Updated on 2025-11-07 GMT+08:00

Elastic Cloud Server (ECS)

IAM provides system-defined identity policies to define common actions supported by cloud services. You can also create custom identity policies using the actions supported by cloud services for more refined access control.

In addition to IAM, the Organizations service also provides Service Control Policies (SCPs) to set access control policies.

SCPs do not actually grant any permissions to an entity. They only set the permissions boundary for the entity. 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. The granted permissions can be applied only if they are allowed by the SCPs.

To learn more about how IAM is different from Organizations for access control, see What Are the Differences in Access Control Between IAM and Organizations?

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

Actions

Actions are specific operations that are allowed or denied in an identity policy.

  • 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 identity policy.
  • 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 identity policy 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 ECS, see Resources.

  • The Condition Key column contains keys that you can specify in the Condition element of an identity policy 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 ECS, see Conditions.

  • The Alias column lists the policy actions that are configured in identity policies. With these actions, you can use APIs for policy-based authorization. For details, see Policies and Identity Policies.

The following table lists the actions that you can define in identity policy statements for ECS.

Table 1 Actions supported by ECS

Action

Description

Access Level

Resource Type (*: required)

Condition Key

Alias

ecs:cloudServers:createServers

Grants permission to create ECSs.

write

-

ecs:cloudServers:create

ecs:cloudServers:deleteServers

Grants permission to delete ECSs.

write

instance *

-

ecs:cloudServers:delete

ecs:cloudServers:resize

Grants permission to modify ECS specifications.

write

instance *

ecs:FlavorId

-

ecs:cloudServers:attachSharedVolume

Grants permission to attach a specified shared EVS disk to multiple ECSs in a batch.

write

instance *

-

ecs:cloudServers:showServer

Grants permission to query ECS details.

read

instance *

-

ecs:cloudServers:get

ecs:cloudServers:attach

Grants permission to attach disks to an ECS.

write

instance *

-

ecs:cloudServers:showServerBlockDevice

Grants permission to query information about a single disk attached to an ECS.

read

instance *

-

ecs:cloudServers:get

ecs:cloudServers:updateServerBlockDevice

Grants permission to modify information about a single disk attached to an ECS.

write

instance *

-

ecs:cloudServers:put

ecs:cloudServers:changeOS

Grants permission to change the ECS OS.

write

instance *

-

ecs:cloudServers:detachVolume

Grants permission to detach disks from an ECS.

write

instance *

-

-

ecs:cloudServers:updateMetadata

Grants permission to update ECS metadata.

write

instance *

-

-

ecs:cloudServers:deleteMetadata

Grants permission to delete ECS metadata.

write

instance *

-

-

ecs:cloudServers:migrate

Grants permission to cold migrate ECSs.

write

instance *

-

-

ecs:cloudServers:listServerInterfaces

Grants permission to query NICs of an ECS.

list

instance *

-

ecs:cloudServers:get

ecs:cloudServers:showResetPasswordFlag

Grants permission to query whether one-click password reset is supported.

read

instance *

-

ecs:cloudServers:get

ecs:cloudServers:showServerPassword

Grants permission to get the password for logging in to an ECS.

read

instance *

-

ecs:cloudServers:get

ecs:cloudServers:deletePassword

Grants permission to delete the password for logging in to an ECS.

write

instance *

-

-

ecs:cloudServers:listServerVolumeAttachments

Grants permission to query disks attached to an ECS.

list

instance *

-

ecs:cloudServers:get

ecs:cloudServers:rebuild

Grants permission to reinstall the ECS OS.

write

instance *

-

ecs:cloudServers:vnc

Grants permission to obtain the VNC login address.

read

instance *

-

-

ecs:cloudServers:updateServer

Grants permission to modify ECS information.

write

instance *

-

ecs:cloudServers:put

ecs:cloudServers:addNics

Grants permission to add NICs to an ECS in a batch.

write

instance *

-

ecs:cloudServerNics:delete

Grants permission to delete NICs from an ECS in a batch.

write

instance *

-

-

ecs:cloudServers:showServerTags

Grants permission to query ECS tags.

list

instance *

-

ecs:cloudServers:get

ecs:cloudServers:batchCreateServerTags

Grants permission to add tags to an ECS in a batch.

write

instance *

  • ecs:cloudServers:put
  • ecs:cloudServers:batchSetServerTags

ecs:cloudServers:batchDeleteServerTags

Grants permission to delete tags from an ECS in a batch.

write

instance *

  • ecs:cloudServers:put
  • ecs:cloudServers:batchSetServerTags

ecs:cloudServers:start

Grants permission to start ECSs in a batch.

write

instance *

-

-

ecs:cloudServers:stop

Grants permission to stop ECSs in a batch.

write

instance *

-

-

ecs:cloudServers:reboot

Grants permission to restart ECSs in a batch.

write

instance *

-

-

ecs:cloudServers:batchUpdateServersName

Grants permission to modify ECS information in a batch.

write

instance *

-

ecs:cloudServers:put

ecs:cloudServers:listServersDetails

Grants permission to list ECSs.

list

-

g:EnterpriseProjectId

ecs:cloudServers:list

ecs:cloudServerFlavors:get

Grants permission to query specifications and expansion details about ECSs.

read

-

-

-

ecs:cloudServerQuotas:get

Grants permission to query tenant quotas.

read

-

-

-

ecs:cloudServers:resetServerPwd

Grants permission to reset the password of an ECS.

write

instance *

-

-

ecs:cloudServers:listServerGroups

Grants permission to list ECS groups.

list

-

-

ecs:cloudServers:list

ecs:cloudServers:createServerGroup

Grants permission to create ECS groups.

write

-

-

ecs:cloudServers:create

ecs:cloudServers:showServerGroup

Grants permission to query ECS groups.

read

-

-

ecs:cloudServers:get

ecs:cloudServers:deleteServerGroup

Grants permission to delete ECS groups.

write

-

-

ecs:cloudServers:delete

ecs:cloudServers:addServerGroupMember

Grants permission to add ECSs to an ECS group.

write

-

-

ecs:cloudServers:create

ecs:cloudServers:deleteServerGroupMember

Grants permission to delete ECSs from an ECS group.

write

-

-

ecs:cloudServers:delete

ecs:cloudServers:listServersByTag

Grants permission to query ECS groups by tag.

list

-

-

ecs:cloudServers:list

ecs:cloudServers:listResizeFlavors

Grants permission to query the target ECS flavors to which a flavor can be changed.

list

-

-

ecs:cloudServers:list

ecs:cloudServers:listServerTags

Grants permission to query project tags.

list

-

-

ecs:cloudServers:list

ecs:cloudServers:changeVpc

Grants permission to change the VPC of an ECS.

write

instance *

-

ecs:cloudServers:changeChargeMode

Grants permission to change the billing mode of an ECS.

write

instance *

-

-

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

Table 2 Actions and dependencies supported by ECS APIs

API

Action

Dependencies

POST /v1.1/{project_id}/cloudservers

ecs:cloudServers:createServers

  • eip:publicIps:create
  • eip:publicIps:associateInstance
  • iam:agencies:pass
  • eip:bandwidths:insertPublicIps

POST /v1/{project_id}/cloudservers

ecs:cloudServers:createServers

  • eip:publicIps:create
  • eip:publicIps:associateInstance
  • iam:agencies:pass
  • eip:bandwidths:insertPublicIps

POST /v1/{project_id}/cloudservers/delete

ecs:cloudServers:deleteServers

-

POST /v1.1/{project_id}/cloudservers/{server_id}/resize

ecs:cloudServers:resize

-

POST /v1/{project_id}/batchaction/attachvolumes/{volume_id}

ecs:cloudServers:attachSharedVolume

evs:volumes:use

GET /v1/{project_id}/cloudservers/{server_id}

ecs:cloudServers:showServer

-

POST /v1/{project_id}/cloudservers/{server_id}/attachvolume

ecs:cloudServers:attach

evs:volumes:use

GET /v1/{project_id}/cloudservers/{server_id}/block_device

ecs:cloudServers:listServerBlockDevices

-

GET /v1/{project_id}/cloudservers/{server_id}/block_device/{volume_id}

ecs:cloudServers:showServerBlockDevice

-

PUT /v1/{project_id}/cloudservers/{server_id}/block_device/{volume_id}

ecs:cloudServers:updateServerBlockDevice

-

POST /v1/{project_id}/cloudservers/{server_id}/changeos

ecs:cloudServers:changeOS

-

DELETE /v1/{project_id}/cloudservers/{server_id}/detachvolume/{volume_id}

ecs:cloudServers:detachVolume

-

POST /v1/{project_id}/cloudservers/{server_id}/metadata

ecs:cloudServers:updateMetadata

iam:agencies:pass

DELETE /v1/{project_id}/cloudservers/{server_id}/metadata/{key}

ecs:cloudServers:deleteMetadata

-

POST /v1/{project_id}/cloudservers/{server_id}/migrate

ecs:cloudServers:migrate

-

GET /v1/{project_id}/cloudservers/{server_id}/os-interface

ecs:cloudServers:listServerInterfaces

-

PUT /v1/{project_id}/cloudservers/{server_id}/os-reset-password

ecs:cloudServers:resetServerPwd

-

GET /v1/{project_id}/cloudservers/{server_id}/os-resetpwd-flag

ecs:cloudServers:showResetPasswordFlag

-

GET /v1/{project_id}/cloudservers/{server_id}/os-server-password

ecs:cloudServers:showServerPassword

-

DELETE /v1/{project_id}/cloudservers/{server_id}/os-server-password

ecs:cloudServers:deletePassword

-

GET /v1/{project_id}/cloudservers/{server_id}/os-volume_attachments

ecs:cloudServers:listServerVolumeAttachments

-

POST /v1/{project_id}/cloudservers/{server_id}/reinstallos

ecs:cloudServers:rebuild

-

POST /v2/{project_id}/cloudservers/{server_id}/reinstallos

ecs:cloudServers:rebuild

-

POST /v1/{project_id}/cloudservers/{server_id}/remote_console

ecs:cloudServers:vnc

-

POST /v1/{project_id}/cloudservers/{server_id}/resize

ecs:cloudServers:resize

-

GET /v1/{project_id}/cloudservers/detail?flavor={flavor}&name={name}&status={status}&limit={limit}&offset={offset}&not-tags={not-tags}&reservation_id={reservation_id}&enterprise_project_id={enterprise_project_id}&tags={tags}&ip={ip}

ecs:cloudServers:listServersDetails

-

PUT /v1/{project_id}/cloudservers/{server_id}

ecs:cloudServers:updateServer

-

POST /v1/{project_id}/cloudservers/{server_id}/actions/update-auto-terminate-time

ecs:cloudServers:setAutoTerminateTime

-

POST /v1/{project_id}/cloudservers/{server_id}/nics

ecs:cloudServers:addNics

-

POST /v1/{project_id}/cloudservers/{server_id}/nics/delete

ecs:cloudServerNics:delete

-

GET /v1/{project_id}/cloudservers/{server_id}/tags

ecs:cloudServers:showServerTags

-

POST /v1/{project_id}/cloudservers/{server_id}/tags/action

ecs:cloudServers:batchCreateServerTags

-

POST /v1/{project_id}/cloudservers/{server_id}/tags/action

ecs:cloudServers:batchDeleteServerTags

-

POST /v1/{project_id}/cloudservers/action

ecs:cloudServers:start

-

POST /v1/{project_id}/cloudservers/action

ecs:cloudServers:stop

-

POST /v1/{project_id}/cloudservers/action

ecs:cloudServers:reboot

-

GET /v1/{project_id}/cloudservers/flavors?availability_zone={availability_zone}&flavor_id={flavor_id}&limit={limit}&marker={marker}

ecs:cloudServerFlavors:get

-

GET /v1/{project_id}/cloudservers/limits

ecs:cloudServerQuotas:get

-

PUT /v1/{project_id}/cloudservers/{server_id}/os-reset-password

ecs:cloudServers:resetServerPwd

-

GET /v1/{project_id}/cloudservers/os-server-groups?limit={limit}&marker={marker}

ecs:cloudServers:listServerGroups

-

POST /v1/{project_id}/cloudservers/os-server-groups

ecs:cloudServers:createServerGroup

-

GET /v1/{project_id}/cloudservers/os-server-groups/{server_group_id}

ecs:cloudServers:showServerGroup

-

DELETE /v1/{project_id}/cloudservers/os-server-groups/{server_group_id}

ecs:cloudServers:deleteServerGroup

-

POST /v1/{project_id}/cloudservers/os-server-groups/{server_group_id}/action

ecs:cloudServers:addServerGroupMember

-

POST /v1/{project_id}/cloudservers/os-server-groups/{server_group_id}/action

ecs:cloudServers:deleteServerGroupMember

-

GET /v1/{project_id}/cloudservers/resize_flavors?instance_uuid={instance_uuid}&source_flavor_id={source_flavor_id}&source_flavor_name={source_flavor_name}

ecs:cloudServers:listResizeFlavors

-

GET /v1/{project_id}/cloudservers/tags

ecs:cloudServers:listServerTags

-

POST /v2/{project_id}/cloudservers/{server_id}/changeos

ecs:cloudServers:changeOS

-

PUT /v1/{project_id}/cloudservers/server-name

ecs:cloudServers:batchUpdateServersName

-

POST /v1/{project_id}/cloudservers/{server_id}/changevpc

ecs:cloudServers:changeVpc

-

POST /v1/{project_id}/cloudservers/actions/change-charge-mode

ChangeServerChargeMode

  • billing:order:pay
  • billing:subscription:renew

GET /v2/{domain_id}/auto-launch-groups

ecs:launchTemplates:list

-

DELETE /v2/{domain_id}/auto-launch-groups/{auto_launch_group_id}

ecs:launchTemplates:delete

-

POST /v2/{domain_id}/auto-launch-groups

ecs:launchTemplates:create

-

PUT /v2/{domain_id}/auto-launch-groups/{auto_launch_group_id}

ecs:launchTemplates:update

-

GET /v1/{project_id}/cloudservers/flavor-sell-policies?flavor_id={flavor_id}

ecs:cloudServerFlavors:get

-

GET /v1/{project_id}/cloudservers/{server_id}/autorecovery

ecs:cloudServers:getAutoRecovery

-

PUT /v1/{project_id}/cloudservers/{server_id}/autorecovery

ecs:cloudServers:setAutoRecovery

-

Resources

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

The following table lists the resource types that you can define in identity policy statements for ECS.

Table 3 Resource types supported by ECS

Resource Type

URN

instance

ecs:<region>:<account-id>:instance:<server-id>

Conditions

About condition keys

A Condition element lets you specify conditions for when an identity policy 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, ecs:) only apply to operations of the ECS 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 identity policy can be applied only when its request conditions are met. For supported condition operators, see Condition operators.

Service-specific condition keys supported by ECS

The following table lists the condition keys that you can define in identity policies for ECS. You can include these condition keys to specify conditions for when your identity policy is in effect.

Table 4 Service-specific condition keys supported by ECS

Condition Key

Type

Single-valued/Multivalued

Description

ecs:imageID

string

Multivalued

Filters access based on the image ID specified in the request parameter.

ecs:FlavorId

string

Multivalued

Filters access based on the flavor ID specified in the request parameter.

ecs:VpcId

string

Multivalued

Filters access based on the VPC ID specified in the request parameter.

ecs:SubnetId

string

Multivalued

Filters access based on the subnet ID specified in the request parameter.

ecs:KmsKeyId

string

Multivalued

Filters access based on the KMS key ID specified in the request parameter.

ecs:ServerId

string

Single-valued

Filters access based on ECS ID.

ecs:SSHKeyPairName

string

Single-valued

Filters access based on the SSH key pair name specified in the request parameter.

ecs:AvailabilityZone

string

Single-valued

Filters access based on the AZ name specified in the request parameter.

ecs:PortId

string

Multivalued

Filters access based on the port ID specified in the request parameter.

ecs:SupportAgentType

string

Multivalued

Filters access based on the agent type specified in the request parameter.

ecs:ImageSupportAgentType

string

Multivalued

Filters access based on the supported image agent type in the request parameter.

ecs:VolumeId

string

Single-valued

Filters access based on the volume ID specified in the request parameter.

ecs:ImageType

string

Single-valued

Filters access based on the image type specified in the request parameter, for example, public images, private images, shared images, or KooGallery images.

ecs:OsType

string

Single-valued

Filters access based on the OS type of the image specified in the request parameter, for example, Linux or Windows.

ecs:OsVersion

string

Single-valued

Filters access based on the OS version of the image specified in the request, for example, CentOS 7.3 64bit.

ecs:ImagePlatform

string

Single-valued

Filters access based on the platform of the image specified in the request, for example, Windows, Ubuntu, Red Hat, SUSE or CentOS.

ecs:LegacyAPIFlavor

string

Single-valued

Filters access based on the API type. Currently, only native OpenStack APIs are supported.