createTargetGroup
- Print
- PDF
createTargetGroup
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Can be used in a VPC environment.
Overview
Creates target groups.
The created target groups can be used in load balancers or Auto Scaling Groups.
Request
Request parameter
Parameter name | Requirement status | Type | Restrictions | Description |
---|---|---|---|---|
regionCode | No | String | - Region code Determines the region in which the target group will be created. regionCode can be obtained through the getRegionList action. Default: Selects the first region of the getRegionList search results. | |
vpcNo | Yes | String | - VPC number Determines the VPC where the target group will be created. vpcNo can be obtained through the getVpcList action. | |
targetGroupName | No | String | Min : 3, Max : 30 Only English letters, numbers, and "-" can be used, and this must start with an English letter. It must end with an English letter or number. | - Target group name Default: NAVER Cloud Platform automatically assigns it. |
targetTypeCode | No | String | - Target type code Determines the target type that will be added to the target group. Options : VSVR (Server (VPC)) | |
targetGroupProtocolTypeCode | Yes | String | - Target group protocol type code Determines the target group's protocol type. Options : TCP | UDP | PROXY_TCP | HTTP | HTTPS The available type of load balancers for application is decided, depending on the protocol in use. Network Load Balancer : TCP / UDP Network Proxy Load Balancer : PROXY_TCP Application Load Balancer : HTTP / HTTPS The UDP protocol can only be used in the SGN (Singapore) region. | |
targetGroupPort | No | Integer | Min : 1, Max : 65534 | - Target group port Determines the port number that will be used in the target group. Default : 80 |
targetGroupDescription | No | String | Min : 0, Max : 1000 Bytes | Description of the target group to be created |
healthCheckProtocolTypeCode | Yes | String | - Health check protocol type code Determines the protocol type to use for the health check. Options : TCP | HTTP | HTTPS The selectable health check protocol types are limited, depending on the target group protocol type. TCP / PROXY_TCP : TCP HTTP / HTTPS : HTTP / HTTPS | |
healthCheckPort | No | Integer | Min : 1, Max : 65534 | - Health check port Specifies the port to use for the health check. Default : 80 |
healthCheckUrlPath | No | String | - Health check URL path Specifies the URL path to use for the health check. It is only valid if the health check protocol type is either HTTP or HTTPS. Enter the URL path starting with / .Default : / | |
healthCheckHttpMethodTypeCode | Conditional | String | - Health check HTTP method type code Determines the HTTP method to use for the health check. It must be entered it if the health check protocol type is either HTTP or HTTPS. Options : HEAD | GET | |
healthCheckCycle | No | Integer | Min: 5, Max: 300 (seconds) | - Health check interval Determines the health check interval. Default: 30 seconds |
healthCheckUpThreshold | No | Integer | Min : 2, Max : 10 | - Health check normal threshold Specifies the number of consecutive successful status checks required before the health check result is considered normal. Default : 2 |
healthCheckDownThreshold | No | Integer | Min : 2, Max : 10 | - Health check failure threshold Specifies the number of consecutive successful status checks required before the health check result is considered failed. Default : 2 |
targetNoList.N | No | List | - List of target numbers Specifies the list of targets that will be bound to the target group. targetNo can be obtained through the get action corresponding to targetTypeCode. ex) targetNoList.1=1234&targetNoList.2=2345 | |
responseFormatType | No | String | - Format type of the response result Options : xml | json Default : xml |
Response
Response data type
- TargetGroupList type
TargetGroupList extends CommonResponse |
---|
private Integer totalRows; |
private List |
TargetGroup |
---|
private String targetGroupNo; |
private String targetGroupName; |
private CommonCode targetType; |
private String vpcNo; |
private CommonCode targetGroupProtocolType; |
private Integer targetGroupPort; |
private String targetGroupDescription; |
private Boolean useStickySession; |
private Boolean useProxyProtocol; |
private CommonCode algorithmType; |
private Date createDate; |
private String regionCode; |
private String loadBalancerInstanceNo; |
private CommonCode healthCheckProtocolType; |
private Integer healthCheckPort; |
private String healthCheckUrlPath; |
private CommonCode healthCheckHttpMethodType; |
private Integer healthCheckCycle; |
private Integer healthCheckUpThreshold; |
private Integer healthCheckDownThreshold; |
private TargetNoList targetNoList; |
TargetNoList |
---|
private List |
Examples
Request examples
ncloud vloadbalancer createTargetGroup --regionCode KR --vpcNo ***04 --targetGroupName test-*** --targetTypeCode VSVR --targetGroupProtocolTypeCode VSVR --targetGroupPort 80 --healthCheckProtocolTypeCode HTTP --healthCheckPort 80 --healthCheckUrlPath / --healthCheckHttpMethodTypeCode GET --healthCheckCycle 30 --healthCheckUpThreshold 2 --healthCheckDownThreshold 2
Response examples
<createTargetGroupResponse>
<requestId>b644e5ed-6ca8-48d5-9b7f-2a3549ef3c96</requestId>
<returnCode>0</returnCode>
<returnMessage>success</returnMessage>
<totalRows>1</totalRows>
<targetGroupList>
<targetGroup>
<targetGroupNo>***095</targetGroupNo>
<targetGroupName>test-***</targetGroupName>
<targetType>
<code>VSVR</code>
<codeName>Server (VPC)</codeName>
</targetType>
<vpcNo>***04</vpcNo>
<targetGroupProtocolType>
<code>HTTP</code>
<codeName>HTTP protocol</codeName>
</targetGroupProtocolType>
<targetGroupPort>80</targetGroupPort>
<targetGroupDescription></targetGroupDescription>
<useStickySession>false</useStickySession>
<useProxyProtocol>false</useProxyProtocol>
<algorithmType>
<code>RR</code>
<codeName>Round Robin</codeName>
</algorithmType>
<createDate>2020-12-17T21:06:45+0900</createDate>
<regionCode>KR</regionCode>
<loadBalancerInstanceNo></loadBalancerInstanceNo>
<healthCheckProtocolType>
<code>HTTP</code>
<codeName>HTTP protocol</codeName>
</healthCheckProtocolType>
<healthCheckPort>80</healthCheckPort>
<healthCheckUrlPath>/</healthCheckUrlPath>
<healthCheckHttpMethodType>
<code>GET</code>
<codeName>get</codeName>
</healthCheckHttpMethodType>
<healthCheckCycle>30</healthCheckCycle>
<healthCheckUpThreshold>2</healthCheckUpThreshold>
<healthCheckDownThreshold>2</healthCheckDownThreshold>
<targetNoList/>
</targetGroup>
</targetGroupList>
</createTargetGroupResponse>
Was this article helpful?