All Products
Search
Document Center

Alibaba Cloud DNS:AddDnsGtmAccessStrategy

Last Updated:Oct 24, 2024

Creates an access policy.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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.
OperationAccess levelResource typeCondition keyAssociated operation
alidns:AddDnsGtmAccessStrategycreate
  • gtmInstance
    acs:alidns::{#accountId}:gtmInstance/{#gtmInstanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
LangstringNo

The language of the values for specific response parameters. Default value: en. Valid values: en, zh, and ja.

en
InstanceIdstringYes

The instance ID.

instance1
StrategyNamestringYes

The name of the access policy.

testStrategyName
LinesstringYes

The Domain Name System (DNS) request source. For example: ["default", "drpeng"] indicates Global and Dr. Peng Group.

["default", "drpeng"]
DefaultAddrPoolTypestringYes

The type of the primary address pool. Valid values:

  • IPV4
  • IPV6
  • DOMAIN
ipv4
DefaultLbaStrategystringNo

The load balancing policy of the primary address pool set. Valid values:

  • ALL_RR: returns all addresses.
  • RATIO: returns addresses by weight.
all_rr
DefaultMinAvailableAddrNumintegerYes

The minimum number of available addresses in the primary address pool set.

1
DefaultMaxReturnAddrNumintegerNo

The maximum number of addresses returned from the primary address pool set.

3
DefaultLatencyOptimizationstringNo

Specifies whether to enable DNS resolution with optimal latency for the primary address pool set. Valid values:

  • OPEN
  • CLOSE
open
FailoverAddrPoolTypestringNo

The type of the secondary address pool. Valid values:

  • IPV4
  • IPV6
  • DOMAIN
ipv4
FailoverLbaStrategystringNo

The load balancing policy of the secondary address pool set. Valid values:

  • ALL_RR: returns all addresses.
  • RATIO: returns addresses by weight.
all_rr
FailoverMinAvailableAddrNumintegerNo

The minimum number of available addresses in the secondary address pool set.

1
FailoverMaxReturnAddrNumintegerNo

The maximum number of addresses returned from the secondary address pool set.

1
FailoverLatencyOptimizationstringNo

Specifies whether to enable DNS resolution with optimal latency for the secondary address pool set. Valid values:

  • OPEN
  • CLOSE
open
StrategyModestringYes

The type of the access policy. Valid values:

  • GEO: geographical location-based access policy
  • LATENCY: latency-based access policy
geo
DefaultAddrPoolarray<object>Yes

The address pools in the primary address pool set.

objectYes
LbaWeightintegerNo

The weight of the address pool in the primary address pool set.

1
IdstringNo

The ID of the address pool in the primary address pool set.

pool1
FailoverAddrPoolarray<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.

objectNo
LbaWeightintegerNo

The weight of the address pool in the secondary address pool set.

1
IdstringNo

The ID of the address pool in the secondary address pool set.

pool1

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

29D0F8F8-5499-4F6C-9FDC-1EE13BF55925
StrategyIdstring

The ID of the access policy.

testStrategyId1

Examples

Sample success responses

JSONformat

{
  "RequestId": "29D0F8F8-5499-4F6C-9FDC-1EE13BF55925",
  "StrategyId": "testStrategyId1"
}

Error codes

HTTP status codeError codeError message
400DnsGtmSystemBusyness

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-03-21The Error code has changedView Change Details