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 group type is INSTANCE, this is an instance ID. If the target group type is IP, this is an IP address. If the target group type is LAMBDA, this is the ARN of a Lambda function. If the target group type is ALB, this is the ARN of an 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 group type is INSTANCE, this is an instance ID. If the target group type is IP, this is an IP address. If the target group type is LAMBDA, this is the ARN of a Lambda function. If the target group type is ALB, this is the ARN of an 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 group type is INSTANCE, this is an instance ID. If the target group type is IP, this is an IP address. If the target group type is LAMBDA, this is the ARN of a Lambda function. If the target group type is ALB, this is the ARN of an 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