Κοινή χρήση μέσω


az ams account sp

Manage service principal and role based access for an Azure Media Services account.

Commands

Name Description Type Status
az ams account sp create

Create or update a service principal and configure its access to an Azure Media Services account.

Core GA
az ams account sp reset-credentials

Generate a new client secret for a service principal configured for an Azure Media Services account.

Core GA

az ams account sp create

Create or update a service principal and configure its access to an Azure Media Services account.

Service principal propagation throughout Azure Active Directory may take some extra seconds to complete.

az ams account sp create --account-name
                         --resource-group
                         [--name]
                         [--new-sp-name]
                         [--password]
                         [--role]
                         [--xml]
                         [--years]

Examples

Create a service principal with password and configure its access to an Azure Media Services account. Output will be in xml format.

az ams account sp create -a myAmsAccount -g myRG -n mySpName --password mySecret --role Owner --xml

Update a service principal with a new role and new name.

az ams account sp create -a myAmsAccount -g myRG -n mySpName --new-sp-name myNewSpName --role newRole

Required Parameters

--account-name -a

The name of the Azure Media Services account.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--name -n

The app name or app URI to associate the RBAC with. If not present, a default name like '{amsaccountname}-access-sp' will be generated.

--new-sp-name

The new app name or app URI to update the RBAC with.

--password -p

The friendly name of the password. The actual password will be an autogenerated strong password which will be displayed after the command runs.

--role

The role of the service principal.

--xml

Enables xml output format.

Default value: False
--years

Number of years for which the secret will be valid. Default: 1 year.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az ams account sp reset-credentials

Generate a new client secret for a service principal configured for an Azure Media Services account.

az ams account sp reset-credentials [--account-name]
                                    [--ids]
                                    [--name]
                                    [--password]
                                    [--resource-group]
                                    [--role]
                                    [--subscription]
                                    [--xml]
                                    [--years]

Optional Parameters

--account-name -a

The name of the Azure Media Services account.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

The app name or app URI to associate the RBAC with. If not present, a default name like '{amsaccountname}-access-sp' will be generated.

--password -p

The friendly name of the password. The actual password will be an autogenerated strong password which will be displayed after the command runs.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--role

The role of the service principal.

Default value: Contributor
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--xml

Enables xml output format.

Default value: False
--years

Number of years for which the secret will be valid. Default: 1 year.

Default value: 1
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.