CAM policy:
{
"version":"2.0",
"statement":
[
{
"effect":"effect",
"action":["action"],
"resource":["resource"],
"condition": {"key":{"value"}}
}
]
}
effect
, action
, resource
, and condition
. One policy has only one statement
.
In a CAM policy statement, you can specify any API operation from any service that supports CAM. APIs prefixed with name/asr:
should be used for ASR, such as name/asr:CreateModel
or name/asr:CreateAsrVocab
.
"action":["name/asr:action1","name/asr:action2"]
You can also specify multiple operations by using a wildcard. For example, you can specify all operations beginning with "Describe" in the name as shown below:
"action":["name/cvm:Describe*"]
*
wildcard as shown below:"action":["name/asr:*"]
Each CAM policy statement is resource-specific with a resource path as shown below:
qcs:project_id:service_type:region:account:resource
asr
.uin/164256472
.model/model_id1
or model/*
.For example, you can use a specific self adaptive learning model (15b96676edb211ea9301b49691037310) by specifying it in the statement as shown below:
"resource":[ "qcs::asr::uin/164256472:model/15b96676edb211ea9301b49691037310"]
You can also use the *
wildcard to specify all self adaptive learning models that belong to a specific account as shown below:
"resource":[ "qcs::asr::uin/164256472:model/*"]
If you want to specify all resources or a specific API operation supports only API-level permission control, you can use the *
wildcard in the resource
element as shown below:
"resource": ["*"]
To specify multiple resources in one policy, separate them with commas. In the following example, two resources are specified:
"resource":["resource1","resource2"]
Was this page helpful?