az iot ops identity
Note
此参考是 Azure CLI(版本 2.67.0 或更高版本)的 azure-iot-ops 扩展的一部分。 该扩展将在首次运行 az iot ops identity 命令时自动安装。 了解更多关于扩展的信息。
实例标识管理。
命令
| 名称 | 说明 | 类型 | Status |
|---|---|---|---|
| az iot ops identity assign |
使用实例分配用户分配的托管标识。 |
Extension | GA |
| az iot ops identity remove |
从实例中删除用户分配的托管标识。 |
Extension | GA |
| az iot ops identity show |
显示实例标识。 |
Extension | GA |
az iot ops identity assign
使用实例分配用户分配的托管标识。
此作包括用于适用目的的标识的联合身份验证。
如果存在 --usage “schema”,则默认情况下,如果预期的角色尚不存在,则会针对实例架构注册表分配标识。
az iot ops identity assign --mi-user-assigned
--name
--resource-group
[--custom-sr-role-id]
[--fc]
[--self-hosted-issuer {false, true}]
[--skip-sr-ra {false, true}]
[--usage {dataflow, schema, wasm-graph}]
示例
分配和联合所需的用户分配的托管标识,以便与数据流一起使用。
az iot ops identity assign --name myinstance -g myresourcegroup --mi-user-assigned $UA_MI_RESOURCE_ID
分配和联合所需的用户分配的托管标识,以便与架构注册表一起使用。
az iot ops identity assign --name myinstance -g myresourcegroup --mi-user-assigned $UA_MI_RESOURCE_ID --usage schema
分配和联合所需的用户分配托管标识,以便与架构注册表一起使用,并将该角色与要用于标识角色分配的自定义角色一起使用。
az iot ops identity assign --name myinstance -g myresourcegroup --mi-user-assigned $UA_MI_RESOURCE_ID --usage schema --custom-sr-role-id $CUSTOM_ROLE_ID
分配和联合所需的用户分配的托管标识以用于架构注册表,但跳过作的角色分配步骤。
az iot ops identity assign --name myinstance -g myresourcegroup --mi-user-assigned $UA_MI_RESOURCE_ID --usage schema --skip-sr-ra
必需参数
要用于实例的所需用户分配托管标识的资源 ID。
IoT 操作实例名称。
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
完全限定的角色定义 ID 采用以下格式:/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/roleDefinitions/{roleId}。 仅当 --usage 设置为“schema”时才适用。
联合凭据名称。
使用自承载 oidc 颁发者进行联合身份验证。
| 属性 | 值 |
|---|---|
| 接受的值: | false, true |
使用时,将跳过操作的角色分配步骤。 仅当 --usage 设置为“schema”时才适用。
| 属性 | 值 |
|---|---|
| 接受的值: | false, true |
指示关联标识的使用类型。
| 属性 | 值 |
|---|---|
| 默认值: | dataflow |
| 接受的值: | dataflow, schema, wasm-graph |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az iot ops identity remove
从实例中删除用户分配的托管标识。
az iot ops identity remove --mi-user-assigned
--name
--resource-group
[--fc]
示例
从实例中删除所需的用户分配托管标识。
az iot ops identity remove --name myinstance -g myresourcegroup --mi-user-assigned $UA_MI_RESOURCE_ID
必需参数
要用于实例的所需用户分配托管标识的资源 ID。
IoT 操作实例名称。
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
联合凭据名称。
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az iot ops identity show
显示实例标识。
az iot ops identity show --name
--resource-group
示例
显示与目标实例关联的标识。
az iot ops identity show --name myinstance -g myresourcegroup
必需参数
IoT 操作实例名称。
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |