Modifies the traffic policies for an endpoint that is associated with a custom routing listener.
Operation description
-
UpdateCustomRoutingEndpointTrafficPolicies is an asynchronous operation. After you send a request, the system returns a request ID and runs the task in the background. You can call the DescribeCustomRoutingEndpointGroup operation to query the status of the task.
- If the endpoint group is in the updating state, traffic policies are being modified for endpoints in the endpoint group. In this case, you can perform only query operations.
- If the endpoint group is in the active state, traffic policies are modified for endpoints in the endpoint group.
-
The UpdateCustomRoutingEndpointTrafficPolicies operation cannot be repeatedly called for the same Global Accelerator (GA) instance within a specific period of time.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
ga:UpdateCustomRoutingEndpointTrafficPolicies | update |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID of the Global Accelerator (GA) instance. Set the value to cn-hangzhou. | cn-hangzhou |
ClientToken | string | No | The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters. Note
If you do not specify this parameter, the system automatically uses the request ID as the client token. The request ID may be different for each request.
| 123e4567-e89b-12d3-a456-426655440000 |
EndpointId | string | Yes | The ID of the endpoint for which you want to modify the traffic policies. | ep-2zewuzypq5e6r3pfh**** |
PolicyConfigurations | array<object> | Yes | The access policies. You can specify a maximum of 500 traffic policies for each endpoint. | |
object | Yes | The traffic policies. You can specify up to 500 destination IP addresses for each endpoint. | ||
PolicyId | string | No | The ID of the traffic policy that you want to modify. Note
This parameter is required.
| ply-bptest2**** |
Address | string | No | The IP address of the destination which to allow traffic. This parameter takes effect only when you set the TrafficToEndpointPolicy parameter to AllowCustom. You can call the DescribeCustomRoutingEndpoint operation to query the traffic policy of an endpoint. You can specify a maximum of 500 traffic policies for each endpoint. Note
This parameter is required.
| 10.0.XX.XX |
PortRanges | array<object> | No | The port range of the destination to which traffic is forwarded. The value of this parameter must fall within the port range of the endpoint group. If you do not specify object, traffic is forwarded to all ports. This parameter takes effect only when you set the TrafficToEndpointPolicy parameter to AllowCustom. You can call the DescribeCustomRoutingEndpoint operation to query the traffic policy of an endpoint. You can specify a maximum of 500 port ranges for each endpoint and a maximum of 10 port ranges for each traffic policy. | |
object | No | The port range of the destination to which traffic is allowed. The value of this parameter must fall within the port range of the backend service. If you do not specify object, traffic is forwarded to all ports. This parameter takes effect only when TrafficToEndpointPolicy is set to AllowCustom. You can call the DescribeCustomRoutingEndpoint operation to query the traffic policy for the specified endpoint. You can specify port ranges for up to 500 traffic destinations in each endpoint and specify up to 10 port ranges for each traffic destination. | ||
FromPort | integer | No | The first port of the destination port range. The value of this parameter must fall within the port range of the backend service. This parameter takes effect only when you set the TrafficToEndpointPolicy parameter to AllowCustom. You can call the DescribeCustomRoutingEndpoint operation to query the traffic policy of an endpoint. If the start port and end port values are empty, traffic on all ports of the destination is allowed. You can specify a maximum of 500 port ranges for each endpoint and a maximum of 10 port ranges for each traffic policy. | 80 |
ToPort | integer | No | The last port of the destination port range. The value of this parameter must fall within the port range of the backend service. This parameter takes effect only when you set the TrafficToEndpointPolicy parameter to AllowCustom. You can call the DescribeCustomRoutingEndpoint operation to query the traffic policy of an endpoint. If the start port and end port values are empty, traffic on all ports of the destination is allowed. You can specify a maximum of 500 port ranges for each endpoint and a maximum of 10 port ranges for each traffic policy. | 80 |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368",
"PolicyIds": [
"ply-bptest2****"
]
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-07-11 | The Error code has changed | View Change Details |