subscription

package
v33.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package subscription implements the Azure ARM Subscription service API version 2017-11-01-preview.

Subscription definitions client provides an interface to create, modify and retrieve azure subscriptions programmatically.

Index

Constants

View Source
const (
	// DefaultBaseURI is the default URI used for the service Subscription
	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
}

BaseClient is the base client for Subscription.

func New

func New() BaseClient

New creates an instance of the BaseClient client.

func NewWithBaseURI

func NewWithBaseURI(baseURI string) BaseClient

NewWithBaseURI creates an instance of the BaseClient client.

type Definition

type Definition struct {
	autorest.Response `json:"-"`
	// ID - READ-ONLY; The resource ID.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; The name of the resource.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; The type of the resource.
	Type *string `json:"type,omitempty"`
	// DefinitionProperties - the subscription definition properties
	*DefinitionProperties `json:"properties,omitempty"`
}

Definition the subscription definition used to create the subscription.

func (Definition) MarshalJSON

func (d Definition) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Definition.

func (*Definition) UnmarshalJSON

func (d *Definition) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for Definition struct.

type DefinitionList

type DefinitionList struct {
	autorest.Response `json:"-"`
	// Value - An array of subscriptionDefinitions
	Value *[]Definition `json:"value,omitempty"`
	// NextLink - URL to get the next set of operation list results if there are any.
	NextLink *string `json:"nextLink,omitempty"`
}

DefinitionList subscription Definition List operation response.

func (DefinitionList) IsEmpty

func (dl DefinitionList) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

type DefinitionListIterator

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

DefinitionListIterator provides access to a complete listing of Definition values.

func NewDefinitionListIterator

func NewDefinitionListIterator(page DefinitionListPage) DefinitionListIterator

Creates a new instance of the DefinitionListIterator type.

func (*DefinitionListIterator) Next

func (iter *DefinitionListIterator) 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 (*DefinitionListIterator) NextWithContext

func (iter *DefinitionListIterator) 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 (DefinitionListIterator) NotDone

func (iter DefinitionListIterator) NotDone() bool

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

func (DefinitionListIterator) Response

func (iter DefinitionListIterator) Response() DefinitionList

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

func (DefinitionListIterator) Value

func (iter DefinitionListIterator) Value() Definition

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

type DefinitionListPage

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

DefinitionListPage contains a page of Definition values.

func NewDefinitionListPage

func NewDefinitionListPage(getNextPage func(context.Context, DefinitionList) (DefinitionList, error)) DefinitionListPage

Creates a new instance of the DefinitionListPage type.

func (*DefinitionListPage) Next

func (page *DefinitionListPage) 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 (*DefinitionListPage) NextWithContext

func (page *DefinitionListPage) 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 (DefinitionListPage) NotDone

func (page DefinitionListPage) NotDone() bool

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

func (DefinitionListPage) Response

func (page DefinitionListPage) Response() DefinitionList

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

func (DefinitionListPage) Values

func (page DefinitionListPage) Values() []Definition

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

type DefinitionProperties

type DefinitionProperties struct {
	// SubscriptionID - READ-ONLY; The ID of the subscription.
	SubscriptionID *string `json:"subscriptionId,omitempty"`
	// SubscriptionDisplayName - The display name of the subscription.
	SubscriptionDisplayName *string `json:"subscriptionDisplayName,omitempty"`
	// OfferType - The offer type of the subscription. For example, MS-AZR-0017P (EnterpriseAgreement) and MS-AZR-0148P (EnterpriseAgreement devTest) are available.
	OfferType *string `json:"offerType,omitempty"`
	// Etag - The etag the subscription definition.
	Etag *string `json:"etag,omitempty"`
}

DefinitionProperties the subscription definition properties.

type DefinitionsClient

type DefinitionsClient struct {
	BaseClient
}

DefinitionsClient is the subscription definitions client provides an interface to create, modify and retrieve azure subscriptions programmatically.

func NewDefinitionsClient

func NewDefinitionsClient() DefinitionsClient

NewDefinitionsClient creates an instance of the DefinitionsClient client.

func NewDefinitionsClientWithBaseURI

func NewDefinitionsClientWithBaseURI(baseURI string) DefinitionsClient

NewDefinitionsClientWithBaseURI creates an instance of the DefinitionsClient client.

func (DefinitionsClient) Create

func (client DefinitionsClient) Create(ctx context.Context, subscriptionDefinitionName string, body Definition) (result DefinitionsCreateFuture, err error)

Create create an Azure subscription definition. Parameters: subscriptionDefinitionName - the name of the Azure subscription definition. body - the subscription definition creation.

func (DefinitionsClient) CreatePreparer

func (client DefinitionsClient) CreatePreparer(ctx context.Context, subscriptionDefinitionName string, body Definition) (*http.Request, error)

CreatePreparer prepares the Create request.

func (DefinitionsClient) CreateResponder

func (client DefinitionsClient) CreateResponder(resp *http.Response) (result Definition, err error)

CreateResponder handles the response to the Create request. The method always closes the http.Response Body.

func (DefinitionsClient) CreateSender

func (client DefinitionsClient) CreateSender(req *http.Request) (future DefinitionsCreateFuture, err error)

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

func (DefinitionsClient) Get

func (client DefinitionsClient) Get(ctx context.Context, subscriptionDefinitionName string) (result Definition, err error)

Get get an Azure subscription definition. Parameters: subscriptionDefinitionName - the name of the Azure subscription definition.

func (DefinitionsClient) GetOperationStatus

func (client DefinitionsClient) GetOperationStatus(ctx context.Context, operationID uuid.UUID) (result Definition, err error)

GetOperationStatus retrieves the status of the subscription definition PUT operation. The URI of this API is returned in the Location field of the response header. Parameters: operationID - the operation ID, which can be found from the Location field in the generate recommendation response header.

func (DefinitionsClient) GetOperationStatusPreparer

func (client DefinitionsClient) GetOperationStatusPreparer(ctx context.Context, operationID uuid.UUID) (*http.Request, error)

GetOperationStatusPreparer prepares the GetOperationStatus request.

func (DefinitionsClient) GetOperationStatusResponder

func (client DefinitionsClient) GetOperationStatusResponder(resp *http.Response) (result Definition, err error)

GetOperationStatusResponder handles the response to the GetOperationStatus request. The method always closes the http.Response Body.

func (DefinitionsClient) GetOperationStatusSender

func (client DefinitionsClient) GetOperationStatusSender(req *http.Request) (*http.Response, error)

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

func (DefinitionsClient) GetPreparer

func (client DefinitionsClient) GetPreparer(ctx context.Context, subscriptionDefinitionName string) (*http.Request, error)

GetPreparer prepares the Get request.

func (DefinitionsClient) GetResponder

func (client DefinitionsClient) GetResponder(resp *http.Response) (result Definition, err error)

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

func (DefinitionsClient) GetSender

func (client DefinitionsClient) 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 (DefinitionsClient) List

func (client DefinitionsClient) List(ctx context.Context) (result DefinitionListPage, err error)

List list an Azure subscription definition by subscriptionId.

func (DefinitionsClient) ListComplete

func (client DefinitionsClient) ListComplete(ctx context.Context) (result DefinitionListIterator, err error)

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

func (DefinitionsClient) ListPreparer

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

ListPreparer prepares the List request.

func (DefinitionsClient) ListResponder

func (client DefinitionsClient) ListResponder(resp *http.Response) (result DefinitionList, err error)

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

func (DefinitionsClient) ListSender

func (client DefinitionsClient) 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 DefinitionsCreateFuture

type DefinitionsCreateFuture struct {
	azure.Future
}

DefinitionsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.

func (*DefinitionsCreateFuture) Result

func (future *DefinitionsCreateFuture) Result(client DefinitionsClient) (d Definition, err error)

Result returns the result of the asynchronous operation. If the operation has not completed it will return an error.

type DefinitionsOperationMetadataClient

type DefinitionsOperationMetadataClient struct {
	BaseClient
}

DefinitionsOperationMetadataClient is the subscription definitions client provides an interface to create, modify and retrieve azure subscriptions programmatically.

func NewDefinitionsOperationMetadataClient

func NewDefinitionsOperationMetadataClient() DefinitionsOperationMetadataClient

NewDefinitionsOperationMetadataClient creates an instance of the DefinitionsOperationMetadataClient client.

func NewDefinitionsOperationMetadataClientWithBaseURI

func NewDefinitionsOperationMetadataClientWithBaseURI(baseURI string) DefinitionsOperationMetadataClient

NewDefinitionsOperationMetadataClientWithBaseURI creates an instance of the DefinitionsOperationMetadataClient client.

func (DefinitionsOperationMetadataClient) List

List lists all of the available Microsoft.Subscription API operations.

func (DefinitionsOperationMetadataClient) ListComplete

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

func (DefinitionsOperationMetadataClient) ListPreparer

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

ListPreparer prepares the List request.

func (DefinitionsOperationMetadataClient) ListResponder

func (client DefinitionsOperationMetadataClient) 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 (DefinitionsOperationMetadataClient) ListSender

func (client DefinitionsOperationMetadataClient) 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 ErrorResponse

type ErrorResponse struct {
	// Code - Error code
	Code *string `json:"code,omitempty"`
	// Message - Error message indicating why the operation failed.
	Message *string `json:"message,omitempty"`
}

ErrorResponse describes the format of Error response.

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 REST API operation

type OperationDisplay

type OperationDisplay struct {
	// Provider - Service provider: Microsoft.Subscription
	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"`
}

OperationDisplay the object that represents the operation.

type OperationListResult

type OperationListResult struct {
	autorest.Response `json:"-"`
	// Value - List of 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 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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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