ResourceLinksOperations Class
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
<xref:resource_links> attribute.
Constructor
ResourceLinksOperations(*args, **kwargs)
Methods
| create_or_update |
Creates or updates a resource link between the specified resources. |
| delete |
Deletes a resource link with the specified ID. |
| get |
Gets a resource link with the specified ID. |
| list_at_source_scope |
Gets a list of resource links at and below the specified source scope. |
| list_at_subscription |
Gets all the linked resources for the subscription. |
create_or_update
Creates or updates a resource link between the specified resources.
async create_or_update(link_id: str, parameters: _models.ResourceLink, *, content_type: str = 'application/json', **kwargs: Any) -> _models.ResourceLink
Parameters
| Name | Description |
|---|---|
|
link_id
Required
|
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. Required. |
|
parameters
Required
|
Parameters for creating or updating a resource link. Is either a ResourceLink type or a IO[bytes] type. Required. |
Returns
| Type | Description |
|---|---|
|
ResourceLink or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
delete
Deletes a resource link with the specified ID.
async delete(link_id: str, **kwargs: Any) -> None
Parameters
| Name | Description |
|---|---|
|
link_id
Required
|
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. Required. |
Returns
| Type | Description |
|---|---|
|
None or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
get
Gets a resource link with the specified ID.
async get(link_id: str, **kwargs: Any) -> ResourceLink
Parameters
| Name | Description |
|---|---|
|
link_id
Required
|
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. Required. |
Returns
| Type | Description |
|---|---|
|
ResourceLink or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
list_at_source_scope
Gets a list of resource links at and below the specified source scope.
list_at_source_scope(scope: str, filter: Literal['atScope()'] = 'atScope()', **kwargs: Any) -> AsyncItemPaged[ResourceLink]
Parameters
| Name | Description |
|---|---|
|
scope
Required
|
The fully qualified ID of the scope for getting the resource links. For example, to list resource links at and under a resource group, set the scope to /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup. Required. |
|
filter
|
The filter to apply when getting resource links. To get links only at the specified scope (not below the scope), use Filter.atScope(). Known values are "atScope()" and None. Default value is "atScope()". Default value: atScope()
|
Returns
| Type | Description |
|---|---|
|
An iterator like instance of either ResourceLink or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
list_at_subscription
Gets all the linked resources for the subscription.
list_at_subscription(filter: str | None = None, **kwargs: Any) -> AsyncItemPaged[ResourceLink]
Parameters
| Name | Description |
|---|---|
|
filter
|
The filter to apply on the list resource links operation. The supported filter for list resource links is targetId. For example, $filter=targetId eq {value}. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
An iterator like instance of either ResourceLink or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
Attributes
models
models = <module 'azure.mgmt.resource.links.v2016_09_01.models' from 'C:\\ToolCache\\Python\\3.11.9\\x64\\Lib\\site-packages\\py2docfx\\venv\\venv206\\Lib\\site-packages\\azure\\mgmt\\resource\\links\\v2016_09_01\\models\\__init__.py'>