在指定项目内为身份(用户、用户组或角色)解绑权限策略。相比于普通的策略授权,按项目授权时,权限仅在用户访问对应项目内资源时生效,若访问的资源不存在项目内,则权限不生效。在项目内移除策略后,用户访问项目内资源时的权限将被移除。
此接口的API Version为2021-08-01。建议使用SDK进行请求。
const columns = [
{
width: '9%',
title: '名称',
dataIndex: 'Name',
},
{
width: '9%',
title: '类型',
dataIndex: 'DataType',
},
{
width: '9%',
title: '是否必填',
dataIndex: 'IsRequired',
},
{
width: '18%',
title: '示例值',
dataIndex: 'Example',
},
{
width: '55%',
title: '描述',
dataIndex: 'Description',
},
];
const data = [
{
rowKey: '->Action',
Name: 'Action',
DataType: 'String',
IsRequired: '是',
Example: <RenderMd content={"DetachPolicyInProject"} />,
Description: <RenderMd content={"要执行的操作,取值:DetachPolicyInProject"} />,
children: [
]
},
{
rowKey: '->Version',
Name: 'Version',
DataType: 'String',
IsRequired: '是',
Example: <RenderMd content={"2021-08-01"} />,
Description: <RenderMd content={"API的版本,取值:2021-08-01"} />,
children: [
]
},
{
rowKey: '->PrincipalType',
Name: 'PrincipalType',
DataType: 'String',
IsRequired: '是',
Example: <RenderMd content={"User"} />,
Description: <RenderMd content={"身份类型,取值:\n- User:子用户\n- Role:角色\n- UserGroup:用户组"} />,
children: [
]
},
{
rowKey: '->PrincipalName',
Name: 'PrincipalName',
DataType: 'String',
IsRequired: '是',
Example: <RenderMd content={"Name"} />,
Description: <RenderMd content={"身份名称"} />,
children: [
]
},
{
rowKey: '->PolicyType',
Name: 'PolicyType',
DataType: 'String',
IsRequired: '是',
Example: <RenderMd content={"Custom"} />,
Description: <RenderMd content={"策略类型"} />,
children: [
]
},
{
rowKey: '->PolicyName',
Name: 'PolicyName',
DataType: 'String',
IsRequired: '是',
Example: <RenderMd content={"policy"} />,
Description: <RenderMd content={"策略名称"} />,
children: [
]
},
{
rowKey: '->ProjectName.N',
Name: 'ProjectName.N',
DataType: 'Array of String',
IsRequired: '是',
Example: <RenderMd content={"project-name"} />,
Description: <RenderMd content={"项目名称,即策略作用范围"} />,
children: [
]
},
];
return (<Table
rowKey="rowKey"
columns={columns}
data={data}
border={ { cell: true, wrapper: true } }
pagination={false}
/>);
本接口无特有的返回参数。更多信息请见返回结构。
http://iam.volcengineapi.com/?Action=DetachPolicyInProject
&Version=2021-08-01
&ProjectName.1=project-name
&PrincipalType=UserGroup
&PrincipalName=principal-name
{
"ResponseMetadata": {
"RequestId": "20230131193317E016D5963A3BE72AE155",
"Action": "DetachPolicyInProject",
"Version": "2021-08-01",
"Service": "iam",
"Region": "cn-north-1"
}
}
您可访问公共错误码,获取详细信息。