Creates an access policy.
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 |
---|---|---|---|---|
alidns:AddDnsGtmAccessStrategy | create |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
Lang | string | No | The language of the values for specific response parameters. Default value: en. Valid values: en, zh, and ja. | en |
InstanceId | string | Yes | The instance ID. | instance1 |
StrategyName | string | Yes | The name of the access policy. | testStrategyName |
Lines | string | Yes | The Domain Name System (DNS) request source. For example: | ["default", "drpeng"] |
DefaultAddrPoolType | string | Yes | The type of the primary address pool. Valid values:
| ipv4 |
DefaultLbaStrategy | string | No | The load balancing policy of the primary address pool set. Valid values:
| all_rr |
DefaultMinAvailableAddrNum | integer | Yes | The minimum number of available addresses in the primary address pool set. | 1 |
DefaultMaxReturnAddrNum | integer | No | The maximum number of addresses returned from the primary address pool set. | 3 |
DefaultLatencyOptimization | string | No | Specifies whether to enable DNS resolution with optimal latency for the primary address pool set. Valid values:
| open |
FailoverAddrPoolType | string | No | The type of the secondary address pool. Valid values:
| ipv4 |
FailoverLbaStrategy | string | No | The load balancing policy of the secondary address pool set. Valid values:
| all_rr |
FailoverMinAvailableAddrNum | integer | No | The minimum number of available addresses in the secondary address pool set. | 1 |
FailoverMaxReturnAddrNum | integer | No | The maximum number of addresses returned from the secondary address pool set. | 1 |
FailoverLatencyOptimization | string | No | Specifies whether to enable DNS resolution with optimal latency for the secondary address pool set. Valid values:
| open |
StrategyMode | string | Yes | The type of the access policy. Valid values:
| geo |
DefaultAddrPool | array<object> | Yes | The address pools in the primary address pool set. | |
object | Yes | |||
LbaWeight | integer | No | The weight of the address pool in the primary address pool set. | 1 |
Id | string | No | The ID of the address pool in the primary address pool set. | pool1 |
FailoverAddrPool | array<object> | No | The address pools in the secondary address pool set. If no address pool exists in the secondary address pool set, set this parameter to EMPTY. | |
object | No | |||
LbaWeight | integer | No | The weight of the address pool in the secondary address pool set. | 1 |
Id | string | No | The ID of the address pool in the secondary address pool set. | pool1 |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "29D0F8F8-5499-4F6C-9FDC-1EE13BF55925",
"StrategyId": "testStrategyId1"
}
Error codes
HTTP status code | Error code | Error message |
---|---|---|
400 | DnsGtmSystemBusyness |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-03-21 | The Error code has changed | View Change Details |