다음을 통해 공유


az policy assignment identity

정책 할당의 관리 ID를 관리합니다.

명령

Name Description 형식 상태
az policy assignment identity assign

정책 할당에 시스템 할당 ID 또는 사용자 할당 ID를 추가합니다.

Core GA
az policy assignment identity remove

정책 할당에서 관리 ID를 제거합니다.

Core GA
az policy assignment identity show

정책 할당의 관리 ID를 표시합니다.

Core GA

az policy assignment identity assign

Breaking change

Replacing an existing identity will change in a future release of the resource commands. It will require first removing the existing identity.

정책 할당에 시스템 할당 ID 또는 사용자 할당 ID를 추가합니다.

az policy assignment identity assign --name
                                     [--identity-scope]
                                     [--resource-group]
                                     [--role]
                                     [--scope]
                                     [--system-assigned]
                                     [--user-assigned]

예제

정책 할당에 시스템 할당 관리 ID를 추가합니다.

az policy assignment identity assign --system-assigned -g MyResourceGroup -n MyPolicyAssignment

시스템 할당 관리 ID를 정책 할당에 추가하고 현재 리소스 그룹에 대한 '기여자' 역할을 부여합니다.

az policy assignment identity assign --system-assigned -g MyResourceGroup -n MyPolicyAssignment --role Contributor --identity-scope /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/MyResourceGroup

정책 할당에 사용자 할당 관리 ID를 추가합니다.

az policy assignment identity assign --user-assigned MyAssignedId -g MyResourceGroup -n MyPolicyAssignment

필수 매개 변수

--name -n

정책 할당의 이름입니다.

선택적 매개 변수

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--identity-scope

시스템 할당 ID가 액세스할 수 있는 범위입니다.

속성
Parameter group: Managed Identity Arguments
--resource-group -g

정책을 적용할 리소스 그룹입니다.

--role

관리 ID에 할당될 역할 이름 또는 ID입니다.

속성
Parameter group: Managed Identity Arguments
Default value: Contributor
--scope

이 정책 할당 하위 명령이 적용되는 범위입니다. 기본값은 현재 컨텍스트 구독입니다.

--system-assigned

정책 할당에 시스템 할당 ID를 사용하려면 이 플래그를 제공합니다. 자세한 예제는 도움말을 확인하세요.

속성
Parameter group: Managed Identity Arguments
--user-assigned

정책 할당에 사용할 UserAssigned ID ID입니다. 자세한 예제는 도움말을 확인하세요.

속성
Parameter group: Managed Identity Arguments
전역 매개 변수
--debug

로깅 수위를 높여 모든 디버그 로그를 표시합니다.

속성
Default value: False
--help -h

이 도움말 메시지를 표시하고 종료합니다.

--only-show-errors

경고를 표시하지 않고 오류만 표시합니다.

속성
Default value: False
--output -o

Output format.

속성
Default value: json
허용되는 값: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 쿼리 문자열입니다. 자세한 내용 및 예제는 http://jmespath.org/ 참조하세요.

--subscription

구독의 이름 또는 ID입니다. az account set -s NAME_OR_ID사용하여 기본 구독을 구성할 수 있습니다.

--verbose

로깅의 자세한 정도를 증가시킵니다. 전체 디버그 로그에 --debug를 사용합니다.

속성
Default value: False

az policy assignment identity remove

Breaking change

Removing a user assigned identity will change in a future release of the resource commands. It will require providing the --mi-user-assigned switch.

정책 할당에서 관리 ID를 제거합니다.

az policy assignment identity remove --name
                                     [--resource-group]
                                     [--scope]

필수 매개 변수

--name -n

정책 할당의 이름입니다.

선택적 매개 변수

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--resource-group -g

정책을 적용할 리소스 그룹입니다.

--scope

이 정책 할당 하위 명령이 적용되는 범위입니다. 기본값은 현재 컨텍스트 구독입니다.

전역 매개 변수
--debug

로깅 수위를 높여 모든 디버그 로그를 표시합니다.

속성
Default value: False
--help -h

이 도움말 메시지를 표시하고 종료합니다.

--only-show-errors

경고를 표시하지 않고 오류만 표시합니다.

속성
Default value: False
--output -o

Output format.

속성
Default value: json
허용되는 값: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 쿼리 문자열입니다. 자세한 내용 및 예제는 http://jmespath.org/ 참조하세요.

--subscription

구독의 이름 또는 ID입니다. az account set -s NAME_OR_ID사용하여 기본 구독을 구성할 수 있습니다.

--verbose

로깅의 자세한 정도를 증가시킵니다. 전체 디버그 로그에 --debug를 사용합니다.

속성
Default value: False

az policy assignment identity show

정책 할당의 관리 ID를 표시합니다.

az policy assignment identity show --name
                                   [--resource-group]
                                   [--scope]

예제

정책 할당의 관리 ID를 표시합니다. (autogenerated)

az policy assignment identity show --name MyPolicyAssignment --scope '/providers/Microsoft.Management/managementGroups/MyManagementGroup'

필수 매개 변수

--name -n

정책 할당의 이름입니다.

선택적 매개 변수

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--resource-group -g

정책을 적용할 리소스 그룹입니다.

--scope

이 정책 할당 하위 명령이 적용되는 범위입니다. 기본값은 현재 컨텍스트 구독입니다.

전역 매개 변수
--debug

로깅 수위를 높여 모든 디버그 로그를 표시합니다.

속성
Default value: False
--help -h

이 도움말 메시지를 표시하고 종료합니다.

--only-show-errors

경고를 표시하지 않고 오류만 표시합니다.

속성
Default value: False
--output -o

Output format.

속성
Default value: json
허용되는 값: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 쿼리 문자열입니다. 자세한 내용 및 예제는 http://jmespath.org/ 참조하세요.

--subscription

구독의 이름 또는 ID입니다. az account set -s NAME_OR_ID사용하여 기본 구독을 구성할 수 있습니다.

--verbose

로깅의 자세한 정도를 증가시킵니다. 전체 디버그 로그에 --debug를 사용합니다.

속성
Default value: False