az ams account sp
管理服务主体和基于角色的访问,用于 Azure 媒体服务帐户。
命令
名称 | 说明 | 类型 | Status |
---|---|---|---|
az ams account sp create |
创建或更新服务主体,并配置其对 Azure 媒体服务帐户的访问权限。 |
Core | GA |
az ams account sp reset-credentials |
为为 Azure 媒体服务帐户配置的服务主体生成新的客户端密码。 |
Core | GA |
az ams account sp create
创建或更新服务主体,并配置其对 Azure 媒体服务帐户的访问权限。
整个 Azure Active Directory 的服务主体传播可能需要一些额外的时间才能完成。
az ams account sp create --account-name
--resource-group
[--name]
[--new-sp-name]
[--password]
[--role]
[--xml]
[--years]
示例
创建具有密码的服务主体,并配置其对 Azure 媒体服务帐户的访问权限。 输出将采用 xml 格式。
az ams account sp create -a myAmsAccount -g myRG -n mySpName --password mySecret --role Owner --xml
使用新角色和新名称更新服务主体。
az ams account sp create -a myAmsAccount -g myRG -n mySpName --new-sp-name myNewSpName --role newRole
必需参数
Azure 媒体服务帐户的名称。
资源组的名称。 可以使用 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.
要与 RBAC 关联的应用名称或应用 URI。 如果不存在,将生成默认名称,例如“{amsaccountname}-access-sp”。
要更新 RBAC 的新应用名称或应用 URI。
密码的友好名称。 实际密码将是自动生成的强密码,该密码将在命令运行后显示。
服务主体的角色。
启用 xml 输出格式。
属性 | 值 |
---|---|
默认值: | False |
机密有效的年数。 默认值:1 年。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | 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 ams account sp reset-credentials
为为 Azure 媒体服务帐户配置的服务主体生成新的客户端密码。
az ams account sp reset-credentials [--account-name]
[--ids]
[--name]
[--password]
[--resource-group]
[--role]
[--subscription]
[--xml]
[--years]
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Azure 媒体服务帐户的名称。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
要与 RBAC 关联的应用名称或应用 URI。 如果不存在,将生成默认名称,例如“{amsaccountname}-access-sp”。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
密码的友好名称。 实际密码将是自动生成的强密码,该密码将在命令运行后显示。
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
服务主体的角色。
属性 | 值 |
---|---|
默认值: | Contributor |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
启用 xml 输出格式。
属性 | 值 |
---|---|
默认值: | False |
机密有效的年数。 默认值:1 年。
属性 | 值 |
---|---|
默认值: | 1 |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |