az policy assignment identity
ポリシー割り当てのマネージド ID を管理します。
コマンド
名前 | 説明 | 型 | 状態 |
---|---|---|---|
az policy assignment identity assign |
システム割り当て ID またはユーザー割り当て ID をポリシー割り当てに追加します。 |
Core | Deprecated |
az policy assignment identity remove |
ポリシー割り当てからマネージド ID を削除します。 |
Core | Deprecated |
az policy assignment identity show |
ポリシー割り当てのマネージド ID を表示します。 |
Core | GA |
az policy assignment identity assign
既存の ID の置き換えは、リソース コマンドの将来のリリースで変更されます。 最初に既存の ID を削除する必要があります。
システム割り当て 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
必須のパラメーター
ポリシー割り当ての名前。
省略可能のパラメーター
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
システム割り当て ID がアクセスできるスコープ。
プロパティ | 値 |
---|---|
Parameter group: | Managed Identity Arguments |
ポリシーが適用されるリソース グループ。
マネージド ID に割り当てられるロール名または ID。
プロパティ | 値 |
---|---|
Parameter group: | Managed Identity Arguments |
規定値: | Contributor |
このポリシー割り当てサブコマンドが適用されるスコープ。 既定値は現在のコンテキスト サブスクリプションです。
ポリシー割り当てにシステム割り当て ID を使用するには、このフラグを指定します。 その他の例については、ヘルプを参照してください。
プロパティ | 値 |
---|---|
Parameter group: | Managed Identity Arguments |
ポリシー割り当てに使用する UserAssigned ID。 その他の例については、ヘルプを参照してください。
プロパティ | 値 |
---|---|
Parameter group: | Managed Identity Arguments |
グローバル パラメーター
ログの詳細度を上げて、すべてのデバッグ ログを表示します。
プロパティ | 値 |
---|---|
規定値: | False |
このヘルプ メッセージを表示して終了します。
エラーのみを表示し、警告を抑制します。
プロパティ | 値 |
---|---|
規定値: | False |
Output format.
プロパティ | 値 |
---|---|
規定値: | json |
指定可能な値: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath クエリ文字列。 詳細と例については、http://jmespath.org/ を参照してください。
サブスクリプションの名前または ID。
az account set -s NAME_OR_ID
を使用して既定のサブスクリプションを構成できます。
ログの詳細度を高める。 完全なデバッグ ログには --debug を使用します。
プロパティ | 値 |
---|---|
規定値: | False |
az policy assignment identity remove
ユーザー割り当て ID の削除は、リソース コマンドの今後のリリースで変更されます。 ユーザー割り当てスイッチを提供する必要があります。
ポリシー割り当てからマネージド ID を削除します。
az policy assignment identity remove --name
[--resource-group]
[--scope]
必須のパラメーター
ポリシー割り当ての名前。
省略可能のパラメーター
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
ポリシーが適用されるリソース グループ。
このポリシー割り当てサブコマンドが適用されるスコープ。 既定値は現在のコンテキスト サブスクリプションです。
グローバル パラメーター
ログの詳細度を上げて、すべてのデバッグ ログを表示します。
プロパティ | 値 |
---|---|
規定値: | False |
このヘルプ メッセージを表示して終了します。
エラーのみを表示し、警告を抑制します。
プロパティ | 値 |
---|---|
規定値: | False |
Output format.
プロパティ | 値 |
---|---|
規定値: | json |
指定可能な値: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath クエリ文字列。 詳細と例については、http://jmespath.org/ を参照してください。
サブスクリプションの名前または ID。
az account set -s NAME_OR_ID
を使用して既定のサブスクリプションを構成できます。
ログの詳細度を高める。 完全なデバッグ ログには --debug を使用します。
プロパティ | 値 |
---|---|
規定値: | 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'
必須のパラメーター
ポリシー割り当ての名前。
省略可能のパラメーター
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
ポリシーが適用されるリソース グループ。
このポリシー割り当てサブコマンドが適用されるスコープ。 既定値は現在のコンテキスト サブスクリプションです。
グローバル パラメーター
ログの詳細度を上げて、すべてのデバッグ ログを表示します。
プロパティ | 値 |
---|---|
規定値: | False |
このヘルプ メッセージを表示して終了します。
エラーのみを表示し、警告を抑制します。
プロパティ | 値 |
---|---|
規定値: | False |
Output format.
プロパティ | 値 |
---|---|
規定値: | json |
指定可能な値: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath クエリ文字列。 詳細と例については、http://jmespath.org/ を参照してください。
サブスクリプションの名前または ID。
az account set -s NAME_OR_ID
を使用して既定のサブスクリプションを構成できます。
ログの詳細度を高める。 完全なデバッグ ログには --debug を使用します。
プロパティ | 値 |
---|---|
規定値: | False |