az resource link

Manage links between resources.

Linking is a feature of the Resource Manager. It enables declaring relationships between resources even if they do not reside in the same resource group. Linking has no impact on resource usage, billing, or role-based access. It allows for managing multiple resources across groups as a single unit.

Commands

az resource link create

Create a new link between resources.

az resource link delete

Delete a link between resources.

az resource link list

List resource links.

az resource link show

Gets a resource link with the specified ID.

az resource link update

Update link between resources.

Create a new link between resources.

az resource link create --link
                        --target
                        [--notes]
                        [--subscription]

Create a link from {SourceID} to {ResourceID} with notes

az resource link create --link {SourceID} --target {ResourceID} --notes "SourceID depends on ResourceID"
--link

Fully-qualified resource ID of the resource link.

--target

Fully-qualified resource ID of the resource link target.

--notes

Notes for the link.

--subscription

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

Delete a link between resources.

az resource link delete --link
                        [--subscription]

Delete link {LinkID}

az resource link delete --link {LinkID}
--link

Fully-qualified resource ID of the resource link.

--subscription

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

List resource links.

az resource link list [--filter]
                      [--query-examples]
                      [--scope]
                      [--subscription]

List links, filtering with {filter-string}

az resource link list --filter {filter-string}

List all links for resource group {ResourceGroup} in subscription {SubID}

az resource link list --scope /subscriptions/{SubID}/resourceGroups/{ResourceGroup}
--filter

Filter string for limiting results.

--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.

--scope

Fully-qualified scope for retrieving links.

--subscription

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

Gets a resource link with the specified ID.

az resource link show --link
                      [--query-examples]
                      [--subscription]
--link

Fully-qualified resource ID of the resource link.

--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.

--subscription

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

Update link between resources.

az resource link update --link
                        [--notes]
                        [--subscription]
                        [--target]

Update the notes for {LinkID} notes "some notes to explain this link"

az resource link update --link {LinkID} --notes "some notes to explain this link"
--link

Fully-qualified resource ID of the resource link.

--notes

Notes for the link.

--subscription

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

--target

Fully-qualified resource ID of the resource link target.