links

package
v16.2.1+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package links implements the Azure ARM Links service API version 2016-09-01.

Azure resources can be linked together to form logical relationships. You can establish links between resources belonging to different resource groups. However, all the linked resources must belong to the same subscription. Each resource can be linked to 50 other resources. If any of the linked resources are deleted or moved, the link owner must clean up the remaining link.

Index

Constants

View Source
const (
	// DefaultBaseURI is the default URI used for the service Links
	DefaultBaseURI = "https://management.azure.com"
)

Variables

This section is empty.

Functions

func UserAgent

func UserAgent() string

UserAgent returns the UserAgent string to use when sending http.Requests.

func Version

func Version() string

Version returns the semantic version (see http://semver.org) of the client.

Types

type BaseClient

type BaseClient struct {
	autorest.Client
	BaseURI        string
	SubscriptionID string
}

BaseClient is the base client for Links.

func New

func New(subscriptionID string) BaseClient

New creates an instance of the BaseClient client.

func NewWithBaseURI

func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient

NewWithBaseURI creates an instance of the BaseClient client.

type Filter

type Filter string

Filter enumerates the values for filter.

const (
	// AtScope ...
	AtScope Filter = "atScope()"
)

func PossibleFilterValues

func PossibleFilterValues() []Filter

PossibleFilterValues returns an array of possible values for the Filter const type.

type ResourceLink struct {
	autorest.Response `json:"-"`
	// ID - The fully qualified ID of the resource link.
	ID *string `json:"id,omitempty"`
	// Name - The name of the resource link.
	Name *string `json:"name,omitempty"`
	// Properties - Properties for resource link.
	Properties *ResourceLinkProperties `json:"properties,omitempty"`
}

ResourceLink the resource link.

type ResourceLinkFilter

type ResourceLinkFilter struct {
	// TargetID - The ID of the target resource.
	TargetID *string `json:"targetId,omitempty"`
}

ResourceLinkFilter resource link filter.

type ResourceLinkProperties

type ResourceLinkProperties struct {
	// SourceID - The fully qualified ID of the source resource in the link.
	SourceID *string `json:"sourceId,omitempty"`
	// TargetID - The fully qualified ID of the target resource in the link.
	TargetID *string `json:"targetId,omitempty"`
	// Notes - Notes about the resource link.
	Notes *string `json:"notes,omitempty"`
}

ResourceLinkProperties the resource link properties.

type ResourceLinkResult

type ResourceLinkResult struct {
	autorest.Response `json:"-"`
	// Value - An array of resource links.
	Value *[]ResourceLink `json:"value,omitempty"`
	// NextLink - The URL to use for getting the next set of results.
	NextLink *string `json:"nextLink,omitempty"`
}

ResourceLinkResult list of resource links.

func (ResourceLinkResult) IsEmpty

func (rlr ResourceLinkResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

type ResourceLinkResultIterator

type ResourceLinkResultIterator struct {
	// contains filtered or unexported fields
}

ResourceLinkResultIterator provides access to a complete listing of ResourceLink values.

func (*ResourceLinkResultIterator) Next

func (iter *ResourceLinkResultIterator) Next() error

Next advances to the next value. If there was an error making the request the iterator does not advance and the error is returned.

func (ResourceLinkResultIterator) NotDone

func (iter ResourceLinkResultIterator) NotDone() bool

NotDone returns true if the enumeration should be started or is not yet complete.

func (ResourceLinkResultIterator) Response

Response returns the raw server response from the last page request.

func (ResourceLinkResultIterator) Value

Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.

type ResourceLinkResultPage

type ResourceLinkResultPage struct {
	// contains filtered or unexported fields
}

ResourceLinkResultPage contains a page of ResourceLink values.

func (*ResourceLinkResultPage) Next

func (page *ResourceLinkResultPage) Next() error

Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.

func (ResourceLinkResultPage) NotDone

func (page ResourceLinkResultPage) NotDone() bool

NotDone returns true if the page enumeration should be started or is not yet complete.

func (ResourceLinkResultPage) Response

Response returns the raw server response from the last page request.

func (ResourceLinkResultPage) Values

func (page ResourceLinkResultPage) Values() []ResourceLink

Values returns the slice of values for the current page or nil if there are no values.

type ResourceLinksClient

type ResourceLinksClient struct {
	BaseClient
}

ResourceLinksClient is the azure resources can be linked together to form logical relationships. You can establish links between resources belonging to different resource groups. However, all the linked resources must belong to the same subscription. Each resource can be linked to 50 other resources. If any of the linked resources are deleted or moved, the link owner must clean up the remaining link.

func NewResourceLinksClient

func NewResourceLinksClient(subscriptionID string) ResourceLinksClient

NewResourceLinksClient creates an instance of the ResourceLinksClient client.

func NewResourceLinksClientWithBaseURI

func NewResourceLinksClientWithBaseURI(baseURI string, subscriptionID string) ResourceLinksClient

NewResourceLinksClientWithBaseURI creates an instance of the ResourceLinksClient client.

func (ResourceLinksClient) CreateOrUpdate

func (client ResourceLinksClient) CreateOrUpdate(ctx context.Context, linkID string, parameters ResourceLink) (result ResourceLink, err error)

CreateOrUpdate creates or updates a resource link between the specified resources. Parameters: linkID - 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 - parameters for creating or updating a resource link.

func (ResourceLinksClient) CreateOrUpdatePreparer

func (client ResourceLinksClient) CreateOrUpdatePreparer(ctx context.Context, linkID string, parameters ResourceLink) (*http.Request, error)

CreateOrUpdatePreparer prepares the CreateOrUpdate request.

func (ResourceLinksClient) CreateOrUpdateResponder

func (client ResourceLinksClient) CreateOrUpdateResponder(resp *http.Response) (result ResourceLink, err error)

CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always closes the http.Response Body.

func (ResourceLinksClient) CreateOrUpdateSender

func (client ResourceLinksClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error)

CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the http.Response Body if it receives an error.

func (ResourceLinksClient) Delete

func (client ResourceLinksClient) Delete(ctx context.Context, linkID string) (result autorest.Response, err error)

Delete deletes a resource link with the specified ID. Parameters: linkID - 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

func (ResourceLinksClient) DeletePreparer

func (client ResourceLinksClient) DeletePreparer(ctx context.Context, linkID string) (*http.Request, error)

DeletePreparer prepares the Delete request.

func (ResourceLinksClient) DeleteResponder

func (client ResourceLinksClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error)

DeleteResponder handles the response to the Delete request. The method always closes the http.Response Body.

func (ResourceLinksClient) DeleteSender

func (client ResourceLinksClient) DeleteSender(req *http.Request) (*http.Response, error)

DeleteSender sends the Delete request. The method will close the http.Response Body if it receives an error.

func (ResourceLinksClient) Get

func (client ResourceLinksClient) Get(ctx context.Context, linkID string) (result ResourceLink, err error)

Get gets a resource link with the specified ID. Parameters: linkID - 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

func (ResourceLinksClient) GetPreparer

func (client ResourceLinksClient) GetPreparer(ctx context.Context, linkID string) (*http.Request, error)

GetPreparer prepares the Get request.

func (ResourceLinksClient) GetResponder

func (client ResourceLinksClient) GetResponder(resp *http.Response) (result ResourceLink, err error)

GetResponder handles the response to the Get request. The method always closes the http.Response Body.

func (ResourceLinksClient) GetSender

func (client ResourceLinksClient) GetSender(req *http.Request) (*http.Response, error)

GetSender sends the Get request. The method will close the http.Response Body if it receives an error.

func (ResourceLinksClient) ListAtSourceScope

func (client ResourceLinksClient) ListAtSourceScope(ctx context.Context, scope string, filter Filter) (result ResourceLinkResultPage, err error)

ListAtSourceScope gets a list of resource links at and below the specified source scope. Parameters: scope - 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. filter - the filter to apply when getting resource links. To get links only at the specified scope (not below the scope), use Filter.atScope().

func (ResourceLinksClient) ListAtSourceScopeComplete

func (client ResourceLinksClient) ListAtSourceScopeComplete(ctx context.Context, scope string, filter Filter) (result ResourceLinkResultIterator, err error)

ListAtSourceScopeComplete enumerates all values, automatically crossing page boundaries as required.

func (ResourceLinksClient) ListAtSourceScopePreparer

func (client ResourceLinksClient) ListAtSourceScopePreparer(ctx context.Context, scope string, filter Filter) (*http.Request, error)

ListAtSourceScopePreparer prepares the ListAtSourceScope request.

func (ResourceLinksClient) ListAtSourceScopeResponder

func (client ResourceLinksClient) ListAtSourceScopeResponder(resp *http.Response) (result ResourceLinkResult, err error)

ListAtSourceScopeResponder handles the response to the ListAtSourceScope request. The method always closes the http.Response Body.

func (ResourceLinksClient) ListAtSourceScopeSender

func (client ResourceLinksClient) ListAtSourceScopeSender(req *http.Request) (*http.Response, error)

ListAtSourceScopeSender sends the ListAtSourceScope request. The method will close the http.Response Body if it receives an error.

func (ResourceLinksClient) ListAtSubscription

func (client ResourceLinksClient) ListAtSubscription(ctx context.Context, filter string) (result ResourceLinkResultPage, err error)

ListAtSubscription gets all the linked resources for the subscription. Parameters: 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}

func (ResourceLinksClient) ListAtSubscriptionComplete

func (client ResourceLinksClient) ListAtSubscriptionComplete(ctx context.Context, filter string) (result ResourceLinkResultIterator, err error)

ListAtSubscriptionComplete enumerates all values, automatically crossing page boundaries as required.

func (ResourceLinksClient) ListAtSubscriptionPreparer

func (client ResourceLinksClient) ListAtSubscriptionPreparer(ctx context.Context, filter string) (*http.Request, error)

ListAtSubscriptionPreparer prepares the ListAtSubscription request.

func (ResourceLinksClient) ListAtSubscriptionResponder

func (client ResourceLinksClient) ListAtSubscriptionResponder(resp *http.Response) (result ResourceLinkResult, err error)

ListAtSubscriptionResponder handles the response to the ListAtSubscription request. The method always closes the http.Response Body.

func (ResourceLinksClient) ListAtSubscriptionSender

func (client ResourceLinksClient) ListAtSubscriptionSender(req *http.Request) (*http.Response, error)

ListAtSubscriptionSender sends the ListAtSubscription request. The method will close the http.Response Body if it receives an error.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL