Documentation ¶
Overview ¶
Deprecated: Please note, this package has been deprecated. A replacement package is available github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/subscription/armsubscription(https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/subscription/armsubscription). We strongly encourage you to upgrade to continue receiving updates. See [Migration Guide](https://aka.ms/azsdk/golang/t2/migration) for guidance on upgrading. Refer to our [deprecation policy](https://azure.github.io/azure-sdk/policies_support.html) for more details.
Package subscription implements the Azure ARM Subscription service API version .
The subscription client
Index ¶
- Constants
- func UserAgent() string
- func Version() string
- type AdPrincipal
- type BaseClient
- type CanceledSubscriptionID
- type Client
- func (client Client) Cancel(ctx context.Context, subscriptionID string) (result CanceledSubscriptionID, err error)
- func (client Client) CancelPreparer(ctx context.Context, subscriptionID string) (*http.Request, error)
- func (client Client) CancelResponder(resp *http.Response) (result CanceledSubscriptionID, err error)
- func (client Client) CancelSender(req *http.Request) (*http.Response, error)
- func (client Client) CreateAlias(ctx context.Context, aliasName string, body PutAliasRequest) (result CreateAliasFuture, err error)
- func (client Client) CreateAliasPreparer(ctx context.Context, aliasName string, body PutAliasRequest) (*http.Request, error)
- func (client Client) CreateAliasResponder(resp *http.Response) (result PutAliasResponse, err error)
- func (client Client) CreateAliasSender(req *http.Request) (future CreateAliasFuture, err error)
- func (client Client) CreateCspSubscription(ctx context.Context, billingAccountName string, customerName string, ...) (result CreateCspSubscriptionFuture, err error)
- func (client Client) CreateCspSubscriptionPreparer(ctx context.Context, billingAccountName string, customerName string, ...) (*http.Request, error)
- func (client Client) CreateCspSubscriptionResponder(resp *http.Response) (result CreationResult, err error)
- func (client Client) CreateCspSubscriptionSender(req *http.Request) (future CreateCspSubscriptionFuture, err error)
- func (client Client) CreateSubscription(ctx context.Context, billingAccountName string, billingProfileName string, ...) (result CreateSubscriptionFuture, err error)
- func (client Client) CreateSubscriptionInEnrollmentAccount(ctx context.Context, enrollmentAccountName string, body CreationParameters) (result CreateSubscriptionInEnrollmentAccountFuture, err error)
- func (client Client) CreateSubscriptionInEnrollmentAccountPreparer(ctx context.Context, enrollmentAccountName string, body CreationParameters) (*http.Request, error)
- func (client Client) CreateSubscriptionInEnrollmentAccountResponder(resp *http.Response) (result CreationResult, err error)
- func (client Client) CreateSubscriptionInEnrollmentAccountSender(req *http.Request) (future CreateSubscriptionInEnrollmentAccountFuture, err error)
- func (client Client) CreateSubscriptionPreparer(ctx context.Context, billingAccountName string, billingProfileName string, ...) (*http.Request, error)
- func (client Client) CreateSubscriptionResponder(resp *http.Response) (result CreationResult, err error)
- func (client Client) CreateSubscriptionSender(req *http.Request) (future CreateSubscriptionFuture, err error)
- func (client Client) DeleteAlias(ctx context.Context, aliasName string) (result autorest.Response, err error)
- func (client Client) DeleteAliasPreparer(ctx context.Context, aliasName string) (*http.Request, error)
- func (client Client) DeleteAliasResponder(resp *http.Response) (result autorest.Response, err error)
- func (client Client) DeleteAliasSender(req *http.Request) (*http.Response, error)
- func (client Client) Enable(ctx context.Context, subscriptionID string) (result EnabledSubscriptionID, err error)
- func (client Client) EnablePreparer(ctx context.Context, subscriptionID string) (*http.Request, error)
- func (client Client) EnableResponder(resp *http.Response) (result EnabledSubscriptionID, err error)
- func (client Client) EnableSender(req *http.Request) (*http.Response, error)
- func (client Client) GetAlias(ctx context.Context, aliasName string) (result PutAliasResponse, err error)
- func (client Client) GetAliasPreparer(ctx context.Context, aliasName string) (*http.Request, error)
- func (client Client) GetAliasResponder(resp *http.Response) (result PutAliasResponse, err error)
- func (client Client) GetAliasSender(req *http.Request) (*http.Response, error)
- func (client Client) ListAlias(ctx context.Context) (result PutAliasListResult, err error)
- func (client Client) ListAliasPreparer(ctx context.Context) (*http.Request, error)
- func (client Client) ListAliasResponder(resp *http.Response) (result PutAliasListResult, err error)
- func (client Client) ListAliasSender(req *http.Request) (*http.Response, error)
- func (client Client) Rename(ctx context.Context, subscriptionID string, body Name) (result RenamedSubscriptionID, err error)
- func (client Client) RenamePreparer(ctx context.Context, subscriptionID string, body Name) (*http.Request, error)
- func (client Client) RenameResponder(resp *http.Response) (result RenamedSubscriptionID, err error)
- func (client Client) RenameSender(req *http.Request) (*http.Response, error)
- type CreateAliasFuture
- type CreateCspSubscriptionFuture
- type CreateSubscriptionFuture
- type CreateSubscriptionInEnrollmentAccountFuture
- type CreationParameters
- type CreationResult
- type EnabledSubscriptionID
- type ErrorResponse
- type ErrorResponseBody
- type ListResult
- type ListResultIterator
- type ListResultPage
- type Location
- type LocationListResult
- type Model
- type ModernCspSubscriptionCreationParameters
- type ModernSubscriptionCreationParameters
- type Name
- type OfferType
- type Operation
- type OperationClient
- func (client OperationClient) Get(ctx context.Context, operationID string) (result CreationResult, err error)
- func (client OperationClient) GetPreparer(ctx context.Context, operationID string) (*http.Request, error)
- func (client OperationClient) GetResponder(resp *http.Response) (result CreationResult, err error)
- func (client OperationClient) GetSender(req *http.Request) (*http.Response, error)
- type OperationDisplay
- type OperationListResult
- type OperationsClient
- func (client OperationsClient) List(ctx context.Context) (result OperationListResult, err error)
- func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error)
- func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error)
- func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error)
- type Policies
- type ProvisioningState
- type PutAliasListResult
- type PutAliasRequest
- type PutAliasRequestProperties
- type PutAliasResponse
- type PutAliasResponseProperties
- type RenamedSubscriptionID
- type SpendingLimit
- type State
- type SubscriptionsClient
- func (client SubscriptionsClient) Get(ctx context.Context, subscriptionID string) (result Model, err error)
- func (client SubscriptionsClient) GetPreparer(ctx context.Context, subscriptionID string) (*http.Request, error)
- func (client SubscriptionsClient) GetResponder(resp *http.Response) (result Model, err error)
- func (client SubscriptionsClient) GetSender(req *http.Request) (*http.Response, error)
- func (client SubscriptionsClient) List(ctx context.Context) (result ListResultPage, err error)
- func (client SubscriptionsClient) ListComplete(ctx context.Context) (result ListResultIterator, err error)
- func (client SubscriptionsClient) ListLocations(ctx context.Context, subscriptionID string) (result LocationListResult, err error)
- func (client SubscriptionsClient) ListLocationsPreparer(ctx context.Context, subscriptionID string) (*http.Request, error)
- func (client SubscriptionsClient) ListLocationsResponder(resp *http.Response) (result LocationListResult, err error)
- func (client SubscriptionsClient) ListLocationsSender(req *http.Request) (*http.Response, error)
- func (client SubscriptionsClient) ListPreparer(ctx context.Context) (*http.Request, error)
- func (client SubscriptionsClient) ListResponder(resp *http.Response) (result ListResult, err error)
- func (client SubscriptionsClient) ListSender(req *http.Request) (*http.Response, error)
- type TenantIDDescription
- type TenantListResult
- type TenantListResultIterator
- func (iter *TenantListResultIterator) Next() error
- func (iter *TenantListResultIterator) NextWithContext(ctx context.Context) (err error)
- func (iter TenantListResultIterator) NotDone() bool
- func (iter TenantListResultIterator) Response() TenantListResult
- func (iter TenantListResultIterator) Value() TenantIDDescription
- type TenantListResultPage
- func (page *TenantListResultPage) Next() error
- func (page *TenantListResultPage) NextWithContext(ctx context.Context) (err error)
- func (page TenantListResultPage) NotDone() bool
- func (page TenantListResultPage) Response() TenantListResult
- func (page TenantListResultPage) Values() []TenantIDDescription
- type TenantsClient
- func (client TenantsClient) List(ctx context.Context) (result TenantListResultPage, err error)
- func (client TenantsClient) ListComplete(ctx context.Context) (result TenantListResultIterator, err error)
- func (client TenantsClient) ListPreparer(ctx context.Context) (*http.Request, error)
- func (client TenantsClient) ListResponder(resp *http.Response) (result TenantListResult, err error)
- func (client TenantsClient) ListSender(req *http.Request) (*http.Response, error)
- type Workload
Constants ¶
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 ¶
BaseClient is the base client for Subscription.
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 CanceledSubscriptionID ¶
type CanceledSubscriptionID struct { autorest.Response `json:"-"` // Value - READ-ONLY; The ID of the canceled subscription Value *string `json:"value,omitempty"` }
CanceledSubscriptionID the ID of the canceled subscription
func (CanceledSubscriptionID) MarshalJSON ¶
func (csi CanceledSubscriptionID) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for CanceledSubscriptionID.
type Client ¶
type Client struct {
BaseClient
}
Client is the the subscription client
func NewClientWithBaseURI ¶
NewClientWithBaseURI creates an instance of the Client 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 (Client) Cancel ¶
func (client Client) Cancel(ctx context.Context, subscriptionID string) (result CanceledSubscriptionID, err error)
Cancel the operation to cancel a subscription Parameters: subscriptionID - subscription Id.
func (Client) CancelPreparer ¶
func (client Client) CancelPreparer(ctx context.Context, subscriptionID string) (*http.Request, error)
CancelPreparer prepares the Cancel request.
func (Client) CancelResponder ¶
func (client Client) CancelResponder(resp *http.Response) (result CanceledSubscriptionID, err error)
CancelResponder handles the response to the Cancel request. The method always closes the http.Response Body.
func (Client) CancelSender ¶
CancelSender sends the Cancel request. The method will close the http.Response Body if it receives an error.
func (Client) CreateAlias ¶
func (client Client) CreateAlias(ctx context.Context, aliasName string, body PutAliasRequest) (result CreateAliasFuture, err error)
CreateAlias create Alias Subscription. Parameters: aliasName - alias Name
func (Client) CreateAliasPreparer ¶
func (client Client) CreateAliasPreparer(ctx context.Context, aliasName string, body PutAliasRequest) (*http.Request, error)
CreateAliasPreparer prepares the CreateAlias request.
func (Client) CreateAliasResponder ¶
func (client Client) CreateAliasResponder(resp *http.Response) (result PutAliasResponse, err error)
CreateAliasResponder handles the response to the CreateAlias request. The method always closes the http.Response Body.
func (Client) CreateAliasSender ¶
func (client Client) CreateAliasSender(req *http.Request) (future CreateAliasFuture, err error)
CreateAliasSender sends the CreateAlias request. The method will close the http.Response Body if it receives an error.
func (Client) CreateCspSubscription ¶
func (client Client) CreateCspSubscription(ctx context.Context, billingAccountName string, customerName string, body ModernCspSubscriptionCreationParameters) (result CreateCspSubscriptionFuture, err error)
CreateCspSubscription the operation to create a new CSP subscription. Parameters: billingAccountName - the name of the Microsoft Customer Agreement billing account for which you want to create the subscription. customerName - the name of the customer. body - the subscription creation parameters.
func (Client) CreateCspSubscriptionPreparer ¶
func (client Client) CreateCspSubscriptionPreparer(ctx context.Context, billingAccountName string, customerName string, body ModernCspSubscriptionCreationParameters) (*http.Request, error)
CreateCspSubscriptionPreparer prepares the CreateCspSubscription request.
func (Client) CreateCspSubscriptionResponder ¶
func (client Client) CreateCspSubscriptionResponder(resp *http.Response) (result CreationResult, err error)
CreateCspSubscriptionResponder handles the response to the CreateCspSubscription request. The method always closes the http.Response Body.
func (Client) CreateCspSubscriptionSender ¶
func (client Client) CreateCspSubscriptionSender(req *http.Request) (future CreateCspSubscriptionFuture, err error)
CreateCspSubscriptionSender sends the CreateCspSubscription request. The method will close the http.Response Body if it receives an error.
func (Client) CreateSubscription ¶
func (client Client) CreateSubscription(ctx context.Context, billingAccountName string, billingProfileName string, invoiceSectionName string, body ModernSubscriptionCreationParameters) (result CreateSubscriptionFuture, err error)
CreateSubscription the operation to create a new WebDirect or EA Azure subscription. Parameters: billingAccountName - the name of the Microsoft Customer Agreement billing account for which you want to create the subscription. billingProfileName - the name of the billing profile in the billing account for which you want to create the subscription. invoiceSectionName - the name of the invoice section in the billing account for which you want to create the subscription. body - the subscription creation parameters.
func (Client) CreateSubscriptionInEnrollmentAccount ¶
func (client Client) CreateSubscriptionInEnrollmentAccount(ctx context.Context, enrollmentAccountName string, body CreationParameters) (result CreateSubscriptionInEnrollmentAccountFuture, 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 (Client) CreateSubscriptionInEnrollmentAccountPreparer ¶
func (client Client) CreateSubscriptionInEnrollmentAccountPreparer(ctx context.Context, enrollmentAccountName string, body CreationParameters) (*http.Request, error)
CreateSubscriptionInEnrollmentAccountPreparer prepares the CreateSubscriptionInEnrollmentAccount request.
func (Client) CreateSubscriptionInEnrollmentAccountResponder ¶
func (client Client) 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 (Client) CreateSubscriptionInEnrollmentAccountSender ¶
func (client Client) CreateSubscriptionInEnrollmentAccountSender(req *http.Request) (future CreateSubscriptionInEnrollmentAccountFuture, err error)
CreateSubscriptionInEnrollmentAccountSender sends the CreateSubscriptionInEnrollmentAccount request. The method will close the http.Response Body if it receives an error.
func (Client) CreateSubscriptionPreparer ¶
func (client Client) CreateSubscriptionPreparer(ctx context.Context, billingAccountName string, billingProfileName string, invoiceSectionName string, body ModernSubscriptionCreationParameters) (*http.Request, error)
CreateSubscriptionPreparer prepares the CreateSubscription request.
func (Client) CreateSubscriptionResponder ¶
func (client Client) CreateSubscriptionResponder(resp *http.Response) (result CreationResult, err error)
CreateSubscriptionResponder handles the response to the CreateSubscription request. The method always closes the http.Response Body.
func (Client) CreateSubscriptionSender ¶
func (client Client) CreateSubscriptionSender(req *http.Request) (future CreateSubscriptionFuture, err error)
CreateSubscriptionSender sends the CreateSubscription request. The method will close the http.Response Body if it receives an error.
func (Client) DeleteAlias ¶
func (client Client) DeleteAlias(ctx context.Context, aliasName string) (result autorest.Response, err error)
DeleteAlias delete Alias. Parameters: aliasName - alias Name
func (Client) DeleteAliasPreparer ¶
func (client Client) DeleteAliasPreparer(ctx context.Context, aliasName string) (*http.Request, error)
DeleteAliasPreparer prepares the DeleteAlias request.
func (Client) DeleteAliasResponder ¶
func (client Client) DeleteAliasResponder(resp *http.Response) (result autorest.Response, err error)
DeleteAliasResponder handles the response to the DeleteAlias request. The method always closes the http.Response Body.
func (Client) DeleteAliasSender ¶
DeleteAliasSender sends the DeleteAlias request. The method will close the http.Response Body if it receives an error.
func (Client) Enable ¶
func (client Client) Enable(ctx context.Context, subscriptionID string) (result EnabledSubscriptionID, err error)
Enable the operation to enable a subscription Parameters: subscriptionID - subscription Id.
func (Client) EnablePreparer ¶
func (client Client) EnablePreparer(ctx context.Context, subscriptionID string) (*http.Request, error)
EnablePreparer prepares the Enable request.
func (Client) EnableResponder ¶
func (client Client) EnableResponder(resp *http.Response) (result EnabledSubscriptionID, err error)
EnableResponder handles the response to the Enable request. The method always closes the http.Response Body.
func (Client) EnableSender ¶
EnableSender sends the Enable request. The method will close the http.Response Body if it receives an error.
func (Client) GetAlias ¶
func (client Client) GetAlias(ctx context.Context, aliasName string) (result PutAliasResponse, err error)
GetAlias get Alias Subscription. Parameters: aliasName - alias Name
func (Client) GetAliasPreparer ¶
GetAliasPreparer prepares the GetAlias request.
func (Client) GetAliasResponder ¶
func (client Client) GetAliasResponder(resp *http.Response) (result PutAliasResponse, err error)
GetAliasResponder handles the response to the GetAlias request. The method always closes the http.Response Body.
func (Client) GetAliasSender ¶
GetAliasSender sends the GetAlias request. The method will close the http.Response Body if it receives an error.
func (Client) ListAlias ¶
func (client Client) ListAlias(ctx context.Context) (result PutAliasListResult, err error)
ListAlias get Alias Subscription.
func (Client) ListAliasPreparer ¶
ListAliasPreparer prepares the ListAlias request.
func (Client) ListAliasResponder ¶
func (client Client) ListAliasResponder(resp *http.Response) (result PutAliasListResult, err error)
ListAliasResponder handles the response to the ListAlias request. The method always closes the http.Response Body.
func (Client) ListAliasSender ¶
ListAliasSender sends the ListAlias request. The method will close the http.Response Body if it receives an error.
func (Client) Rename ¶
func (client Client) Rename(ctx context.Context, subscriptionID string, body Name) (result RenamedSubscriptionID, err error)
Rename the operation to rename a subscription Parameters: subscriptionID - subscription Id. body - subscription Name
func (Client) RenamePreparer ¶
func (client Client) RenamePreparer(ctx context.Context, subscriptionID string, body Name) (*http.Request, error)
RenamePreparer prepares the Rename request.
func (Client) RenameResponder ¶
func (client Client) RenameResponder(resp *http.Response) (result RenamedSubscriptionID, err error)
RenameResponder handles the response to the Rename request. The method always closes the http.Response Body.
type CreateAliasFuture ¶
type CreateAliasFuture struct { azure.FutureAPI // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. Result func(Client) (PutAliasResponse, error) }
CreateAliasFuture an abstraction for monitoring and retrieving the results of a long-running operation.
func (*CreateAliasFuture) UnmarshalJSON ¶
func (future *CreateAliasFuture) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaller for CreateFuture.
type CreateCspSubscriptionFuture ¶
type CreateCspSubscriptionFuture struct { azure.FutureAPI // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. Result func(Client) (CreationResult, error) }
CreateCspSubscriptionFuture an abstraction for monitoring and retrieving the results of a long-running operation.
func (*CreateCspSubscriptionFuture) UnmarshalJSON ¶
func (future *CreateCspSubscriptionFuture) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaller for CreateFuture.
type CreateSubscriptionFuture ¶
type CreateSubscriptionFuture struct { azure.FutureAPI // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. Result func(Client) (CreationResult, error) }
CreateSubscriptionFuture an abstraction for monitoring and retrieving the results of a long-running operation.
func (*CreateSubscriptionFuture) UnmarshalJSON ¶
func (future *CreateSubscriptionFuture) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaller for CreateFuture.
type CreateSubscriptionInEnrollmentAccountFuture ¶
type CreateSubscriptionInEnrollmentAccountFuture struct { azure.FutureAPI // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. Result func(Client) (CreationResult, error) }
CreateSubscriptionInEnrollmentAccountFuture an abstraction for monitoring and retrieving the results of a long-running operation.
func (*CreateSubscriptionInEnrollmentAccountFuture) UnmarshalJSON ¶
func (future *CreateSubscriptionInEnrollmentAccountFuture) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaller for CreateFuture.
type CreationParameters ¶
type CreationParameters struct { // DisplayName - The display name of the subscription. DisplayName *string `json:"displayName,omitempty"` // ManagementGroupID - The Management Group Id. ManagementGroupID *string `json:"managementGroupId,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 EnabledSubscriptionID ¶
type EnabledSubscriptionID struct { autorest.Response `json:"-"` // Value - READ-ONLY; The ID of the subscriptions that is being enabled Value *string `json:"value,omitempty"` }
EnabledSubscriptionID the ID of the subscriptions that is being enabled
func (EnabledSubscriptionID) MarshalJSON ¶
func (esi EnabledSubscriptionID) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for EnabledSubscriptionID.
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 ErrorResponseBody ¶
type ErrorResponseBody struct { // Error - The details of the error. Error *ErrorResponse `json:"error,omitempty"` }
ErrorResponseBody error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.
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(cur ListResult, 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.
func (Location) MarshalJSON ¶
MarshalJSON is the custom marshaler for Location.
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 ¶
MarshalJSON is the custom marshaler for Model.
type ModernCspSubscriptionCreationParameters ¶
type ModernCspSubscriptionCreationParameters struct { // DisplayName - The friendly name of the subscription. DisplayName *string `json:"displayName,omitempty"` // SkuID - The SKU ID of the Azure plan. Azure plan determines the pricing and service-level agreement of the subscription. Use 001 for Microsoft Azure Plan and 002 for Microsoft Azure Plan for DevTest. SkuID *string `json:"skuId,omitempty"` // ResellerID - Reseller ID, basically MPN Id. ResellerID *string `json:"resellerId,omitempty"` }
ModernCspSubscriptionCreationParameters the parameters required to create a new CSP subscription.
type ModernSubscriptionCreationParameters ¶
type ModernSubscriptionCreationParameters struct { // DisplayName - The friendly name of the subscription. DisplayName *string `json:"displayName,omitempty"` // SkuID - The SKU ID of the Azure plan. Azure plan determines the pricing and service-level agreement of the subscription. Use 001 for Microsoft Azure Plan and 002 for Microsoft Azure Plan for DevTest. SkuID *string `json:"skuId,omitempty"` // CostCenter - If set, the cost center will show up on the Azure usage and charges file. CostCenter *string `json:"costCenter,omitempty"` // Owner - If specified, the AD principal will get owner access to the subscription, along with the user who is performing the create subscription operation Owner *AdPrincipal `json:"owner,omitempty"` // ManagementGroupID - The identifier of the management group to which this subscription will be associated. ManagementGroupID *string `json:"managementGroupId,omitempty"` // AdditionalParameters - Additional, untyped parameters to support custom subscription creation scenarios. AdditionalParameters map[string]interface{} `json:"additionalParameters"` }
ModernSubscriptionCreationParameters the parameters required to create a new subscription.
func (ModernSubscriptionCreationParameters) MarshalJSON ¶
func (mscp ModernSubscriptionCreationParameters) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ModernSubscriptionCreationParameters.
type Name ¶
type Name struct { // SubscriptionName - New subscription name SubscriptionName *string `json:"subscriptionName,omitempty"` }
Name the new name of the subscription.
type OfferType ¶
type OfferType string
OfferType enumerates the values for offer type.
func PossibleOfferTypeValues ¶
func PossibleOfferTypeValues() []OfferType
PossibleOfferTypeValues returns an array of possible values for the OfferType 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 REST API operation
type OperationClient ¶
type OperationClient struct {
BaseClient
}
OperationClient is the the subscription client
func NewOperationClient ¶
func NewOperationClient() OperationClient
NewOperationClient creates an instance of the OperationClient client.
func NewOperationClientWithBaseURI ¶
func NewOperationClientWithBaseURI(baseURI string) OperationClient
NewOperationClientWithBaseURI creates an instance of the OperationClient 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 (OperationClient) Get ¶
func (client OperationClient) Get(ctx context.Context, operationID string) (result CreationResult, err error)
Get get the status of the pending Microsoft.Subscription API operations. Parameters: operationID - the operation ID, which can be found from the Location field in the generate recommendation response header.
func (OperationClient) GetPreparer ¶
func (client OperationClient) GetPreparer(ctx context.Context, operationID string) (*http.Request, error)
GetPreparer prepares the Get request.
func (OperationClient) GetResponder ¶
func (client OperationClient) GetResponder(resp *http.Response) (result CreationResult, err error)
GetResponder handles the response to the Get request. The method always closes the http.Response Body.
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.
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 Microsoft.Subscription API operations.
func (OperationsClient) ListPreparer ¶
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 ¶
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.
func (Policies) MarshalJSON ¶
MarshalJSON is the custom marshaler for Policies.
type ProvisioningState ¶
type ProvisioningState string
ProvisioningState enumerates the values for provisioning state.
const ( // Accepted ... Accepted ProvisioningState = "Accepted" // Failed ... Failed ProvisioningState = "Failed" // Succeeded ... Succeeded ProvisioningState = "Succeeded" )
func PossibleProvisioningStateValues ¶
func PossibleProvisioningStateValues() []ProvisioningState
PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type.
type PutAliasListResult ¶
type PutAliasListResult struct { autorest.Response `json:"-"` // Value - READ-ONLY; The list of alias. Value *[]PutAliasResponse `json:"value,omitempty"` // NextLink - READ-ONLY; The link (url) to the next page of results. NextLink *string `json:"nextLink,omitempty"` }
PutAliasListResult the list of aliases.
func (PutAliasListResult) MarshalJSON ¶
func (palr PutAliasListResult) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for PutAliasListResult.
type PutAliasRequest ¶
type PutAliasRequest struct { // Properties - Put alias request properties. Properties *PutAliasRequestProperties `json:"properties,omitempty"` }
PutAliasRequest the parameters required to create a new subscription.
type PutAliasRequestProperties ¶
type PutAliasRequestProperties struct { // DisplayName - The friendly name of the subscription. DisplayName *string `json:"displayName,omitempty"` // Workload - The workload type of the subscription. It can be either Production or DevTest. Possible values include: 'Production', 'DevTest' Workload Workload `json:"workload,omitempty"` // BillingScope - Determines whether subscription is fieldLed, partnerLed or LegacyEA BillingScope *string `json:"billingScope,omitempty"` // SubscriptionID - This parameter can be used to create alias for existing subscription Id SubscriptionID *string `json:"subscriptionId,omitempty"` }
PutAliasRequestProperties put subscription properties.
type PutAliasResponse ¶
type PutAliasResponse struct { autorest.Response `json:"-"` // ID - READ-ONLY; Fully qualified ID for the alias resource. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Alias ID. Name *string `json:"name,omitempty"` // Type - READ-ONLY; Resource type, Microsoft.Subscription/aliases. Type *string `json:"type,omitempty"` // Properties - Put Alias response properties. Properties *PutAliasResponseProperties `json:"properties,omitempty"` }
PutAliasResponse subscription Information with the alias.
func (PutAliasResponse) MarshalJSON ¶
func (par PutAliasResponse) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for PutAliasResponse.
type PutAliasResponseProperties ¶
type PutAliasResponseProperties struct { // SubscriptionID - READ-ONLY; Newly created subscription Id. SubscriptionID *string `json:"subscriptionId,omitempty"` // ProvisioningState - The provisioning state of the resource. Possible values include: 'Accepted', 'Succeeded', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` }
PutAliasResponseProperties put subscription creation result properties.
func (PutAliasResponseProperties) MarshalJSON ¶
func (parp PutAliasResponseProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for PutAliasResponseProperties.
type RenamedSubscriptionID ¶
type RenamedSubscriptionID struct { autorest.Response `json:"-"` // Value - READ-ONLY; The ID of the subscriptions that is being renamed Value *string `json:"value,omitempty"` }
RenamedSubscriptionID the ID of the subscriptions that is being renamed
func (RenamedSubscriptionID) MarshalJSON ¶
func (rsi RenamedSubscriptionID) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for RenamedSubscriptionID.
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.
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 ¶
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 ¶
ListLocationsSender sends the ListLocations request. The method will close the http.Response Body if it receives an error.
func (SubscriptionsClient) ListPreparer ¶
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 ¶
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.
func (TenantIDDescription) MarshalJSON ¶
func (tid TenantIDDescription) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for TenantIDDescription.
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 ¶
func (iter TenantListResultIterator) Response() TenantListResult
Response returns the raw server response from the last page request.
func (TenantListResultIterator) Value ¶
func (iter TenantListResultIterator) Value() TenantIDDescription
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(cur TenantListResult, 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 ¶
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 ¶
ListSender sends the List request. The method will close the http.Response Body if it receives an error.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Deprecated: Please note, this package has been deprecated.
|
Deprecated: Please note, this package has been deprecated. |