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, no impact on billing, and no impact on 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 Get details for a resource link.
az resource link update Update link between resources.

Create a new link between resources.

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

Examples

Create a link from <link-id> to <resource-id> with notes "some notes to explain this link"

az resource link create --link-id  --target-id  --notes "some notes to explain this link"

Required Parameters

--link-id
--target-id
The id of the resource link target.

Optional Parameters

--notes
Notes for this link.

Delete a link between resources.

az resource link delete --link-id

Examples

Delete link <link-id>

az resource link delete --link-id 

Required Parameters

--link-id
The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink.

List resource links.

az resource link list [--filter-string]
[--scope]

Examples

List links, filtering with <filter-string>

az resource link list --filter 

List all links at /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup

az resource link list --scope /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup

Optional Parameters

--filter-string
A filter for restricting the results.
--scope
The scope for the links.

Get details for a resource link.

az resource link show --link-id

Examples

Show the <link-id> resource link.

az resource link show --link-id 

Required Parameters

--link-id
The fully qualified Id of the resource link. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink.

Update link between resources.

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

Examples

Update the notes for <link-id> notes "some notes to explain this link"

az resource link update --link-id  --notes "some notes to explain this link"

Required Parameters

--link-id

Optional Parameters

--notes
Notes for this link.
--target-id
The id of the resource link target.