@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api ManagementLinkClient
@base https://management.azure.com
@version 2016-09-01
@auth OAuth2
@common_fields {api-version: any # The API version to use for the operation.}
@endpoints 6
@toc providers(1), {linkId}(3), subscriptions(1), {scope}(1)

@group providers
@endpoint GET /providers/Microsoft.Resources/operations
@desc Lists all of the available Microsoft.Resources REST API operations.
@returns(200) OK. The request has succeeded.

@endgroup

@group {linkId}
@endpoint DELETE /{linkId}
@desc Deletes a resource link with the specified ID.
@required {linkId: any # 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}
@returns(200) OK
@returns(204) No Content

@endpoint PUT /{linkId}
@desc Creates or updates a resource link between the specified resources.
@required {linkId: any # 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, parameters: any # Parameters for creating or updating a resource link.}
@returns(200) OK - Returns information about the link.
@returns(201) Created - Returns information about the link.

@endpoint GET /{linkId}
@desc Gets a resource link with the specified ID.
@required {linkId: any # 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}
@returns(200) OK - Returns information about the resource link.

@endgroup

@group subscriptions
@endpoint GET /subscriptions/{subscriptionId}/providers/Microsoft.Resources/links
@desc Gets all the linked resources for the subscription.
@required {subscriptionId: any # The ID of the target subscription.}
@optional {$filter: any # 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}}
@returns(200) Returns an array of resource links for the subscription.

@endgroup

@group {scope}
@endpoint GET /{scope}/providers/Microsoft.Resources/links
@desc Gets a list of resource links at and below the specified source scope.
@required {scope: any # 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.}
@optional {$filter: any # The filter to apply when getting resource links. To get links only at the specified scope (not below the scope), use Filter.atScope().}
@returns(200) OK - Returns an array of links at the specified scope.

@endgroup

@end
