Resource links - az resource link

Manage links between resources.

Linking is a feature of the Resource Manager. It enables you to declare relationships between resources even if they do not reside in the same resource group. Linking has no impact on the runtime of your resources, no impact on billing, and no impact on role-based access. It's simply a mechanism you can use to represent relationships so that tools like the tile gallery can provide a rich management experience. Your tools can inspect the links using the links API and provide custom relationship management experiences as well.

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 all resource links.
az resource link show Show a specific link.
az resource link update Update link between resources.

az resource link create

A link-id is of the form /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}.

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.

az resource link delete

A link-id is of the form /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}.

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.

az resource link list

Optionally restrict to a specific scope (e.g. /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup) or filter using a filter expression.

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.

az resource link show

A link-id is of the form /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}.

az resource link show --link-id

Examples

Show a specific link, <link-id>

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.

az resource link update

A link-id is of the form /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}.

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.