VPCLattice / Client / register_targets

register_targets#

VPCLattice.Client.register_targets(**kwargs)#

Registers the targets with the target group. If it’s a Lambda target, you can only have one target in a target group.

See also: AWS API Documentation

Request Syntax

response = client.register_targets(
    targetGroupIdentifier='string',
    targets=[
        {
            'id': 'string',
            'port': 123
        },
    ]
)
Parameters:
  • targetGroupIdentifier (string) –

    [REQUIRED]

    The ID or Amazon Resource Name (ARN) of the target group.

  • targets (list) –

    [REQUIRED]

    The targets.

    • (dict) –

      Describes a target.

      • id (string) – [REQUIRED]

        The ID of the target. If the target type of the target group is INSTANCE, this is an instance ID. If the target type is IP , this is an IP address. If the target type is LAMBDA, this is the ARN of the Lambda function. If the target type is ALB, this is the ARN of the Application Load Balancer.

      • port (integer) –

        The port on which the target is listening. For HTTP, the default is 80. For HTTPS, the default is 443.

Return type:

dict

Returns:

Response Syntax

{
    'successful': [
        {
            'id': 'string',
            'port': 123
        },
    ],
    'unsuccessful': [
        {
            'failureCode': 'string',
            'failureMessage': 'string',
            'id': 'string',
            'port': 123
        },
    ]
}

Response Structure

  • (dict) –

    • successful (list) –

      The targets that were successfully registered.

      • (dict) –

        Describes a target.

        • id (string) –

          The ID of the target. If the target type of the target group is INSTANCE, this is an instance ID. If the target type is IP , this is an IP address. If the target type is LAMBDA, this is the ARN of the Lambda function. If the target type is ALB, this is the ARN of the Application Load Balancer.

        • port (integer) –

          The port on which the target is listening. For HTTP, the default is 80. For HTTPS, the default is 443.

    • unsuccessful (list) –

      The targets that were not registered.

      • (dict) –

        Describes a target failure.

        • failureCode (string) –

          The failure code.

        • failureMessage (string) –

          The failure message.

        • id (string) –

          The ID of the target. If the target type of the target group is INSTANCE, this is an instance ID. If the target type is IP , this is an IP address. If the target type is LAMBDA, this is the ARN of the Lambda function. If the target type is ALB, this is the ARN of the Application Load Balancer.

        • port (integer) –

          The port on which the target is listening. This parameter doesn’t apply if the target is a Lambda function.

Exceptions

  • VPCLattice.Client.exceptions.ValidationException

  • VPCLattice.Client.exceptions.AccessDeniedException

  • VPCLattice.Client.exceptions.ThrottlingException

  • VPCLattice.Client.exceptions.ResourceNotFoundException

  • VPCLattice.Client.exceptions.ConflictException

  • VPCLattice.Client.exceptions.ServiceQuotaExceededException

  • VPCLattice.Client.exceptions.InternalServerException