links

package
v0.0.0-...-838bff6 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2019 License: Apache-2.0 Imports: 8 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 Operation

type Operation struct {
	// Name - Operation name: {provider}/{resource}/{operation}
	Name *string `json:"name,omitempty"`
	// Display - The object that represents the operation.
	Display *OperationDisplay `json:"display,omitempty"`
}

Operation microsoft.Resources operation

type OperationDisplay

type OperationDisplay struct {
	// Provider - Service provider: Microsoft.Resources
	Provider *string `json:"provider,omitempty"`
	// Resource - Resource on which the operation is performed: Profile, endpoint, etc.
	Resource *string `json:"resource,omitempty"`
	// Operation - Operation type: Read, write, delete, etc.
	Operation *string `json:"operation,omitempty"`
	// Description - Description of the operation.
	Description *string `json:"description,omitempty"`
}

OperationDisplay the object that represents the operation.

type OperationListResult

type OperationListResult struct {
	autorest.Response `json:"-"`
	// Value - List of Microsoft.Resources operations.
	Value *[]Operation `json:"value,omitempty"`
	// NextLink - URL to get the next set of operation list results if there are any.
	NextLink *string `json:"nextLink,omitempty"`
}

OperationListResult result of the request to list Microsoft.Resources operations. It contains a list of operations and a URL link to get the next set of results.

func (OperationListResult) IsEmpty

func (olr OperationListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

type OperationListResultIterator

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

OperationListResultIterator provides access to a complete listing of Operation values.

func NewOperationListResultIterator

func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator

Creates a new instance of the OperationListResultIterator type.

func (*OperationListResultIterator) Next

func (iter *OperationListResultIterator) 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. Deprecated: Use NextWithContext() instead.

func (*OperationListResultIterator) NextWithContext

func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error)

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

func (OperationListResultIterator) NotDone

func (iter OperationListResultIterator) NotDone() bool

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

func (OperationListResultIterator) Response

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

func (OperationListResultIterator) Value

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

type OperationListResultPage

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

OperationListResultPage contains a page of Operation values.

func NewOperationListResultPage

func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage

Creates a new instance of the OperationListResultPage type.

func (*OperationListResultPage) Next

func (page *OperationListResultPage) 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. Deprecated: Use NextWithContext() instead.

func (*OperationListResultPage) NextWithContext

func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error)

NextWithContext 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 (OperationListResultPage) NotDone

func (page OperationListResultPage) NotDone() bool

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

func (OperationListResultPage) Response

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

func (OperationListResultPage) Values

func (page OperationListResultPage) Values() []Operation

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

type OperationsClient

type OperationsClient struct {
	BaseClient
}

OperationsClient 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 NewOperationsClient

func NewOperationsClient(subscriptionID string) OperationsClient

NewOperationsClient creates an instance of the OperationsClient client.

func NewOperationsClientWithBaseURI

func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient

NewOperationsClientWithBaseURI creates an instance of the OperationsClient client.

func (OperationsClient) List

func (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error)

List lists all of the available Microsoft.Resources REST API operations.

func (OperationsClient) ListComplete

func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error)

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

func (OperationsClient) ListPreparer

func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error)

ListPreparer prepares the List request.

func (OperationsClient) ListResponder

func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (OperationsClient) ListSender

func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error)

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

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"`
	// Type - The resource link object.
	Type interface{} `json:"type,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 NewResourceLinkResultIterator

func NewResourceLinkResultIterator(page ResourceLinkResultPage) ResourceLinkResultIterator

Creates a new instance of the ResourceLinkResultIterator type.

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. Deprecated: Use NextWithContext() instead.

func (*ResourceLinkResultIterator) NextWithContext

func (iter *ResourceLinkResultIterator) NextWithContext(ctx context.Context) (err error)

NextWithContext 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 NewResourceLinkResultPage

func NewResourceLinkResultPage(getNextPage func(context.Context, ResourceLinkResult) (ResourceLinkResult, error)) ResourceLinkResultPage

Creates a new instance of the ResourceLinkResultPage type.

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. Deprecated: Use NextWithContext() instead.

func (*ResourceLinkResultPage) NextWithContext

func (page *ResourceLinkResultPage) NextWithContext(ctx context.Context) (err error)

NextWithContext 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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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