AssociateResources

Updated at:

Integrates cloud services with Global Accelerator.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ga:AssociateResources

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

AcceleratorId

string

Yes

The ID of the Global Accelerator instance.

ga-bp1odcab8tmno0hdq****

AssociatedResourceType

string

Yes

The resource type of the associated resource.

Valid values:

  • WAF :

    Web Application Firewall (WAF)

WAF

AssociatedResourceId

string

No

The ID of the associated resource.

waf_xx

AssociatedResourceRegionId

string

Yes

The region of the associated resource.

cn-hangzhou

AssociatedMode

string

No

The association mode. Valid values:

  • Managed: Managed mode. GA restricts user operations based on management policies. Currently, no resources of this type are supported.

  • Associated: Loose coupling mode. This is the default value. GA does not restrict user operations. WAF uses this mode.

Valid values:

  • Associated :

    Loose coupling mode.

  • Managed :

    Managed mode.

Associated

RegionId

string

No

The region ID of the basic Global Accelerator instance. Set the value to cn-hangzhou.

cn-hangzhou

DryRun

boolean

No

Specifies whether to perform a dry run on the request. Valid values:

  • true: performs a dry run and does not associate the resource. The system checks whether required parameters are specified, the request format is valid, and service limits are met. If the request fails the dry run, an error is returned. If the request passes the dry run, an HTTP 2xx status code is returned.

  • false: sends a normal request. This is the default value. If the request passes the dry run, an HTTP 2xx status code is returned and the system creates an endpoint group.

false

Response elements

Element

Type

Description

Example

object

Schema of Response

AcceleratorId

string

The ID of the Global Accelerator instance.

ga-bp1odcab8tmno0hdq****

AssociatedResourceId

string

The ID of the associated resource.

waf_xx

RequestId

string

Id of the request

DE77A7F3-3B74-41C0-A5BC-CAFD188C28B6

Examples

Success response

JSON format

{
  "AcceleratorId": "ga-bp1odcab8tmno0hdq****",
  "AssociatedResourceId": "waf_xx",
  "RequestId": "DE77A7F3-3B74-41C0-A5BC-CAFD188C28B6"
}

Error codes

HTTP status code

Error code

Error message

Description

400 StateError.Accelerator accelerator state %s is illegal The GA instance is in an invalid state %s.
400 NotExist.Accelerator accelerator %s is not exist The GA instance %s does not exist.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.