az acr scope-map

Manage scope access maps for Azure Container Registries.

Commands

az acr scope-map create

Create a scope map for an Azure Container Registry.

az acr scope-map delete

Delete a scope map for an Azure Container Registry.

az acr scope-map list

List all scope maps for an Azure Container Registry.

az acr scope-map show

Show details and attributes of a scope map for an Azure Container Registry.

az acr scope-map update

Update a scope map for an Azure Container Registry.

az acr scope-map create

Create a scope map for an Azure Container Registry.

az acr scope-map create --name
                        --registry
                        --repository
                        [--description]
                        [--resource-group]
                        [--subscription]

Examples

Create a scope map that allows content/write and metadata/read actions for `hello-world` repository, and content/read action for `hello-world-again`.

az acr scope-map create -n MyScopeMap -r MyRegistry --repository hello-world content/write metadata/read --repository hello-world-again content/read --description "Sample scope map."

Required Parameters

--name -n

The name of the scope map.

--registry -r

The name of the container registry. You can configure the default registry name using az configure --defaults acr=<registry name>.

--repository

Repository permissions. Use the format "--repository REPO [ACTION1 ACTION2 ...]" per flag. Valid actions are {'content/delete', 'content/write', 'metadata/read', 'content/read', 'metadata/write'}.

Optional Parameters

--description

Description for the scope map. Maximum 256 characters are allowed.

--resource-group -g

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

--subscription

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

az acr scope-map delete

Delete a scope map for an Azure Container Registry.

az acr scope-map delete --name
                        --registry
                        [--resource-group]
                        [--subscription]
                        [--yes]

Examples

Delete the scope map 'MyScopeMap'.

az acr scope-map delete -n MyScopeMap -r MyRegistry

Required Parameters

--name -n

The name of the scope map.

--registry -r

The name of the container registry. You can configure the default registry name using az configure --defaults acr=<registry name>.

Optional Parameters

--resource-group -g

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

--subscription

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

--yes -y

Do not prompt for confirmation.

az acr scope-map list

List all scope maps for an Azure Container Registry.

az acr scope-map list --registry
                      [--query-examples]
                      [--resource-group]
                      [--subscription]

Examples

List scope maps under the registry 'MyRegistry'.

az acr scope-map list -r MyRegistry

Required Parameters

--registry -r

The name of the container registry. You can configure the default registry name using az configure --defaults acr=<registry name>.

Optional Parameters

--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

--resource-group -g

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

--subscription

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

az acr scope-map show

Show details and attributes of a scope map for an Azure Container Registry.

az acr scope-map show --name
                      --registry
                      [--query-examples]
                      [--resource-group]
                      [--subscription]

Examples

Get information for the scope map 'MyScopeMap'.

az acr scope-map show -n MyScopeMap -r MyRegistry

Required Parameters

--name -n

The name of the scope map.

--registry -r

The name of the container registry. You can configure the default registry name using az configure --defaults acr=<registry name>.

Optional Parameters

--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

--resource-group -g

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

--subscription

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

az acr scope-map update

Update a scope map for an Azure Container Registry.

az acr scope-map update --name
                        --registry
                        [--add]
                        [--description]
                        [--remove]
                        [--resource-group]
                        [--subscription]

Examples

Update the scope map 'MyScopeMap' removing metadata/read and content/read actions for `hello-world` repository, and metadata/write action for `hello-world-again`.

az acr scope-map update -n MyScopeMap -r MyRegistry --remove hello-world metadata/read content/read --remove hello-world-again metadata/write

Required Parameters

--name -n

The name of the scope map.

--registry -r

The name of the container registry. You can configure the default registry name using az configure --defaults acr=<registry name>.

Optional Parameters

--add

Repository permissions to be added. Use the format "--add REPO [ACTION1 ACTION2 ...]" per flag. Valid actions are {'content/delete', 'content/write', 'metadata/read', 'content/read', 'metadata/write'}.

--description

Description for the scope map. Maximum 256 characters are allowed.

--remove

Respsitory permissions to be removed. Use the format "--remove REPO [ACTION1 ACTION2 ...]" per flag. Valid actions are {'content/delete', 'content/write', 'metadata/read', 'content/read', 'metadata/write'}.

--resource-group -g

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

--subscription

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