Updated on 2024-05-11 GMT+08:00

Image Management Service (IMS)

The Organizations service 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 an organizational unit (OU) or a member account, the SCPs do not directly grant permissions to that OU or member account. Instead, the SCPs only determine what permissions are available for that member account or those 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 edit 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.
  • Resource Type 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 a URN for the Resource element in your identity policy 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 IMS, 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 of an action is empty (-), the action does not support any condition keys.

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

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

Table 1 Supported Actions

Action

Description

Access Level

Resource Type (*: required)

Condition Key

ims:images:list

Grants permission to view images.

list

-

g:EnterpriseProjectId

ims:images:get

Grants permission to view details about a specified image.

read

image *

-

ims:images:create

Grants permission to create image metadata.

write

-

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

ims:images:share

Grants permission to share images.

permission_management

image *

ims:TargetOrgPaths

ims:images:copyInRegion

Grants permission to replicate images within a region.

write

image *

ims:Encrypted

ims:images:copyCrossRegion

Grants permission to replicate images across regions.

write

image *

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

ims:quotas:get

Grants permission to query the image quota.

read

-

-

ims:images:upload

Grants permission to upload images.

write

image *

-

ims:wholeImages:create

Grants permission to create full-ECS images.

write

-

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

ims:images:export

Grants permission to export images.

read

image *

-

ims:dataImages:create

Grants permission to create data disk images from external image files.

write

-

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

ims:serverImages:create

Grants permission to create images.

write

-

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

ims:images:setTags

Grants permission to update image tags.

tagging

image *

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

ims:images:getTags

Grants permission to query tags of an image.

read

-

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

ims:images:deleteImage

Grants permission to delete an image.

write

image *

-

ims:images:updateImage

Grants permission to update image information.

write

image *

-

ims:images:listOsVersion

Grants permission to query OSs supported by images.

list

-

-

ims:images:getJob

Grants permission to query progresses of asynchronous tasks.

read

-

-

ims:images:import

Grants permission to import images.

write

-

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

ims:images:setOrDeleteTags

Grants permission to add or deleting image tags in a batch.

write

-

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

ims:images:updateMemberStatus

Grants permission to update the status of members who can use shared images.

write

image *

-

ims:images:addMember

Grants permission to add a tenant that can use a shared image.

write

image *

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

ims:images:deleteMember

Grants permission to delete a tenant from the group where the members can use a shared image.

write

image *

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

ims:images:listImagesByTag

Grants permission to query images by tag.

read

-

-

ims:images:showImageTags

Grants permission to query tags of an image.

read

image *

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

ims:images:listImageTags

Grants permission to query project tags.

list

-

-

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

Table 2 Actions and dependencies supported by IMS APIs

API

Action

Dependencies

GET /v2/cloudimages

ims:images:list

-

GET /v2/images/{image_id}

ims:images:get

-

POST /v2/images

ims:images:create

-

POST /v2/images/{image_id}/members

ims:images:share

ims:images:get

POST /v1/cloudimages/{image_id}/copy

ims:images:copyInRegion

ims:serverImages:create

POST /v1/cloudimages/{image_id}/cross_region_copy

ims:images:copyCrossRegion

-

GET /v1/cloudimages/quota

ims:quotas:get

-

PUT /v1/cloudimages/{image_id}/upload

PUT /v2/images/{image_id}/file

ims:images:upload

  • ims:images:get
  • ims:images:update

POST /v1/cloudimages/wholeimages/action

ims:wholeImages:create

-

POST /v1/cloudimages/{image_id}/file

ims:images:export

  • obs:object:GetObject
  • obs:object:PutObject
  • POST /v2/cloudimages/quickimport/action (required only for quickly importing a data disk image)
  • POST /v1/cloudimages/dataimages/action

ims:dataImages:create

-

  • PATCH /v2/cloudimages/{image_id} (required only for enterprise project migration)
  • POST /v2/cloudimages/action
  • OST /v2/cloudimages/quickimport/action (required only for quickly importing a system disk image)
  • POST /v1/cloudimages/{image_id}/copy (required only by enterprise project users)

ims:serverImages:create

-

PUT /v1/cloudimages/tags

ims:images:setTags

-

GET /v1/cloudimages/tags

ims:images:getTags

-

DELETE /v2/images/{image_id}

ims:images:deleteImage

-

  • PATCH /v2/cloudimages/{image_id}
  • PATCH /v2/images/{image_id}

ims:images:updateImage

-

GET /v1/cloudimages/os_version

ims:images:listOsVersion

-

GET /v1/cloudimages/job/{job_id}

ims:images:getJob

-

POST /v2/cloudimages/quickimport/action

ims:images:import

  • ims:dataImages:create
  • ims:serverImages:create

POST /v2/{project_id}/images/{image_id}/tags/action

ims:images:setOrDeleteTags

  • ims:images:setTags
  • ims:images:deleteTags
  • PUT /v1/cloudimages/members
  • PUT /v2/images/{image_id}/members/{member_id}

ims:images:updateMemberStatus

-

POST /v1/cloudimages/members

ims:images:addMember

-

DELETE /v1/cloudimages/members

ims:images:deleteMember

-

POST /v2/{project_id}/images/resource_instances/action

ims:images:listImagesByTag

-

GET /v2/{project_id}/images/{image_id}/tags

ims:images:showImageTags

-

GET /v2/{project_id}/images/tags

ims:images:listImageTags

-

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 specify in SCP statements for IMS.

Table 3 Resource types supported by IMS

Resource Type

URN

image

ims:<region>:<account-id>:image:<image-id>

  • <region> indicates the region where a user is authorized to perform operations.
  • <account-id> indicates the ID of an authorized user account. Obtain an account ID as instructed in API Credentials.
  • <image-id> indicates the ID of the image on which a user is authorized to perform operations.

You can use a wildcard (*) in URN to indicate all resources.

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, IAM 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, ims:) apply only to operations of IMS. 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 IMS. You can include these condition keys to specify conditions for when your SCP is in effect.

Table 4 Service-specific condition keys supported by IMS

Service-specific Condition Key

Type

Single-valued/Multivalued

Description

ims:TargetOrgPaths

string

Multivalued

Filters access based on the Organizations Path of the specified sharing account.

ims:Encrypted

boolean

Single valued

Controls operations such as image import and replication based on whether images are encrypted.

ims:TargetBucketOrgPaths

string

Multivalued

Filters access based on the Organizations Path of the specified destination bucket owner account.

ims:OriginBucketOrgPaths

string

Multivalued

Filters access based on the Organizations Path of the specified source bucket owner account.