azure-sdk-for-go: github.com/Azure/azure-sdk-for-go/services/preview/subscription/mgmt/2017-11-01-preview/subscription Index | Files | Directories

package subscription

import "github.com/Azure/azure-sdk-for-go/services/preview/subscription/mgmt/2017-11-01-preview/subscription"

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

Package Files

client.go definitions.go definitionsoperationmetadata.go models.go version.go

Constants

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

func UserAgent Uses

func UserAgent() string

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

func Version Uses

func Version() string

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

type BaseClient Uses

type BaseClient struct {
    autorest.Client
    BaseURI string
}

BaseClient is the base client for Subscription.

func New Uses

func New() BaseClient

New creates an instance of the BaseClient client.

func NewWithBaseURI Uses

func NewWithBaseURI(baseURI string) BaseClient

NewWithBaseURI creates an instance of the BaseClient client.

type Definition Uses

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 Uses

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

MarshalJSON is the custom marshaler for Definition.

func (*Definition) UnmarshalJSON Uses

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

UnmarshalJSON is the custom unmarshaler for Definition struct.

type DefinitionList Uses

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 Uses

func (dl DefinitionList) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

type DefinitionListIterator Uses

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

DefinitionListIterator provides access to a complete listing of Definition values.

func NewDefinitionListIterator Uses

func NewDefinitionListIterator(page DefinitionListPage) DefinitionListIterator

Creates a new instance of the DefinitionListIterator type.

func (*DefinitionListIterator) Next Uses

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 Uses

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 Uses

func (iter DefinitionListIterator) NotDone() bool

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

func (DefinitionListIterator) Response Uses

func (iter DefinitionListIterator) Response() DefinitionList

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

func (DefinitionListIterator) Value Uses

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 Uses

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

DefinitionListPage contains a page of Definition values.

func NewDefinitionListPage Uses

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

Creates a new instance of the DefinitionListPage type.

func (*DefinitionListPage) Next Uses

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 Uses

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 Uses

func (page DefinitionListPage) NotDone() bool

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

func (DefinitionListPage) Response Uses

func (page DefinitionListPage) Response() DefinitionList

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

func (DefinitionListPage) Values Uses

func (page DefinitionListPage) Values() []Definition

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

type DefinitionProperties Uses

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 Uses

type DefinitionsClient struct {
    BaseClient
}

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

func NewDefinitionsClient Uses

func NewDefinitionsClient() DefinitionsClient

NewDefinitionsClient creates an instance of the DefinitionsClient client.

func NewDefinitionsClientWithBaseURI Uses

func NewDefinitionsClientWithBaseURI(baseURI string) DefinitionsClient

NewDefinitionsClientWithBaseURI creates an instance of the DefinitionsClient client.

func (DefinitionsClient) Create Uses

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 Uses

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

CreatePreparer prepares the Create request.

func (DefinitionsClient) CreateResponder Uses

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 Uses

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 Uses

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 Uses

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 Uses

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

GetOperationStatusPreparer prepares the GetOperationStatus request.

func (DefinitionsClient) GetOperationStatusResponder Uses

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 Uses

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 Uses

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

GetPreparer prepares the Get request.

func (DefinitionsClient) GetResponder Uses

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 Uses

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 Uses

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

List list an Azure subscription definition by subscriptionId.

func (DefinitionsClient) ListComplete Uses

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

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

func (DefinitionsClient) ListPreparer Uses

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

ListPreparer prepares the List request.

func (DefinitionsClient) ListResponder Uses

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 Uses

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 Uses

type DefinitionsCreateFuture struct {
    azure.Future
}

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

func (*DefinitionsCreateFuture) Result Uses

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 Uses

type DefinitionsOperationMetadataClient struct {
    BaseClient
}

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

func NewDefinitionsOperationMetadataClient Uses

func NewDefinitionsOperationMetadataClient() DefinitionsOperationMetadataClient

NewDefinitionsOperationMetadataClient creates an instance of the DefinitionsOperationMetadataClient client.

func NewDefinitionsOperationMetadataClientWithBaseURI Uses

func NewDefinitionsOperationMetadataClientWithBaseURI(baseURI string) DefinitionsOperationMetadataClient

NewDefinitionsOperationMetadataClientWithBaseURI creates an instance of the DefinitionsOperationMetadataClient client.

func (DefinitionsOperationMetadataClient) List Uses

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

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

func (DefinitionsOperationMetadataClient) ListComplete Uses

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

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

func (DefinitionsOperationMetadataClient) ListPreparer Uses

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

ListPreparer prepares the List request.

func (DefinitionsOperationMetadataClient) ListResponder Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

func (olr OperationListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

type OperationListResultIterator Uses

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

OperationListResultIterator provides access to a complete listing of Operation values.

func NewOperationListResultIterator Uses

func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator

Creates a new instance of the OperationListResultIterator type.

func (*OperationListResultIterator) Next Uses

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 Uses

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 Uses

func (iter OperationListResultIterator) NotDone() bool

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

func (OperationListResultIterator) Response Uses

func (iter OperationListResultIterator) Response() OperationListResult

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

func (OperationListResultIterator) Value Uses

func (iter OperationListResultIterator) Value() Operation

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

type OperationListResultPage Uses

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

OperationListResultPage contains a page of Operation values.

func NewOperationListResultPage Uses

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

Creates a new instance of the OperationListResultPage type.

func (*OperationListResultPage) Next Uses

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 Uses

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 Uses

func (page OperationListResultPage) NotDone() bool

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

func (OperationListResultPage) Response Uses

func (page OperationListResultPage) Response() OperationListResult

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

func (OperationListResultPage) Values Uses

func (page OperationListResultPage) Values() []Operation

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

Directories

PathSynopsis
subscriptionapi

Package subscription imports 9 packages (graph) and is imported by 4 packages. Updated 2019-08-10. Refresh now. Tools for package owners.