subscription

package
v45.1.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package subscription implements the Azure ARM Subscription service API version .

The subscription client

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 AdPrincipal

type AdPrincipal struct {
	// ObjectID - Object id of the Principal
	ObjectID *string `json:"objectId,omitempty"`
}

AdPrincipal active Directory Principal who’ll get owner access on the new subscription.

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 using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

type CreationParameters

type CreationParameters struct {
	// DisplayName - The display name of the subscription.
	DisplayName *string `json:"displayName,omitempty"`
	// Owners - The list of principals that should be granted Owner access on the subscription. Principals should be of type User, Service Principal or Security Group.
	Owners *[]AdPrincipal `json:"owners,omitempty"`
	// OfferType - The offer type of the subscription. For example, MS-AZR-0017P (EnterpriseAgreement) and MS-AZR-0148P (EnterpriseAgreement devTest) are available. Only valid when creating a subscription in a enrollment account scope. Possible values include: 'MSAZR0017P', 'MSAZR0148P'
	OfferType OfferType `json:"offerType,omitempty"`
	// AdditionalParameters - Additional, untyped parameters to support custom subscription creation scenarios.
	AdditionalParameters map[string]interface{} `json:"additionalParameters"`
}

CreationParameters subscription Creation Parameters required to create a new Azure subscription.

func (CreationParameters) MarshalJSON

func (cp CreationParameters) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for CreationParameters.

type CreationResult

type CreationResult struct {
	autorest.Response `json:"-"`
	// SubscriptionLink - The link to the new subscription. Use this link to check the status of subscription creation operation.
	SubscriptionLink *string `json:"subscriptionLink,omitempty"`
}

CreationResult the created subscription object.

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 FactoryClient

type FactoryClient struct {
	BaseClient
}

FactoryClient is the the subscription client

func NewFactoryClient

func NewFactoryClient() FactoryClient

NewFactoryClient creates an instance of the FactoryClient client.

func NewFactoryClientWithBaseURI

func NewFactoryClientWithBaseURI(baseURI string) FactoryClient

NewFactoryClientWithBaseURI creates an instance of the FactoryClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (FactoryClient) CreateSubscriptionInEnrollmentAccount

func (client FactoryClient) CreateSubscriptionInEnrollmentAccount(ctx context.Context, enrollmentAccountName string, body CreationParameters) (result FactoryCreateSubscriptionInEnrollmentAccountFuture, err error)

CreateSubscriptionInEnrollmentAccount creates an Azure subscription Parameters: enrollmentAccountName - the name of the enrollment account to which the subscription will be billed. body - the subscription creation parameters.

func (FactoryClient) CreateSubscriptionInEnrollmentAccountPreparer

func (client FactoryClient) CreateSubscriptionInEnrollmentAccountPreparer(ctx context.Context, enrollmentAccountName string, body CreationParameters) (*http.Request, error)

CreateSubscriptionInEnrollmentAccountPreparer prepares the CreateSubscriptionInEnrollmentAccount request.

func (FactoryClient) CreateSubscriptionInEnrollmentAccountResponder

func (client FactoryClient) CreateSubscriptionInEnrollmentAccountResponder(resp *http.Response) (result CreationResult, err error)

CreateSubscriptionInEnrollmentAccountResponder handles the response to the CreateSubscriptionInEnrollmentAccount request. The method always closes the http.Response Body.

func (FactoryClient) CreateSubscriptionInEnrollmentAccountSender

func (client FactoryClient) CreateSubscriptionInEnrollmentAccountSender(req *http.Request) (future FactoryCreateSubscriptionInEnrollmentAccountFuture, err error)

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

type FactoryCreateSubscriptionInEnrollmentAccountFuture

type FactoryCreateSubscriptionInEnrollmentAccountFuture struct {
	azure.Future
}

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

func (*FactoryCreateSubscriptionInEnrollmentAccountFuture) Result

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

type ListResult

type ListResult struct {
	autorest.Response `json:"-"`
	// Value - An array of subscriptions.
	Value *[]Model `json:"value,omitempty"`
	// NextLink - The URL to get the next set of results.
	NextLink *string `json:"nextLink,omitempty"`
}

ListResult subscription list operation response.

func (ListResult) IsEmpty

func (lr ListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

type ListResultIterator

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

ListResultIterator provides access to a complete listing of Model values.

func NewListResultIterator

func NewListResultIterator(page ListResultPage) ListResultIterator

Creates a new instance of the ListResultIterator type.

func (*ListResultIterator) Next

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

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

func (iter ListResultIterator) NotDone() bool

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

func (ListResultIterator) Response

func (iter ListResultIterator) Response() ListResult

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

func (ListResultIterator) Value

func (iter ListResultIterator) Value() Model

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

type ListResultPage

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

ListResultPage contains a page of Model values.

func NewListResultPage

func NewListResultPage(getNextPage func(context.Context, ListResult) (ListResult, error)) ListResultPage

Creates a new instance of the ListResultPage type.

func (*ListResultPage) Next

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

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

func (page ListResultPage) NotDone() bool

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

func (ListResultPage) Response

func (page ListResultPage) Response() ListResult

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

func (ListResultPage) Values

func (page ListResultPage) Values() []Model

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

type Location

type Location struct {
	// ID - READ-ONLY; The fully qualified ID of the location. For example, /subscriptions/00000000-0000-0000-0000-000000000000/locations/westus.
	ID *string `json:"id,omitempty"`
	// SubscriptionID - READ-ONLY; The subscription ID.
	SubscriptionID *string `json:"subscriptionId,omitempty"`
	// Name - READ-ONLY; The location name.
	Name *string `json:"name,omitempty"`
	// DisplayName - READ-ONLY; The display name of the location.
	DisplayName *string `json:"displayName,omitempty"`
	// Latitude - READ-ONLY; The latitude of the location.
	Latitude *string `json:"latitude,omitempty"`
	// Longitude - READ-ONLY; The longitude of the location.
	Longitude *string `json:"longitude,omitempty"`
}

Location location information.

type LocationListResult

type LocationListResult struct {
	autorest.Response `json:"-"`
	// Value - An array of locations.
	Value *[]Location `json:"value,omitempty"`
}

LocationListResult location list operation response.

type Model

type Model struct {
	autorest.Response `json:"-"`
	// ID - READ-ONLY; The fully qualified ID for the subscription. For example, /subscriptions/00000000-0000-0000-0000-000000000000.
	ID *string `json:"id,omitempty"`
	// SubscriptionID - READ-ONLY; The subscription ID.
	SubscriptionID *string `json:"subscriptionId,omitempty"`
	// DisplayName - READ-ONLY; The subscription display name.
	DisplayName *string `json:"displayName,omitempty"`
	// State - READ-ONLY; The subscription state. Possible values are Enabled, Warned, PastDue, Disabled, and Deleted. Possible values include: 'Enabled', 'Warned', 'PastDue', 'Disabled', 'Deleted'
	State State `json:"state,omitempty"`
	// SubscriptionPolicies - The subscription policies.
	SubscriptionPolicies *Policies `json:"subscriptionPolicies,omitempty"`
	// AuthorizationSource - The authorization source of the request. Valid values are one or more combinations of Legacy, RoleBased, Bypassed, Direct and Management. For example, 'Legacy, RoleBased'.
	AuthorizationSource *string `json:"authorizationSource,omitempty"`
}

Model subscription information.

func (Model) MarshalJSON

func (mVar Model) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Model.

type OfferType

type OfferType string

OfferType enumerates the values for offer type.

const (
	// MSAZR0017P ...
	MSAZR0017P OfferType = "MS-AZR-0017P"
	// MSAZR0148P ...
	MSAZR0148P OfferType = "MS-AZR-0148P"
)

func PossibleOfferTypeValues

func PossibleOfferTypeValues() []OfferType

PossibleOfferTypeValues returns an array of possible values for the OfferType const type.

type Operation

type Operation struct {
	// ID - READ-ONLY; The operation Id.
	ID *string `json:"id,omitempty"`
	// Status - Status of the pending subscription
	Status *string `json:"status,omitempty"`
	// StatusDetail - Status Detail of the pending subscription
	StatusDetail *string `json:"statusDetail,omitempty"`
}

Operation status of the subscription POST operation.

func (Operation) MarshalJSON

func (o Operation) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Operation.

type OperationListResult

type OperationListResult struct {
	autorest.Response `json:"-"`
	// Value - A list of pending SubscriptionOperations
	Value *[]Operation `json:"value,omitempty"`
}

OperationListResult a list of pending subscription operations.

type OperationsClient

type OperationsClient struct {
	BaseClient
}

OperationsClient is the the subscription client

func NewOperationsClient

func NewOperationsClient() OperationsClient

NewOperationsClient creates an instance of the OperationsClient client.

func NewOperationsClientWithBaseURI

func NewOperationsClientWithBaseURI(baseURI string) OperationsClient

NewOperationsClientWithBaseURI creates an instance of the OperationsClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (OperationsClient) List

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

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

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 Policies

type Policies struct {
	// LocationPlacementID - READ-ONLY; The subscription location placement ID. The ID indicates which regions are visible for a subscription. For example, a subscription with a location placement Id of Public_2014-09-01 has access to Azure public regions.
	LocationPlacementID *string `json:"locationPlacementId,omitempty"`
	// QuotaID - READ-ONLY; The subscription quota ID.
	QuotaID *string `json:"quotaId,omitempty"`
	// SpendingLimit - READ-ONLY; The subscription spending limit. Possible values include: 'On', 'Off', 'CurrentPeriodOff'
	SpendingLimit SpendingLimit `json:"spendingLimit,omitempty"`
}

Policies subscription policies.

type SpendingLimit

type SpendingLimit string

SpendingLimit enumerates the values for spending limit.

const (
	// CurrentPeriodOff ...
	CurrentPeriodOff SpendingLimit = "CurrentPeriodOff"
	// Off ...
	Off SpendingLimit = "Off"
	// On ...
	On SpendingLimit = "On"
)

func PossibleSpendingLimitValues

func PossibleSpendingLimitValues() []SpendingLimit

PossibleSpendingLimitValues returns an array of possible values for the SpendingLimit const type.

type State

type State string

State enumerates the values for state.

const (
	// Deleted ...
	Deleted State = "Deleted"
	// Disabled ...
	Disabled State = "Disabled"
	// Enabled ...
	Enabled State = "Enabled"
	// PastDue ...
	PastDue State = "PastDue"
	// Warned ...
	Warned State = "Warned"
)

func PossibleStateValues

func PossibleStateValues() []State

PossibleStateValues returns an array of possible values for the State const type.

type SubscriptionsClient

type SubscriptionsClient struct {
	BaseClient
}

SubscriptionsClient is the the subscription client

func NewSubscriptionsClient

func NewSubscriptionsClient() SubscriptionsClient

NewSubscriptionsClient creates an instance of the SubscriptionsClient client.

func NewSubscriptionsClientWithBaseURI

func NewSubscriptionsClientWithBaseURI(baseURI string) SubscriptionsClient

NewSubscriptionsClientWithBaseURI creates an instance of the SubscriptionsClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (SubscriptionsClient) Get

func (client SubscriptionsClient) Get(ctx context.Context, subscriptionID string) (result Model, err error)

Get gets details about a specified subscription. Parameters: subscriptionID - the ID of the target subscription.

func (SubscriptionsClient) GetPreparer

func (client SubscriptionsClient) GetPreparer(ctx context.Context, subscriptionID string) (*http.Request, error)

GetPreparer prepares the Get request.

func (SubscriptionsClient) GetResponder

func (client SubscriptionsClient) GetResponder(resp *http.Response) (result Model, err error)

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

func (SubscriptionsClient) GetSender

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

func (client SubscriptionsClient) List(ctx context.Context) (result ListResultPage, err error)

List gets all subscriptions for a tenant.

func (SubscriptionsClient) ListComplete

func (client SubscriptionsClient) ListComplete(ctx context.Context) (result ListResultIterator, err error)

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

func (SubscriptionsClient) ListLocations

func (client SubscriptionsClient) ListLocations(ctx context.Context, subscriptionID string) (result LocationListResult, err error)

ListLocations this operation provides all the locations that are available for resource providers; however, each resource provider may support a subset of this list. Parameters: subscriptionID - the ID of the target subscription.

func (SubscriptionsClient) ListLocationsPreparer

func (client SubscriptionsClient) ListLocationsPreparer(ctx context.Context, subscriptionID string) (*http.Request, error)

ListLocationsPreparer prepares the ListLocations request.

func (SubscriptionsClient) ListLocationsResponder

func (client SubscriptionsClient) ListLocationsResponder(resp *http.Response) (result LocationListResult, err error)

ListLocationsResponder handles the response to the ListLocations request. The method always closes the http.Response Body.

func (SubscriptionsClient) ListLocationsSender

func (client SubscriptionsClient) ListLocationsSender(req *http.Request) (*http.Response, error)

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

func (SubscriptionsClient) ListPreparer

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

ListPreparer prepares the List request.

func (SubscriptionsClient) ListResponder

func (client SubscriptionsClient) ListResponder(resp *http.Response) (result ListResult, err error)

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

func (SubscriptionsClient) ListSender

func (client SubscriptionsClient) 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 TenantIDDescription

type TenantIDDescription struct {
	// ID - READ-ONLY; The fully qualified ID of the tenant. For example, /tenants/00000000-0000-0000-0000-000000000000.
	ID *string `json:"id,omitempty"`
	// TenantID - READ-ONLY; The tenant ID. For example, 00000000-0000-0000-0000-000000000000.
	TenantID *string `json:"tenantId,omitempty"`
}

TenantIDDescription tenant Id information.

type TenantListResult

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

TenantListResult tenant Ids information.

func (TenantListResult) IsEmpty

func (tlr TenantListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

type TenantListResultIterator

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

TenantListResultIterator provides access to a complete listing of TenantIDDescription values.

func NewTenantListResultIterator

func NewTenantListResultIterator(page TenantListResultPage) TenantListResultIterator

Creates a new instance of the TenantListResultIterator type.

func (*TenantListResultIterator) Next

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

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

func (iter TenantListResultIterator) NotDone() bool

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

func (TenantListResultIterator) Response

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

func (TenantListResultIterator) Value

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

type TenantListResultPage

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

TenantListResultPage contains a page of TenantIDDescription values.

func NewTenantListResultPage

func NewTenantListResultPage(getNextPage func(context.Context, TenantListResult) (TenantListResult, error)) TenantListResultPage

Creates a new instance of the TenantListResultPage type.

func (*TenantListResultPage) Next

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

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

func (page TenantListResultPage) NotDone() bool

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

func (TenantListResultPage) Response

func (page TenantListResultPage) Response() TenantListResult

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

func (TenantListResultPage) Values

func (page TenantListResultPage) Values() []TenantIDDescription

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

type TenantsClient

type TenantsClient struct {
	BaseClient
}

TenantsClient is the the subscription client

func NewTenantsClient

func NewTenantsClient() TenantsClient

NewTenantsClient creates an instance of the TenantsClient client.

func NewTenantsClientWithBaseURI

func NewTenantsClientWithBaseURI(baseURI string) TenantsClient

NewTenantsClientWithBaseURI creates an instance of the TenantsClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (TenantsClient) List

func (client TenantsClient) List(ctx context.Context) (result TenantListResultPage, err error)

List gets the tenants for your account.

func (TenantsClient) ListComplete

func (client TenantsClient) ListComplete(ctx context.Context) (result TenantListResultIterator, err error)

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

func (TenantsClient) ListPreparer

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

ListPreparer prepares the List request.

func (TenantsClient) ListResponder

func (client TenantsClient) ListResponder(resp *http.Response) (result TenantListResult, err error)

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

func (TenantsClient) ListSender

func (client TenantsClient) 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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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