RAM ユーザーを使用して Alibaba Cloud API オペレーションを呼び出す前に、Alibaba Cloud アカウントを使用して、RAM ユーザーに権限を付与する認証ポリシーを作成する必要があります。
リソース認証
デフォルトでは、RAM ユーザーは Alibaba Cloud API オペレーションを呼び出す権限がありません。 RAM ユーザーを使用して Alibaba Cloud API オペレーションを呼び出す前に、呼び出す API オペレーションに対する権限を RAM ユーザーに付与する必要があります。 RAM ユーザーに権限を付与するには、認証ポリシーを作成して RAM ユーザーにアタッチする必要があります。
認証ポリシーを作成するときは、Alibaba Cloud Resource Name(ARN)を使用して、権限を付与するリソースを指定できます。 ARN は、Alibaba Cloud 上のリソースを識別するために使用されるグローバルに一意な名前です。 ARN の形式は次のとおりです。
acs:service-name:region:account-id:resource-relative-idARN には次のフィールドが含まれています。
acs: Alibaba Cloud Service の省略形。これは、サービスが Alibaba Cloud のパブリッククラウドサービスであることを示します。
service-name: Elastic Compute Service(ECS)、Object Storage Service(OSS)、Resource Orchestration Service(ROS)などの Alibaba Cloud サービスの名前。
region: サービスが存在するリージョン。このオプションがサポートされていない場合は、アスタリスク(
*)を使用します。account-id: 123456789012**** などの Alibaba Cloud アカウント ID。
resource-relative-id: リソースの説明。説明はサービスによって異なります。 詳細については、使用する Alibaba Cloud サービスのドキュメントをご参照ください。
たとえば、
acs:oss:*:123456789012****:sample_bucket/file1.txtは、OSS 内の sample_bucket/file1.txt という名前のリソースを示し、123456789012****は、リソースが属するユーザーの ID を示します。
認証可能な ROS リソースの種類
リソースの種類 | 認証ポリシーの ARN 形式 |
スタック | acs:ros:$regionid:$accountid:stack/$stackid |
acs:ros:$regionid:$accountid:stack/* | |
テンプレート | acs:ros:$regionid:$accountid:template/$templateid |
acs:ros:$regionid:$accountid:template/* | |
スタックグループ | acs:ros:$regionid:$accountid:stack_group/* |
認証可能な ROS API オペレーション
スタックオペレーション
API
アクション
ARN 形式
PreviewStack
ros:PreviewStack
acs:ros:cn-hangzhou:$accountid:stack/*
CreateStack
ros:CreateStack
cs:ros:cn-hangzhou:$accountid:stack/*
ContinueCreateStack
ros:ContinueCreateStack
acs:ros:cn-hangzhou:$accountid:stack/$stackid
SetDeletionProtection
ros:SetDeletionProtection
acs:ros:cn-hangzhou:$accountid:stack/$stackid
UpdateStack
ros:UpdateStack
acs:ros:cn-hangzhou:$accountid:stack/$stackid
CancelUpdateStack
ros:CancelUpdateStack
acs:ros:cn-hangzhou:$accountid:stack/$stackid
GetStack
ros:GetStack
acs:ros:cn-hangzhou:$accountid:stack/$stackid
ListStacks
ros:ListStacks
acs:ros:cn-hangzhou:$accountid:stack/*
ListStackEvents
ros:ListStackEvents
acs:ros:cn-hangzhou:$accountid:stack/$stackid
ListStackOperationRisks
ros:ListStackOperationRisks
acs:ros:cn-hangzhou:$accountid:stack/$stackid
DeleteStack
ros:DeleteStack
acs:ros:cn-hangzhou:$accountid:stack/$stackid
CreateChangeSet
ros:CreateChangeSet
ChangeSetType が CREATE に設定されている場合: acs:ros:cn-hangzhou:$accountid:stack/*
ChangeSetType が UPDATE に設定されている場合: acs:ros:cn-hangzhou:$accountid:stack/$stackid
ChangeSetType が IMPORT に設定されている場合: acs:ros:cn-hangzhou:$accountid:stack/*
ExecuteChangeSet
ros:ExecuteChangeSet
acs:ros:cn-hangzhou:$accountid:stack/$stackid
GetChangeSet
ros:GetChangeSet
acs:ros:cn-hangzhou:$accountid:stack/$stackid
ListChangeSets
ros:ListChangeSets
acs:ros:cn-hangzhou:$accountid:stack/$stackid
DeleteChangeSet
ros:DeleteChangeSet
acs:ros:cn-hangzhou:$accountid:stack/$stackid
リソースオペレーション
API
アクション
ARN 形式
GetResourceTypeTemplate
ros:GetResourceTypeTemplate
認証は不要です
ListStackResources
ros:ListStackResources
acs:ros:cn-hangzhou:$accountid:stack/$stackid
GetStackResource
ros:GetStackResource
acs:ros:cn-hangzhou:$accountid:stack/$stackid
GetResourceType
ros:GetResourceType
認証は不要です
ListResourceTypes
ros:ListResourceTypes
認証は不要です
MoveResourceGroup
ros:MoveResourceGroup
ResourceType が stack に設定されている場合: acs:ros:cn-hangzhou:$accountid:stack/*
ResourceType が stackgroup に設定されている場合: acs:ros:cn-hangzhou:$accountid:stack_group/*
ResourceType が template に設定されている場合: acs:ros:cn-hangzhou:$accountid:template/*
スタックグループオペレーション
API
アクション
ARN 形式
CreateStackGroup
ros:CreateStackGroup
acs:ros:cn-hangzhou:$accountid:stack_group/*
UpdateStackGroup
ros:UpdateStackGroup
acs:ros:cn-hangzhou:$accountid:stack_group/*
GetStackGroup
ros:GetStackGroup
acs:ros:cn-hangzhou:$accountid:stack_group/*
ListStackGroups
ros:ListStackGroups
acs:ros:cn-hangzhou:$accountid:stack_group/*
DeleteStackGroup
ros:DeleteStackGroup
acs:ros:cn-hangzhou:$accountid:stack_group/*
CreateStackInstances
ros:CreateStackInstances
acs:ros:cn-hangzhou:$accountid:stack_instance/*
UpdateStackInstances
ros:UpdateStackInstances
acs:ros:cn-hangzhou:$accountid:stack_instance/*
GetStackInstance
ros:GetStackInstance
acs:ros:cn-hangzhou:$accountid:stack_instance/*
ListStackInstances
ros:ListStackInstances
acs:ros:cn-hangzhou:$accountid:stack_instance/*
DeleteStackInstances
ros:DeleteStackInstances
acs:ros:cn-hangzhou:$accountid:stack_instance/*
GetStackGroupOperation
ros:GetStackGroupOperation
acs:ros:cn-hangzhou:$accountid:stack_group_operation/*
ListStackGroupOperations
ros:ListStackGroupOperations
acs:ros:cn-hangzhou:$accountid:stack_group_operation/*
ListStackGroupOperationResults
ros:ListStackGroupOperationResults
acs:ros:cn-hangzhou:$accountid:stack_group_operation/*
StopStackGroupOperation
ros:StopStackGroupOperation
acs:ros:cn-hangzhou:$accountid:stack_group_operation/*
テンプレートオペレーション
API
アクション
ARN 形式
GenerateTemplatePolicy
ros:GenerateTemplatePolicy
acs:ros:cn-hangzhou:$accountid:template/$templateid
説明TemplateId パラメーターが指定されている場合は、認証が必要です。
CreateTemplate
ros:CreateTemplate
acs:ros:cn-hangzhou:$accountid:template/*
ValidateTemplate
ros:ValidateTemplate
認証は不要です
UpdateTemplate
ros:UpdateTemplate
acs:ros:cn-hangzhou:$accountid:template/$templateid
GetTemplate
ros:GetTemplate
acs:ros:cn-hangzhou:$accountid:stack/$stackid
acs:ros:$regionid:$accountid:stack_group/*
acs:ros:cn-hangzhou:$accountid:template/$templateid
GetTemplateEstimateCost
ros:GetTemplateEstimateCost
acs:ros:cn-hangzhou:$accountid:*
GetTemplateSummary
ros:GetTemplateSummary
acs:ros:cn-hangzhou:$accountid:template/$templateid
説明TemplateId パラメーターが指定されている場合は、認証が必要です。
ListTemplates
ros:ListTemplates
acs:ros:cn-hangzhou:$accountid:template/*
ListTemplateVersions
ros:ListTemplateVersions
acs:ros:cn-hangzhou:$accountid:template/$templateid
SetTemplatePermission
ros:SetTemplatePermission
acs:ros:cn-hangzhou:$accountid:*
DeleteTemplate
ros:DeleteTemplate
acs:ros:cn-hangzhou:$accountid:template/$templateid
タグオペレーション
API
アクション
ARN 形式
ListTagResources
ros:ListTagResources
acs:ros:cn-hangzhou:$accountid:tag/*
ListTagKeys
ros:ListTagKeys
acs:ros:cn-hangzhou:$accountid:tag/*
ListTagValues
ros:ListTagValues
acs:ros:cn-hangzhou:$accountid:tag/*
UntagResources
ros:UntagResources
acs:ros:cn-hangzhou:$accountid:tag/*
その他のオペレーション
API
アクション
ARN 形式
DescribeRegions
ros:DescribeRegions
認証は不要です
SignalResource
ros:SignalResource
acs:ros:cn-hangzhou:$accountid:stack/$stackid
GetStackPolicy
ros:GetStackPolicy
acs:ros:cn-hangzhou:$accountid:stack/$stackid
SetStackPolicy
ros:SetStackPolicy
acs:ros:cn-hangzhou:$accountid:stack/$stackid