BindAuthToMachine

Updated at:

Binds authorization licenses to servers.

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

yundun-sas:BindAuthToMachine

update

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

Criteria

string

No

Specifies the conditions for searching assets. This parameter is in JSON format and is case-sensitive.

Note

You can search for assets by using conditions such as the instance ID, instance name, VPC ID, region, and public IP address of the asset. You can call the DescribeCriteria operation to query the supported search conditions.

[{"name":"riskStatus","value":"YES"},{"name":"internetIp","value":"1.2.XX.XX"}]

LogicalExp

string

No

Specifies the logical relationship among multiple search conditions. Default value: OR. Valid values:

  • OR: The conditions have an OR logical relationship.

  • AND: The conditions have an AND logical relationship.

OR

BindAll

boolean

No

Specifies whether to bind all assets. Default value: false. Valid values:

  • true: Yes.

  • false: No.

true

AuthVersion

integer

No

Specifies the authorization version of the asset. Valid values:

  • 6: Anti-virus Edition.

  • 5: Premium Edition.

  • 3: Enterprise Edition.

  • 7: Ultimate Edition.

  • 10: Value-added Service Edition.

6

AutoBind

integer

No

Specifies whether to enable automatic binding. Valid values:

  • 0: Disabled.

  • 1: Enabled.

1

IsPreBind

integer

No

Specifies whether the operation is a pre-binding operation. Valid values:

  • 0: No.

  • 1: Yes.

Note

After you enable pre-binding, the system automatically binds the corresponding version of authorization licenses to the specified servers after the purchase is completed.

1

PreBindOrderId

integer

No

The order ID associated with the pre-binding operation.

233016**0482

NtmVersion

string

No

Specifies the order version associated with the pre-binding operation. Valid values:

  • level7: Anti-virus Edition.

  • level3: Premium Edition.

  • level2: Enterprise Edition.

  • level8: Ultimate Edition.

  • level10: Value-added services only.

level2

Bind

array

No

The collection of UUIDs to be bound.

Note

Bind and UnBind cannot be left empty at the same time.

string

No

The UUID of the server to be bound.

Note

You can call the DescribeCloudCenterInstances operation to obtain this parameter.

44f9ee5a-e39d-46bb-833b-5fc2ff47****

UnBind

array

No

The collection of UUIDs to be unbound.

Note

Bind and UnBind cannot be left empty at the same time.

string

No

The UUID of the server to be unbound.

Note

You can call the DescribeCloudCenterInstances operation to obtain this parameter.

3e3c9d79-2880-465d-9e1b-1bc2af7d****

ResourceDirectoryAccountId

integer

No

The ID of the member accounts in the resource folder (Alibaba Cloud account).

Note

You can invoke the DescribeMonitorAccounts operation to obtain this parameter.

16670360956*****

ProductCode

string

No

The product code, which specifies the product for which the authorization is bound. For example, EDR indicates that the EDR authorization is bound.

EDR

ClientToken

string

No

The client token that is used to ensure the idempotence of the request. You must use different tokens for different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.

02fb3da4-130e-11e9-8e44-0016e04115b

DryRun

boolean

No

Specifies whether to perform a dry run on the request. A value of true indicates that only the request is checked and the actual operation is not performed. A value of false indicates that the request is normally executed. Default value: false.

Response elements

Element

Type

Description

Example

object

ResultCode

integer

The status code of the binding result. Valid values:

  • 0: Success.

  • 1: Parameter error.

  • 2: Insufficient server authorization licenses.

  • 3: Insufficient server authorization cores.

2

RequestId

string

The ID of the request. The ID is a unique identifier generated by Alibaba Cloud for the request and can be used to troubleshoot and locate issues.

23AD0BD2-8771-5647-819E-6BA51E212F80

UnBindCount

integer

The number of servers that are successfully unbound.

1

BindCount

integer

The number of servers that are successfully bound.

1

InsufficientEcsCount

integer

The number of servers for which the authorization licenses are insufficient.

1

InsufficientCoreCount

integer

The number of cores for which the authorization licenses are insufficient.

1

Examples

Success response

JSON format

{
  "ResultCode": 2,
  "RequestId": "23AD0BD2-8771-5647-819E-6BA51E212F80",
  "UnBindCount": 1,
  "BindCount": 1,
  "InsufficientEcsCount": 1,
  "InsufficientCoreCount": 1
}

Error codes

HTTP status code

Error code

Error message

Description

400 MissingPreBindVersion The pre-bound version is missing. Missing pre-bound version information
400 -101 Invalid parameter value. Invalid parameter.
400 RdCheckNoPermission Resource directory account verification has no permission.
400 IdempotentParameterMismatch 相同的 ClientToken 被用于不同的请求参数。
500 ServerError ServerError
500 RdCheckInnerError Resource directory account service internal error.
403 NoPermission caller has no permission You are not authorized to do this operation.
409 IdempotentRequestInProgress 使用相同 ClientToken 的请求正在处理中。

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.