CreateTargetGroup#

Description#

Request to create a target group.

Request Parameters#

Required parameters#

  • Name — The target group name.

    • Type: String

    • Required: Yes

    • Constraints: 1 to 32 ASCII characters

  • Port — The port on which targets receive requests.

    • Type: Integer

    • Required: Yes

    • Valid range: From 1 to 65535

  • Protocol — The protocol used to route traffic to targets.

    • Type: String

    • Required: Yes

    • Valid values: TCP | UDP

  • TargetType — The target type. A target group may contain targets of one type only.

    • Type: String

    • Required: No

    • Valid values: instance

    • Default value: instance

  • VpcId — The ID of the VPC.

    • Type: String

    • Required: Yes

Optional parameters#

  • HealthCheckIntervalSeconds — Interval between target health checks, in seconds.

    • Type: Integer

    • Required: No

    • Valid values: 10 | 30

    • Default value: 30

  • HealthCheckProtocol — The protocol used to perform health checks on targets.

    • Type: String

    • Required: No

    • Constraints: It must match the protocol used by the target group

    • Valid values: TCP | UDP

  • HealthCheckTimeoutSeconds — Interval between target health checks, in seconds.

    • Type: Integer

    • Required: No

    • Constraints: Cannot be changed for ELB of the network type

    • Default value: 10

  • HealthyThresholdCount — Number of successful health checks after which the target status changes to healthy.

    • Type: Integer

    • Required: No

    • Valid range: From 2 to 10

    • Constraints: The value must match the value of UnhealthyThresholdCount

    • Default value: 3

  • UnhealthyThresholdCount — Number of unsuccessful health checks after which the target status changes to unhealthy.

    • Type: Integer

    • Required: No

    • Valid range: From 2 to 10

    • Constraints: The value must match the value of HealthyThresholdCount

    • Default value: 3

  • Tags.N — Tags assigned to the target group.

    • Type: List of Tag objects

    • Required: No

Response Elements#

  • TargetGroups.N — Information about target groups.

Examples#

c2-elb CreateTargetGroup Name "tgname" VpcId "vpc_id" Port 80 Protocol tcp
c2-elb CreateTargetGroup Name "tgname" VpcId "vpc_id" Port 8080 Protocol udp HealthCheckIntervalSeconds 10