RAM authorization

Updated at:

Resource Access Management (RAM) is a service provided by Alibaba Cloud to manage user identities and resource access permissions. Using RAM helps you avoid sharing your Alibaba Cloud account keys with other users and allows you to grant users the least privilege access. RAM uses permission policies to define authorizations. This topic describes the actions, resources, and conditions that AI Guardrails defines for RAM permission policies. The RamCode of AI Guardrails is yundun-greenweb , and the supported authorization granularity is OPERATION . For the resource authorization scope of each action, see the Action table.

General structure of a policy

Permission policies support the JSON format. The following example shows the structure of a policy that uses the Action element. Values in angle brackets (<>) are placeholders. Replace them with actual values.

{
  "Version": "1",
  "Statement": [
    {
      "Effect": "<Effect>",
      "Action": "<Action>",
      "Resource": "<Resource>",
      "Condition": {
        "<Condition_operator>": {
          "<Condition_key>": [
            "<Condition_value>"
          ]
        }
      }
    }
  ]
}        

The following list describes the fields and placeholders in the policy:

  • Effect: Specifies the authorization result. Valid values: Allow and Deny.

  • Action: Specifies one or more operations that are allowed or denied.

  • Resource: Specifies the specific objects affected by the operations. You can use Alibaba Cloud Resource Names (ARNs) to describe specific resources.

  • Condition: Specifies the conditions for the authorization to take effect. This field is optional.

  • Condition operator: Specifies the conditional operators. Different types of conditions support different conditional operators.

  • Condition_key: Specifies the condition keys.

  • Condition_value: Specifies the condition values.

Action

The following table lists the RAM actions defined by AI Guardrails. These actions can be used in the Action element of RAM permission policies.

  • Action: A specific RAM permission point. In most cases, it has the same name as the corresponding OpenAPI.

  • OpenAPI: The OpenAPI associated with the RAM action.

  • Access level: Write, Read, List, or Other.

  • Resource type: The types of resources for which the action supports authorization. Details are as follows:

    • Required resource types are prefixed with an asterisk (*). Specify the corresponding ARN in the Resource element of the policy.

    • When 'All Resources' is displayed and the resource ARN is *, set Resource in the policy to *.

  • Condition key: The product-level condition keys supported by the action. Common condition keys are not included. For more information, see Common condition keys.

  • Dependent action: Other action permissions required to perform the action.

Action

OpenAPI

Access level

Resource type

Condition key

Dependent action

yundun-greenweb:ListServiceConfigs ListServiceConfigs list

*All Resource

*

None None
yundun-greenweb:CreateOnlineTest CreateOnlineTest create

*All Resource

*

None None
yundun-greenweb:LlmStreamChat LlmStreamChat get

*All Resource

*

None None
yundun-greenweb:DeleteKeywordLib DeleteKeywordLib delete

*All Resource

*

None None
yundun-greenweb:UpdateOssCheckResultsUnfreeze UpdateOssCheckResultsUnfreeze update

*All Resource

*

None None
yundun-greenweb:ListAppConfigs ListAppConfigs list

*All Resource

*

None None
yundun-greenweb:GetAiAppDetailTopo GetAiAppDetailTopo none

*All Resource

*

None None
yundun-greenweb:ModifyServiceInfo ModifyServiceInfo update

*All Resource

*

None None
yundun-greenweb:GetFeatureConfig GetFeatureConfig get

*All Resource

*

None None
yundun-greenweb:GetStockOssCheckTasksList GetStockOssCheckTasksList get

*All Resource

*

None None
yundun-greenweb:DeleteOnlineTest DeleteOnlineTest delete

*All Resource

*

None None
yundun-greenweb:DescribeOssV2Result DescribeOssV2Result list

*All Resource

*

None None
yundun-greenweb:ListAppConfigHistory ListAppConfigHistory list

*All Resource

*

None None
yundun-greenweb:GetScanResult GetScanResult get

*All Resource

*

None None
yundun-greenweb:CancelStockOssCheckTask CancelStockOssCheckTask none

*All Resource

*

None None
yundun-greenweb:UpdateOssCheckResultsFeedBack UpdateOssCheckResultsFeedBack update

*All Resource

*

None None
yundun-greenweb:UpdateOssCheckResultsFreeze UpdateOssCheckResultsFreeze update

*All Resource

*

None None
yundun-greenweb:CreateAnswerLib CreateAnswerLib create

*All Resource

*

None None
yundun-greenweb:ListCallback ListCallback list

*All Resource

*

None None
yundun-greenweb:AddAnswerSample AddAnswerSample create

*All Resource

*

None None
yundun-greenweb:ModifyAppInfo ModifyAppInfo update

*All Resource

*

None None
yundun-greenweb:UpdateScanResultFeedback UpdateScanResultFeedback update

*All Resource

*

None None
yundun-greenweb:AddAppConfig AddAppConfig create

*All Resource

*

None None
yundun-greenweb:AddKeywordsToLib AddKeywordsToLib create

*All Resource

*

None None
yundun-greenweb:GetBucketsList GetBucketsList get

*All Resource

*

None None
yundun-greenweb:ExportScanResult ExportScanResult list

*All Resource

*

None None
yundun-greenweb:GetOssCheckStatus GetOssCheckStatus get

*All Resource

*

None None
yundun-greenweb:ModifyFeatureConfig ModifyFeatureConfig update

*All Resource

*

None None
yundun-greenweb:ModifyCallback ModifyCallback update

*All Resource

*

None None
yundun-greenweb:GetGuardLogStats GetGuardLogStats get

*All Resource

*

None None
yundun-greenweb:GetAiAppStats GetAiAppStats none

*All Resource

*

None None
yundun-greenweb:AddKeywords AddKeywords create

*All Resource

*

None None
yundun-greenweb:GetBackupBucketsList GetBackupBucketsList get

*All Resource

*

None None
yundun-greenweb:ExportCipStats ExportCipStats list

*All Resource

*

None None
yundun-greenweb:GetImageSceneLabelConf GetImageSceneLabelConf get

*All Resource

*

None None
yundun-greenweb:GetOssCheckFreezeResult GetOssCheckFreezeResult get

*All Resource

*

None None
yundun-greenweb:UpdateAiAppScanStatus UpdateAiAppScanStatus none

*All Resource

*

None None
yundun-greenweb:GetCipStats GetCipStats get

*All Resource

*

None None
yundun-greenweb:GetPromptTestResult GetPromptTestResult get

*All Resource

*

None None
yundun-greenweb:ListImageLib ListImageLib list

*All Resource

*

None None
yundun-greenweb:GetQpsStats GetQpsStats get

*All Resource

*

None None
yundun-greenweb:AddAppAgent AddAppAgent update

*All Resource

*

None None
yundun-greenweb:InitAiAppScan InitAiAppScan get

*All Resource

*

None None
yundun-greenweb:CopyAppConfig CopyAppConfig create

*All Resource

*

None None
yundun-greenweb:ListAnswerLib ListAnswerLib list

*All Resource

*

None None
yundun-greenweb:GetTextScanResult GetTextScanResult get

*All Resource

*

None None
yundun-greenweb:RecoverAppConfigHistory RecoverAppConfigHistory update

*All Resource

*

None None
yundun-greenweb:ExportKeyword ExportKeyword list

*All Resource

*

None None
yundun-greenweb:GetRiskStats GetRiskStats none

*All Resource

*

None None
yundun-greenweb:OssCheckResultList OssCheckResultList list

*All Resource

*

None None
yundun-greenweb:GetUploadInfo GetUploadInfo get

*All Resource

*

None None
yundun-greenweb:AddImages2Lib AddImages2Lib create

*All Resource

*

None None
yundun-greenweb:GetOssCheckTaskInfo GetOssCheckTaskInfo get

*All Resource

*

None None
yundun-greenweb:ListKeywordLibs ListKeywordLibs list

*All Resource

*

None None
yundun-greenweb:UpdateServiceConfig UpdateServiceConfig update

*All Resource

*

None None
yundun-greenweb:GetServiceConfig GetServiceConfig get

*All Resource

*

None None
yundun-greenweb:QueryLabelConfig QueryLabelConfig get

*All Resource

*

None None
yundun-greenweb:GetImageSceneLabelListConf GetImageSceneLabelListConf get

*All Resource

*

None None
yundun-greenweb:ExportAnswerSample ExportAnswerSample list

*All Resource

*

None None
yundun-greenweb:GetServiceConf GetServiceConf get

*All Resource

*

None None
yundun-greenweb:GetAnswerImportProgress GetAnswerImportProgress get

*All Resource

*

None None
yundun-greenweb:GetAiAppOverview GetAiAppOverview none

*All Resource

*

None None
yundun-greenweb:StopOnlineTest StopOnlineTest update

*All Resource

*

None None
yundun-greenweb:ListAiAppRiskEvent ListAiAppRiskEvent none

*All Resource

*

None None
yundun-greenweb:QueryCallback QueryCallback list

*All Resource

*

None None
yundun-greenweb:GetAiAppNodeDetail GetAiAppNodeDetail none

*All Resource

*

None None
yundun-greenweb:UpdateOssCheckResultsBatchFeedback UpdateOssCheckResultsBatchFeedback update

*All Resource

*

None None
yundun-greenweb:CreateAppConfig CreateAppConfig create

*All Resource

*

None None
yundun-greenweb:GetKeywordLib GetKeywordLib get

*All Resource

*

None None
yundun-greenweb:ModifyAppAgent ModifyAppAgent update

*All Resource

*

None None
yundun-greenweb:UpdateImageLib UpdateImageLib update

*All Resource

*

None None
yundun-greenweb:GetServiceLabelConfig GetServiceLabelConfig get

*All Resource

*

None None
yundun-greenweb:GetOssCheckStat GetOssCheckStat get

*All Resource

*

None None
yundun-greenweb:GetAiAppTraceDetail GetAiAppTraceDetail none

*All Resource

*

None None
yundun-greenweb:CreatePreCheck CreatePreCheck create

*All Resource

*

None None
yundun-greenweb:GetBackupConfig GetBackupConfig get

*All Resource

*

None None
yundun-greenweb:PublishAppConfig PublishAppConfig update

*All Resource

*

None None
yundun-greenweb:DescribeOnlineTestResult DescribeOnlineTestResult get

*All Resource

*

None None
yundun-greenweb:UpdateEventStatus UpdateEventStatus none

*All Resource

*

None None
yundun-greenweb:ListImagesFromLib ListImagesFromLib list

*All Resource

*

None None
yundun-greenweb:GetKeywordImportResult GetKeywordImportResult get

*All Resource

*

None None
yundun-greenweb:GetJobNameList GetJobNameList get

*All Resource

*

None None
yundun-greenweb:ConfirmAiAppScan ConfirmAiAppScan none

*All Resource

*

None None
yundun-greenweb:GetAiAppDetail GetAiAppDetail none

*All Resource

*

None None
yundun-greenweb:GetScanNum GetScanNum get

*All Resource

*

None None
yundun-greenweb:GetAiAppDetailStat GetAiAppDetailStat none

*All Resource

*

None None
yundun-greenweb:QueryCallbackByPage QueryCallbackByPage list

*All Resource

*

None None
yundun-greenweb:QueryAnswerSampleByPage QueryAnswerSampleByPage list

*All Resource

*

None None
yundun-greenweb:DeleteKeyword DeleteKeyword delete

*All Resource

*

None None
yundun-greenweb:ListOssCheckResult ListOssCheckResult list

*All Resource

*

None None
yundun-greenweb:GetTuneProposalById GetTuneProposalById get

*All Resource

*

None None
yundun-greenweb:GetUploadLink GetUploadLink get

*All Resource

*

None None
yundun-greenweb:ExportOssCheckStat ExportOssCheckStat list

*All Resource

*

None None
yundun-greenweb:ListKeywords ListKeywords list

*All Resource

*

None None
yundun-greenweb:DeleteAnswerSample DeleteAnswerSample delete

*All Resource

*

None None
yundun-greenweb:GetBackupStatus GetBackupStatus get

*All Resource

*

None None
yundun-greenweb:UpdateBackupConfig UpdateBackupConfig update

*All Resource

*

None None
yundun-greenweb:ListAiAppRiskEventByPage ListAiAppRiskEventByPage list

*All Resource

*

None None
yundun-greenweb:GetOssCheckResultDetail GetOssCheckResultDetail get

*All Resource

*

None None
yundun-greenweb:GetUploadContent GetUploadContent none

*All Resource

*

None None
yundun-greenweb:ExportTextScanResult ExportTextScanResult list

*All Resource

*

None None
yundun-greenweb:ExportResult ExportResult list

*All Resource

*

None None
yundun-greenweb:DeleteFeatureConfig DeleteFeatureConfig delete

*All Resource

*

None None
yundun-greenweb:UpdateImageLibFreeInspection UpdateImageLibFreeInspection update

*All Resource

*

None None
yundun-greenweb:AddImageLib AddImageLib create

*All Resource

*

None None
yundun-greenweb:GetExecuteTime GetExecuteTime get

*All Resource

*

None None
yundun-greenweb:ListAiAppWarningByPage ListAiAppWarningByPage none

*All Resource

*

None None
yundun-greenweb:DeleteCallback DeleteCallback delete

*All Resource

*

None None
yundun-greenweb:UpdateKeywordLib UpdateKeywordLib update

*All Resource

*

None None
yundun-greenweb:DeleteAnswerLib DeleteAnswerLib delete

*All Resource

*

None None
yundun-greenweb:DeleteAppAgent DeleteAppAgent delete

*All Resource

*

None None
yundun-greenweb:ListAiAppByPage ListAiAppByPage none

*All Resource

*

None None
yundun-greenweb:CreateCallback CreateCallback create

*All Resource

*

None None
yundun-greenweb:GetAppConfig GetAppConfig get

*All Resource

*

None None
yundun-greenweb:CreateImageLib CreateImageLib create

*All Resource

*

None None
yundun-greenweb:MarkOssV2Result MarkOssV2Result update

*All Resource

*

None None
yundun-greenweb:DeleteImagesFromLib DeleteImagesFromLib delete

*All Resource

*

None None
yundun-greenweb:ModifyAnswerLib ModifyAnswerLib update

*All Resource

*

None None
yundun-greenweb:GetUserBuyStatus GetUserBuyStatus get

*All Resource

*

None None
yundun-greenweb:AddKeywordLib AddKeywordLib create

*All Resource

*

None None
yundun-greenweb:UpdateMetaLog UpdateMetaLog update

*All Resource

*

None None
yundun-greenweb:GetGuardStatus GetGuardStatus none

*All Resource

*

None None
yundun-greenweb:CreatStockOssCheckTask CreatStockOssCheckTask create

*All Resource

*

None None
yundun-greenweb:CopyServiceConfig CopyServiceConfig create

*All Resource

*

None None

Resource

The following table lists the resource types and ARN formats defined by AI Guardrails. The Resource element of RAM policy statements specifies the resources to which the statement applies. Notes:

  • In an ARN, {#} indicates a variable that you must replace with an actual value. For example, replace {#ramcode} with the actual RAM code of the cloud service.

  • In an ARN, * means all. For example:

    • {#resourceType}/*: All resources.

    • When {#regionId} is *, all regions are included.

    • When {#accountId} is set to *, it specifies all Alibaba Cloud accounts.

Resource type

ARN

Condition

AI Guardrails does not define product-level condition keys. However, you can use Alibaba Cloud common condition keys for access control. For more information, see Common condition keys.

References

For information about conditional operators, custom policies, and authorization operations, see the following documents: