Updated on 2025-02-25 GMT+08:00

Auto Scaling (AS)

The Organizations service provides Service Control Policies (SCPs) to set access control policies.

SCPs do not actually grant any permissions to a principal. They only set the permissions boundary for the principal. When SCPs are attached to a member account or an organizational unit (OU), they do not directly grant permissions to that member account or OU. Instead, the SCPs just determine what permissions are available for that member account or the member accounts under that OU.

This section describes the elements used by Organizations SCPs. The elements include actions, resources, and conditions.

For details about how to use these elements to create a custom SCP, see Creating an SCP.

Actions

Actions are specific operations that are allowed or denied in an SCP.

  • The Access Level column describes how the action is classified (List, Read, or Write). This classification helps you understand the level of access that an action grants when you use it in an SCP.
  • The Resource Type column indicates whether the action supports resource-level permissions.
    • You can use a wildcard (*) to indicate all resource types. If this column is empty (-), the action does not support resource-level permissions, and you must specify all resources ("*") in your SCP statements.
    • If this column includes a resource type, you must specify the URN in the Resource element of your statements.
    • Required resources are marked with asterisks (*) in the table. If you specify a resource in a statement using this action, then it must be of this type.

    For details about the resource types defined by AS, see Resources.

  • The Condition Key column contains keys that you can specify in the Condition element of an SCP statement.
    • If the Resource Type column has values for an action, the condition key takes effect only for the listed resource types.
    • If the Resource Type column is empty (-) for an action, the condition key takes effect for all resources that action supports.
    • If the Condition Key column is empty (-) for an action, the action does not support any condition keys.

    For details about the condition keys defined by AS, see Conditions.

The following table lists the actions that you can define in SCP statements for AS.

Table 1 Actions supported by AS

Action

Description

Access Level

Resource Type (*: required)

Condition Key

as:scalingGroup:create

Grants permission to create an AS group.

write

-

  • g:EnterpriseProjectId
  • g:RequestTag/<tag-key>
  • g:TagKeys
  • as:ScalingConfigId
  • as:VpcId
  • as:VpcSubnetId
  • as:ElbPoolId
  • as:MaxInstanceSize
  • as:MinInstanceSize

as:scalingGroup:delete

Grants permission to delete an AS group.

write

scalingGroup*

  • g:EnterpriseProjectId
  • g:ResourceTag/<tag-key>

as:scalingGroup:list

Grants permission to list AS groups.

list

-

g:EnterpriseProjectId

as:scalingGroup:get

Grants permission to query AS group details.

read

scalingGroup*

  • g:EnterpriseProjectId
  • g:ResourceTag/<tag-key>

as:scalingGroup:update

Grants permission to modify an AS group.

write

-

  • g:EnterpriseProjectId
  • as:ScalingConfigId
  • as:VpcSubnetId
  • as:ElbPoolId
  • as:MaxInstanceSize
  • as:MinInstanceSize

as:scalingGroup:resume

Grants permission to enable an AS group.

write

scalingGroup*

  • g:EnterpriseProjectId
  • g:ResourceTag/<tag-key>

as:scalingGroup:pause

Grants permission to disable an AS group.

write

scalingGroup*

  • g:EnterpriseProjectId
  • g:ResourceTag/<tag-key>

as:scalingConfig:create

Grants permission to create an AS configuration.

write

-

  • as:EcsInstanceId
  • as:EcsInstanceType
  • as:EcsFlavorId
  • as:ImageId
  • as:ImsDiskImageId
  • as:CbrDiskSnapshotId
  • as:EcsServerGroupId
  • as:EvsEncrypted
  • as:KmsKeyId
  • as:EvsVolumeType
  • as:KpsSSHKeyPairName
  • as:AssociatePublicIp

as:scalingConfig:delete

Grants permission to delete an AS configuration.

write

scalingConfig*

-

as:scalingConfig:batchDelete

Grants permission to delete AS configurations.

write

scalingConfig*

-

as:scalingConfig:list

Grants permission to list AS configurations.

list

scalingConfig*

-

as:scalingConfig:get

Grants permission to query AS configuration details.

read

scalingConfig*

-

as:scalingGroup:batchAddInstances

Grants permission to add instances to an AS group.

write

scalingGroup*

  • g:EnterpriseProjectId
  • g:ResourceTag/<tag-key>

as:scalingGroup:batchRemoveInstances

Grants permission to delete instances from an AS group.

write

scalingGroup*

  • g:EnterpriseProjectId
  • g:ResourceTag/<tag-key>

as:scalingGroup:batchSetInstancesProtect

Grants permission to enable instance protection for instances.

write

scalingGroup*

  • g:EnterpriseProjectId
  • g:ResourceTag/<tag-key>

as:scalingGroup:batchSetInstancesUnprotect

Grants permission to disable instance protection for instances.

write

scalingGroup*

  • g:EnterpriseProjectId
  • g:ResourceTag/<tag-key>

as:scalingGroup:batchSetInstancesStandby

Grants permission to put instances into the standby status.

write

scalingGroup*

  • g:EnterpriseProjectId
  • g:ResourceTag/<tag-key>

as:scalingGroup:batchSetInstancesExitStandby

Grants permission to move instances out of the standby status.

write

scalingGroup*

  • g:EnterpriseProjectId
  • g:ResourceTag/<tag-key>

as:scalingGroup:deleteInstance

Grants permission to delete instances from an AS group.

write

scalingGroup*

  • g:EnterpriseProjectId
  • g:ResourceTag/<tag-key>

as:scalingGroup:listInstances

Grants permission to list instances in an AS group.

list

scalingGroup*

  • g:EnterpriseProjectId
  • g:ResourceTag/<tag-key>

as:scalingPolicy:create

Grants permission to create an AS policy.

write

-

g:EnterpriseProjectId

as:scalingPolicy:list

Grants permission to list AS policies.

list

-

g:EnterpriseProjectId

as:scalingPolicy:get

Grants permission to query AS policy details.

read

scalingPolicy*

g:EnterpriseProjectId

as:scalingPolicy:update

Grants permission to modify an AS policy.

write

-

g:EnterpriseProjectId

as:scalingPolicy:delete

Grants permission to delete an AS policy.

write

scalingPolicy*

g:EnterpriseProjectId

as:scalingPolicy:execute

Grants permission to execute an AS policy.

write

scalingPolicy*

g:EnterpriseProjectId

as:scalingPolicy:resume

Grants permission to enable an AS policy.

write

scalingPolicy*

g:EnterpriseProjectId

as:scalingPolicy:pause

Grants permission to disable an AS policy.

write

scalingPolicy*

g:EnterpriseProjectId

as:scalingPolicy:batchPause

Grants permission to disable AS policies.

write

scalingPolicy*

g:EnterpriseProjectId

as:scalingPolicy:batchResume

Grants permission to enable AS policies.

write

scalingPolicy*

g:EnterpriseProjectId

as:scalingPolicy:batchDelete

Grants permission to delete AS policies.

write

scalingPolicy*

g:EnterpriseProjectId

as:scalingPolicy:listAll

Grants permission to list AS policies of a tenant.

list

-

g:EnterpriseProjectId

as:scalingGroup:listActivityLogs

Grants permission to query scaling action logs.

list

scalingGroup*

  • g:EnterpriseProjectId
  • g:ResourceTag/<tag-key>

as:scalingPolicy:listExecuteLogs

Grants permission to query AS policy execution logs.

list

scalingPolicy*

g:EnterpriseProjectId

as::tagResource

Grants permission to add tags.

tagging

-

  • g:EnterpriseProjectId
  • g:RequestTag/<tag-key>
  • g:TagKeys

as::untagResource

Grants permission to delete tags.

tagging

-

  • g:EnterpriseProjectId
  • g:RequestTag/<tag-key>
  • g:TagKeys

as::listTags

Grants permission to query tags of all resources.

list

-

-

as::listTagsForResource

Grants permission to query tags of a resource.

list

-

g:EnterpriseProjectId

as::listResourcesByTag

Grants permission to query resources by tag.

list

-

  • g:RequestTag/<tag-key>
  • g:TagKeys

as:scalingGroup:createLifecycleHook

Grants permission to create a lifecycle hook.

write

-

g:EnterpriseProjectId

as:scalingGroup:listLifecycleHooks

Grants permission to list lifecycle hooks.

list

scalingGroup*

  • g:EnterpriseProjectId
  • g:ResourceTag/<tag-key>

as:scalingGroup:getLifecycleHook

Grants permission to query lifecycle hook details.

read

scalingGroup*

  • g:EnterpriseProjectId
  • g:ResourceTag/<tag-key>

as:scalingGroup:updateLifecycleHook

Grants permission to modify a lifecycle hook.

write

-

g:EnterpriseProjectId

as:scalingGroup:deleteLifecycleHook

Grants permission to delete a lifecycle hook.

write

scalingGroup*

  • g:EnterpriseProjectId
  • g:ResourceTag/<tag-key>

as:scalingGroup:callbackInstanceHook

Grants permission to call back a lifecycle hook.

write

scalingGroup*

  • g:EnterpriseProjectId
  • g:ResourceTag/<tag-key>

as:scalingGroup:listInstanceHooks

Grants permission to query suspended instances.

list

scalingGroup*

  • g:EnterpriseProjectId
  • g:ResourceTag/<tag-key>

as:scalingGroup:createNotification

Grants permission to create notifications.

write

-

g:EnterpriseProjectId

as:scalingGroup:listNotifications

Grants permission to query notifications.

list

scalingGroup*

  • g:EnterpriseProjectId
  • g:ResourceTag/<tag-key>

as:scalingGroup:deleteNotification

Grants permission to delete notifications.

write

scalingGroup*

  • g:EnterpriseProjectId
  • g:ResourceTag/<tag-key>

as:scalingGroup:getQuotas

Grants permission to query instance and AS policy quotas.

read

-

g:EnterpriseProjectId

as::listQuotas

Grants permission to query instance and AS policy quotas.

read

-

-

Each API of AS usually supports one or more actions. Table 2 lists the actions and dependencies supported by AS APIs.

Table 2 Actions and dependencies supported by AS APIs

API

Action

Dependencies

POST /autoscaling-api/v1/{project_id}/scaling_group

as:scalingGroup:create

-

DELETE /autoscaling-api/v1/{project_id}/scaling_group/{scaling_group_id}

as:scalingGroup:delete

-

GET /autoscaling-api/v1/{project_id}/scaling_group

as:scalingGroup:list

-

GET /autoscaling-api/v1/{project_id}/scaling_group/{scaling_group_id}

as:scalingGroup:get

-

PUT /autoscaling-api/v1/{project_id}/scaling_group/{scaling_group_id}

as:scalingGroup:update

-

POST /autoscaling-api/v1/{project_id}/scaling_group/{scaling_group_id}/action

as:scalingGroup:resume

-

POST /autoscaling-api/v1/{project_id}/scaling_group/{scaling_group_id}/action

as:scalingGroup:pause

-

POST /autoscaling-api/v1/{project_id}/scaling_configurationCreateScalingConfig

as:scalingConfig:create

-

DELETE /autoscaling-api/v1/{project_id}/scaling_configuration/{scaling_configuration_id}

as:scalingConfig:delete

-

POST /autoscaling-api/v1/{project_id}/scaling_configurations

as:scalingConfig:batchDelete

-

GET /autoscaling-api/v1/{project_id}/scaling_configuration

as:scalingConfig:list

-

GET /autoscaling-api/v1/{project_id}/scaling_configuration/{scaling_configuration_id}

as:scalingConfig:get

-

POST /autoscaling-api/v1/{project_id}/scaling_group_instance/{scaling_group_id}/action

  • as:scalingGroup:batchAddInstances
  • as:scalingGroup:batchSetInstancesProtect
  • as:scalingGroup:batchRemoveInstances
  • as:scalingGroup:batchSetInstancesStandby
  • as:scalingGroup:batchSetInstancesUnprotect
  • as:scalingGroup:batchSetInstancesExitStandby

-

DELETE /autoscaling-api/v1/{project_id}/scaling_group_instance/{instance_id}

as:scalingGroup:deleteInstance

-

GET /autoscaling-api/v1/{project_id}/scaling_group_instance/{scaling_group_id}/list

as:scalingGroup:listInstances

-

POST /autoscaling-api/v1/{project_id}/scaling_policy

as:scalingPolicy:create

-

GET /autoscaling-api/v1/{project_id}/scaling_policy/{scaling_group_id}/list

as:scalingPolicy:list

-

GET /autoscaling-api/v1/{project_id}/scaling_policy/{scaling_policy_id}

as:scalingPolicy:get

-

PUT /autoscaling-api/v1/{project_id}/scaling_policy/{scaling_policy_id}

as:scalingPolicy:update

-

DELETE /autoscaling-api/v1/{project_id}/scaling_policy/{scaling_policy_id}

as:scalingPolicy:delete

-

POST /autoscaling-api/v1/{project_id}/scaling_policy/{scaling_policy_id}/action

  • as:scalingPolicy:resume
  • as:scalingPolicy:pause
  • as:scalingPolicy:execute

-

POST /autoscaling-api/v1/{project_id}/scaling_policies/action

as:scalingPolicy:batchDelete

as:scalingPolicy:batchPause

as:scalingPolicy:batchResume

-

POST /autoscaling-api/v2/{project_id}/scaling_policy

as:scalingPolicy:create

-

GET /autoscaling-api/v2/{project_id}/scaling_policy

as:scalingPolicy:listAll

-

GET /autoscaling-api/v2/{project_id}/scaling_policy/{scaling_resource_id}/list

as:scalingPolicy:list

-

GET /autoscaling-api/v2/{project_id}/scaling_policy/{scaling_policy_id}

as:scalingPolicy:get

-

PUT /autoscaling-api/v2/{project_id}/scaling_policy/{scaling_policy_id}

as:scalingPolicy:update

-

GET /autoscaling-api/v1/{project_id}/scaling_activity_log/{scaling_group_id}

as:scalingGroup:listActivityLogs

-

GET /autoscaling-api/v2/{project_id}/scaling_activity_log/{scaling_group_id}

as:scalingGroup:listActivityLogs

-

GET /autoscaling-api/v1/{project_id}/scaling_policy_execute_log/{scaling_policy_id}

as:scalingPolicy:listExecuteLogs

-

POST /autoscaling-api/v1/{project_id}/{resource_type}/{resource_id}/tags/action

as::tagResource

-

POST /autoscaling-api/v1/{project_id}/{resource_type}/{resource_id}/tags/action

as::untagResource

-

GET /autoscaling-api/v1/{project_id}/{resource_type}/tags

as::listTags

-

GET /autoscaling-api/v1/{project_id}/{resource_type}/{resource_id}/tags

as::listTagsForResource

-

POST /autoscaling-api/v1/{project_id}/{resource_type}/resource_instances/action

as::listResourcesByTag

-

POST /autoscaling-api/v1/{project_id}/scaling_lifecycle_hook/{scaling_group_id}

as:scalingGroup:createLifecycleHook

-

GET /autoscaling-api/v1/{project_id}/scaling_lifecycle_hook/{scaling_group_id}/list

as:scalingGroup:listLifecycleHooks

-

GET /autoscaling-api/v1/{project_id}/scaling_lifecycle_hook/{scaling_group_id}/{lifecycle_hook_name}

as:scalingGroup:getLifecycleHook

-

PUT /autoscaling-api/v1/{project_id}/scaling_lifecycle_hook/{scaling_group_id}/{lifecycle_hook_name}

as:scalingGroup:updateLifecycleHook

-

DELETE /autoscaling-api/v1/{project_id}/scaling_lifecycle_hook/{scaling_group_id}/{lifecycle_hook_name}

as:scalingGroup:deleteLifecycleHook

-

PUT /autoscaling-api/v1/{project_id}/scaling_instance_hook/{scaling_group_id}/callback

as:scalingGroup:callbackInstanceHook

-

GET /autoscaling-api/v1/{project_id}/scaling_instance_hook/{scaling_group_id}/list

as:scalingGroup:listInstanceHooks

-

PUT /autoscaling-api/v1/{project_id}/scaling_notification/{scaling_group_id}

as:scalingGroup:createNotification

-

DELETE /autoscaling-api/v1/{project_id}/scaling_notification/{scaling_group_id}/{topic_urn}

as:scalingGroup:deleteNotification

-

GET /autoscaling-api/v1/{project_id}/scaling_notification/{scaling_group_id}

as:scalingGroup:listNotifications

-

GET /autoscaling-api/v1/{project_id}/quotas/{scaling_group_id}

as:scalingGroup:getQuotas

-

GET /autoscaling-api/v1/{project_id}/quotas

as::listQuotas

-

Resources

A resource type indicates the resources that an SCP applies to. If you specify a resource type for any action in Table 3, the resource URN must be specified in the SCP statements using that action, and the SCP applies only to resources of this type. If no resource type is specified, the Resource element is marked with an asterisk (*) and the SCP applies to all resources. You can also set condition keys in an SCP to define resource types.

The following table lists the resource types that you can define in SCP statements for AS.

Table 3 Resource types supported by AS

Resource Type

URN

scalingGroup

as:<region>:<account-id>:scalingGroup:<scaling-group-id>

scalingConfig

as:<region>:<account-id>:scalingConfig:<scaling-config-id>

scalingPolicy

as:<region>:<account-id>:scalingPolicy:<scaling-policy-id>

Conditions

A Condition element lets you specify conditions for when an SCP is in effect. It contains condition keys and operators.

  • The condition key that you specify can be a global condition key or a service-specific condition key.
    • Global condition keys (with the g: prefix) apply to all actions. Cloud services do not need to provide user identity information. Instead, the system automatically obtains such information and authenticates users. For details, see Global Condition Keys.
    • Service-specific condition keys (with the abbreviation of a service name plus a colon as the prefix, for example, as:) only apply to operations of the BMS service. For details, see Table 4.
    • The number of values associated with a condition key in the request context of an API call makes the condition key single-valued or multivalued. Single-valued condition keys have at most one value in the request context of an API call. Multivalued condition keys can have multiple values in the request context of an API call. For example, a request can originate from at most one VPC endpoint, so g:SourceVpce is a single-valued condition key. You can tag resources and include multiple tag key-value pairs in a request, so g:TagKeys is a multivalued condition key.
    • A condition operator, condition key, and a condition value together constitute a complete condition statement. An SCP can be applied only when its request conditions are met. For supported condition operators, see Condition operators.

The following table lists the condition keys that you can define in SCPs for AS. You can include these condition keys to specify conditions for when your SCP is in effect.

Table 4 Service-specific condition keys supported by AS

Service-specific Condition Key

Type

Single-valued/Multivalued

Description

as:ScalingConfigId

String

Single-valued

Filters access by AS configuration ID.

as:VpcId

String

Single-valued

Filters access by VPC ID.

as:VpcSubnetId

String

Multivalued

Filters access by subnet ID.

as:ElbPoolId

String

Multivalued

Filters access by ELB backend server group ID.

as:MaxInstanceSize

Integer

Single-valued

Filters access by the maximum number of instances in an AS group.

as:MinInstanceSize

Integer

Single-valued

Filters access by the minimum number of instances in an AS group.

as:EcsInstanceId

String

Single-valued

Filters access by the ECS ID used for AS configuration creation.

as:EcsInstanceType

String

Single-valued

Filters access by the spot or pay-per-use billing mode.

as:EcsFlavorId

String

Multivalued

Filters access by the flavor ID used for ECS creation.

as:ImageId

String

Single-valued

Filters access by the image ID used for ECS creation.

as:ImsDiskImageId

String

Multivalued

Filters access by the disk image ID used for ECS creation.

as:CbrDiskSnapshotId

String

Multivalued

Filters access by the disk backup ID used for ECS creation.

as:EcsServerGroupId

String

Single-valued

Filters access by the ECS group ID used for ECS creation.

as:EvsEncrypted

Boolean

Single-valued

Filters access based on whether disk encryption is enabled.

as:KmsKeyId

String

Multivalued

Filters access by the key ID used for disk encryption.

as:EvsVolumeType

String

Multivalued

Filters access by the disk type used for ECS creation.

as:KpsSSHKeyPairName

String

Single-valued

Filters access by the key pair name used for ECS creation.

as:AssociatePublicIp

Boolean

Single-valued

Filters access based on whether auto EIP assignment is enabled.