訪問控制(RAM)是阿里云提供的管理用戶身份與資源訪問權限的服務。使用RAM可以讓您避免與其他用戶共享阿里云賬號密鑰,并可按需為用戶授予最小權限。RAM中使用權限策略描述授權的具體內容。
本文為您介紹系統運維管理(oos)為RAM權限策略定義的操作(Action)、資源(Resource)和條件(Condition)。系統運維管理(oos)的RAM代碼(RamCode)為[{"popCode":"oos","ramCodes":["oos"]}],支持的授權粒度為RESOURCE。
權限策略通用結構
權限策略支持JSON格式,其通用結構如下:
{
"Version": "1",
"Statement": [
{
"Effect": "<Effect>",
"Action": "<Action>",
"Resource": "<Resource>",
"Condition": {
"<Condition_operator>": {
"<Condition_key>": [
"<Condition_value>"
]
}
}
}
]
}
- Effect:權限策略效果。取值:Allow(允許)、Deny(拒絕)。
- Action:授予允許或拒絕權限的具體操作。具體信息,請參見操作(Action)。
- Resource:受操作影響的具體對象,您可以使用資源ARN來描述指定資源。具體信息,請參見資源(Resource)。
- Condition:指授權生效的條件。可選字段。具體信息,請參見條件(Condition)。
- Condition_operator:條件運算符,不同類型的條件對應不同的條件運算符。具體信息,請參見權限策略基本元素。
- Condition_key:條件關鍵字。
- Condition_value:條件關鍵字對應的值。
操作(Action)
下表是系統運維管理(oos)定義的操作,這些操作可以在RAM權限策略語句的Action
元素中使用,用來授予執行該操作的權限。下面對表中的具體項提供說明:- 操作:是指具體的權限點。
- API:是指操作對應的API接口。
- 訪問級別:是指每個操作的訪問級別,取值為寫入(Write)、讀?。≧ead)或列出(List)。
- 資源類型:是指操作中支持授權的資源類型。具體說明如下:
- 對于必選的資源類型,用背景高亮的方式表示。
- 對于不支持資源級授權的操作,用
全部資源
表示。
- 條件關鍵字:是指云產品自身定義的條件關鍵字。該列不體現適用于任何操作的通用條件關鍵字。
- 關聯操作:是指成功執行操作所需要的其他權限。操作者必須同時具備關聯操作的權限,操作才能成功。
操作 | API | 訪問級別 | 資源類型 | 條件關鍵字 | 關聯操作 |
---|---|---|---|---|---|
oos:ListExecutions | ListExecutions | list | Execution acs:oos:{#regionId}:{#accountId}:execution/*Execution acs:oos:{#regionId}:{#accountId}:execution/{#executionId} | oos:tag | 無 |
oos:ListTemplateVersions | ListTemplateVersions | list | Template acs:oos:{#regionId}:{#accountId}:template/{#templateName} | 無 | 無 |
oos:ListApplicationGroups | ListApplicationGroups | list | ApplicationGroup acs:oos:{#regionId}:{#AccountId}:application/{#applicationName}/applicationgroup/* | 無 | 無 |
oos:UpdateApplicationGroup | UpdateApplicationGroup | update | ApplicationGroup acs:oos:{#regionId}:{#AccountId}:application/{#applicationName}/applicationgroup/{#applicationGroupName} | 無 | 無 |
oos:DeleteApplicationGroup | DeleteApplicationGroup | Write | ApplicationGroup acs:oos:{#regionId}:{#AccountId}:application/{#applicationName}/applicationgroup/{#applicationGroupName} | 無 | 無 |
oos:DeleteStateConfigurations | DeleteStateConfigurations | delete | stateconfiguration acs:oos:{#regionId}:{#accountId}:stateconfiguration/{#stateconfigurationId} | 無 | 無 |
oos:ListResourceExecutionStatus | ListResourceExecutionStatus | get | execution acs:oos:{#regionId}:{#accountId}:execution/{#executionId} | oos:tag | 無 |
oos:TriggerExecution | TriggerExecution | update | execution acs:oos:{#regionId}:{#accountId}:execution/{#executionId} | 無 | 無 |
oos:ListStateConfigurations | ListStateConfigurations | get | StateConfiguration acs:oos:{#regionId}:{#accountId}:stateconfiguration/*StateConfiguration acs:oos:{#regionId}:{#accountId}:stateconfiguration/{#StateConfigurationId} | 無 | 無 |
oos:ListParameters | ListParameters | list | Parameter acs:oos:{#regionId}:{#accountId}:parameter/* | 無 | 無 |
oos:SetServiceSettings | SetServiceSettings | update | ServiceSetting acs:oos:{#regionId}:{#accountId}:ServiceSetting | 無 | 無 |
oos:ListTagValues | ListTagValues | get | 全部資源 * | 無 | 無 |
oos:DescribeApplicationGroupBill | DescribeApplicationGroupBill | get | ApplicationGroup acs:oos:{#regionId}:{#AccountId}:application/{#ApplicationName}/applicationgroup/{#ApplicationGroupName} | 無 | 無 |
oos:DeletePatchBaseline | DeletePatchBaseline | delete | PatchBaseline acs:oos:{#regionId}:{#accountId}:patchbaseline/{#Name} | 無 | 無 |
oos:GetApplication | GetApplication | get | Application acs:oos:{#regionId}:{#accountId}:application/{#ApplicationName} | 無 | 無 |
oos:ListTemplates | ListTemplates | get | Template acs:oos:{#regionId}:{#accountId}:template/*Template acs:oos:{#regionId}:{#accountId}:template/{#templateName} | oos:tag | 無 |
oos:CreateApplication | CreateApplication | create | Application acs:oos:{#regionId}:{#accountId}:application/* | 無 | 無 |
oos:UpdateStateConfiguration | UpdateStateConfiguration | update | stateconfiguration acs:oos:{#regionId}:{#accountId}:stateconfiguration/{#stateconfigurationId} | 無 | 無 |
oos:NotifyExecution | NotifyExecution | update | execution acs:oos:{#regionId}:{#accountId}:execution/{#executionId} | oos:tag | 無 |
oos:CreateSecretParameter | CreateSecretParameter | create | secretparameter acs:oos:{#regionId}:{#accountId}:secretparameter/{#secretparameterName} | 無 | 無 |
oos:GenerateExecutionPolicy | GenerateExecutionPolicy | get | Template acs:oos:{#regionId}:{#accountId}:template/{#templateName} | 無 | 無 |
oos:CancelExecution | CancelExecution | update | Execution acs:oos:{#regionId}:{#accountId}:execution/{#executionId} | oos:tag | 無 |
oos:UpdateApplication | UpdateApplication | Application acs:oos:{#regionId}:{#accountId}:application/{#ApplicationName} | 無 | 無 | |
oos:CreatePatchBaseline | CreatePatchBaseline | create | patchbaseline acs:oos:{#regionId}:{#accountId}:patchbaseline/{#patchbaselineName} | 無 | 無 |
oos:GetPatchBaseline | GetPatchBaseline | get | patchbaseline acs:oos:{#regionId}:{#accountId}:patchbaseline/{#patchbaselineName} | 無 | 無 |
oos:ContinueDeployApplicationGroup | ContinueDeployApplicationGroup | update | ApplicationGroup acs:oos:{#regionId}:{#AccountId}:application/{#applicationName}/applicationgroup/{#applicationGroupName} | 無 | 無 |
oos:ListPatchBaselines | ListPatchBaselines | list | PatchBaseline acs:oos:{#regionId}:{#accountId}:patchbaseline/{#PatchBaselineName} | 無 | 無 |
oos:UpdateParameter | UpdateParameter | update | parameter acs:oos:{#regionId}:{#accountId}:parameter/{#parameterName} | 無 | 無 |
oos:CreateApplicationGroup | CreateApplicationGroup | Write | ApplicationGroup acs:oos:{#regionId}:{#accountId}:application/{#applicationName}/applicationgroup/{#applicationGroupName} | 無 | 無 |
oos:DeleteTemplates | DeleteTemplates | delete | Template acs:oos:{#regionId}:{#accountId}:template/{#templateName} | 無 | 無 |
oos:TagResources | TagResources | update | execution acs:oos:{#regionId}:{#accountId}:execution/{#executionId}template acs:oos:{#regionId}:{#accountId}:template/{#templateName} | oos:tag | 無 |
oos:ListApplications | ListApplications | list | Application acs:oos:{#regionId}:{#accountId}:application/* | 無 | 無 |
oos:GetParameter | GetParameter | get | parameter acs:oos:{#regionId}:{#accountId}:parameter/{#parameterName} | 無 | 無 |
oos:GetApplicationGroup | GetApplicationGroup | get | ApplicationGroup acs:oos:{#regionId}:{#AccountId}:application/{#applicationName}/applicationgroup/{#applicationGroupName} | 無 | 無 |
oos:DescribeRegions | DescribeRegions | get | 全部資源 * | 無 | 無 |
oos:ListExecutionLogs | ListExecutionLogs | get | execution acs:oos:{#regionId}:{#accountId}:execution/{#executionId} | oos:tag | 無 |
oos:ListExecutionRiskyTasks | ListExecutionRiskyTasks | get | template acs:oos:{#regionId}:{#accountId}:template/{#templateName} | oos:tag | 無 |
oos:DeployApplicationGroup | DeployApplicationGroup | update | ApplicationGroup acs:oos:{#regionId}:{#AccountId}:application/{#applicationName}/applicationgroup/{#applicationGroupName} | 無 | 無 |
oos:ListTagResources | ListTagResources | get | Execution acs:oos:{#regionId}:{#accountId}:execution/{#executionId}Template acs:oos:{#regionId}:{#accountId}:template/{#TemplateName}StateConfiguration acs:oos:{#regionId}:{#accountId}:stateconfiguration/{#StateConfigurationId}Parameter acs:oos:{#regionId}:{#accountId}:parameter/{#ParameterName}SecretParameter acs:oos:{#regionId}:{#accountId}:secretparameter/{#SecretParameterName}OpsItem acs:oos:{#regionId}:{#accountId}:opsitem/{#OpsItemId}PatchBaseline acs:oos:{#regionId}:{#accountId}:patchbaseline/{#PatchBaselineName}Execution acs:oos:{#regionId}:{#accountId}:execution/*Template acs:oos:{#regionId}:{#accountId}:template/*OpsItem acs:oos:{#regionId}:{#accountId}:opsitem/*SecretParameter acs:oos:{#regionId}:{#accountId}:secretparameter/*PatchBaseline acs:oos:{#regionId}:{#accountId}:patchbaseline/*StateConfiguration acs:oos:{#regionId}:{#accountId}:stateconfiguration/*Parameter acs:oos:{#regionId}:{#accountId}:parameter/* | oos:tag | 無 |
oos:DeleteApplication | DeleteApplication | delete | Application acs:oos:{#regionId}:{#accountId}:application/{#ApplicationName} | 無 | 無 |
oos:ListOpsItems | ListOpsItems | list | OpsItem acs:oos:{#regionId}:{#accountId}:opsitem/* | 無 | 無 |
oos:ChangeResourceGroup | ChangeResourceGroup | update | Template acs:oos:{#regionId}:{#accountId}:template/{#TemplateName}StateConfiguration acs:oos:{#regionId}:{#accountId}:stateconfiguration/{#StateConfigurationId}Parameter acs:oos:{#regionId}:{#accountId}:parameter/{#ParameterName}SecretParameter acs:oos:{#regionId}:{#accountId}:secretparameter/{#SecretParameterName}OpsItem acs:oos:{#regionId}:{#accountId}:opsitem/{#OpsItemId}PatchBaseline acs:oos:{#regionId}:{#accountId}:patchbaseline/{#PatchBaselineName}Execution acs:oos:{#regionId}:{#accountId}:execution/{#ExecutionId} | 無 | 無 |
oos:ValidateTemplateContent | ValidateTemplateContent | get | 全部資源 * | 無 | 無 |
oos:StartExecution | StartExecution | update | Execution acs:oos:{#regionId}:{#accountId}:execution/* | oos:tag oos:IsOOSAssumeRole | 無 |
oos:UpdateOpsItem | UpdateOpsItem | update | OpsItem acs:oos:{#regionId}:{#accountId}:opsitem/{#OpsItemId} | 無 | 無 |
oos:ListParameterVersions | ListParameterVersions | list | parameter acs:oos:{#regionId}:{#accountId}:parameter/{#parameterName} | 無 | 無 |
oos:UpdateInstancePackageState | UpdateInstancePackageState | update | Template acs:oos:{#regionId}:{#accountId}:template/{#templateName} | oos:tag | 無 |
oos:ListTaskExecutions | ListTaskExecutions | get | Execution acs:oos:{#regionId}:{#accountId}:execution/{#executionId} | oos:tag | 無 |
oos:DeleteParameter | DeleteParameter | delete | parameter acs:oos:{#regionId}:{#accountId}:parameter/{#parameterName} | 無 | 無 |
oos:ListInstancePackageStates | ListInstancePackageStates | list | Template acs:oos:{#regionId}:{#accountId}:template/{#templateNames} | oos:tag | 無 |
oos:GetServiceSettings | GetServiceSettings | get | ServiceSetting acs:oos:{#regionId}:{#accountId}:ServiceSetting | 無 | 無 |
oos:DeleteSecretParameter | DeleteSecretParameter | delete | secretparameter acs:oos:{#regionId}:{#accountId}:secretparameter/{#secretparameterName} | 無 | 無 |
oos:ListSecretParameterVersions | ListSecretParameterVersions | list | secretparameter acs:oos:{#regionId}:{#accountId}:secretparameter/{#secretparameterName} | 無 | 無 |
oos:UpdateExecution | UpdateExecution | update | execution acs:oos:{#regionId}:{#accountId}:execution/{#executionId} | 無 | 無 |
oos:GetOpsItem | GetOpsItem | get | OpsItem acs:oos:{#regionId}:{#accountId}:opsitem/{#OpsItemId} | 無 | 無 |
oos:UpdateSecretParameter | UpdateSecretParameter | update | secretparameter acs:oos:{#regionId}:{#accountId}:secretparameter/{#secretparameterName} | 無 | 無 |
oos:GetParametersByPath | GetParametersByPath | get | parameter acs:oos:{#regionId}:{#accountId}:parameter/{#parameterName} | 無 | 無 |
oos:UntagResources | UntagResources | update | execution acs:oos:{#regionId}:{#accountId}:execution/{#executionId}template acs:oos:{#regionId}:{#accountId}:template/{#templateName} | oos:tag | 無 |
oos:DeleteExecutions | DeleteExecutions | delete | Execution acs:oos:{#regionId}:{#accountId}:execution/{#executionId} | oos:tag | 無 |
oos:UpdateTemplate | UpdateTemplate | update | template acs:oos:{#regionId}:{#accountId}:template/{#templateName} | oos:tag | 無 |
oos:CreateOpsItem | CreateOpsItem | create | OpsItem acs:oos:{#regionId}:{#accountId}:opsitem/* | 無 | 無 |
oos:GetInventorySchema | GetInventorySchema | get | 全部資源 * | 無 | 無 |
oos:GetTemplate | GetTemplate | get | template acs:oos:{#regionId}:{#accountId}:template/{#templateName} | oos:tag | 無 |
oos:UpdatePatchBaseline | UpdatePatchBaseline | update | patchbaseline acs:oos:{#regionId}:{#accountId}:patchbaseline/{#patchbaselineName} | 無 | 無 |
oos:ListInventoryEntries | ListInventoryEntries | get | 全部資源 * | 無 | 無 |
oos:ListInstancePatches | ListInstancePatches | list | 全部資源 * | 無 | 無 |
oos:GetSecretParametersByPath | GetSecretParametersByPath | get | secretparameter acs:oos:{#regionId}:{#accountId}:secretparameter/{#secretparameterName} | 無 | 無 |
oos:ListTagKeys | ListTagKeys | get | 全部資源 * | 無 | 無 |
oos:CreateStateConfiguration | CreateStateConfiguration | create | StateConfiguration acs:oos:{#regionId}:{#accountId}:stateconfiguration/* | 無 | 無 |
oos:GetSecretParameter | GetSecretParameter | get | secretparameter acs:oos:{#regionId}:{#accountId}:secretparameter/{#secretparameterName} | 無 | 無 |
oos:GetExecutionTemplate | GetExecutionTemplate | get | Execution acs:oos:{#regionId}:{#accountId}:execution/{#executionId} | oos:tag | 無 |
oos:ListSecretParameters | ListSecretParameters | list | SecretParameter acs:oos:{#regionId}:{#accountId}:secretparameter/* | 無 | 無 |
oos:DeleteTemplate | DeleteTemplate | delete | Template acs:oos:{#regionId}:{#accountId}:template/{#templateName} | oos:tag | 無 |
oos:RegisterDefaultPatchBaseline | RegisterDefaultPatchBaseline | update | patchbaseline acs:oos:{#regionId}:{#accountId}:patchbaseline/{#patchbaselineName} | 無 | 無 |
oos:SearchInventory | SearchInventory | get | 全部資源 * | 無 | 無 |
oos:CreateParameter | CreateParameter | create | parameter acs:oos:{#regionId}:{#accountId}:parameter/{#parameterName} | 無 | 無 |
oos:ListInstancePatchStates | ListInstancePatchStates | list | 全部資源 * | 無 | 無 |
oos:GetSecretParameters | GetSecretParameters | get | secretparameter acs:oos:{#regionId}:{#accountId}:secretparameter/{#secretparameterName} | 無 | 無 |
oos:GetParameters | GetParameters | get | parameter acs:oos:{#regionId}:{#accountId}:parameter/{#parameterName} | 無 | 無 |
oos:CreateTemplate | CreateTemplate | create | Template acs:oos:{#regionId}:{#accountId}:template/* | oos:tag | 無 |
資源(Resource)
下表是系統運維管理(oos)定義的資源,這些資源可以在RAM權限策略語句的Resource
元素中使用,用來授予對該資源執行具體操作的權限。 其中,資源ARN是資源在阿里云上的唯一標識。具體說明如下:{#}
為變量標識,需要您替換為實際值。例如:{#ramcode}
需要您替換為實際的云服務RAM代碼。-
*
表示全部。例如:{#resourceType}
為*
時:表示全部資源。{#regionId}
為*
時:表示全部地域。{#accountId}
為*
時:表示全部阿里云賬號。
資源類型 | 資源ARN |
---|---|
Execution | acs:oos:{#regionId}:{#accountId}:execution/* |
Execution | acs:oos:{#regionId}:{#accountId}:execution/{#executionId} |
Template | acs:oos:{#regionId}:{#accountId}:template/{#templateName} |
ApplicationGroup | acs:oos:{#regionId}:{#AccountId}:application/{#applicationName}/applicationgroup/* |
ApplicationGroup | acs:oos:{#regionId}:{#AccountId}:application/{#applicationName}/applicationgroup/{#applicationGroupName} |
stateconfiguration | acs:oos:{#regionId}:{#accountId}:stateconfiguration/{#stateconfigurationId} |
execution | acs:oos:{#regionId}:{#accountId}:execution/{#executionId} |
StateConfiguration | acs:oos:{#regionId}:{#accountId}:stateconfiguration/* |
StateConfiguration | acs:oos:{#regionId}:{#accountId}:stateconfiguration/{#StateConfigurationId} |
Parameter | acs:oos:{#regionId}:{#accountId}:parameter/* |
ServiceSetting | acs:oos:{#regionId}:{#accountId}:ServiceSetting |
tags | acs:oos:{#regionId}:{#accountId}:tags/* |
PatchBaseline | acs:oos:{#regionId}:{#accountId}:patchbaseline/{#Name} |
Application | acs:oos:{#regionId}:{#accountId}:application/{#ApplicationName} |
Template | acs:oos:{#regionId}:{#accountId}:template/* |
Application | acs:oos:{#regionId}:{#accountId}:application/* |
OpsItem | acs:oos:{#regionId}:{#accountId}:opsitem/{#OpsItemId} |
template | acs:oos:{#regionId}:{#accountId}:template/{#templateName} |
secretparameter | acs:oos:{#regionId}:{#accountId}:secretparameter/{#secretparameterName} |
patchbaseline | acs:oos:{#regionId}:{#accountId}:patchbaseline/{#patchbaselineName} |
PatchBaseline | acs:oos:{#regionId}:{#accountId}:patchbaseline/{#PatchBaselineName} |
parameter | acs:oos:{#regionId}:{#accountId}:parameter/{#parameterName} |
Parameter | acs:oos:{#regionId}:{#accountId}:parameter/{#ParameterName} |
SecretParameter | acs:oos:{#regionId}:{#accountId}:secretparameter/{#SecretParameterName} |
OpsItem | acs:oos:{#regionId}:{#accountId}:opsitem/* |
SecretParameter | acs:oos:{#regionId}:{#accountId}:secretparameter/* |
PatchBaseline | acs:oos:{#regionId}:{#accountId}:patchbaseline/* |
OpsItemConfiguration | acs:oos:{#regionId}:{#accountId}:opsitemconfiguration/{#ConfigurationId} |
Template | acs:oos:{#regionId}:{#accountId}:template/{#templateNames} |
OpsItemConfiguration | acs:oos:{#regionId}:{#accountId}:OpsItemConfiguration/* |
條件(Condition)
下表是系統運維管理(oos)定義的產品級條件關鍵字,這些條件關鍵字可以在RAM權限策略語句的
Condition
元素中使用,用來描述授予權限的條件。以下僅列舉產品級的條件關鍵字,阿里云定義的通用條件關鍵字也同樣適用系統運維管理(oos)。其中,數據類型決定了您可以使用哪些條件運算符將請求中的值與權限策略語句中的值進行比較。您必須使用與數據類型匹配的條件運算符,否則無法匹配策略語句,授權行為無效。數據類型與條件運算符的對應關系,請參見條件操作類型。
條件關鍵字 | 描述 | 類型 |
---|---|---|
oos:tag | OOS的標簽信息,與標簽鍵組成條件關鍵字oos:tag/<tag-key>。示例值:假設標簽為team:dev, 則此處條件關鍵字和值的寫法 "oos:tag/team": "dev" | String |
oos:IsOOSAssumeRole | OOS StartExecution 是否通過AssumeRole方式調用 | Boolean |