Documentation
¶
Overview ¶
Package subscription implements the Azure ARM Subscription service API version 2018-03-01-preview.
Subscription client provides an interface to create and manage Azure subscriptions programmatically.
Index ¶
- Constants
- func UserAgent() string
- func Version() string
- type AdPrincipal
- type BaseClient
- type CreationParameters
- type CreationResult
- type ErrorResponse
- type FactoryClient
- func (client FactoryClient) CreateSubscriptionInEnrollmentAccount(ctx context.Context, enrollmentAccountName string, body CreationParameters) (result FactoryCreateSubscriptionInEnrollmentAccountFuture, err error)
- func (client FactoryClient) CreateSubscriptionInEnrollmentAccountPreparer(ctx context.Context, enrollmentAccountName string, body CreationParameters) (*http.Request, error)
- func (client FactoryClient) CreateSubscriptionInEnrollmentAccountResponder(resp *http.Response) (result CreationResult, err error)
- func (client FactoryClient) CreateSubscriptionInEnrollmentAccountSender(req *http.Request) (future FactoryCreateSubscriptionInEnrollmentAccountFuture, err error)
- type FactoryCreateSubscriptionInEnrollmentAccountFuture
- type OfferType
- type Operation
- type OperationDisplay
- type OperationListResult
- type OperationListResultType
- type OperationType
- 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 OperationsGroupClient
- func (client OperationsGroupClient) List(ctx context.Context) (result OperationListResultType, err error)
- func (client OperationsGroupClient) ListPreparer(ctx context.Context) (*http.Request, error)
- func (client OperationsGroupClient) ListResponder(resp *http.Response) (result OperationListResultType, err error)
- func (client OperationsGroupClient) ListSender(req *http.Request) (*http.Response, error)
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 for subscription creation delegated permission
type BaseClient ¶
BaseClient is the base client for Subscription.
func NewWithBaseURI ¶
func NewWithBaseURI(baseURI string) BaseClient
NewWithBaseURI creates an instance of the BaseClient client.
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"` }
CreationParameters subscription Creation Parameters required to create a new Azure subscription.
type CreationResult ¶
type CreationResult struct { autorest.Response `json:"-"` // SubscriptionLink - The link to the new subscription. 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 subscription client provides an interface to create and manage Azure subscriptions programmatically.
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.
func (FactoryClient) CreateSubscriptionInEnrollmentAccount ¶
func (client FactoryClient) CreateSubscriptionInEnrollmentAccount(ctx context.Context, enrollmentAccountName string, body CreationParameters) (result FactoryCreateSubscriptionInEnrollmentAccountFuture, err error)
CreateSubscriptionInEnrollmentAccount creates an Azure subscription
enrollmentAccountName is the name of the enrollment account to which the subscription will be billed. body is 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 // contains filtered or unexported fields }
FactoryCreateSubscriptionInEnrollmentAccountFuture an abstraction for monitoring and retrieving the results of a long-running operation.
func (FactoryCreateSubscriptionInEnrollmentAccountFuture) Result ¶
func (future FactoryCreateSubscriptionInEnrollmentAccountFuture) Result(client FactoryClient) (cr CreationResult, err error)
Result returns the result of the asynchronous operation. If the operation has not completed it will return an error.
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 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 OperationListResultType ¶
type OperationListResultType struct { autorest.Response `json:"-"` // Value - A list of pending SubscriptionOperations Value *[]OperationType `json:"value,omitempty"` }
OperationListResultType a list of pending subscription operations.
type OperationType ¶
type OperationType struct { // ID - 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"` }
OperationType status of the subscription POST operation.
type OperationsClient ¶
type OperationsClient struct {
BaseClient
}
OperationsClient is the subscription client provides an interface to create and manage Azure subscriptions programmatically.
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.
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 OperationsGroupClient ¶
type OperationsGroupClient struct {
BaseClient
}
OperationsGroupClient is the subscription client provides an interface to create and manage Azure subscriptions programmatically.
func NewOperationsGroupClient ¶
func NewOperationsGroupClient() OperationsGroupClient
NewOperationsGroupClient creates an instance of the OperationsGroupClient client.
func NewOperationsGroupClientWithBaseURI ¶
func NewOperationsGroupClientWithBaseURI(baseURI string) OperationsGroupClient
NewOperationsGroupClientWithBaseURI creates an instance of the OperationsGroupClient client.
func (OperationsGroupClient) List ¶
func (client OperationsGroupClient) List(ctx context.Context) (result OperationListResultType, err error)
List lists all of the available pending Microsoft.Subscription API operations.
func (OperationsGroupClient) ListPreparer ¶
ListPreparer prepares the List request.
func (OperationsGroupClient) ListResponder ¶
func (client OperationsGroupClient) ListResponder(resp *http.Response) (result OperationListResultType, err error)
ListResponder handles the response to the List request. The method always closes the http.Response Body.
func (OperationsGroupClient) ListSender ¶
ListSender sends the List request. The method will close the http.Response Body if it receives an error.