MapReduce服务 MRS-策略及授权项说明:支持的授权项

时间:2023-11-01 16:25:08

支持的授权项

策略包含系统策略和自定义策略,如果系统策略不满足授权要求, MRS 集群管理员可以创建自定义策略,并通过给用户组授予自定义策略来进行精细的访问控制。策略支持的操作与API相对应,授权项列表说明如下:

  • 权限:允许或拒绝某项操作。
  • 对应API接口:自定义策略实际调用的API接口。
  • 授权项:自定义策略中支持的Action,在自定义策略中的Action中写入授权项,可以实现授权项对应的权限功能。
  • 依赖的授权项:部分Action存在对其他Action的依赖,需要将依赖的Action同时写入授权项,才能实现对应的权限功能。
  • IAM 项目(Project)/企业项目(Enterprise Project):自定义策略的授权范围,包括IAM项目与企业项目。授权范围如果同时支持IAM项目和企业项目,表示此授权项对应的自定义策略,可以在IAM和企业管理两个服务中给用户组授权并生效。如果仅支持IAM项目,不支持企业项目,表示仅能在IAM中给用户组授权并生效,如果在企业管理中授权,则该自定义策略不生效。关于IAM项目与企业项目的区别,详情请参见:IAM与企业管理的区别

    “√”表示支持,“x”表示暂不支持。

表1 API授权项列表

权限

对应API接口

授权项(Action)

IAM项目

(Project)

企业项目

(Enterprise Project)

创建集群并执行作业(V1)

POST /v1.1/{project_id}/run-job-flow

mrs:cluster:create

创建集群(V2)

POST/v2/{project_id}/clusters

查询集群列表(V1)

GET /v1.1/{project_id}/cluster_infos

mrs:cluster:list

获取集群列表V2接口(可获取集群详细信息)

GET/v2/{project_id}/clusters

删除集群

DELETE /v1.1/{project_id}/clusters/{cluster_id}

mrs:cluster:delete

查询主机列表(V1)

GET /v1.1/{project_id}/clusters/{cluster_id}/hosts

mrs:host:list

查询文件列表(V2)

GET/v2/{project_id}/clusters/{cluster_id}/files

mrs:file:list

新增作业并执行(V1)

POST /v1.1/{project_id}/jobs/submit-job

mrs:job:submit

新增并执行作业(V2)

POST /v2/{project_id}/clusters/{cluster_id}/job-executions

查询作业exe对象列表(V1)

GET /v1.1/{project_id}/job-exes

mrs:job:list

查询单个作业信息(V2)

GET /v2/{project_id}/clusters/{cluster_id}/job-executions/{job_execution_id}

查询作业列表信息(V2)

GET /v2/{project_id}/clusters/{cluster_id}/job-executions

获取SQL结果(V2)

GET /v2/{project_id}/clusters/{cluster_id}/job-executions/{job_execution_id}/sql-result

查询作业exe对象详情(V1)

GET /v1.1/{project_id}/job-exes/{job_exe_id}

mrs:job:get

查询用户代理信息

GET/v2/{project_id}/clusters/{cluster_id}/agency-mapping

查询作业日志详情

GET/v2/{project_id}/clusters/{cluster_id}/job-executions/{job_execution_id}/log-detail

查询指定集群的标签

GET /v1.1/{project_id}/clusters/{cluster_id}/tags

mrs:tag:list

查询所有标签

GET /v1.1/{project_id}/clusters/tags

创建单个集群标签

POST/v1.1/{project_id}/clusters/{cluster_id}/tags

mrs:tag:create

批量添加/删除集群标签

POST /v1.1/{project_id}/clusters/{cluster_id}/tags/action

mrs:tag:batchOperate

查询特定标签的集群列表

POST /v1.1/{project_id}/clusters/resource_instances/action

mrs:tag:listResource

×

终止作业(V2)

POST /v2/{project_id}/clusters/{cluster_id}/job-executions/{job_execution_id}/kill

mrs:job:stop

批量删除作业(V2)

POST /v2/{project_id}/clusters/{cluster_id}/job-executions/batch-delete

mrs:job:batchDelete

取消sql执行

POST/v2/{project_id}/clusters/{cluster_id}/sql-execution/{sql_id}/cancel

mrs:sql:cancel

提交SQL语句

POST/v2/{project_id}/clusters/{cluster_id}/sql-execution

mrs:sql:execute

获取所有的弹性伸缩策略

GET/v2/{project_id}/autoscaling-policy/{cluster_id}

mrs:cluster:policy

配置弹性伸缩规则

POST /v1.1/{project_id}/autoscaling-policy/{cluster_id}

更新用户代理信息

PUT/v2/{project_id}/clusters/{cluster_id}/agency-mapping

mrs:cluster:syncUser

获取sql执行结果

GET/v2/{project_id}/clusters/{cluster_id}/sql-execution/{sql_id}

mrs:sql:get

support.huaweicloud.com/api-mrs/mrs_02_0083.html