const ( // DefaultBaseURI is the default URI used for the service Billing DefaultBaseURI = "https://management.azure.com" )
func UserAgent() string
UserAgent returns the UserAgent string to use when sending http.Requests.
func Version() string
Version returns the semantic version (see http://semver.org) of the client.
AcceptanceMode enumerates the values for acceptance mode.
type AcceptanceMode string
const ( // ClickToAccept ... ClickToAccept AcceptanceMode = "ClickToAccept" // ESignEmbedded ... ESignEmbedded AcceptanceMode = "ESignEmbedded" // ESignOffline ... ESignOffline AcceptanceMode = "ESignOffline" )
func PossibleAcceptanceModeValues() []AcceptanceMode
PossibleAcceptanceModeValues returns an array of possible values for the AcceptanceMode const type.
Account a billing account.
type Account struct { autorest.Response `json:"-"` // AccountProperties - The properties of the billing account. *AccountProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name. Name *string `json:"name,omitempty"` // Type - READ-ONLY; Resource type. Type *string `json:"type,omitempty"` }
func (a Account) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Account.
func (a *Account) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for Account struct.
AccountListResult the list of billing accounts.
type AccountListResult struct { autorest.Response `json:"-"` // Value - READ-ONLY; The list of billing accounts. Value *[]Account `json:"value,omitempty"` // NextLink - READ-ONLY; The link (url) to the next page of results. NextLink *string `json:"nextLink,omitempty"` }
func (alr AccountListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
func (alr AccountListResult) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for AccountListResult.
AccountListResultIterator provides access to a complete listing of Account values.
type AccountListResultIterator struct {
// contains filtered or unexported fields
}
func NewAccountListResultIterator(page AccountListResultPage) AccountListResultIterator
Creates a new instance of the AccountListResultIterator type.
func (iter *AccountListResultIterator) 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 (iter *AccountListResultIterator) 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 (iter AccountListResultIterator) NotDone() bool
NotDone returns true if the enumeration should be started or is not yet complete.
func (iter AccountListResultIterator) Response() AccountListResult
Response returns the raw server response from the last page request.
func (iter AccountListResultIterator) Value() Account
Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.
AccountListResultPage contains a page of Account values.
type AccountListResultPage struct {
// contains filtered or unexported fields
}
func NewAccountListResultPage(cur AccountListResult, getNextPage func(context.Context, AccountListResult) (AccountListResult, error)) AccountListResultPage
Creates a new instance of the AccountListResultPage type.
func (page *AccountListResultPage) 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 (page *AccountListResultPage) 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 (page AccountListResultPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (page AccountListResultPage) Response() AccountListResult
Response returns the raw server response from the last page request.
func (page AccountListResultPage) Values() []Account
Values returns the slice of values for the current page or nil if there are no values.
AccountProperties the properties of the billing account.
type AccountProperties struct { // DisplayName - The billing account name. DisplayName *string `json:"displayName,omitempty"` // SoldTo - The address of the individual or organization that is responsible for the billing account. SoldTo *AddressDetails `json:"soldTo,omitempty"` // AgreementType - READ-ONLY; The type of agreement. Possible values include: 'MicrosoftCustomerAgreement', 'EnterpriseAgreement', 'MicrosoftOnlineServicesProgram', 'MicrosoftPartnerAgreement' AgreementType AgreementType `json:"agreementType,omitempty"` // AccountType - READ-ONLY; The type of customer. Possible values include: 'Enterprise', 'Individual', 'Partner' AccountType AccountType `json:"accountType,omitempty"` // AccountStatus - READ-ONLY; The current status of the billing account. Possible values include: 'Active', 'Deleted', 'Disabled', 'Expired', 'Transferred', 'Extended', 'Terminated' AccountStatus AccountStatus `json:"accountStatus,omitempty"` // BillingProfiles - The billing profiles associated with the billing account. By default this is not populated, unless it's specified in $expand. BillingProfiles *ProfilesOnExpand `json:"billingProfiles,omitempty"` // EnrollmentDetails - READ-ONLY; The details about the associated legacy enrollment. By default this is not populated, unless it's specified in $expand. EnrollmentDetails *Enrollment `json:"enrollmentDetails,omitempty"` // Departments - The departments associated to the enrollment. Departments *[]Department `json:"departments,omitempty"` // EnrollmentAccounts - The accounts associated to the enrollment. EnrollmentAccounts *[]EnrollmentAccount `json:"enrollmentAccounts,omitempty"` // HasReadAccess - READ-ONLY; Indicates whether user has read access to the billing account. HasReadAccess *bool `json:"hasReadAccess,omitempty"` }
func (ap AccountProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for AccountProperties.
AccountStatus enumerates the values for account status.
type AccountStatus string
const ( // Active ... Active AccountStatus = "Active" // Deleted ... Deleted AccountStatus = "Deleted" // Disabled ... Disabled AccountStatus = "Disabled" // Expired ... Expired AccountStatus = "Expired" // Extended ... Extended AccountStatus = "Extended" // Terminated ... Terminated AccountStatus = "Terminated" // Transferred ... Transferred AccountStatus = "Transferred" )
func PossibleAccountStatusValues() []AccountStatus
PossibleAccountStatusValues returns an array of possible values for the AccountStatus const type.
AccountType enumerates the values for account type.
type AccountType string
const ( // Enterprise ... Enterprise AccountType = "Enterprise" // Individual ... Individual AccountType = "Individual" // Partner ... Partner AccountType = "Partner" )
func PossibleAccountTypeValues() []AccountType
PossibleAccountTypeValues returns an array of possible values for the AccountType const type.
AccountUpdateRequest the request properties of the billing account that can be updated.
type AccountUpdateRequest struct { // AccountProperties - A billing property. *AccountProperties `json:"properties,omitempty"` }
func (aur AccountUpdateRequest) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for AccountUpdateRequest.
func (aur *AccountUpdateRequest) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for AccountUpdateRequest struct.
AccountsClient is the billing client provides access to billing resources for Azure subscriptions.
type AccountsClient struct { BaseClient }
func NewAccountsClient(subscriptionID string) AccountsClient
NewAccountsClient creates an instance of the AccountsClient client.
func NewAccountsClientWithBaseURI(baseURI string, subscriptionID string) AccountsClient
NewAccountsClientWithBaseURI creates an instance of the AccountsClient 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 AccountsClient) Get(ctx context.Context, billingAccountName string, expand string) (result Account, err error)
Get gets a billing account by its ID. Parameters: billingAccountName - the ID that uniquely identifies a billing account. expand - may be used to expand the soldTo, invoice sections and billing profiles.
func (client AccountsClient) GetPreparer(ctx context.Context, billingAccountName string, expand string) (*http.Request, error)
GetPreparer prepares the Get request.
func (client AccountsClient) GetResponder(resp *http.Response) (result Account, err error)
GetResponder handles the response to the Get request. The method always closes the http.Response Body.
func (client AccountsClient) 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 (client AccountsClient) List(ctx context.Context, expand string) (result AccountListResultPage, err error)
List lists the billing accounts that a user has access to. Parameters: expand - may be used to expand the soldTo, invoice sections and billing profiles.
func (client AccountsClient) ListComplete(ctx context.Context, expand string) (result AccountListResultIterator, err error)
ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client AccountsClient) ListInvoiceSectionsByCreateSubscriptionPermission(ctx context.Context, billingAccountName string) (result InvoiceSectionListWithCreateSubPermissionResultPage, err error)
ListInvoiceSectionsByCreateSubscriptionPermission lists the invoice sections for which the user has permission to create Azure subscriptions. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account.
func (client AccountsClient) ListInvoiceSectionsByCreateSubscriptionPermissionComplete(ctx context.Context, billingAccountName string) (result InvoiceSectionListWithCreateSubPermissionResultIterator, err error)
ListInvoiceSectionsByCreateSubscriptionPermissionComplete enumerates all values, automatically crossing page boundaries as required.
func (client AccountsClient) ListInvoiceSectionsByCreateSubscriptionPermissionPreparer(ctx context.Context, billingAccountName string) (*http.Request, error)
ListInvoiceSectionsByCreateSubscriptionPermissionPreparer prepares the ListInvoiceSectionsByCreateSubscriptionPermission request.
func (client AccountsClient) ListInvoiceSectionsByCreateSubscriptionPermissionResponder(resp *http.Response) (result InvoiceSectionListWithCreateSubPermissionResult, err error)
ListInvoiceSectionsByCreateSubscriptionPermissionResponder handles the response to the ListInvoiceSectionsByCreateSubscriptionPermission request. The method always closes the http.Response Body.
func (client AccountsClient) ListInvoiceSectionsByCreateSubscriptionPermissionSender(req *http.Request) (*http.Response, error)
ListInvoiceSectionsByCreateSubscriptionPermissionSender sends the ListInvoiceSectionsByCreateSubscriptionPermission request. The method will close the http.Response Body if it receives an error.
func (client AccountsClient) ListPreparer(ctx context.Context, expand string) (*http.Request, error)
ListPreparer prepares the List request.
func (client AccountsClient) ListResponder(resp *http.Response) (result AccountListResult, err error)
ListResponder handles the response to the List request. The method always closes the http.Response Body.
func (client AccountsClient) 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.
func (client AccountsClient) Update(ctx context.Context, billingAccountName string, parameters AccountUpdateRequest) (result AccountsUpdateFuture, err error)
Update updates the properties of a billing account. Currently, displayName and address can be updated. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. parameters - request parameters that are provided to the update billing account operation.
func (client AccountsClient) UpdatePreparer(ctx context.Context, billingAccountName string, parameters AccountUpdateRequest) (*http.Request, error)
UpdatePreparer prepares the Update request.
func (client AccountsClient) UpdateResponder(resp *http.Response) (result Account, err error)
UpdateResponder handles the response to the Update request. The method always closes the http.Response Body.
func (client AccountsClient) UpdateSender(req *http.Request) (future AccountsUpdateFuture, err error)
UpdateSender sends the Update request. The method will close the http.Response Body if it receives an error.
AccountsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type AccountsUpdateFuture struct { azure.FutureAPI // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. Result func(AccountsClient) (Account, error) }
func (future *AccountsUpdateFuture) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaller for CreateFuture.
AddressClient is the billing client provides access to billing resources for Azure subscriptions.
type AddressClient struct { BaseClient }
func NewAddressClient(subscriptionID string) AddressClient
NewAddressClient creates an instance of the AddressClient client.
func NewAddressClientWithBaseURI(baseURI string, subscriptionID string) AddressClient
NewAddressClientWithBaseURI creates an instance of the AddressClient 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 AddressClient) Validate(ctx context.Context, address AddressDetails) (result ValidateAddressResponse, err error)
Validate validates an address. Use the operation to validate an address before using it as soldTo or a billTo address.
func (client AddressClient) ValidatePreparer(ctx context.Context, address AddressDetails) (*http.Request, error)
ValidatePreparer prepares the Validate request.
func (client AddressClient) ValidateResponder(resp *http.Response) (result ValidateAddressResponse, err error)
ValidateResponder handles the response to the Validate request. The method always closes the http.Response Body.
func (client AddressClient) ValidateSender(req *http.Request) (*http.Response, error)
ValidateSender sends the Validate request. The method will close the http.Response Body if it receives an error.
AddressDetails address details.
type AddressDetails struct { // FirstName - First name. FirstName *string `json:"firstName,omitempty"` // LastName - Last name. LastName *string `json:"lastName,omitempty"` // CompanyName - Company name. CompanyName *string `json:"companyName,omitempty"` // AddressLine1 - Address line 1. AddressLine1 *string `json:"addressLine1,omitempty"` // AddressLine2 - Address line 2. AddressLine2 *string `json:"addressLine2,omitempty"` // AddressLine3 - Address line 3. AddressLine3 *string `json:"addressLine3,omitempty"` // City - Address city. City *string `json:"city,omitempty"` // District - Address district. District *string `json:"district,omitempty"` // Region - Address region. Region *string `json:"region,omitempty"` // Country - Country code uses ISO2, 2-digit format. Country *string `json:"country,omitempty"` // PostalCode - Postal code. PostalCode *string `json:"postalCode,omitempty"` // Email - Email address. Email *string `json:"email,omitempty"` // PhoneNumber - Phone number. PhoneNumber *string `json:"phoneNumber,omitempty"` }
AddressValidationStatus enumerates the values for address validation status.
type AddressValidationStatus string
const ( // Invalid ... Invalid AddressValidationStatus = "Invalid" // Valid ... Valid AddressValidationStatus = "Valid" )
func PossibleAddressValidationStatusValues() []AddressValidationStatus
PossibleAddressValidationStatusValues returns an array of possible values for the AddressValidationStatus const type.
Agreement an agreement.
type Agreement struct { autorest.Response `json:"-"` // AgreementProperties - The properties of an agreement. *AgreementProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name. Name *string `json:"name,omitempty"` // Type - READ-ONLY; Resource type. Type *string `json:"type,omitempty"` }
func (a Agreement) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Agreement.
func (a *Agreement) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for Agreement struct.
AgreementListResult result of listing agreements.
type AgreementListResult struct { autorest.Response `json:"-"` // Value - READ-ONLY; The list of agreements. Value *[]Agreement `json:"value,omitempty"` // NextLink - READ-ONLY; The link (url) to the next page of results. NextLink *string `json:"nextLink,omitempty"` }
func (alr AgreementListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
func (alr AgreementListResult) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for AgreementListResult.
AgreementListResultIterator provides access to a complete listing of Agreement values.
type AgreementListResultIterator struct {
// contains filtered or unexported fields
}
func NewAgreementListResultIterator(page AgreementListResultPage) AgreementListResultIterator
Creates a new instance of the AgreementListResultIterator type.
func (iter *AgreementListResultIterator) 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 (iter *AgreementListResultIterator) 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 (iter AgreementListResultIterator) NotDone() bool
NotDone returns true if the enumeration should be started or is not yet complete.
func (iter AgreementListResultIterator) Response() AgreementListResult
Response returns the raw server response from the last page request.
func (iter AgreementListResultIterator) Value() Agreement
Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.
AgreementListResultPage contains a page of Agreement values.
type AgreementListResultPage struct {
// contains filtered or unexported fields
}
func NewAgreementListResultPage(cur AgreementListResult, getNextPage func(context.Context, AgreementListResult) (AgreementListResult, error)) AgreementListResultPage
Creates a new instance of the AgreementListResultPage type.
func (page *AgreementListResultPage) 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 (page *AgreementListResultPage) 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 (page AgreementListResultPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (page AgreementListResultPage) Response() AgreementListResult
Response returns the raw server response from the last page request.
func (page AgreementListResultPage) Values() []Agreement
Values returns the slice of values for the current page or nil if there are no values.
AgreementProperties the properties of an agreement.
type AgreementProperties struct { // AgreementLink - READ-ONLY; The URL to download the agreement. AgreementLink *string `json:"agreementLink,omitempty"` // Category - READ-ONLY; The category of the agreement signed by a customer. Possible values include: 'CategoryMicrosoftCustomerAgreement', 'CategoryAffiliatePurchaseTerms', 'CategoryOther' Category Category `json:"category,omitempty"` // AcceptanceMode - READ-ONLY; The mode of acceptance for an agreement. Possible values include: 'ClickToAccept', 'ESignEmbedded', 'ESignOffline' AcceptanceMode AcceptanceMode `json:"acceptanceMode,omitempty"` // EffectiveDate - READ-ONLY; The date from which the agreement is effective. EffectiveDate *date.Time `json:"effectiveDate,omitempty"` // ExpirationDate - READ-ONLY; The date when the agreement expires. ExpirationDate *date.Time `json:"expirationDate,omitempty"` // Participants - The list of participants that participates in acceptance of an agreement. Participants *[]Participants `json:"participants,omitempty"` // Status - READ-ONLY; The current status of the agreement. Status *string `json:"status,omitempty"` }
func (ap AgreementProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for AgreementProperties.
AgreementType enumerates the values for agreement type.
type AgreementType string
const ( // EnterpriseAgreement ... EnterpriseAgreement AgreementType = "EnterpriseAgreement" // MicrosoftCustomerAgreement ... MicrosoftCustomerAgreement AgreementType = "MicrosoftCustomerAgreement" // MicrosoftOnlineServicesProgram ... MicrosoftOnlineServicesProgram AgreementType = "MicrosoftOnlineServicesProgram" // MicrosoftPartnerAgreement ... MicrosoftPartnerAgreement AgreementType = "MicrosoftPartnerAgreement" )
func PossibleAgreementTypeValues() []AgreementType
PossibleAgreementTypeValues returns an array of possible values for the AgreementType const type.
AgreementsClient is the billing client provides access to billing resources for Azure subscriptions.
type AgreementsClient struct { BaseClient }
func NewAgreementsClient(subscriptionID string) AgreementsClient
NewAgreementsClient creates an instance of the AgreementsClient client.
func NewAgreementsClientWithBaseURI(baseURI string, subscriptionID string) AgreementsClient
NewAgreementsClientWithBaseURI creates an instance of the AgreementsClient 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 AgreementsClient) Get(ctx context.Context, billingAccountName string, agreementName string, expand string) (result Agreement, err error)
Get gets an agreement by ID. Parameters: billingAccountName - the ID that uniquely identifies a billing account. agreementName - the ID that uniquely identifies an agreement. expand - may be used to expand the participants.
func (client AgreementsClient) GetPreparer(ctx context.Context, billingAccountName string, agreementName string, expand string) (*http.Request, error)
GetPreparer prepares the Get request.
func (client AgreementsClient) GetResponder(resp *http.Response) (result Agreement, err error)
GetResponder handles the response to the Get request. The method always closes the http.Response Body.
func (client AgreementsClient) 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 (client AgreementsClient) ListByBillingAccount(ctx context.Context, billingAccountName string, expand string) (result AgreementListResultPage, err error)
ListByBillingAccount lists the agreements for a billing account. Parameters: billingAccountName - the ID that uniquely identifies a billing account. expand - may be used to expand the participants.
func (client AgreementsClient) ListByBillingAccountComplete(ctx context.Context, billingAccountName string, expand string) (result AgreementListResultIterator, err error)
ListByBillingAccountComplete enumerates all values, automatically crossing page boundaries as required.
func (client AgreementsClient) ListByBillingAccountPreparer(ctx context.Context, billingAccountName string, expand string) (*http.Request, error)
ListByBillingAccountPreparer prepares the ListByBillingAccount request.
func (client AgreementsClient) ListByBillingAccountResponder(resp *http.Response) (result AgreementListResult, err error)
ListByBillingAccountResponder handles the response to the ListByBillingAccount request. The method always closes the http.Response Body.
func (client AgreementsClient) ListByBillingAccountSender(req *http.Request) (*http.Response, error)
ListByBillingAccountSender sends the ListByBillingAccount request. The method will close the http.Response Body if it receives an error.
Amount the amount.
type Amount struct { // Currency - READ-ONLY; The currency for the amount value. Currency *string `json:"currency,omitempty"` // Value - Amount value. Value *float64 `json:"value,omitempty"` }
func (a Amount) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Amount.
AutoRenew enumerates the values for auto renew.
type AutoRenew string
const ( // Off ... Off AutoRenew = "Off" // On ... On AutoRenew = "On" )
func PossibleAutoRenewValues() []AutoRenew
PossibleAutoRenewValues returns an array of possible values for the AutoRenew const type.
AvailableBalance the latest Azure credit balance. This is the balance available for pay now.
type AvailableBalance struct { autorest.Response `json:"-"` *AvailableBalanceProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name. Name *string `json:"name,omitempty"` // Type - READ-ONLY; Resource type. Type *string `json:"type,omitempty"` }
func (ab AvailableBalance) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for AvailableBalance.
func (ab *AvailableBalance) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for AvailableBalance struct.
AvailableBalanceProperties the properties of available balance.
type AvailableBalanceProperties struct { // Amount - READ-ONLY; Balance amount. Amount *Amount `json:"amount,omitempty"` }
func (abp AvailableBalanceProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for AvailableBalanceProperties.
AvailableBalancesClient is the billing client provides access to billing resources for Azure subscriptions.
type AvailableBalancesClient struct { BaseClient }
func NewAvailableBalancesClient(subscriptionID string) AvailableBalancesClient
NewAvailableBalancesClient creates an instance of the AvailableBalancesClient client.
func NewAvailableBalancesClientWithBaseURI(baseURI string, subscriptionID string) AvailableBalancesClient
NewAvailableBalancesClientWithBaseURI creates an instance of the AvailableBalancesClient 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 AvailableBalancesClient) Get(ctx context.Context, billingAccountName string, billingProfileName string) (result AvailableBalance, err error)
Get the available credit balance for a billing profile. This is the balance that can be used for pay now to settle due or past due invoices. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. billingProfileName - the ID that uniquely identifies a billing profile.
func (client AvailableBalancesClient) GetPreparer(ctx context.Context, billingAccountName string, billingProfileName string) (*http.Request, error)
GetPreparer prepares the Get request.
func (client AvailableBalancesClient) GetResponder(resp *http.Response) (result AvailableBalance, err error)
GetResponder handles the response to the Get request. The method always closes the http.Response Body.
func (client AvailableBalancesClient) 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.
AzurePlan details of the Azure plan.
type AzurePlan struct { // SkuID - The sku id. SkuID *string `json:"skuId,omitempty"` // SkuDescription - READ-ONLY; The sku description. SkuDescription *string `json:"skuDescription,omitempty"` }
func (ap AzurePlan) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for AzurePlan.
BaseClient is the base client for Billing.
type BaseClient struct { autorest.Client BaseURI string SubscriptionID string }
func New(subscriptionID string) BaseClient
New creates an instance of the BaseClient client.
func NewWithBaseURI(baseURI string, subscriptionID 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).
Category enumerates the values for category.
type Category string
const ( // CategoryAffiliatePurchaseTerms ... CategoryAffiliatePurchaseTerms Category = "AffiliatePurchaseTerms" // CategoryMicrosoftCustomerAgreement ... CategoryMicrosoftCustomerAgreement Category = "MicrosoftCustomerAgreement" // CategoryOther ... CategoryOther Category = "Other" )
func PossibleCategoryValues() []Category
PossibleCategoryValues returns an array of possible values for the Category const type.
Customer a partner's customer.
type Customer struct { autorest.Response `json:"-"` // CustomerProperties - The customer. *CustomerProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name. Name *string `json:"name,omitempty"` // Type - READ-ONLY; Resource type. Type *string `json:"type,omitempty"` }
func (c Customer) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Customer.
func (c *Customer) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for Customer struct.
CustomerListResult the list of customers.
type CustomerListResult struct { autorest.Response `json:"-"` // Value - READ-ONLY; The list of customers. Value *[]Customer `json:"value,omitempty"` // NextLink - READ-ONLY; The link (url) to the next page of results. NextLink *string `json:"nextLink,omitempty"` }
func (clr CustomerListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
func (clr CustomerListResult) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for CustomerListResult.
CustomerListResultIterator provides access to a complete listing of Customer values.
type CustomerListResultIterator struct {
// contains filtered or unexported fields
}
func NewCustomerListResultIterator(page CustomerListResultPage) CustomerListResultIterator
Creates a new instance of the CustomerListResultIterator type.
func (iter *CustomerListResultIterator) 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 (iter *CustomerListResultIterator) 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 (iter CustomerListResultIterator) NotDone() bool
NotDone returns true if the enumeration should be started or is not yet complete.
func (iter CustomerListResultIterator) Response() CustomerListResult
Response returns the raw server response from the last page request.
func (iter CustomerListResultIterator) Value() Customer
Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.
CustomerListResultPage contains a page of Customer values.
type CustomerListResultPage struct {
// contains filtered or unexported fields
}
func NewCustomerListResultPage(cur CustomerListResult, getNextPage func(context.Context, CustomerListResult) (CustomerListResult, error)) CustomerListResultPage
Creates a new instance of the CustomerListResultPage type.
func (page *CustomerListResultPage) 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 (page *CustomerListResultPage) 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 (page CustomerListResultPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (page CustomerListResultPage) Response() CustomerListResult
Response returns the raw server response from the last page request.
func (page CustomerListResultPage) Values() []Customer
Values returns the slice of values for the current page or nil if there are no values.
CustomerPolicy the customer's Policy.
type CustomerPolicy struct { autorest.Response `json:"-"` *CustomerPolicyProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name. Name *string `json:"name,omitempty"` // Type - READ-ONLY; Resource type. Type *string `json:"type,omitempty"` }
func (cp CustomerPolicy) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for CustomerPolicy.
func (cp *CustomerPolicy) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for CustomerPolicy struct.
CustomerPolicyProperties the properties of a customer's policy.
type CustomerPolicyProperties struct { // ViewCharges - The policy that controls whether the users in customer's organization can view charges at pay-as-you-go prices. Possible values include: 'ViewChargesAllowed', 'ViewChargesNotAllowed' ViewCharges ViewCharges `json:"viewCharges,omitempty"` }
CustomerProperties the properties of a customer.
type CustomerProperties struct { // BillingProfileID - READ-ONLY; The ID of the billing profile for the invoice section. BillingProfileID *string `json:"billingProfileId,omitempty"` // BillingProfileDisplayName - READ-ONLY; The name of the billing profile for the invoice section. BillingProfileDisplayName *string `json:"billingProfileDisplayName,omitempty"` // DisplayName - The name of the customer. DisplayName *string `json:"displayName,omitempty"` // EnabledAzurePlans - Azure plans enabled for the customer. EnabledAzurePlans *[]AzurePlan `json:"enabledAzurePlans,omitempty"` // Resellers - The list of resellers for which an Azure plan is enabled for the customer. Resellers *[]Reseller `json:"resellers,omitempty"` }
func (cp CustomerProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for CustomerProperties.
CustomersClient is the billing client provides access to billing resources for Azure subscriptions.
type CustomersClient struct { BaseClient }
func NewCustomersClient(subscriptionID string) CustomersClient
NewCustomersClient creates an instance of the CustomersClient client.
func NewCustomersClientWithBaseURI(baseURI string, subscriptionID string) CustomersClient
NewCustomersClientWithBaseURI creates an instance of the CustomersClient 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 CustomersClient) Get(ctx context.Context, billingAccountName string, customerName string, expand string) (result Customer, err error)
Get gets a customer by its ID. The operation is supported only for billing accounts with agreement type Microsoft Partner Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. customerName - the ID that uniquely identifies a customer. expand - may be used to expand enabledAzurePlans and resellers
func (client CustomersClient) GetPreparer(ctx context.Context, billingAccountName string, customerName string, expand string) (*http.Request, error)
GetPreparer prepares the Get request.
func (client CustomersClient) GetResponder(resp *http.Response) (result Customer, err error)
GetResponder handles the response to the Get request. The method always closes the http.Response Body.
func (client CustomersClient) 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 (client CustomersClient) ListByBillingAccount(ctx context.Context, billingAccountName string, search string, filter string) (result CustomerListResultPage, err error)
ListByBillingAccount lists the customers that are billed to a billing account. The operation is supported only for billing accounts with agreement type Microsoft Partner Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. search - used for searching customers by their name. Any customer with name containing the search text will be included in the response filter - may be used to filter the list of customers.
func (client CustomersClient) ListByBillingAccountComplete(ctx context.Context, billingAccountName string, search string, filter string) (result CustomerListResultIterator, err error)
ListByBillingAccountComplete enumerates all values, automatically crossing page boundaries as required.
func (client CustomersClient) ListByBillingAccountPreparer(ctx context.Context, billingAccountName string, search string, filter string) (*http.Request, error)
ListByBillingAccountPreparer prepares the ListByBillingAccount request.
func (client CustomersClient) ListByBillingAccountResponder(resp *http.Response) (result CustomerListResult, err error)
ListByBillingAccountResponder handles the response to the ListByBillingAccount request. The method always closes the http.Response Body.
func (client CustomersClient) ListByBillingAccountSender(req *http.Request) (*http.Response, error)
ListByBillingAccountSender sends the ListByBillingAccount request. The method will close the http.Response Body if it receives an error.
func (client CustomersClient) ListByBillingProfile(ctx context.Context, billingAccountName string, billingProfileName string, search string, filter string) (result CustomerListResultPage, err error)
ListByBillingProfile lists the customers that are billed to a billing profile. The operation is supported only for billing accounts with agreement type Microsoft Partner Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. billingProfileName - the ID that uniquely identifies a billing profile. search - used for searching customers by their name. Any customer with name containing the search text will be included in the response filter - may be used to filter the list of customers.
func (client CustomersClient) ListByBillingProfileComplete(ctx context.Context, billingAccountName string, billingProfileName string, search string, filter string) (result CustomerListResultIterator, err error)
ListByBillingProfileComplete enumerates all values, automatically crossing page boundaries as required.
func (client CustomersClient) ListByBillingProfilePreparer(ctx context.Context, billingAccountName string, billingProfileName string, search string, filter string) (*http.Request, error)
ListByBillingProfilePreparer prepares the ListByBillingProfile request.
func (client CustomersClient) ListByBillingProfileResponder(resp *http.Response) (result CustomerListResult, err error)
ListByBillingProfileResponder handles the response to the ListByBillingProfile request. The method always closes the http.Response Body.
func (client CustomersClient) ListByBillingProfileSender(req *http.Request) (*http.Response, error)
ListByBillingProfileSender sends the ListByBillingProfile request. The method will close the http.Response Body if it receives an error.
Department a department.
type Department struct { // DepartmentProperties - A department. *DepartmentProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name. Name *string `json:"name,omitempty"` // Type - READ-ONLY; Resource type. Type *string `json:"type,omitempty"` }
func (d Department) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Department.
func (d *Department) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for Department struct.
DepartmentProperties the properties of a department.
type DepartmentProperties struct { // DepartmentName - The name of the department. DepartmentName *string `json:"departmentName,omitempty"` // CostCenter - The cost center associated with the department. CostCenter *string `json:"costCenter,omitempty"` // Status - The status of the department. Status *string `json:"status,omitempty"` // EnrollmentAccounts - Associated enrollment accounts. By default this is not populated, unless it's specified in $expand. EnrollmentAccounts *[]EnrollmentAccount `json:"enrollmentAccounts,omitempty"` }
Document the properties of a document.
type Document struct { // Kind - READ-ONLY; The type of the document. Possible values include: 'DocumentTypeInvoice', 'DocumentTypeVoidNote', 'DocumentTypeTaxReceipt', 'DocumentTypeCreditNote' Kind DocumentType `json:"kind,omitempty"` // URL - READ-ONLY; Document URL. URL *string `json:"url,omitempty"` // Source - READ-ONLY; The source of the document. ENF for Brazil and DRS for rest of the world. Possible values include: 'DRS', 'ENF' Source DocumentSource `json:"source,omitempty"` }
func (d Document) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Document.
DocumentSource enumerates the values for document source.
type DocumentSource string
const ( // DRS ... DRS DocumentSource = "DRS" // ENF ... ENF DocumentSource = "ENF" )
func PossibleDocumentSourceValues() []DocumentSource
PossibleDocumentSourceValues returns an array of possible values for the DocumentSource const type.
DocumentType enumerates the values for document type.
type DocumentType string
const ( // DocumentTypeCreditNote ... DocumentTypeCreditNote DocumentType = "CreditNote" // DocumentTypeInvoice ... DocumentTypeInvoice DocumentType = "Invoice" // DocumentTypeTaxReceipt ... DocumentTypeTaxReceipt DocumentType = "TaxReceipt" // DocumentTypeVoidNote ... DocumentTypeVoidNote DocumentType = "VoidNote" )
func PossibleDocumentTypeValues() []DocumentType
PossibleDocumentTypeValues returns an array of possible values for the DocumentType const type.
DownloadURL a secure URL that can be used to download a an entity until the URL expires.
type DownloadURL struct { autorest.Response `json:"-"` // ExpiryTime - READ-ONLY; The time in UTC when the download URL will expire. ExpiryTime *date.Time `json:"expiryTime,omitempty"` // URL - READ-ONLY; The URL to the PDF file. URL *string `json:"url,omitempty"` }
func (du DownloadURL) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for DownloadURL.
Enrollment the properties of an enrollment.
type Enrollment struct { // StartDate - The start date of the enrollment. StartDate *date.Time `json:"startDate,omitempty"` // EndDate - The end date of the enrollment. EndDate *date.Time `json:"endDate,omitempty"` // Currency - READ-ONLY; The billing currency for the enrollment. Currency *string `json:"currency,omitempty"` // Channel - READ-ONLY; The channel type of the enrollment. Channel *string `json:"channel,omitempty"` // Policies - READ-ONLY; The policies for Enterprise Agreement enrollments. Policies *EnrollmentPolicies `json:"policies,omitempty"` // Language - READ-ONLY; The language for the enrollment. Language *string `json:"language,omitempty"` // CountryCode - READ-ONLY; The country code of the enrollment. CountryCode *string `json:"countryCode,omitempty"` // Status - READ-ONLY; The current status of the enrollment. Status *string `json:"status,omitempty"` // BillingCycle - READ-ONLY; The billing cycle for the enrollment. BillingCycle *string `json:"billingCycle,omitempty"` }
func (e Enrollment) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Enrollment.
EnrollmentAccount an enrollment account.
type EnrollmentAccount struct { // EnrollmentAccountProperties - The properties of an enrollment account. *EnrollmentAccountProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name. Name *string `json:"name,omitempty"` // Type - READ-ONLY; Resource type. Type *string `json:"type,omitempty"` }
func (ea EnrollmentAccount) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for EnrollmentAccount.
func (ea *EnrollmentAccount) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for EnrollmentAccount struct.
EnrollmentAccountContext the enrollment account context
type EnrollmentAccountContext struct { // CostCenter - The cost center associated with the enrollment account. CostCenter *string `json:"costCenter,omitempty"` // StartDate - The start date of the enrollment account. StartDate *date.Time `json:"startDate,omitempty"` // EndDate - The end date of the enrollment account. EndDate *date.Time `json:"endDate,omitempty"` // EnrollmentAccountName - The ID of the enrollment account. EnrollmentAccountName *string `json:"enrollmentAccountName,omitempty"` }
EnrollmentAccountListResult result of listing enrollment accounts.
type EnrollmentAccountListResult struct { autorest.Response `json:"-"` // Value - READ-ONLY; The list of enrollment accounts. Value *[]EnrollmentAccountSummary `json:"value,omitempty"` // NextLink - READ-ONLY; The link (url) to the next page of results. NextLink *string `json:"nextLink,omitempty"` }
func (ealr EnrollmentAccountListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
func (ealr EnrollmentAccountListResult) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for EnrollmentAccountListResult.
EnrollmentAccountListResultIterator provides access to a complete listing of EnrollmentAccountSummary values.
type EnrollmentAccountListResultIterator struct {
// contains filtered or unexported fields
}
func NewEnrollmentAccountListResultIterator(page EnrollmentAccountListResultPage) EnrollmentAccountListResultIterator
Creates a new instance of the EnrollmentAccountListResultIterator type.
func (iter *EnrollmentAccountListResultIterator) 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 (iter *EnrollmentAccountListResultIterator) 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 (iter EnrollmentAccountListResultIterator) NotDone() bool
NotDone returns true if the enumeration should be started or is not yet complete.
func (iter EnrollmentAccountListResultIterator) Response() EnrollmentAccountListResult
Response returns the raw server response from the last page request.
func (iter EnrollmentAccountListResultIterator) Value() EnrollmentAccountSummary
Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.
EnrollmentAccountListResultPage contains a page of EnrollmentAccountSummary values.
type EnrollmentAccountListResultPage struct {
// contains filtered or unexported fields
}
func NewEnrollmentAccountListResultPage(cur EnrollmentAccountListResult, getNextPage func(context.Context, EnrollmentAccountListResult) (EnrollmentAccountListResult, error)) EnrollmentAccountListResultPage
Creates a new instance of the EnrollmentAccountListResultPage type.
func (page *EnrollmentAccountListResultPage) 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 (page *EnrollmentAccountListResultPage) 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 (page EnrollmentAccountListResultPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (page EnrollmentAccountListResultPage) Response() EnrollmentAccountListResult
Response returns the raw server response from the last page request.
func (page EnrollmentAccountListResultPage) Values() []EnrollmentAccountSummary
Values returns the slice of values for the current page or nil if there are no values.
EnrollmentAccountProperties the properties of an enrollment account.
type EnrollmentAccountProperties struct { // AccountName - The name of the enrollment account. AccountName *string `json:"accountName,omitempty"` // CostCenter - The cost center associated with the enrollment account. CostCenter *string `json:"costCenter,omitempty"` // AccountOwner - The owner of the enrollment account. AccountOwner *string `json:"accountOwner,omitempty"` // Status - The status of the enrollment account. Status *string `json:"status,omitempty"` // StartDate - The start date of the enrollment account. StartDate *date.Time `json:"startDate,omitempty"` // EndDate - The end date of the enrollment account. EndDate *date.Time `json:"endDate,omitempty"` // Department - Associated department. By default this is not populated, unless it's specified in $expand. Department *Department `json:"department,omitempty"` }
EnrollmentAccountSummary an enrollment account resource.
type EnrollmentAccountSummary struct { autorest.Response `json:"-"` // EnrollmentAccountSummaryProperties - An enrollment account. *EnrollmentAccountSummaryProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name. Name *string `json:"name,omitempty"` // Type - READ-ONLY; Resource type. Type *string `json:"type,omitempty"` }
func (eas EnrollmentAccountSummary) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for EnrollmentAccountSummary.
func (eas *EnrollmentAccountSummary) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for EnrollmentAccountSummary struct.
EnrollmentAccountSummaryProperties the properties of the enrollment account.
type EnrollmentAccountSummaryProperties struct { // PrincipalName - READ-ONLY; The account owner's principal name. PrincipalName *string `json:"principalName,omitempty"` }
func (easp EnrollmentAccountSummaryProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for EnrollmentAccountSummaryProperties.
EnrollmentAccountsClient is the billing client provides access to billing resources for Azure subscriptions.
type EnrollmentAccountsClient struct { BaseClient }
func NewEnrollmentAccountsClient(subscriptionID string) EnrollmentAccountsClient
NewEnrollmentAccountsClient creates an instance of the EnrollmentAccountsClient client.
func NewEnrollmentAccountsClientWithBaseURI(baseURI string, subscriptionID string) EnrollmentAccountsClient
NewEnrollmentAccountsClientWithBaseURI creates an instance of the EnrollmentAccountsClient 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 EnrollmentAccountsClient) Get(ctx context.Context, name string) (result EnrollmentAccountSummary, err error)
Get gets a enrollment account by name. Parameters: name - enrollment Account name.
func (client EnrollmentAccountsClient) GetPreparer(ctx context.Context, name string) (*http.Request, error)
GetPreparer prepares the Get request.
func (client EnrollmentAccountsClient) GetResponder(resp *http.Response) (result EnrollmentAccountSummary, err error)
GetResponder handles the response to the Get request. The method always closes the http.Response Body.
func (client EnrollmentAccountsClient) 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 (client EnrollmentAccountsClient) List(ctx context.Context) (result EnrollmentAccountListResultPage, err error)
List lists the enrollment accounts the caller has access to.
func (client EnrollmentAccountsClient) ListComplete(ctx context.Context) (result EnrollmentAccountListResultIterator, err error)
ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client EnrollmentAccountsClient) ListPreparer(ctx context.Context) (*http.Request, error)
ListPreparer prepares the List request.
func (client EnrollmentAccountsClient) ListResponder(resp *http.Response) (result EnrollmentAccountListResult, err error)
ListResponder handles the response to the List request. The method always closes the http.Response Body.
func (client EnrollmentAccountsClient) 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.
EnrollmentPolicies the policies for Enterprise Agreement enrollments.
type EnrollmentPolicies struct { // AccountOwnerViewCharges - READ-ONLY; The policy that controls whether Account Owners can view charges. AccountOwnerViewCharges *bool `json:"accountOwnerViewCharges,omitempty"` // DepartmentAdminViewCharges - READ-ONLY; The policy that controls whether Department Administrators can view charges. DepartmentAdminViewCharges *bool `json:"departmentAdminViewCharges,omitempty"` // MarketplacesEnabled - READ-ONLY; The policy that controls whether Azure marketplace purchases are allowed in the enrollment. MarketplacesEnabled *bool `json:"marketplacesEnabled,omitempty"` // ReservedInstancesEnabled - READ-ONLY; The policy that controls whether Azure reservation purchases are allowed in the enrollment. ReservedInstancesEnabled *bool `json:"reservedInstancesEnabled,omitempty"` }
func (ep EnrollmentPolicies) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for EnrollmentPolicies.
ErrorDetails the details of the error.
type ErrorDetails struct { // Code - READ-ONLY; Error code. Code *string `json:"code,omitempty"` // Message - READ-ONLY; Error message indicating why the operation failed. Message *string `json:"message,omitempty"` // Target - READ-ONLY; The target of the particular error. Target *string `json:"target,omitempty"` // Details - READ-ONLY; The sub details of the error. Details *[]ErrorSubDetailsItem `json:"details,omitempty"` }
func (ed ErrorDetails) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ErrorDetails.
ErrorResponse error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.
type ErrorResponse struct { // Error - The details of the error. Error *ErrorDetails `json:"error,omitempty"` }
ErrorSubDetailsItem ...
type ErrorSubDetailsItem struct { // Code - READ-ONLY; Error code. Code *string `json:"code,omitempty"` // Message - READ-ONLY; Error message indicating why the operation failed. Message *string `json:"message,omitempty"` // Target - READ-ONLY; The target of the particular error. Target *string `json:"target,omitempty"` }
func (esdi ErrorSubDetailsItem) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ErrorSubDetailsItem.
Frequency enumerates the values for frequency.
type Frequency string
const ( // Monthly ... Monthly Frequency = "Monthly" // OneTime ... OneTime Frequency = "OneTime" // UsageBased ... UsageBased Frequency = "UsageBased" )
func PossibleFrequencyValues() []Frequency
PossibleFrequencyValues returns an array of possible values for the Frequency const type.
IndirectRelationshipInfo the billing profile details of the partner of the customer for an indirect motion.
type IndirectRelationshipInfo struct { // BillingAccountName - The billing account name of the partner or the customer for an indirect motion. BillingAccountName *string `json:"billingAccountName,omitempty"` // BillingProfileName - The billing profile name of the partner or the customer for an indirect motion. BillingProfileName *string `json:"billingProfileName,omitempty"` // DisplayName - The display name of the partner or customer for an indirect motion. DisplayName *string `json:"displayName,omitempty"` }
Instruction an instruction.
type Instruction struct { autorest.Response `json:"-"` // InstructionProperties - A billing instruction used during invoice generation. *InstructionProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name. Name *string `json:"name,omitempty"` // Type - READ-ONLY; Resource type. Type *string `json:"type,omitempty"` }
func (i Instruction) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Instruction.
func (i *Instruction) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for Instruction struct.
InstructionListResult the list of billing instructions used during invoice generation.
type InstructionListResult struct { autorest.Response `json:"-"` // Value - READ-ONLY; The list of billing instructions used during invoice generation. Value *[]Instruction `json:"value,omitempty"` // NextLink - READ-ONLY; The link (url) to the next page of results. NextLink *string `json:"nextLink,omitempty"` }
func (ilr InstructionListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
func (ilr InstructionListResult) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for InstructionListResult.
InstructionListResultIterator provides access to a complete listing of Instruction values.
type InstructionListResultIterator struct {
// contains filtered or unexported fields
}
func NewInstructionListResultIterator(page InstructionListResultPage) InstructionListResultIterator
Creates a new instance of the InstructionListResultIterator type.
func (iter *InstructionListResultIterator) 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 (iter *InstructionListResultIterator) 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 (iter InstructionListResultIterator) NotDone() bool
NotDone returns true if the enumeration should be started or is not yet complete.
func (iter InstructionListResultIterator) Response() InstructionListResult
Response returns the raw server response from the last page request.
func (iter InstructionListResultIterator) Value() Instruction
Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.
InstructionListResultPage contains a page of Instruction values.
type InstructionListResultPage struct {
// contains filtered or unexported fields
}
func NewInstructionListResultPage(cur InstructionListResult, getNextPage func(context.Context, InstructionListResult) (InstructionListResult, error)) InstructionListResultPage
Creates a new instance of the InstructionListResultPage type.
func (page *InstructionListResultPage) 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 (page *InstructionListResultPage) 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 (page InstructionListResultPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (page InstructionListResultPage) Response() InstructionListResult
Response returns the raw server response from the last page request.
func (page InstructionListResultPage) Values() []Instruction
Values returns the slice of values for the current page or nil if there are no values.
InstructionProperties a billing instruction used during invoice generation.
type InstructionProperties struct { // Amount - The amount budgeted for this billing instruction. Amount *float64 `json:"amount,omitempty"` // StartDate - The date this billing instruction goes into effect. StartDate *date.Time `json:"startDate,omitempty"` // EndDate - The date this billing instruction is no longer in effect. EndDate *date.Time `json:"endDate,omitempty"` // CreationDate - The date this billing instruction was created. CreationDate *date.Time `json:"creationDate,omitempty"` }
InstructionsClient is the billing client provides access to billing resources for Azure subscriptions.
type InstructionsClient struct { BaseClient }
func NewInstructionsClient(subscriptionID string) InstructionsClient
NewInstructionsClient creates an instance of the InstructionsClient client.
func NewInstructionsClientWithBaseURI(baseURI string, subscriptionID string) InstructionsClient
NewInstructionsClientWithBaseURI creates an instance of the InstructionsClient 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 InstructionsClient) Get(ctx context.Context, billingAccountName string, billingProfileName string, instructionName string) (result Instruction, err error)
Get get the instruction by name. These are custom billing instructions and are only applicable for certain customers. Parameters: billingAccountName - the ID that uniquely identifies a billing account. billingProfileName - the ID that uniquely identifies a billing profile. instructionName - instruction Name.
func (client InstructionsClient) GetPreparer(ctx context.Context, billingAccountName string, billingProfileName string, instructionName string) (*http.Request, error)
GetPreparer prepares the Get request.
func (client InstructionsClient) GetResponder(resp *http.Response) (result Instruction, err error)
GetResponder handles the response to the Get request. The method always closes the http.Response Body.
func (client InstructionsClient) 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 (client InstructionsClient) ListByBillingProfile(ctx context.Context, billingAccountName string, billingProfileName string) (result InstructionListResultPage, err error)
ListByBillingProfile lists the instructions by billing profile id. Parameters: billingAccountName - the ID that uniquely identifies a billing account. billingProfileName - the ID that uniquely identifies a billing profile.
func (client InstructionsClient) ListByBillingProfileComplete(ctx context.Context, billingAccountName string, billingProfileName string) (result InstructionListResultIterator, err error)
ListByBillingProfileComplete enumerates all values, automatically crossing page boundaries as required.
func (client InstructionsClient) ListByBillingProfilePreparer(ctx context.Context, billingAccountName string, billingProfileName string) (*http.Request, error)
ListByBillingProfilePreparer prepares the ListByBillingProfile request.
func (client InstructionsClient) ListByBillingProfileResponder(resp *http.Response) (result InstructionListResult, err error)
ListByBillingProfileResponder handles the response to the ListByBillingProfile request. The method always closes the http.Response Body.
func (client InstructionsClient) ListByBillingProfileSender(req *http.Request) (*http.Response, error)
ListByBillingProfileSender sends the ListByBillingProfile request. The method will close the http.Response Body if it receives an error.
func (client InstructionsClient) Put(ctx context.Context, billingAccountName string, billingProfileName string, instructionName string, parameters Instruction) (result Instruction, err error)
Put creates or updates an instruction. These are custom billing instructions and are only applicable for certain customers. Parameters: billingAccountName - the ID that uniquely identifies a billing account. billingProfileName - the ID that uniquely identifies a billing profile. instructionName - instruction Name. parameters - the new instruction.
func (client InstructionsClient) PutPreparer(ctx context.Context, billingAccountName string, billingProfileName string, instructionName string, parameters Instruction) (*http.Request, error)
PutPreparer prepares the Put request.
func (client InstructionsClient) PutResponder(resp *http.Response) (result Instruction, err error)
PutResponder handles the response to the Put request. The method always closes the http.Response Body.
func (client InstructionsClient) PutSender(req *http.Request) (*http.Response, error)
PutSender sends the Put request. The method will close the http.Response Body if it receives an error.
Invoice an invoice.
type Invoice struct { autorest.Response `json:"-"` // InvoiceProperties - An invoice. *InvoiceProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name. Name *string `json:"name,omitempty"` // Type - READ-ONLY; Resource type. Type *string `json:"type,omitempty"` }
func (i Invoice) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Invoice.
func (i *Invoice) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for Invoice struct.
InvoiceDocumentType enumerates the values for invoice document type.
type InvoiceDocumentType string
const ( // InvoiceDocumentTypeCreditNote ... InvoiceDocumentTypeCreditNote InvoiceDocumentType = "CreditNote" // InvoiceDocumentTypeInvoice ... InvoiceDocumentTypeInvoice InvoiceDocumentType = "Invoice" )
func PossibleInvoiceDocumentTypeValues() []InvoiceDocumentType
PossibleInvoiceDocumentTypeValues returns an array of possible values for the InvoiceDocumentType const type.
InvoiceListResult the list of invoices.
type InvoiceListResult struct { autorest.Response `json:"-"` // Value - READ-ONLY; The list of invoices. Value *[]Invoice `json:"value,omitempty"` // NextLink - READ-ONLY; The link (url) to the next page of results. NextLink *string `json:"nextLink,omitempty"` }
func (ilr InvoiceListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
func (ilr InvoiceListResult) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for InvoiceListResult.
InvoiceListResultIterator provides access to a complete listing of Invoice values.
type InvoiceListResultIterator struct {
// contains filtered or unexported fields
}
func NewInvoiceListResultIterator(page InvoiceListResultPage) InvoiceListResultIterator
Creates a new instance of the InvoiceListResultIterator type.
func (iter *InvoiceListResultIterator) 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 (iter *InvoiceListResultIterator) 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 (iter InvoiceListResultIterator) NotDone() bool
NotDone returns true if the enumeration should be started or is not yet complete.
func (iter InvoiceListResultIterator) Response() InvoiceListResult
Response returns the raw server response from the last page request.
func (iter InvoiceListResultIterator) Value() Invoice
Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.
InvoiceListResultPage contains a page of Invoice values.
type InvoiceListResultPage struct {
// contains filtered or unexported fields
}
func NewInvoiceListResultPage(cur InvoiceListResult, getNextPage func(context.Context, InvoiceListResult) (InvoiceListResult, error)) InvoiceListResultPage
Creates a new instance of the InvoiceListResultPage type.
func (page *InvoiceListResultPage) 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 (page *InvoiceListResultPage) 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 (page InvoiceListResultPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (page InvoiceListResultPage) Response() InvoiceListResult
Response returns the raw server response from the last page request.
func (page InvoiceListResultPage) Values() []Invoice
Values returns the slice of values for the current page or nil if there are no values.
InvoiceProperties the properties of the invoice.
type InvoiceProperties struct { // DueDate - READ-ONLY; The due date for the invoice. DueDate *date.Time `json:"dueDate,omitempty"` // InvoiceDate - READ-ONLY; The date when the invoice was generated. InvoiceDate *date.Time `json:"invoiceDate,omitempty"` // Status - READ-ONLY; The current status of the invoice. Possible values include: 'Due', 'OverDue', 'Paid', 'Void' Status InvoiceStatus `json:"status,omitempty"` // AmountDue - READ-ONLY; The amount due as of now. AmountDue *Amount `json:"amountDue,omitempty"` // AzurePrepaymentApplied - READ-ONLY; The amount of Azure prepayment applied to the charges. This field is applicable to billing accounts with agreement type Microsoft Customer Agreement. AzurePrepaymentApplied *Amount `json:"azurePrepaymentApplied,omitempty"` // BilledAmount - READ-ONLY; The total charges for the invoice billing period. BilledAmount *Amount `json:"billedAmount,omitempty"` // CreditAmount - READ-ONLY; The total refund for returns and cancellations during the invoice billing period. This field is applicable to billing accounts with agreement type Microsoft Customer Agreement. CreditAmount *Amount `json:"creditAmount,omitempty"` // FreeAzureCreditApplied - READ-ONLY; The amount of free Azure credits applied to the charges. This field is applicable to billing accounts with agreement type Microsoft Customer Agreement. FreeAzureCreditApplied *Amount `json:"freeAzureCreditApplied,omitempty"` // SubTotal - READ-ONLY; The pre-tax amount due. This field is applicable to billing accounts with agreement type Microsoft Customer Agreement. SubTotal *Amount `json:"subTotal,omitempty"` // TaxAmount - READ-ONLY; The amount of tax charged for the billing period. This field is applicable to billing accounts with agreement type Microsoft Customer Agreement. TaxAmount *Amount `json:"taxAmount,omitempty"` // TotalAmount - READ-ONLY; The amount due when the invoice was generated. This field is applicable to billing accounts with agreement type Microsoft Customer Agreement. TotalAmount *Amount `json:"totalAmount,omitempty"` // InvoicePeriodStartDate - READ-ONLY; The start date of the billing period for which the invoice is generated. InvoicePeriodStartDate *date.Time `json:"invoicePeriodStartDate,omitempty"` // InvoicePeriodEndDate - READ-ONLY; The end date of the billing period for which the invoice is generated. InvoicePeriodEndDate *date.Time `json:"invoicePeriodEndDate,omitempty"` // InvoiceType - READ-ONLY; Invoice type. Possible values include: 'AzureService', 'AzureMarketplace', 'AzureSupport' InvoiceType InvoiceType `json:"invoiceType,omitempty"` // IsMonthlyInvoice - READ-ONLY; Specifies if the invoice is generated as part of monthly invoicing cycle or not. This field is applicable to billing accounts with agreement type Microsoft Customer Agreement. IsMonthlyInvoice *bool `json:"isMonthlyInvoice,omitempty"` // BillingProfileID - READ-ONLY; The ID of the billing profile for which the invoice is generated. BillingProfileID *string `json:"billingProfileId,omitempty"` // BillingProfileDisplayName - READ-ONLY; The name of the billing profile for which the invoice is generated. BillingProfileDisplayName *string `json:"billingProfileDisplayName,omitempty"` // PurchaseOrderNumber - READ-ONLY; An optional purchase order number for the invoice. PurchaseOrderNumber *string `json:"purchaseOrderNumber,omitempty"` // Documents - READ-ONLY; List of documents available to download such as invoice and tax receipt. Documents *[]Document `json:"documents,omitempty"` // Payments - READ-ONLY; List of payments. Payments *[]PaymentProperties `json:"payments,omitempty"` // RebillDetails - READ-ONLY; Rebill details for an invoice. RebillDetails map[string]*RebillDetails `json:"rebillDetails"` // DocumentType - READ-ONLY; The type of the document. Possible values include: 'InvoiceDocumentTypeInvoice', 'InvoiceDocumentTypeCreditNote' DocumentType InvoiceDocumentType `json:"documentType,omitempty"` // BilledDocumentID - READ-ONLY; The Id of the active invoice which is originally billed after this invoice was voided. This field is applicable to the void invoices only. BilledDocumentID *string `json:"billedDocumentId,omitempty"` // CreditForDocumentID - READ-ONLY; The Id of the invoice which got voided and this credit note was issued as a result. This field is applicable to the credit notes only. CreditForDocumentID *string `json:"creditForDocumentId,omitempty"` // SubscriptionID - READ-ONLY; The ID of the subscription for which the invoice is generated. SubscriptionID *string `json:"subscriptionId,omitempty"` }
func (IP InvoiceProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for InvoiceProperties.
InvoiceSection an invoice section.
type InvoiceSection struct { autorest.Response `json:"-"` // InvoiceSectionProperties - The properties of an invoice section. *InvoiceSectionProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name. Name *string `json:"name,omitempty"` // Type - READ-ONLY; Resource type. Type *string `json:"type,omitempty"` }
func (is InvoiceSection) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for InvoiceSection.
func (is *InvoiceSection) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for InvoiceSection struct.
InvoiceSectionCreationRequest the properties of the invoice section.
type InvoiceSectionCreationRequest struct { // DisplayName - The name of the invoice section. DisplayName *string `json:"displayName,omitempty"` }
InvoiceSectionListResult the list of invoice sections.
type InvoiceSectionListResult struct { autorest.Response `json:"-"` // Value - READ-ONLY; The list of invoice sections. Value *[]InvoiceSection `json:"value,omitempty"` // NextLink - READ-ONLY; The link (url) to the next page of results. NextLink *string `json:"nextLink,omitempty"` }
func (islr InvoiceSectionListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
func (islr InvoiceSectionListResult) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for InvoiceSectionListResult.
InvoiceSectionListResultIterator provides access to a complete listing of InvoiceSection values.
type InvoiceSectionListResultIterator struct {
// contains filtered or unexported fields
}
func NewInvoiceSectionListResultIterator(page InvoiceSectionListResultPage) InvoiceSectionListResultIterator
Creates a new instance of the InvoiceSectionListResultIterator type.
func (iter *InvoiceSectionListResultIterator) 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 (iter *InvoiceSectionListResultIterator) 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 (iter InvoiceSectionListResultIterator) NotDone() bool
NotDone returns true if the enumeration should be started or is not yet complete.
func (iter InvoiceSectionListResultIterator) Response() InvoiceSectionListResult
Response returns the raw server response from the last page request.
func (iter InvoiceSectionListResultIterator) Value() InvoiceSection
Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.
InvoiceSectionListResultPage contains a page of InvoiceSection values.
type InvoiceSectionListResultPage struct {
// contains filtered or unexported fields
}
func NewInvoiceSectionListResultPage(cur InvoiceSectionListResult, getNextPage func(context.Context, InvoiceSectionListResult) (InvoiceSectionListResult, error)) InvoiceSectionListResultPage
Creates a new instance of the InvoiceSectionListResultPage type.
func (page *InvoiceSectionListResultPage) 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 (page *InvoiceSectionListResultPage) 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 (page InvoiceSectionListResultPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (page InvoiceSectionListResultPage) Response() InvoiceSectionListResult
Response returns the raw server response from the last page request.
func (page InvoiceSectionListResultPage) Values() []InvoiceSection
Values returns the slice of values for the current page or nil if there are no values.
InvoiceSectionListWithCreateSubPermissionResult the list of invoice section properties with create subscription permission.
type InvoiceSectionListWithCreateSubPermissionResult struct { autorest.Response `json:"-"` // Value - The list of invoice section properties with create subscription permission. Value *[]InvoiceSectionWithCreateSubPermission `json:"value,omitempty"` // NextLink - READ-ONLY; The link (url) to the next page of results. NextLink *string `json:"nextLink,omitempty"` }
func (islwcspr InvoiceSectionListWithCreateSubPermissionResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
func (islwcspr InvoiceSectionListWithCreateSubPermissionResult) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for InvoiceSectionListWithCreateSubPermissionResult.
InvoiceSectionListWithCreateSubPermissionResultIterator provides access to a complete listing of InvoiceSectionWithCreateSubPermission values.
type InvoiceSectionListWithCreateSubPermissionResultIterator struct {
// contains filtered or unexported fields
}
func NewInvoiceSectionListWithCreateSubPermissionResultIterator(page InvoiceSectionListWithCreateSubPermissionResultPage) InvoiceSectionListWithCreateSubPermissionResultIterator
Creates a new instance of the InvoiceSectionListWithCreateSubPermissionResultIterator type.
func (iter *InvoiceSectionListWithCreateSubPermissionResultIterator) 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 (iter *InvoiceSectionListWithCreateSubPermissionResultIterator) 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 (iter InvoiceSectionListWithCreateSubPermissionResultIterator) NotDone() bool
NotDone returns true if the enumeration should be started or is not yet complete.
func (iter InvoiceSectionListWithCreateSubPermissionResultIterator) Response() InvoiceSectionListWithCreateSubPermissionResult
Response returns the raw server response from the last page request.
func (iter InvoiceSectionListWithCreateSubPermissionResultIterator) Value() InvoiceSectionWithCreateSubPermission
Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.
InvoiceSectionListWithCreateSubPermissionResultPage contains a page of InvoiceSectionWithCreateSubPermission values.
type InvoiceSectionListWithCreateSubPermissionResultPage struct {
// contains filtered or unexported fields
}
func NewInvoiceSectionListWithCreateSubPermissionResultPage(cur InvoiceSectionListWithCreateSubPermissionResult, getNextPage func(context.Context, InvoiceSectionListWithCreateSubPermissionResult) (InvoiceSectionListWithCreateSubPermissionResult, error)) InvoiceSectionListWithCreateSubPermissionResultPage
Creates a new instance of the InvoiceSectionListWithCreateSubPermissionResultPage type.
func (page *InvoiceSectionListWithCreateSubPermissionResultPage) 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 (page *InvoiceSectionListWithCreateSubPermissionResultPage) 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 (page InvoiceSectionListWithCreateSubPermissionResultPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (page InvoiceSectionListWithCreateSubPermissionResultPage) Response() InvoiceSectionListWithCreateSubPermissionResult
Response returns the raw server response from the last page request.
func (page InvoiceSectionListWithCreateSubPermissionResultPage) Values() []InvoiceSectionWithCreateSubPermission
Values returns the slice of values for the current page or nil if there are no values.
InvoiceSectionProperties the properties of an invoice section.
type InvoiceSectionProperties struct { // DisplayName - The name of the invoice section. DisplayName *string `json:"displayName,omitempty"` // Labels - Dictionary of metadata associated with the invoice section. Labels map[string]*string `json:"labels"` // State - READ-ONLY; Identifies the state of an invoice section. Possible values include: 'InvoiceSectionStateActive', 'InvoiceSectionStateRestricted' State InvoiceSectionState `json:"state,omitempty"` // SystemID - READ-ONLY; The system generated unique identifier for an invoice section. SystemID *string `json:"systemId,omitempty"` // TargetCloud - READ-ONLY; Identifies the cloud environments that are associated with an invoice section. This is a system managed optional field and gets updated as the invoice section gets associated with accounts in various clouds. Possible values include: 'USGov', 'USNat', 'USSec' TargetCloud TargetCloud `json:"targetCloud,omitempty"` }
func (isp InvoiceSectionProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for InvoiceSectionProperties.
InvoiceSectionState enumerates the values for invoice section state.
type InvoiceSectionState string
const ( // InvoiceSectionStateActive ... InvoiceSectionStateActive InvoiceSectionState = "Active" // InvoiceSectionStateRestricted ... InvoiceSectionStateRestricted InvoiceSectionState = "Restricted" )
func PossibleInvoiceSectionStateValues() []InvoiceSectionState
PossibleInvoiceSectionStateValues returns an array of possible values for the InvoiceSectionState const type.
InvoiceSectionWithCreateSubPermission invoice section properties with create subscription permission.
type InvoiceSectionWithCreateSubPermission struct { // InvoiceSectionID - READ-ONLY; The ID of the invoice section. InvoiceSectionID *string `json:"invoiceSectionId,omitempty"` // InvoiceSectionDisplayName - READ-ONLY; The name of the invoice section. InvoiceSectionDisplayName *string `json:"invoiceSectionDisplayName,omitempty"` // InvoiceSectionSystemID - READ-ONLY; The system generated unique identifier for an invoice section. InvoiceSectionSystemID *string `json:"invoiceSectionSystemId,omitempty"` // BillingProfileID - READ-ONLY; The ID of the billing profile for the invoice section. BillingProfileID *string `json:"billingProfileId,omitempty"` // BillingProfileDisplayName - READ-ONLY; The name of the billing profile for the invoice section. BillingProfileDisplayName *string `json:"billingProfileDisplayName,omitempty"` // BillingProfileStatus - READ-ONLY; The status of the billing profile. Possible values include: 'ProfileStatusActive', 'ProfileStatusDisabled', 'ProfileStatusWarned' BillingProfileStatus ProfileStatus `json:"billingProfileStatus,omitempty"` // BillingProfileStatusReasonCode - READ-ONLY; Reason for the specified billing profile status. Possible values include: 'StatusReasonCodeForBillingProfilePastDue', 'StatusReasonCodeForBillingProfileSpendingLimitReached', 'StatusReasonCodeForBillingProfileSpendingLimitExpired' BillingProfileStatusReasonCode StatusReasonCodeForBillingProfile `json:"billingProfileStatusReasonCode,omitempty"` // BillingProfileSpendingLimit - READ-ONLY; The billing profile spending limit. Possible values include: 'SpendingLimitForBillingProfileOff', 'SpendingLimitForBillingProfileOn' BillingProfileSpendingLimit SpendingLimitForBillingProfile `json:"billingProfileSpendingLimit,omitempty"` // BillingProfileSystemID - READ-ONLY; The system generated unique identifier for a billing profile. BillingProfileSystemID *string `json:"billingProfileSystemId,omitempty"` // EnabledAzurePlans - Enabled azure plans for the associated billing profile. EnabledAzurePlans *[]AzurePlan `json:"enabledAzurePlans,omitempty"` }
func (iswcsp InvoiceSectionWithCreateSubPermission) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for InvoiceSectionWithCreateSubPermission.
InvoiceSectionsClient is the billing client provides access to billing resources for Azure subscriptions.
type InvoiceSectionsClient struct { BaseClient }
func NewInvoiceSectionsClient(subscriptionID string) InvoiceSectionsClient
NewInvoiceSectionsClient creates an instance of the InvoiceSectionsClient client.
func NewInvoiceSectionsClientWithBaseURI(baseURI string, subscriptionID string) InvoiceSectionsClient
NewInvoiceSectionsClientWithBaseURI creates an instance of the InvoiceSectionsClient 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 InvoiceSectionsClient) CreateOrUpdate(ctx context.Context, billingAccountName string, billingProfileName string, invoiceSectionName string, parameters InvoiceSection) (result InvoiceSectionsCreateOrUpdateFuture, err error)
CreateOrUpdate creates or updates an invoice section. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. billingProfileName - the ID that uniquely identifies a billing profile. invoiceSectionName - the ID that uniquely identifies an invoice section. parameters - the new or updated invoice section.
func (client InvoiceSectionsClient) CreateOrUpdatePreparer(ctx context.Context, billingAccountName string, billingProfileName string, invoiceSectionName string, parameters InvoiceSection) (*http.Request, error)
CreateOrUpdatePreparer prepares the CreateOrUpdate request.
func (client InvoiceSectionsClient) CreateOrUpdateResponder(resp *http.Response) (result InvoiceSection, err error)
CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always closes the http.Response Body.
func (client InvoiceSectionsClient) CreateOrUpdateSender(req *http.Request) (future InvoiceSectionsCreateOrUpdateFuture, err error)
CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the http.Response Body if it receives an error.
func (client InvoiceSectionsClient) Get(ctx context.Context, billingAccountName string, billingProfileName string, invoiceSectionName string) (result InvoiceSection, err error)
Get gets an invoice section by its ID. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. billingProfileName - the ID that uniquely identifies a billing profile. invoiceSectionName - the ID that uniquely identifies an invoice section.
func (client InvoiceSectionsClient) GetPreparer(ctx context.Context, billingAccountName string, billingProfileName string, invoiceSectionName string) (*http.Request, error)
GetPreparer prepares the Get request.
func (client InvoiceSectionsClient) GetResponder(resp *http.Response) (result InvoiceSection, err error)
GetResponder handles the response to the Get request. The method always closes the http.Response Body.
func (client InvoiceSectionsClient) 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 (client InvoiceSectionsClient) ListByBillingProfile(ctx context.Context, billingAccountName string, billingProfileName string) (result InvoiceSectionListResultPage, err error)
ListByBillingProfile lists the invoice sections that a user has access to. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. billingProfileName - the ID that uniquely identifies a billing profile.
func (client InvoiceSectionsClient) ListByBillingProfileComplete(ctx context.Context, billingAccountName string, billingProfileName string) (result InvoiceSectionListResultIterator, err error)
ListByBillingProfileComplete enumerates all values, automatically crossing page boundaries as required.
func (client InvoiceSectionsClient) ListByBillingProfilePreparer(ctx context.Context, billingAccountName string, billingProfileName string) (*http.Request, error)
ListByBillingProfilePreparer prepares the ListByBillingProfile request.
func (client InvoiceSectionsClient) ListByBillingProfileResponder(resp *http.Response) (result InvoiceSectionListResult, err error)
ListByBillingProfileResponder handles the response to the ListByBillingProfile request. The method always closes the http.Response Body.
func (client InvoiceSectionsClient) ListByBillingProfileSender(req *http.Request) (*http.Response, error)
ListByBillingProfileSender sends the ListByBillingProfile request. The method will close the http.Response Body if it receives an error.
InvoiceSectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type InvoiceSectionsCreateOrUpdateFuture struct { azure.FutureAPI // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. Result func(InvoiceSectionsClient) (InvoiceSection, error) }
func (future *InvoiceSectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaller for CreateFuture.
InvoiceSectionsOnExpand the invoice sections associated to the billing profile. By default this is not populated, unless it's specified in $expand.
type InvoiceSectionsOnExpand struct { // HasMoreResults - READ-ONLY; Indicates whether there are more invoice sections than the ones listed in this collection. The collection lists a maximum of 50 invoice sections. To get all invoice sections, use the list invoice sections API. HasMoreResults *bool `json:"hasMoreResults,omitempty"` // Value - The invoice sections associated to the billing profile. Value *[]InvoiceSection `json:"value,omitempty"` }
func (isoe InvoiceSectionsOnExpand) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for InvoiceSectionsOnExpand.
InvoiceStatus enumerates the values for invoice status.
type InvoiceStatus string
const ( // Due ... Due InvoiceStatus = "Due" // OverDue ... OverDue InvoiceStatus = "OverDue" // Paid ... Paid InvoiceStatus = "Paid" // Void ... Void InvoiceStatus = "Void" )
func PossibleInvoiceStatusValues() []InvoiceStatus
PossibleInvoiceStatusValues returns an array of possible values for the InvoiceStatus const type.
InvoiceType enumerates the values for invoice type.
type InvoiceType string
const ( // AzureMarketplace ... AzureMarketplace InvoiceType = "AzureMarketplace" // AzureService ... AzureService InvoiceType = "AzureService" // AzureSupport ... AzureSupport InvoiceType = "AzureSupport" )
func PossibleInvoiceTypeValues() []InvoiceType
PossibleInvoiceTypeValues returns an array of possible values for the InvoiceType const type.
InvoicesClient is the billing client provides access to billing resources for Azure subscriptions.
type InvoicesClient struct { BaseClient }
func NewInvoicesClient(subscriptionID string) InvoicesClient
NewInvoicesClient creates an instance of the InvoicesClient client.
func NewInvoicesClientWithBaseURI(baseURI string, subscriptionID string) InvoicesClient
NewInvoicesClientWithBaseURI creates an instance of the InvoicesClient 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 InvoicesClient) DownloadBillingSubscriptionInvoice(ctx context.Context, invoiceName string, downloadToken string) (result InvoicesDownloadBillingSubscriptionInvoiceFuture, err error)
DownloadBillingSubscriptionInvoice gets a URL to download an invoice. Parameters: invoiceName - the ID that uniquely identifies an invoice. downloadToken - download token with document source and document ID.
func (client InvoicesClient) DownloadBillingSubscriptionInvoicePreparer(ctx context.Context, invoiceName string, downloadToken string) (*http.Request, error)
DownloadBillingSubscriptionInvoicePreparer prepares the DownloadBillingSubscriptionInvoice request.
func (client InvoicesClient) DownloadBillingSubscriptionInvoiceResponder(resp *http.Response) (result DownloadURL, err error)
DownloadBillingSubscriptionInvoiceResponder handles the response to the DownloadBillingSubscriptionInvoice request. The method always closes the http.Response Body.
func (client InvoicesClient) DownloadBillingSubscriptionInvoiceSender(req *http.Request) (future InvoicesDownloadBillingSubscriptionInvoiceFuture, err error)
DownloadBillingSubscriptionInvoiceSender sends the DownloadBillingSubscriptionInvoice request. The method will close the http.Response Body if it receives an error.
func (client InvoicesClient) DownloadInvoice(ctx context.Context, billingAccountName string, invoiceName string, downloadToken string) (result InvoicesDownloadInvoiceFuture, err error)
DownloadInvoice gets a URL to download an invoice. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. invoiceName - the ID that uniquely identifies an invoice. downloadToken - download token with document source and document ID.
func (client InvoicesClient) DownloadInvoicePreparer(ctx context.Context, billingAccountName string, invoiceName string, downloadToken string) (*http.Request, error)
DownloadInvoicePreparer prepares the DownloadInvoice request.
func (client InvoicesClient) DownloadInvoiceResponder(resp *http.Response) (result DownloadURL, err error)
DownloadInvoiceResponder handles the response to the DownloadInvoice request. The method always closes the http.Response Body.
func (client InvoicesClient) DownloadInvoiceSender(req *http.Request) (future InvoicesDownloadInvoiceFuture, err error)
DownloadInvoiceSender sends the DownloadInvoice request. The method will close the http.Response Body if it receives an error.
func (client InvoicesClient) DownloadMultipleBillingProfileInvoices(ctx context.Context, billingAccountName string, downloadUrls []string) (result InvoicesDownloadMultipleBillingProfileInvoicesFuture, err error)
DownloadMultipleBillingProfileInvoices gets a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. downloadUrls - an array of download urls for individual documents
func (client InvoicesClient) DownloadMultipleBillingProfileInvoicesPreparer(ctx context.Context, billingAccountName string, downloadUrls []string) (*http.Request, error)
DownloadMultipleBillingProfileInvoicesPreparer prepares the DownloadMultipleBillingProfileInvoices request.
func (client InvoicesClient) DownloadMultipleBillingProfileInvoicesResponder(resp *http.Response) (result DownloadURL, err error)
DownloadMultipleBillingProfileInvoicesResponder handles the response to the DownloadMultipleBillingProfileInvoices request. The method always closes the http.Response Body.
func (client InvoicesClient) DownloadMultipleBillingProfileInvoicesSender(req *http.Request) (future InvoicesDownloadMultipleBillingProfileInvoicesFuture, err error)
DownloadMultipleBillingProfileInvoicesSender sends the DownloadMultipleBillingProfileInvoices request. The method will close the http.Response Body if it receives an error.
func (client InvoicesClient) DownloadMultipleBillingSubscriptionInvoices(ctx context.Context, downloadUrls []string) (result InvoicesDownloadMultipleBillingSubscriptionInvoicesFuture, err error)
DownloadMultipleBillingSubscriptionInvoices gets a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file. Parameters: downloadUrls - an array of download urls for individual documents
func (client InvoicesClient) DownloadMultipleBillingSubscriptionInvoicesPreparer(ctx context.Context, downloadUrls []string) (*http.Request, error)
DownloadMultipleBillingSubscriptionInvoicesPreparer prepares the DownloadMultipleBillingSubscriptionInvoices request.
func (client InvoicesClient) DownloadMultipleBillingSubscriptionInvoicesResponder(resp *http.Response) (result DownloadURL, err error)
DownloadMultipleBillingSubscriptionInvoicesResponder handles the response to the DownloadMultipleBillingSubscriptionInvoices request. The method always closes the http.Response Body.
func (client InvoicesClient) DownloadMultipleBillingSubscriptionInvoicesSender(req *http.Request) (future InvoicesDownloadMultipleBillingSubscriptionInvoicesFuture, err error)
DownloadMultipleBillingSubscriptionInvoicesSender sends the DownloadMultipleBillingSubscriptionInvoices request. The method will close the http.Response Body if it receives an error.
func (client InvoicesClient) Get(ctx context.Context, billingAccountName string, invoiceName string) (result Invoice, err error)
Get gets an invoice by billing account name and ID. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. invoiceName - the ID that uniquely identifies an invoice.
func (client InvoicesClient) GetByID(ctx context.Context, invoiceName string) (result Invoice, err error)
GetByID gets an invoice by ID. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. Parameters: invoiceName - the ID that uniquely identifies an invoice.
func (client InvoicesClient) GetByIDPreparer(ctx context.Context, invoiceName string) (*http.Request, error)
GetByIDPreparer prepares the GetByID request.
func (client InvoicesClient) GetByIDResponder(resp *http.Response) (result Invoice, err error)
GetByIDResponder handles the response to the GetByID request. The method always closes the http.Response Body.
func (client InvoicesClient) GetByIDSender(req *http.Request) (*http.Response, error)
GetByIDSender sends the GetByID request. The method will close the http.Response Body if it receives an error.
func (client InvoicesClient) GetBySubscriptionAndInvoiceID(ctx context.Context, invoiceName string) (result Invoice, err error)
GetBySubscriptionAndInvoiceID gets an invoice by subscription ID and invoice ID. Parameters: invoiceName - the ID that uniquely identifies an invoice.
func (client InvoicesClient) GetBySubscriptionAndInvoiceIDPreparer(ctx context.Context, invoiceName string) (*http.Request, error)
GetBySubscriptionAndInvoiceIDPreparer prepares the GetBySubscriptionAndInvoiceID request.
func (client InvoicesClient) GetBySubscriptionAndInvoiceIDResponder(resp *http.Response) (result Invoice, err error)
GetBySubscriptionAndInvoiceIDResponder handles the response to the GetBySubscriptionAndInvoiceID request. The method always closes the http.Response Body.
func (client InvoicesClient) GetBySubscriptionAndInvoiceIDSender(req *http.Request) (*http.Response, error)
GetBySubscriptionAndInvoiceIDSender sends the GetBySubscriptionAndInvoiceID request. The method will close the http.Response Body if it receives an error.
func (client InvoicesClient) GetPreparer(ctx context.Context, billingAccountName string, invoiceName string) (*http.Request, error)
GetPreparer prepares the Get request.
func (client InvoicesClient) GetResponder(resp *http.Response) (result Invoice, err error)
GetResponder handles the response to the Get request. The method always closes the http.Response Body.
func (client InvoicesClient) 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 (client InvoicesClient) ListByBillingAccount(ctx context.Context, billingAccountName string, periodStartDate string, periodEndDate string) (result InvoiceListResultPage, err error)
ListByBillingAccount lists the invoices for a billing account for a given start date and end date. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. periodStartDate - the start date to fetch the invoices. The date should be specified in MM-DD-YYYY format. periodEndDate - the end date to fetch the invoices. The date should be specified in MM-DD-YYYY format.
func (client InvoicesClient) ListByBillingAccountComplete(ctx context.Context, billingAccountName string, periodStartDate string, periodEndDate string) (result InvoiceListResultIterator, err error)
ListByBillingAccountComplete enumerates all values, automatically crossing page boundaries as required.
func (client InvoicesClient) ListByBillingAccountPreparer(ctx context.Context, billingAccountName string, periodStartDate string, periodEndDate string) (*http.Request, error)
ListByBillingAccountPreparer prepares the ListByBillingAccount request.
func (client InvoicesClient) ListByBillingAccountResponder(resp *http.Response) (result InvoiceListResult, err error)
ListByBillingAccountResponder handles the response to the ListByBillingAccount request. The method always closes the http.Response Body.
func (client InvoicesClient) ListByBillingAccountSender(req *http.Request) (*http.Response, error)
ListByBillingAccountSender sends the ListByBillingAccount request. The method will close the http.Response Body if it receives an error.
func (client InvoicesClient) ListByBillingProfile(ctx context.Context, billingAccountName string, billingProfileName string, periodStartDate string, periodEndDate string) (result InvoiceListResultPage, err error)
ListByBillingProfile lists the invoices for a billing profile for a given start date and end date. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. billingProfileName - the ID that uniquely identifies a billing profile. periodStartDate - the start date to fetch the invoices. The date should be specified in MM-DD-YYYY format. periodEndDate - the end date to fetch the invoices. The date should be specified in MM-DD-YYYY format.
func (client InvoicesClient) ListByBillingProfileComplete(ctx context.Context, billingAccountName string, billingProfileName string, periodStartDate string, periodEndDate string) (result InvoiceListResultIterator, err error)
ListByBillingProfileComplete enumerates all values, automatically crossing page boundaries as required.
func (client InvoicesClient) ListByBillingProfilePreparer(ctx context.Context, billingAccountName string, billingProfileName string, periodStartDate string, periodEndDate string) (*http.Request, error)
ListByBillingProfilePreparer prepares the ListByBillingProfile request.
func (client InvoicesClient) ListByBillingProfileResponder(resp *http.Response) (result InvoiceListResult, err error)
ListByBillingProfileResponder handles the response to the ListByBillingProfile request. The method always closes the http.Response Body.
func (client InvoicesClient) ListByBillingProfileSender(req *http.Request) (*http.Response, error)
ListByBillingProfileSender sends the ListByBillingProfile request. The method will close the http.Response Body if it receives an error.
func (client InvoicesClient) ListByBillingSubscription(ctx context.Context, periodStartDate string, periodEndDate string) (result InvoiceListResultPage, err error)
ListByBillingSubscription lists the invoices for a subscription. Parameters: periodStartDate - invoice period start date. periodEndDate - invoice period end date.
func (client InvoicesClient) ListByBillingSubscriptionComplete(ctx context.Context, periodStartDate string, periodEndDate string) (result InvoiceListResultIterator, err error)
ListByBillingSubscriptionComplete enumerates all values, automatically crossing page boundaries as required.
func (client InvoicesClient) ListByBillingSubscriptionPreparer(ctx context.Context, periodStartDate string, periodEndDate string) (*http.Request, error)
ListByBillingSubscriptionPreparer prepares the ListByBillingSubscription request.
func (client InvoicesClient) ListByBillingSubscriptionResponder(resp *http.Response) (result InvoiceListResult, err error)
ListByBillingSubscriptionResponder handles the response to the ListByBillingSubscription request. The method always closes the http.Response Body.
func (client InvoicesClient) ListByBillingSubscriptionSender(req *http.Request) (*http.Response, error)
ListByBillingSubscriptionSender sends the ListByBillingSubscription request. The method will close the http.Response Body if it receives an error.
InvoicesDownloadBillingSubscriptionInvoiceFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type InvoicesDownloadBillingSubscriptionInvoiceFuture struct { azure.FutureAPI // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. Result func(InvoicesClient) (DownloadURL, error) }
func (future *InvoicesDownloadBillingSubscriptionInvoiceFuture) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaller for CreateFuture.
InvoicesDownloadInvoiceFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type InvoicesDownloadInvoiceFuture struct { azure.FutureAPI // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. Result func(InvoicesClient) (DownloadURL, error) }
func (future *InvoicesDownloadInvoiceFuture) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaller for CreateFuture.
InvoicesDownloadMultipleBillingProfileInvoicesFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type InvoicesDownloadMultipleBillingProfileInvoicesFuture struct { azure.FutureAPI // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. Result func(InvoicesClient) (DownloadURL, error) }
func (future *InvoicesDownloadMultipleBillingProfileInvoicesFuture) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaller for CreateFuture.
InvoicesDownloadMultipleBillingSubscriptionInvoicesFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type InvoicesDownloadMultipleBillingSubscriptionInvoicesFuture struct { azure.FutureAPI // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. Result func(InvoicesClient) (DownloadURL, error) }
func (future *InvoicesDownloadMultipleBillingSubscriptionInvoicesFuture) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaller for CreateFuture.
MarketplacePurchasesPolicy enumerates the values for marketplace purchases policy.
type MarketplacePurchasesPolicy string
const ( // AllAllowed ... AllAllowed MarketplacePurchasesPolicy = "AllAllowed" // NotAllowed ... NotAllowed MarketplacePurchasesPolicy = "NotAllowed" // OnlyFreeAllowed ... OnlyFreeAllowed MarketplacePurchasesPolicy = "OnlyFreeAllowed" )
func PossibleMarketplacePurchasesPolicyValues() []MarketplacePurchasesPolicy
PossibleMarketplacePurchasesPolicyValues returns an array of possible values for the MarketplacePurchasesPolicy const type.
Operation a Billing REST API operation.
type Operation struct { // Name - READ-ONLY; Operation name: {provider}/{resource}/{operation}. Name *string `json:"name,omitempty"` // Display - The object that represents the operation. Display *OperationDisplay `json:"display,omitempty"` }
func (o Operation) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Operation.
OperationDisplay the object that represents the operation.
type OperationDisplay struct { // Provider - READ-ONLY; Service provider: Microsoft.Billing. Provider *string `json:"provider,omitempty"` // Resource - READ-ONLY; Resource on which the operation is performed such as invoice and billing subscription. Resource *string `json:"resource,omitempty"` // Operation - READ-ONLY; Operation type such as read, write and delete. Operation *string `json:"operation,omitempty"` }
func (o OperationDisplay) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for OperationDisplay.
OperationListResult the list of billing operations and a URL link to get the next set of results.
type OperationListResult struct { autorest.Response `json:"-"` // Value - READ-ONLY; The list of billing operations supported by the Microsoft.Billing resource provider. Value *[]Operation `json:"value,omitempty"` // NextLink - READ-ONLY; URL to get the next set of operation list results if there are any. NextLink *string `json:"nextLink,omitempty"` }
func (olr OperationListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
func (olr OperationListResult) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for OperationListResult.
OperationListResultIterator provides access to a complete listing of Operation values.
type OperationListResultIterator struct {
// contains filtered or unexported fields
}
func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator
Creates a new instance of the OperationListResultIterator type.
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 (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 (iter OperationListResultIterator) NotDone() bool
NotDone returns true if the enumeration should be started or is not yet complete.
func (iter OperationListResultIterator) Response() OperationListResult
Response returns the raw server response from the last page request.
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.
OperationListResultPage contains a page of Operation values.
type OperationListResultPage struct {
// contains filtered or unexported fields
}
func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage
Creates a new instance of the OperationListResultPage type.
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 (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 (page OperationListResultPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (page OperationListResultPage) Response() OperationListResult
Response returns the raw server response from the last page request.
func (page OperationListResultPage) Values() []Operation
Values returns the slice of values for the current page or nil if there are no values.
OperationsClient is the billing client provides access to billing resources for Azure subscriptions.
type OperationsClient struct { BaseClient }
func NewOperationsClient(subscriptionID string) OperationsClient
NewOperationsClient creates an instance of the OperationsClient client.
func NewOperationsClientWithBaseURI(baseURI string, subscriptionID 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 (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error)
List lists the available billing REST API operations.
func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error)
ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error)
ListPreparer prepares the List request.
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 (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.
Participants the details about a participant.
type Participants struct { // Status - READ-ONLY; The acceptance status of the participant. Status *string `json:"status,omitempty"` // StatusDate - READ-ONLY; The date when the status got changed. StatusDate *date.Time `json:"statusDate,omitempty"` // Email - READ-ONLY; The email address of the participant. Email *string `json:"email,omitempty"` }
func (p Participants) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Participants.
PaymentMethodFamily enumerates the values for payment method family.
type PaymentMethodFamily string
const ( // CheckWire ... CheckWire PaymentMethodFamily = "CheckWire" // CreditCard ... CreditCard PaymentMethodFamily = "CreditCard" // Credits ... Credits PaymentMethodFamily = "Credits" // None ... None PaymentMethodFamily = "None" )
func PossiblePaymentMethodFamilyValues() []PaymentMethodFamily
PossiblePaymentMethodFamilyValues returns an array of possible values for the PaymentMethodFamily const type.
PaymentProperties the properties of a payment.
type PaymentProperties struct { // PaymentType - READ-ONLY; The type of payment. PaymentType *string `json:"paymentType,omitempty"` // Amount - READ-ONLY; The paid amount. Amount *Amount `json:"amount,omitempty"` // Date - READ-ONLY; The date when the payment was made. Date *date.Time `json:"date,omitempty"` // PaymentMethodFamily - The family of payment method. Possible values include: 'Credits', 'CheckWire', 'CreditCard', 'None' PaymentMethodFamily PaymentMethodFamily `json:"paymentMethodFamily,omitempty"` // PaymentMethodType - READ-ONLY; The type of payment method. PaymentMethodType *string `json:"paymentMethodType,omitempty"` }
func (pp PaymentProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for PaymentProperties.
Period a billing period resource.
type Period struct { autorest.Response `json:"-"` // PeriodProperties - A billing period. *PeriodProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name. Name *string `json:"name,omitempty"` // Type - READ-ONLY; Resource type. Type *string `json:"type,omitempty"` }
func (p Period) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Period.
func (p *Period) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for Period struct.
PeriodProperties the properties of the billing period.
type PeriodProperties struct { // BillingPeriodStartDate - READ-ONLY; The start of the date range covered by the billing period. BillingPeriodStartDate *date.Date `json:"billingPeriodStartDate,omitempty"` // BillingPeriodEndDate - READ-ONLY; The end of the date range covered by the billing period. BillingPeriodEndDate *date.Date `json:"billingPeriodEndDate,omitempty"` // InvoiceIds - READ-ONLY; Array of invoice ids that associated with. InvoiceIds *[]string `json:"invoiceIds,omitempty"` }
func (pp PeriodProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for PeriodProperties.
PeriodsClient is the billing client provides access to billing resources for Azure subscriptions.
type PeriodsClient struct { BaseClient }
func NewPeriodsClient(subscriptionID string) PeriodsClient
NewPeriodsClient creates an instance of the PeriodsClient client.
func NewPeriodsClientWithBaseURI(baseURI string, subscriptionID string) PeriodsClient
NewPeriodsClientWithBaseURI creates an instance of the PeriodsClient 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 PeriodsClient) Get(ctx context.Context, billingPeriodName string) (result Period, err error)
Get gets a named billing period. This is only supported for Azure Web-Direct subscriptions. Other subscription types which were not purchased directly through the Azure web portal are not supported through this preview API. Parameters: billingPeriodName - the name of a BillingPeriod resource.
func (client PeriodsClient) GetPreparer(ctx context.Context, billingPeriodName string) (*http.Request, error)
GetPreparer prepares the Get request.
func (client PeriodsClient) GetResponder(resp *http.Response) (result Period, err error)
GetResponder handles the response to the Get request. The method always closes the http.Response Body.
func (client PeriodsClient) 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 (client PeriodsClient) List(ctx context.Context, filter string, skiptoken string, top *int32) (result PeriodsListResultPage, err error)
List lists the available billing periods for a subscription in reverse chronological order. This is only supported for Azure Web-Direct subscriptions. Other subscription types which were not purchased directly through the Azure web portal are not supported through this preview API. Parameters: filter - may be used to filter billing periods by billingPeriodEndDate. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. skiptoken - skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. top - may be used to limit the number of results to the most recent N billing periods.
func (client PeriodsClient) ListComplete(ctx context.Context, filter string, skiptoken string, top *int32) (result PeriodsListResultIterator, err error)
ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client PeriodsClient) ListPreparer(ctx context.Context, filter string, skiptoken string, top *int32) (*http.Request, error)
ListPreparer prepares the List request.
func (client PeriodsClient) ListResponder(resp *http.Response) (result PeriodsListResult, err error)
ListResponder handles the response to the List request. The method always closes the http.Response Body.
func (client PeriodsClient) 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.
PeriodsListResult result of listing billing periods. It contains a list of available billing periods in reverse chronological order.
type PeriodsListResult struct { autorest.Response `json:"-"` // Value - READ-ONLY; The list of billing periods. Value *[]Period `json:"value,omitempty"` // NextLink - READ-ONLY; The link (url) to the next page of results. NextLink *string `json:"nextLink,omitempty"` }
func (plr PeriodsListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
func (plr PeriodsListResult) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for PeriodsListResult.
PeriodsListResultIterator provides access to a complete listing of Period values.
type PeriodsListResultIterator struct {
// contains filtered or unexported fields
}
func NewPeriodsListResultIterator(page PeriodsListResultPage) PeriodsListResultIterator
Creates a new instance of the PeriodsListResultIterator type.
func (iter *PeriodsListResultIterator) 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 (iter *PeriodsListResultIterator) 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 (iter PeriodsListResultIterator) NotDone() bool
NotDone returns true if the enumeration should be started or is not yet complete.
func (iter PeriodsListResultIterator) Response() PeriodsListResult
Response returns the raw server response from the last page request.
func (iter PeriodsListResultIterator) Value() Period
Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.
PeriodsListResultPage contains a page of Period values.
type PeriodsListResultPage struct {
// contains filtered or unexported fields
}
func NewPeriodsListResultPage(cur PeriodsListResult, getNextPage func(context.Context, PeriodsListResult) (PeriodsListResult, error)) PeriodsListResultPage
Creates a new instance of the PeriodsListResultPage type.
func (page *PeriodsListResultPage) 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 (page *PeriodsListResultPage) 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 (page PeriodsListResultPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (page PeriodsListResultPage) Response() PeriodsListResult
Response returns the raw server response from the last page request.
func (page PeriodsListResultPage) Values() []Period
Values returns the slice of values for the current page or nil if there are no values.
PermissionsClient is the billing client provides access to billing resources for Azure subscriptions.
type PermissionsClient struct { BaseClient }
func NewPermissionsClient(subscriptionID string) PermissionsClient
NewPermissionsClient creates an instance of the PermissionsClient client.
func NewPermissionsClientWithBaseURI(baseURI string, subscriptionID string) PermissionsClient
NewPermissionsClientWithBaseURI creates an instance of the PermissionsClient 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 PermissionsClient) ListByBillingAccount(ctx context.Context, billingAccountName string) (result PermissionsListResultPage, err error)
ListByBillingAccount lists the billing permissions the caller has on a billing account. Parameters: billingAccountName - the ID that uniquely identifies a billing account.
func (client PermissionsClient) ListByBillingAccountComplete(ctx context.Context, billingAccountName string) (result PermissionsListResultIterator, err error)
ListByBillingAccountComplete enumerates all values, automatically crossing page boundaries as required.
func (client PermissionsClient) ListByBillingAccountPreparer(ctx context.Context, billingAccountName string) (*http.Request, error)
ListByBillingAccountPreparer prepares the ListByBillingAccount request.
func (client PermissionsClient) ListByBillingAccountResponder(resp *http.Response) (result PermissionsListResult, err error)
ListByBillingAccountResponder handles the response to the ListByBillingAccount request. The method always closes the http.Response Body.
func (client PermissionsClient) ListByBillingAccountSender(req *http.Request) (*http.Response, error)
ListByBillingAccountSender sends the ListByBillingAccount request. The method will close the http.Response Body if it receives an error.
func (client PermissionsClient) ListByBillingProfile(ctx context.Context, billingAccountName string, billingProfileName string) (result PermissionsListResultPage, err error)
ListByBillingProfile lists the billing permissions the caller has on a billing profile. Parameters: billingAccountName - the ID that uniquely identifies a billing account. billingProfileName - the ID that uniquely identifies a billing profile.
func (client PermissionsClient) ListByBillingProfileComplete(ctx context.Context, billingAccountName string, billingProfileName string) (result PermissionsListResultIterator, err error)
ListByBillingProfileComplete enumerates all values, automatically crossing page boundaries as required.
func (client PermissionsClient) ListByBillingProfilePreparer(ctx context.Context, billingAccountName string, billingProfileName string) (*http.Request, error)
ListByBillingProfilePreparer prepares the ListByBillingProfile request.
func (client PermissionsClient) ListByBillingProfileResponder(resp *http.Response) (result PermissionsListResult, err error)
ListByBillingProfileResponder handles the response to the ListByBillingProfile request. The method always closes the http.Response Body.
func (client PermissionsClient) ListByBillingProfileSender(req *http.Request) (*http.Response, error)
ListByBillingProfileSender sends the ListByBillingProfile request. The method will close the http.Response Body if it receives an error.
func (client PermissionsClient) ListByCustomer(ctx context.Context, billingAccountName string, customerName string) (result PermissionsListResultPage, err error)
ListByCustomer lists the billing permissions the caller has for a customer. Parameters: billingAccountName - the ID that uniquely identifies a billing account. customerName - the ID that uniquely identifies a customer.
func (client PermissionsClient) ListByCustomerComplete(ctx context.Context, billingAccountName string, customerName string) (result PermissionsListResultIterator, err error)
ListByCustomerComplete enumerates all values, automatically crossing page boundaries as required.
func (client PermissionsClient) ListByCustomerPreparer(ctx context.Context, billingAccountName string, customerName string) (*http.Request, error)
ListByCustomerPreparer prepares the ListByCustomer request.
func (client PermissionsClient) ListByCustomerResponder(resp *http.Response) (result PermissionsListResult, err error)
ListByCustomerResponder handles the response to the ListByCustomer request. The method always closes the http.Response Body.
func (client PermissionsClient) ListByCustomerSender(req *http.Request) (*http.Response, error)
ListByCustomerSender sends the ListByCustomer request. The method will close the http.Response Body if it receives an error.
func (client PermissionsClient) ListByInvoiceSections(ctx context.Context, billingAccountName string, billingProfileName string, invoiceSectionName string) (result PermissionsListResultPage, err error)
ListByInvoiceSections lists the billing permissions the caller has on an invoice section. Parameters: billingAccountName - the ID that uniquely identifies a billing account. billingProfileName - the ID that uniquely identifies a billing profile. invoiceSectionName - the ID that uniquely identifies an invoice section.
func (client PermissionsClient) ListByInvoiceSectionsComplete(ctx context.Context, billingAccountName string, billingProfileName string, invoiceSectionName string) (result PermissionsListResultIterator, err error)
ListByInvoiceSectionsComplete enumerates all values, automatically crossing page boundaries as required.
func (client PermissionsClient) ListByInvoiceSectionsPreparer(ctx context.Context, billingAccountName string, billingProfileName string, invoiceSectionName string) (*http.Request, error)
ListByInvoiceSectionsPreparer prepares the ListByInvoiceSections request.
func (client PermissionsClient) ListByInvoiceSectionsResponder(resp *http.Response) (result PermissionsListResult, err error)
ListByInvoiceSectionsResponder handles the response to the ListByInvoiceSections request. The method always closes the http.Response Body.
func (client PermissionsClient) ListByInvoiceSectionsSender(req *http.Request) (*http.Response, error)
ListByInvoiceSectionsSender sends the ListByInvoiceSections request. The method will close the http.Response Body if it receives an error.
PermissionsListResult result of list billingPermissions a caller has on a billing account.
type PermissionsListResult struct { autorest.Response `json:"-"` // Value - READ-ONLY; The list of billingPermissions a caller has on a billing account. Value *[]PermissionsProperties `json:"value,omitempty"` // NextLink - READ-ONLY; The link (url) to the next page of results. NextLink *string `json:"nextLink,omitempty"` }
func (plr PermissionsListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
func (plr PermissionsListResult) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for PermissionsListResult.
PermissionsListResultIterator provides access to a complete listing of PermissionsProperties values.
type PermissionsListResultIterator struct {
// contains filtered or unexported fields
}
func NewPermissionsListResultIterator(page PermissionsListResultPage) PermissionsListResultIterator
Creates a new instance of the PermissionsListResultIterator type.
func (iter *PermissionsListResultIterator) 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 (iter *PermissionsListResultIterator) 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 (iter PermissionsListResultIterator) NotDone() bool
NotDone returns true if the enumeration should be started or is not yet complete.
func (iter PermissionsListResultIterator) Response() PermissionsListResult
Response returns the raw server response from the last page request.
func (iter PermissionsListResultIterator) Value() PermissionsProperties
Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.
PermissionsListResultPage contains a page of PermissionsProperties values.
type PermissionsListResultPage struct {
// contains filtered or unexported fields
}
func NewPermissionsListResultPage(cur PermissionsListResult, getNextPage func(context.Context, PermissionsListResult) (PermissionsListResult, error)) PermissionsListResultPage
Creates a new instance of the PermissionsListResultPage type.
func (page *PermissionsListResultPage) 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 (page *PermissionsListResultPage) 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 (page PermissionsListResultPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (page PermissionsListResultPage) Response() PermissionsListResult
Response returns the raw server response from the last page request.
func (page PermissionsListResultPage) Values() []PermissionsProperties
Values returns the slice of values for the current page or nil if there are no values.
PermissionsProperties the set of allowed action and not allowed actions a caller has on a billing account
type PermissionsProperties struct { // Actions - READ-ONLY; The set of actions that the caller is allowed to perform. Actions *[]string `json:"actions,omitempty"` // NotActions - READ-ONLY; The set of actions that the caller is not allowed to perform. NotActions *[]string `json:"notActions,omitempty"` }
func (pp PermissionsProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for PermissionsProperties.
PoliciesClient is the billing client provides access to billing resources for Azure subscriptions.
type PoliciesClient struct { BaseClient }
func NewPoliciesClient(subscriptionID string) PoliciesClient
NewPoliciesClient creates an instance of the PoliciesClient client.
func NewPoliciesClientWithBaseURI(baseURI string, subscriptionID string) PoliciesClient
NewPoliciesClientWithBaseURI creates an instance of the PoliciesClient 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 PoliciesClient) GetByBillingProfile(ctx context.Context, billingAccountName string, billingProfileName string) (result Policy, err error)
GetByBillingProfile lists the policies for a billing profile. This operation is supported only for billing accounts with agreement type Microsoft Customer Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. billingProfileName - the ID that uniquely identifies a billing profile.
func (client PoliciesClient) GetByBillingProfilePreparer(ctx context.Context, billingAccountName string, billingProfileName string) (*http.Request, error)
GetByBillingProfilePreparer prepares the GetByBillingProfile request.
func (client PoliciesClient) GetByBillingProfileResponder(resp *http.Response) (result Policy, err error)
GetByBillingProfileResponder handles the response to the GetByBillingProfile request. The method always closes the http.Response Body.
func (client PoliciesClient) GetByBillingProfileSender(req *http.Request) (*http.Response, error)
GetByBillingProfileSender sends the GetByBillingProfile request. The method will close the http.Response Body if it receives an error.
func (client PoliciesClient) GetByCustomer(ctx context.Context, billingAccountName string, customerName string) (result CustomerPolicy, err error)
GetByCustomer lists the policies for a customer. This operation is supported only for billing accounts with agreement type Microsoft Partner Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. customerName - the ID that uniquely identifies a customer.
func (client PoliciesClient) GetByCustomerPreparer(ctx context.Context, billingAccountName string, customerName string) (*http.Request, error)
GetByCustomerPreparer prepares the GetByCustomer request.
func (client PoliciesClient) GetByCustomerResponder(resp *http.Response) (result CustomerPolicy, err error)
GetByCustomerResponder handles the response to the GetByCustomer request. The method always closes the http.Response Body.
func (client PoliciesClient) GetByCustomerSender(req *http.Request) (*http.Response, error)
GetByCustomerSender sends the GetByCustomer request. The method will close the http.Response Body if it receives an error.
func (client PoliciesClient) Update(ctx context.Context, billingAccountName string, billingProfileName string, parameters Policy) (result Policy, err error)
Update updates the policies for a billing profile. This operation is supported only for billing accounts with agreement type Microsoft Customer Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. billingProfileName - the ID that uniquely identifies a billing profile. parameters - request parameters that are provided to the update policies operation.
func (client PoliciesClient) UpdateCustomer(ctx context.Context, billingAccountName string, customerName string, parameters CustomerPolicy) (result CustomerPolicy, err error)
UpdateCustomer updates the policies for a customer. This operation is supported only for billing accounts with agreement type Microsoft Partner Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. customerName - the ID that uniquely identifies a customer. parameters - request parameters that are provided to the update policies operation.
func (client PoliciesClient) UpdateCustomerPreparer(ctx context.Context, billingAccountName string, customerName string, parameters CustomerPolicy) (*http.Request, error)
UpdateCustomerPreparer prepares the UpdateCustomer request.
func (client PoliciesClient) UpdateCustomerResponder(resp *http.Response) (result CustomerPolicy, err error)
UpdateCustomerResponder handles the response to the UpdateCustomer request. The method always closes the http.Response Body.
func (client PoliciesClient) UpdateCustomerSender(req *http.Request) (*http.Response, error)
UpdateCustomerSender sends the UpdateCustomer request. The method will close the http.Response Body if it receives an error.
func (client PoliciesClient) UpdatePreparer(ctx context.Context, billingAccountName string, billingProfileName string, parameters Policy) (*http.Request, error)
UpdatePreparer prepares the Update request.
func (client PoliciesClient) UpdateResponder(resp *http.Response) (result Policy, err error)
UpdateResponder handles the response to the Update request. The method always closes the http.Response Body.
func (client PoliciesClient) UpdateSender(req *http.Request) (*http.Response, error)
UpdateSender sends the Update request. The method will close the http.Response Body if it receives an error.
Policy a policy.
type Policy struct { autorest.Response `json:"-"` *PolicyProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name. Name *string `json:"name,omitempty"` // Type - READ-ONLY; Resource type. Type *string `json:"type,omitempty"` }
func (p Policy) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Policy.
func (p *Policy) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for Policy struct.
PolicyProperties the properties of a policy.
type PolicyProperties struct { // MarketplacePurchases - The policy that controls whether Azure marketplace purchases are allowed for a billing profile. Possible values include: 'AllAllowed', 'OnlyFreeAllowed', 'NotAllowed' MarketplacePurchases MarketplacePurchasesPolicy `json:"marketplacePurchases,omitempty"` // ReservationPurchases - The policy that controls whether Azure reservation purchases are allowed for a billing profile. Possible values include: 'ReservationPurchasesPolicyAllowed', 'ReservationPurchasesPolicyNotAllowed' ReservationPurchases ReservationPurchasesPolicy `json:"reservationPurchases,omitempty"` // ViewCharges - The policy that controls whether users with Azure RBAC access to a subscription can view its charges. Possible values include: 'ViewChargesPolicyAllowed', 'ViewChargesPolicyNotAllowed' ViewCharges ViewChargesPolicy `json:"viewCharges,omitempty"` }
Product a product.
type Product struct { autorest.Response `json:"-"` *ProductProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name. Name *string `json:"name,omitempty"` // Type - READ-ONLY; Resource type. Type *string `json:"type,omitempty"` }
func (p Product) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Product.
func (p *Product) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for Product struct.
ProductProperties the properties of a product.
type ProductProperties struct { // AutoRenew - Indicates whether auto renewal is turned on or off for a product. Possible values include: 'Off', 'On' AutoRenew AutoRenew `json:"autoRenew,omitempty"` // DisplayName - READ-ONLY; The display name of the product. DisplayName *string `json:"displayName,omitempty"` // PurchaseDate - READ-ONLY; The date when the product was purchased. PurchaseDate *date.Time `json:"purchaseDate,omitempty"` // ProductTypeID - READ-ONLY; The ID of the type of product. ProductTypeID *string `json:"productTypeId,omitempty"` // ProductType - READ-ONLY; The description of the type of product. ProductType *string `json:"productType,omitempty"` // Status - The current status of the product. Possible values include: 'ProductStatusTypeActive', 'ProductStatusTypeInactive', 'ProductStatusTypePastDue', 'ProductStatusTypeExpiring', 'ProductStatusTypeExpired', 'ProductStatusTypeDisabled', 'ProductStatusTypeCancelled', 'ProductStatusTypeAutoRenew' Status ProductStatusType `json:"status,omitempty"` // EndDate - READ-ONLY; The date when the product will be renewed or canceled. EndDate *date.Time `json:"endDate,omitempty"` // BillingFrequency - The frequency at which the product will be billed. Possible values include: 'OneTime', 'Monthly', 'UsageBased' BillingFrequency Frequency `json:"billingFrequency,omitempty"` // LastCharge - READ-ONLY; The last month charges. LastCharge *Amount `json:"lastCharge,omitempty"` // LastChargeDate - READ-ONLY; The date of the last charge. LastChargeDate *date.Time `json:"lastChargeDate,omitempty"` // Quantity - READ-ONLY; The quantity purchased for the product. Quantity *float64 `json:"quantity,omitempty"` // SkuID - READ-ONLY; The sku ID of the product. SkuID *string `json:"skuId,omitempty"` // SkuDescription - READ-ONLY; The sku description of the product. SkuDescription *string `json:"skuDescription,omitempty"` // TenantID - READ-ONLY; The id of the tenant in which the product is used. TenantID *string `json:"tenantId,omitempty"` // AvailabilityID - READ-ONLY; The availability of the product. AvailabilityID *string `json:"availabilityId,omitempty"` // InvoiceSectionID - READ-ONLY; The ID of the invoice section to which the product is billed. InvoiceSectionID *string `json:"invoiceSectionId,omitempty"` // InvoiceSectionDisplayName - READ-ONLY; The name of the invoice section to which the product is billed. InvoiceSectionDisplayName *string `json:"invoiceSectionDisplayName,omitempty"` // BillingProfileID - READ-ONLY; The ID of the billing profile to which the product is billed. BillingProfileID *string `json:"billingProfileId,omitempty"` // BillingProfileDisplayName - READ-ONLY; The name of the billing profile to which the product is billed. BillingProfileDisplayName *string `json:"billingProfileDisplayName,omitempty"` // CustomerID - READ-ONLY; The ID of the customer for whom the product was purchased. The field is applicable only for Microsoft Partner Agreement billing account. CustomerID *string `json:"customerId,omitempty"` // CustomerDisplayName - READ-ONLY; The name of the customer for whom the product was purchased. The field is applicable only for Microsoft Partner Agreement billing account. CustomerDisplayName *string `json:"customerDisplayName,omitempty"` // Reseller - READ-ONLY; Reseller for this product. Reseller *Reseller `json:"reseller,omitempty"` }
func (pp ProductProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ProductProperties.
ProductStatusType enumerates the values for product status type.
type ProductStatusType string
const ( // ProductStatusTypeActive ... ProductStatusTypeActive ProductStatusType = "Active" // ProductStatusTypeAutoRenew ... ProductStatusTypeAutoRenew ProductStatusType = "AutoRenew" // ProductStatusTypeCancelled ... ProductStatusTypeCancelled ProductStatusType = "Cancelled" // ProductStatusTypeDisabled ... ProductStatusTypeDisabled ProductStatusType = "Disabled" // ProductStatusTypeExpired ... ProductStatusTypeExpired ProductStatusType = "Expired" // ProductStatusTypeExpiring ... ProductStatusTypeExpiring ProductStatusType = "Expiring" // ProductStatusTypeInactive ... ProductStatusTypeInactive ProductStatusType = "Inactive" // ProductStatusTypePastDue ... ProductStatusTypePastDue ProductStatusType = "PastDue" )
func PossibleProductStatusTypeValues() []ProductStatusType
PossibleProductStatusTypeValues returns an array of possible values for the ProductStatusType const type.
ProductTransferValidationErrorCode enumerates the values for product transfer validation error code.
type ProductTransferValidationErrorCode string
const ( // CrossBillingAccountNotAllowed ... CrossBillingAccountNotAllowed ProductTransferValidationErrorCode = "CrossBillingAccountNotAllowed" // DestinationBillingProfilePastDue ... DestinationBillingProfilePastDue ProductTransferValidationErrorCode = "DestinationBillingProfilePastDue" // InsufficientPermissionOnDestination ... InsufficientPermissionOnDestination ProductTransferValidationErrorCode = "InsufficientPermissionOnDestination" // InsufficientPermissionOnSource ... InsufficientPermissionOnSource ProductTransferValidationErrorCode = "InsufficientPermissionOnSource" // InvalidSource ... InvalidSource ProductTransferValidationErrorCode = "InvalidSource" // NotAvailableForDestinationMarket ... NotAvailableForDestinationMarket ProductTransferValidationErrorCode = "NotAvailableForDestinationMarket" // OneTimePurchaseProductTransferNotAllowed ... OneTimePurchaseProductTransferNotAllowed ProductTransferValidationErrorCode = "OneTimePurchaseProductTransferNotAllowed" // ProductNotActive ... ProductNotActive ProductTransferValidationErrorCode = "ProductNotActive" // ProductTypeNotSupported ... ProductTypeNotSupported ProductTransferValidationErrorCode = "ProductTypeNotSupported" )
func PossibleProductTransferValidationErrorCodeValues() []ProductTransferValidationErrorCode
PossibleProductTransferValidationErrorCodeValues returns an array of possible values for the ProductTransferValidationErrorCode const type.
ProductsClient is the billing client provides access to billing resources for Azure subscriptions.
type ProductsClient struct { BaseClient }
func NewProductsClient(subscriptionID string) ProductsClient
NewProductsClient creates an instance of the ProductsClient client.
func NewProductsClientWithBaseURI(baseURI string, subscriptionID string) ProductsClient
NewProductsClientWithBaseURI creates an instance of the ProductsClient 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 ProductsClient) Get(ctx context.Context, billingAccountName string, productName string) (result Product, err error)
Get gets a product by ID. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. productName - the ID that uniquely identifies a product.
func (client ProductsClient) GetPreparer(ctx context.Context, billingAccountName string, productName string) (*http.Request, error)
GetPreparer prepares the Get request.
func (client ProductsClient) GetResponder(resp *http.Response) (result Product, err error)
GetResponder handles the response to the Get request. The method always closes the http.Response Body.
func (client ProductsClient) 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 (client ProductsClient) ListByBillingAccount(ctx context.Context, billingAccountName string, filter string) (result ProductsListResultPage, err error)
ListByBillingAccount lists the products for a billing account. These don't include products billed based on usage. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. filter - may be used to filter by product type. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value are separated by a colon (:).
func (client ProductsClient) ListByBillingAccountComplete(ctx context.Context, billingAccountName string, filter string) (result ProductsListResultIterator, err error)
ListByBillingAccountComplete enumerates all values, automatically crossing page boundaries as required.
func (client ProductsClient) ListByBillingAccountPreparer(ctx context.Context, billingAccountName string, filter string) (*http.Request, error)
ListByBillingAccountPreparer prepares the ListByBillingAccount request.
func (client ProductsClient) ListByBillingAccountResponder(resp *http.Response) (result ProductsListResult, err error)
ListByBillingAccountResponder handles the response to the ListByBillingAccount request. The method always closes the http.Response Body.
func (client ProductsClient) ListByBillingAccountSender(req *http.Request) (*http.Response, error)
ListByBillingAccountSender sends the ListByBillingAccount request. The method will close the http.Response Body if it receives an error.
func (client ProductsClient) ListByBillingProfile(ctx context.Context, billingAccountName string, billingProfileName string, filter string) (result ProductsListResultPage, err error)
ListByBillingProfile lists the products for a billing profile. These don't include products billed based on usage. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. billingProfileName - the ID that uniquely identifies a billing profile. filter - may be used to filter by product type. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value are separated by a colon (:).
func (client ProductsClient) ListByBillingProfileComplete(ctx context.Context, billingAccountName string, billingProfileName string, filter string) (result ProductsListResultIterator, err error)
ListByBillingProfileComplete enumerates all values, automatically crossing page boundaries as required.
func (client ProductsClient) ListByBillingProfilePreparer(ctx context.Context, billingAccountName string, billingProfileName string, filter string) (*http.Request, error)
ListByBillingProfilePreparer prepares the ListByBillingProfile request.
func (client ProductsClient) ListByBillingProfileResponder(resp *http.Response) (result ProductsListResult, err error)
ListByBillingProfileResponder handles the response to the ListByBillingProfile request. The method always closes the http.Response Body.
func (client ProductsClient) ListByBillingProfileSender(req *http.Request) (*http.Response, error)
ListByBillingProfileSender sends the ListByBillingProfile request. The method will close the http.Response Body if it receives an error.
func (client ProductsClient) ListByCustomer(ctx context.Context, billingAccountName string, customerName string) (result ProductsListResultPage, err error)
ListByCustomer lists the products for a customer. These don't include products billed based on usage.The operation is supported only for billing accounts with agreement type Microsoft Partner Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. customerName - the ID that uniquely identifies a customer.
func (client ProductsClient) ListByCustomerComplete(ctx context.Context, billingAccountName string, customerName string) (result ProductsListResultIterator, err error)
ListByCustomerComplete enumerates all values, automatically crossing page boundaries as required.
func (client ProductsClient) ListByCustomerPreparer(ctx context.Context, billingAccountName string, customerName string) (*http.Request, error)
ListByCustomerPreparer prepares the ListByCustomer request.
func (client ProductsClient) ListByCustomerResponder(resp *http.Response) (result ProductsListResult, err error)
ListByCustomerResponder handles the response to the ListByCustomer request. The method always closes the http.Response Body.
func (client ProductsClient) ListByCustomerSender(req *http.Request) (*http.Response, error)
ListByCustomerSender sends the ListByCustomer request. The method will close the http.Response Body if it receives an error.
func (client ProductsClient) ListByInvoiceSection(ctx context.Context, billingAccountName string, billingProfileName string, invoiceSectionName string, filter string) (result ProductsListResultPage, err error)
ListByInvoiceSection lists the products for an invoice section. These don't include products billed based on usage. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. billingProfileName - the ID that uniquely identifies a billing profile. invoiceSectionName - the ID that uniquely identifies an invoice section. filter - may be used to filter by product type. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value are separated by a colon (:).
func (client ProductsClient) ListByInvoiceSectionComplete(ctx context.Context, billingAccountName string, billingProfileName string, invoiceSectionName string, filter string) (result ProductsListResultIterator, err error)
ListByInvoiceSectionComplete enumerates all values, automatically crossing page boundaries as required.
func (client ProductsClient) ListByInvoiceSectionPreparer(ctx context.Context, billingAccountName string, billingProfileName string, invoiceSectionName string, filter string) (*http.Request, error)
ListByInvoiceSectionPreparer prepares the ListByInvoiceSection request.
func (client ProductsClient) ListByInvoiceSectionResponder(resp *http.Response) (result ProductsListResult, err error)
ListByInvoiceSectionResponder handles the response to the ListByInvoiceSection request. The method always closes the http.Response Body.
func (client ProductsClient) ListByInvoiceSectionSender(req *http.Request) (*http.Response, error)
ListByInvoiceSectionSender sends the ListByInvoiceSection request. The method will close the http.Response Body if it receives an error.
func (client ProductsClient) Move(ctx context.Context, billingAccountName string, productName string, parameters TransferProductRequestProperties) (result Product, err error)
Move moves a product's charges to a new invoice section. The new invoice section must belong to the same billing profile as the existing invoice section. This operation is supported only for products that are purchased with a recurring charge and for billing accounts with agreement type Microsoft Customer Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. productName - the ID that uniquely identifies a product. parameters - request parameters that are provided to the move product operation.
func (client ProductsClient) MovePreparer(ctx context.Context, billingAccountName string, productName string, parameters TransferProductRequestProperties) (*http.Request, error)
MovePreparer prepares the Move request.
func (client ProductsClient) MoveResponder(resp *http.Response) (result Product, err error)
MoveResponder handles the response to the Move request. The method always closes the http.Response Body.
func (client ProductsClient) MoveSender(req *http.Request) (*http.Response, error)
MoveSender sends the Move request. The method will close the http.Response Body if it receives an error.
func (client ProductsClient) Update(ctx context.Context, billingAccountName string, productName string, parameters Product) (result Product, err error)
Update updates the properties of a Product. Currently, auto renew can be updated. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. productName - the ID that uniquely identifies a product. parameters - request parameters that are provided to the update product operation.
func (client ProductsClient) UpdatePreparer(ctx context.Context, billingAccountName string, productName string, parameters Product) (*http.Request, error)
UpdatePreparer prepares the Update request.
func (client ProductsClient) UpdateResponder(resp *http.Response) (result Product, err error)
UpdateResponder handles the response to the Update request. The method always closes the http.Response Body.
func (client ProductsClient) UpdateSender(req *http.Request) (*http.Response, error)
UpdateSender sends the Update request. The method will close the http.Response Body if it receives an error.
func (client ProductsClient) ValidateMove(ctx context.Context, billingAccountName string, productName string, parameters TransferProductRequestProperties) (result ValidateProductTransferEligibilityResult, err error)
ValidateMove validates if a product's charges can be moved to a new invoice section. This operation is supported only for products that are purchased with a recurring charge and for billing accounts with agreement type Microsoft Customer Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. productName - the ID that uniquely identifies a product. parameters - request parameters that are provided to the validate move eligibility operation.
func (client ProductsClient) ValidateMovePreparer(ctx context.Context, billingAccountName string, productName string, parameters TransferProductRequestProperties) (*http.Request, error)
ValidateMovePreparer prepares the ValidateMove request.
func (client ProductsClient) ValidateMoveResponder(resp *http.Response) (result ValidateProductTransferEligibilityResult, err error)
ValidateMoveResponder handles the response to the ValidateMove request. The method always closes the http.Response Body.
func (client ProductsClient) ValidateMoveSender(req *http.Request) (*http.Response, error)
ValidateMoveSender sends the ValidateMove request. The method will close the http.Response Body if it receives an error.
ProductsListResult the list of products. It contains a list of available product summaries in reverse chronological order by purchase date.
type ProductsListResult struct { autorest.Response `json:"-"` // Value - READ-ONLY; The list of products. Value *[]Product `json:"value,omitempty"` // NextLink - READ-ONLY; The link (url) to the next page of results. NextLink *string `json:"nextLink,omitempty"` }
func (plr ProductsListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
func (plr ProductsListResult) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ProductsListResult.
ProductsListResultIterator provides access to a complete listing of Product values.
type ProductsListResultIterator struct {
// contains filtered or unexported fields
}
func NewProductsListResultIterator(page ProductsListResultPage) ProductsListResultIterator
Creates a new instance of the ProductsListResultIterator type.
func (iter *ProductsListResultIterator) 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 (iter *ProductsListResultIterator) 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 (iter ProductsListResultIterator) NotDone() bool
NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ProductsListResultIterator) Response() ProductsListResult
Response returns the raw server response from the last page request.
func (iter ProductsListResultIterator) Value() Product
Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.
ProductsListResultPage contains a page of Product values.
type ProductsListResultPage struct {
// contains filtered or unexported fields
}
func NewProductsListResultPage(cur ProductsListResult, getNextPage func(context.Context, ProductsListResult) (ProductsListResult, error)) ProductsListResultPage
Creates a new instance of the ProductsListResultPage type.
func (page *ProductsListResultPage) 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 (page *ProductsListResultPage) 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 (page ProductsListResultPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ProductsListResultPage) Response() ProductsListResult
Response returns the raw server response from the last page request.
func (page ProductsListResultPage) Values() []Product
Values returns the slice of values for the current page or nil if there are no values.
Profile a billing profile.
type Profile struct { autorest.Response `json:"-"` // ProfileProperties - The properties of the billing profile. *ProfileProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name. Name *string `json:"name,omitempty"` // Type - READ-ONLY; Resource type. Type *string `json:"type,omitempty"` }
func (p Profile) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Profile.
func (p *Profile) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for Profile struct.
ProfileCreationRequest the request parameters for creating a new billing profile.
type ProfileCreationRequest struct { // DisplayName - The name of the billing profile. DisplayName *string `json:"displayName,omitempty"` // PoNumber - The purchase order name that will appear on the invoices generated for the billing profile. PoNumber *string `json:"poNumber,omitempty"` // BillTo - The address of the individual or organization that is responsible for the billing profile. BillTo *AddressDetails `json:"billTo,omitempty"` // InvoiceEmailOptIn - Flag controlling whether the invoices for the billing profile are sent through email. InvoiceEmailOptIn *bool `json:"invoiceEmailOptIn,omitempty"` // EnabledAzurePlans - Enabled azure plans for the billing profile. EnabledAzurePlans *[]AzurePlan `json:"enabledAzurePlans,omitempty"` }
ProfileListResult the list of billing profiles.
type ProfileListResult struct { autorest.Response `json:"-"` // Value - READ-ONLY; The list of billing profiles. Value *[]Profile `json:"value,omitempty"` // NextLink - READ-ONLY; The link (url) to the next page of results. NextLink *string `json:"nextLink,omitempty"` }
func (plr ProfileListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
func (plr ProfileListResult) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ProfileListResult.
ProfileListResultIterator provides access to a complete listing of Profile values.
type ProfileListResultIterator struct {
// contains filtered or unexported fields
}
func NewProfileListResultIterator(page ProfileListResultPage) ProfileListResultIterator
Creates a new instance of the ProfileListResultIterator type.
func (iter *ProfileListResultIterator) 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 (iter *ProfileListResultIterator) 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 (iter ProfileListResultIterator) NotDone() bool
NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ProfileListResultIterator) Response() ProfileListResult
Response returns the raw server response from the last page request.
func (iter ProfileListResultIterator) Value() Profile
Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.
ProfileListResultPage contains a page of Profile values.
type ProfileListResultPage struct {
// contains filtered or unexported fields
}
func NewProfileListResultPage(cur ProfileListResult, getNextPage func(context.Context, ProfileListResult) (ProfileListResult, error)) ProfileListResultPage
Creates a new instance of the ProfileListResultPage type.
func (page *ProfileListResultPage) 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 (page *ProfileListResultPage) 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 (page ProfileListResultPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ProfileListResultPage) Response() ProfileListResult
Response returns the raw server response from the last page request.
func (page ProfileListResultPage) Values() []Profile
Values returns the slice of values for the current page or nil if there are no values.
ProfileProperties the properties of the billing profile.
type ProfileProperties struct { // DisplayName - The name of the billing profile. DisplayName *string `json:"displayName,omitempty"` // PoNumber - The purchase order name that will appear on the invoices generated for the billing profile. PoNumber *string `json:"poNumber,omitempty"` // BillingRelationshipType - READ-ONLY; Identifies which services and purchases are paid by a billing profile. Possible values include: 'Direct', 'IndirectCustomer', 'IndirectPartner', 'CSPPartner' BillingRelationshipType RelationshipType `json:"billingRelationshipType,omitempty"` // BillTo - Billing address. BillTo *AddressDetails `json:"billTo,omitempty"` // IndirectRelationshipInfo - READ-ONLY; Identifies the billing profile that is linked to another billing profile in indirect purchase motion. IndirectRelationshipInfo *IndirectRelationshipInfo `json:"indirectRelationshipInfo,omitempty"` // InvoiceEmailOptIn - Flag controlling whether the invoices for the billing profile are sent through email. InvoiceEmailOptIn *bool `json:"invoiceEmailOptIn,omitempty"` // InvoiceDay - READ-ONLY; The day of the month when the invoice for the billing profile is generated. InvoiceDay *int32 `json:"invoiceDay,omitempty"` // Currency - READ-ONLY; The currency in which the charges for the billing profile are billed. Currency *string `json:"currency,omitempty"` // EnabledAzurePlans - Information about the enabled azure plans. EnabledAzurePlans *[]AzurePlan `json:"enabledAzurePlans,omitempty"` // InvoiceSections - The invoice sections associated to the billing profile. By default this is not populated, unless it's specified in $expand. InvoiceSections *InvoiceSectionsOnExpand `json:"invoiceSections,omitempty"` // HasReadAccess - READ-ONLY; Indicates whether user has read access to the billing profile. HasReadAccess *bool `json:"hasReadAccess,omitempty"` // SystemID - READ-ONLY; The system generated unique identifier for a billing profile. SystemID *string `json:"systemId,omitempty"` // Status - READ-ONLY; The status of the billing profile. Possible values include: 'ProfileStatusActive', 'ProfileStatusDisabled', 'ProfileStatusWarned' Status ProfileStatus `json:"status,omitempty"` // StatusReasonCode - READ-ONLY; Reason for the specified billing profile status. Possible values include: 'StatusReasonCodePastDue', 'StatusReasonCodeSpendingLimitReached', 'StatusReasonCodeSpendingLimitExpired' StatusReasonCode StatusReasonCode `json:"statusReasonCode,omitempty"` // SpendingLimit - READ-ONLY; The billing profile spending limit. Possible values include: 'SpendingLimitOff', 'SpendingLimitOn' SpendingLimit SpendingLimit `json:"spendingLimit,omitempty"` // TargetClouds - READ-ONLY; Identifies the cloud environments that are associated with a billing profile. This is a system managed optional field and gets updated as the billing profile gets associated with accounts in various clouds. TargetClouds *[]TargetCloud `json:"targetClouds,omitempty"` }
func (pp ProfileProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ProfileProperties.
ProfileSpendingLimit enumerates the values for profile spending limit.
type ProfileSpendingLimit string
const ( // ProfileSpendingLimitOff ... ProfileSpendingLimitOff ProfileSpendingLimit = "Off" // ProfileSpendingLimitOn ... ProfileSpendingLimitOn ProfileSpendingLimit = "On" )
func PossibleProfileSpendingLimitValues() []ProfileSpendingLimit
PossibleProfileSpendingLimitValues returns an array of possible values for the ProfileSpendingLimit const type.
ProfileStatus enumerates the values for profile status.
type ProfileStatus string
const ( // ProfileStatusActive ... ProfileStatusActive ProfileStatus = "Active" // ProfileStatusDisabled ... ProfileStatusDisabled ProfileStatus = "Disabled" // ProfileStatusWarned ... ProfileStatusWarned ProfileStatus = "Warned" )
func PossibleProfileStatusValues() []ProfileStatus
PossibleProfileStatusValues returns an array of possible values for the ProfileStatus const type.
ProfileStatusReasonCode enumerates the values for profile status reason code.
type ProfileStatusReasonCode string
const ( // PastDue ... PastDue ProfileStatusReasonCode = "PastDue" // SpendingLimitExpired ... SpendingLimitExpired ProfileStatusReasonCode = "SpendingLimitExpired" // SpendingLimitReached ... SpendingLimitReached ProfileStatusReasonCode = "SpendingLimitReached" )
func PossibleProfileStatusReasonCodeValues() []ProfileStatusReasonCode
PossibleProfileStatusReasonCodeValues returns an array of possible values for the ProfileStatusReasonCode const type.
ProfilesClient is the billing client provides access to billing resources for Azure subscriptions.
type ProfilesClient struct { BaseClient }
func NewProfilesClient(subscriptionID string) ProfilesClient
NewProfilesClient creates an instance of the ProfilesClient client.
func NewProfilesClientWithBaseURI(baseURI string, subscriptionID string) ProfilesClient
NewProfilesClientWithBaseURI creates an instance of the ProfilesClient 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 ProfilesClient) CreateOrUpdate(ctx context.Context, billingAccountName string, billingProfileName string, parameters Profile) (result ProfilesCreateOrUpdateFuture, err error)
CreateOrUpdate creates or updates a billing profile. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. billingProfileName - the ID that uniquely identifies a billing profile. parameters - the new or updated billing profile.
func (client ProfilesClient) CreateOrUpdatePreparer(ctx context.Context, billingAccountName string, billingProfileName string, parameters Profile) (*http.Request, error)
CreateOrUpdatePreparer prepares the CreateOrUpdate request.
func (client ProfilesClient) CreateOrUpdateResponder(resp *http.Response) (result Profile, err error)
CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always closes the http.Response Body.
func (client ProfilesClient) CreateOrUpdateSender(req *http.Request) (future ProfilesCreateOrUpdateFuture, err error)
CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the http.Response Body if it receives an error.
func (client ProfilesClient) Get(ctx context.Context, billingAccountName string, billingProfileName string, expand string) (result Profile, err error)
Get gets a billing profile by its ID. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. billingProfileName - the ID that uniquely identifies a billing profile. expand - may be used to expand the invoice sections.
func (client ProfilesClient) GetPreparer(ctx context.Context, billingAccountName string, billingProfileName string, expand string) (*http.Request, error)
GetPreparer prepares the Get request.
func (client ProfilesClient) GetResponder(resp *http.Response) (result Profile, err error)
GetResponder handles the response to the Get request. The method always closes the http.Response Body.
func (client ProfilesClient) 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 (client ProfilesClient) ListByBillingAccount(ctx context.Context, billingAccountName string, expand string) (result ProfileListResultPage, err error)
ListByBillingAccount lists the billing profiles that a user has access to. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. expand - may be used to expand the invoice sections.
func (client ProfilesClient) ListByBillingAccountComplete(ctx context.Context, billingAccountName string, expand string) (result ProfileListResultIterator, err error)
ListByBillingAccountComplete enumerates all values, automatically crossing page boundaries as required.
func (client ProfilesClient) ListByBillingAccountPreparer(ctx context.Context, billingAccountName string, expand string) (*http.Request, error)
ListByBillingAccountPreparer prepares the ListByBillingAccount request.
func (client ProfilesClient) ListByBillingAccountResponder(resp *http.Response) (result ProfileListResult, err error)
ListByBillingAccountResponder handles the response to the ListByBillingAccount request. The method always closes the http.Response Body.
func (client ProfilesClient) ListByBillingAccountSender(req *http.Request) (*http.Response, error)
ListByBillingAccountSender sends the ListByBillingAccount request. The method will close the http.Response Body if it receives an error.
ProfilesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ProfilesCreateOrUpdateFuture struct { azure.FutureAPI // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. Result func(ProfilesClient) (Profile, error) }
func (future *ProfilesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaller for CreateFuture.
ProfilesOnExpand the billing profiles associated with the billing account. By default this is not populated, unless it's specified in $expand.
type ProfilesOnExpand struct { // HasMoreResults - READ-ONLY; Indicates whether there are more billing profiles than the ones listed in this collection. The collection lists a maximum of 50 billing profiles. To get all billing profiles, use the list billing profiles API. HasMoreResults *bool `json:"hasMoreResults,omitempty"` // Value - The billing profiles associated with the billing account. Value *[]Profile `json:"value,omitempty"` }
func (poe ProfilesOnExpand) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ProfilesOnExpand.
Property a billing property.
type Property struct { autorest.Response `json:"-"` // PropertyProperties - A billing property. *PropertyProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name. Name *string `json:"name,omitempty"` // Type - READ-ONLY; Resource type. Type *string `json:"type,omitempty"` }
func (p Property) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Property.
func (p *Property) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for Property struct.
PropertyClient is the billing client provides access to billing resources for Azure subscriptions.
type PropertyClient struct { BaseClient }
func NewPropertyClient(subscriptionID string) PropertyClient
NewPropertyClient creates an instance of the PropertyClient client.
func NewPropertyClientWithBaseURI(baseURI string, subscriptionID string) PropertyClient
NewPropertyClientWithBaseURI creates an instance of the PropertyClient 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 PropertyClient) Get(ctx context.Context) (result Property, err error)
Get get the billing properties for a subscription. This operation is not supported for billing accounts with agreement type Enterprise Agreement.
func (client PropertyClient) GetPreparer(ctx context.Context) (*http.Request, error)
GetPreparer prepares the Get request.
func (client PropertyClient) GetResponder(resp *http.Response) (result Property, err error)
GetResponder handles the response to the Get request. The method always closes the http.Response Body.
func (client PropertyClient) 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 (client PropertyClient) Update(ctx context.Context, parameters Property) (result Property, err error)
Update updates the billing property of a subscription. Currently, cost center can be updated. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement. Parameters: parameters - request parameters that are provided to the update billing property operation.
func (client PropertyClient) UpdatePreparer(ctx context.Context, parameters Property) (*http.Request, error)
UpdatePreparer prepares the Update request.
func (client PropertyClient) UpdateResponder(resp *http.Response) (result Property, err error)
UpdateResponder handles the response to the Update request. The method always closes the http.Response Body.
func (client PropertyClient) UpdateSender(req *http.Request) (*http.Response, error)
UpdateSender sends the Update request. The method will close the http.Response Body if it receives an error.
PropertyProperties the billing property.
type PropertyProperties struct { // AccountAdminNotificationEmailAddress - READ-ONLY; The email address on which the account admin gets all Azure notifications. AccountAdminNotificationEmailAddress *string `json:"accountAdminNotificationEmailAddress,omitempty"` // BillingTenantID - READ-ONLY; The Azure AD tenant ID of the billing account for the subscription. BillingTenantID *string `json:"billingTenantId,omitempty"` // BillingAccountID - READ-ONLY; The ID of the billing account to which the subscription is billed. BillingAccountID *string `json:"billingAccountId,omitempty"` // BillingAccountDisplayName - READ-ONLY; The name of the billing account to which the subscription is billed. BillingAccountDisplayName *string `json:"billingAccountDisplayName,omitempty"` // BillingProfileID - READ-ONLY; The ID of the billing profile to which the subscription is billed. BillingProfileID *string `json:"billingProfileId,omitempty"` // BillingProfileDisplayName - READ-ONLY; The name of the billing profile to which the subscription is billed. BillingProfileDisplayName *string `json:"billingProfileDisplayName,omitempty"` // BillingProfileStatus - READ-ONLY; The status of the billing profile. Possible values include: 'ProfileStatusActive', 'ProfileStatusDisabled', 'ProfileStatusWarned' BillingProfileStatus ProfileStatus `json:"billingProfileStatus,omitempty"` // BillingProfileStatusReasonCode - READ-ONLY; Reason for the specified billing profile status. Possible values include: 'PastDue', 'SpendingLimitReached', 'SpendingLimitExpired' BillingProfileStatusReasonCode ProfileStatusReasonCode `json:"billingProfileStatusReasonCode,omitempty"` // BillingProfileSpendingLimit - READ-ONLY; The billing profile spending limit. Possible values include: 'ProfileSpendingLimitOff', 'ProfileSpendingLimitOn' BillingProfileSpendingLimit ProfileSpendingLimit `json:"billingProfileSpendingLimit,omitempty"` // CostCenter - The cost center applied to the subscription. CostCenter *string `json:"costCenter,omitempty"` // InvoiceSectionID - READ-ONLY; The ID of the invoice section to which the subscription is billed. InvoiceSectionID *string `json:"invoiceSectionId,omitempty"` // InvoiceSectionDisplayName - READ-ONLY; The name of the invoice section to which the subscription is billed. InvoiceSectionDisplayName *string `json:"invoiceSectionDisplayName,omitempty"` // IsAccountAdmin - READ-ONLY; Indicates whether user is the account admin. IsAccountAdmin *bool `json:"isAccountAdmin,omitempty"` // ProductID - READ-ONLY; The product ID of the Azure plan. ProductID *string `json:"productId,omitempty"` // ProductName - READ-ONLY; The product name of the Azure plan. ProductName *string `json:"productName,omitempty"` // SkuID - READ-ONLY; The sku ID of the Azure plan for the subscription. SkuID *string `json:"skuId,omitempty"` // SkuDescription - READ-ONLY; The sku description of the Azure plan for the subscription. SkuDescription *string `json:"skuDescription,omitempty"` }
func (pp PropertyProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for PropertyProperties.
RebillDetails the rebill details of an invoice.
type RebillDetails struct { // CreditNoteDocumentID - READ-ONLY; The ID of credit note. CreditNoteDocumentID *string `json:"creditNoteDocumentId,omitempty"` // InvoiceDocumentID - READ-ONLY; The ID of invoice. InvoiceDocumentID *string `json:"invoiceDocumentId,omitempty"` // RebillDetails - READ-ONLY; Rebill details for an invoice. RebillDetails map[string]*RebillDetails `json:"rebillDetails"` }
func (rd RebillDetails) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for RebillDetails.
RelationshipType enumerates the values for relationship type.
type RelationshipType string
const ( // CSPPartner ... CSPPartner RelationshipType = "CSPPartner" // Direct ... Direct RelationshipType = "Direct" // IndirectCustomer ... IndirectCustomer RelationshipType = "IndirectCustomer" // IndirectPartner ... IndirectPartner RelationshipType = "IndirectPartner" )
func PossibleRelationshipTypeValues() []RelationshipType
PossibleRelationshipTypeValues returns an array of possible values for the RelationshipType const type.
Reseller details of the reseller.
type Reseller struct { // ResellerID - READ-ONLY; The MPN ID of the reseller. ResellerID *string `json:"resellerId,omitempty"` // Description - READ-ONLY; The name of the reseller. Description *string `json:"description,omitempty"` }
func (r Reseller) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Reseller.
ReservationPurchasesPolicy enumerates the values for reservation purchases policy.
type ReservationPurchasesPolicy string
const ( // ReservationPurchasesPolicyAllowed ... ReservationPurchasesPolicyAllowed ReservationPurchasesPolicy = "Allowed" // ReservationPurchasesPolicyNotAllowed ... ReservationPurchasesPolicyNotAllowed ReservationPurchasesPolicy = "NotAllowed" )
func PossibleReservationPurchasesPolicyValues() []ReservationPurchasesPolicy
PossibleReservationPurchasesPolicyValues returns an array of possible values for the ReservationPurchasesPolicy const type.
ReservationType enumerates the values for reservation type.
type ReservationType string
const ( // Purchase ... Purchase ReservationType = "Purchase" // UsageCharge ... UsageCharge ReservationType = "Usage Charge" )
func PossibleReservationTypeValues() []ReservationType
PossibleReservationTypeValues returns an array of possible values for the ReservationType const type.
Resource the Resource model definition.
type Resource struct { // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name. Name *string `json:"name,omitempty"` // Type - READ-ONLY; Resource type. Type *string `json:"type,omitempty"` }
func (r Resource) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Resource.
RoleAssignment the role assignment
type RoleAssignment struct { autorest.Response `json:"-"` // RoleAssignmentProperties - The properties of the role assignment. *RoleAssignmentProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name. Name *string `json:"name,omitempty"` // Type - READ-ONLY; Resource type. Type *string `json:"type,omitempty"` }
func (ra RoleAssignment) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for RoleAssignment.
func (ra *RoleAssignment) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for RoleAssignment struct.
RoleAssignmentListResult the list of role assignments.
type RoleAssignmentListResult struct { autorest.Response `json:"-"` // Value - READ-ONLY; The list of role assignments. Value *[]RoleAssignment `json:"value,omitempty"` // NextLink - READ-ONLY; The link (url) to the next page of results. NextLink *string `json:"nextLink,omitempty"` }
func (ralr RoleAssignmentListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
func (ralr RoleAssignmentListResult) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for RoleAssignmentListResult.
RoleAssignmentListResultIterator provides access to a complete listing of RoleAssignment values.
type RoleAssignmentListResultIterator struct {
// contains filtered or unexported fields
}
func NewRoleAssignmentListResultIterator(page RoleAssignmentListResultPage) RoleAssignmentListResultIterator
Creates a new instance of the RoleAssignmentListResultIterator type.
func (iter *RoleAssignmentListResultIterator) 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 (iter *RoleAssignmentListResultIterator) 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 (iter RoleAssignmentListResultIterator) NotDone() bool
NotDone returns true if the enumeration should be started or is not yet complete.
func (iter RoleAssignmentListResultIterator) Response() RoleAssignmentListResult
Response returns the raw server response from the last page request.
func (iter RoleAssignmentListResultIterator) Value() RoleAssignment
Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.
RoleAssignmentListResultPage contains a page of RoleAssignment values.
type RoleAssignmentListResultPage struct {
// contains filtered or unexported fields
}
func NewRoleAssignmentListResultPage(cur RoleAssignmentListResult, getNextPage func(context.Context, RoleAssignmentListResult) (RoleAssignmentListResult, error)) RoleAssignmentListResultPage
Creates a new instance of the RoleAssignmentListResultPage type.
func (page *RoleAssignmentListResultPage) 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 (page *RoleAssignmentListResultPage) 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 (page RoleAssignmentListResultPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (page RoleAssignmentListResultPage) Response() RoleAssignmentListResult
Response returns the raw server response from the last page request.
func (page RoleAssignmentListResultPage) Values() []RoleAssignment
Values returns the slice of values for the current page or nil if there are no values.
RoleAssignmentProperties the properties of the role assignment.
type RoleAssignmentProperties struct { // CreatedOn - READ-ONLY; The date the role assignment was created. CreatedOn *string `json:"createdOn,omitempty"` // CreatedByPrincipalTenantID - READ-ONLY; The tenant Id of the user who created the role assignment. CreatedByPrincipalTenantID *string `json:"createdByPrincipalTenantId,omitempty"` // CreatedByPrincipalID - READ-ONLY; The principal Id of the user who created the role assignment. CreatedByPrincipalID *string `json:"createdByPrincipalId,omitempty"` // CreatedByUserEmailAddress - READ-ONLY; The email address of the user who created the role assignment. CreatedByUserEmailAddress *string `json:"createdByUserEmailAddress,omitempty"` // PrincipalID - The principal id of the user to whom the role was assigned. PrincipalID *string `json:"principalId,omitempty"` // PrincipalTenantID - The principal tenant id of the user to whom the role was assigned. PrincipalTenantID *string `json:"principalTenantId,omitempty"` // RoleDefinitionID - The ID of the role definition. RoleDefinitionID *string `json:"roleDefinitionId,omitempty"` // Scope - READ-ONLY; The scope at which the role was assigned. Scope *string `json:"scope,omitempty"` // UserAuthenticationType - The authentication type. UserAuthenticationType *string `json:"userAuthenticationType,omitempty"` // UserEmailAddress - The email address of the user. UserEmailAddress *string `json:"userEmailAddress,omitempty"` }
func (rap RoleAssignmentProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for RoleAssignmentProperties.
RoleAssignmentsClient is the billing client provides access to billing resources for Azure subscriptions.
type RoleAssignmentsClient struct { BaseClient }
func NewRoleAssignmentsClient(subscriptionID string) RoleAssignmentsClient
NewRoleAssignmentsClient creates an instance of the RoleAssignmentsClient client.
func NewRoleAssignmentsClientWithBaseURI(baseURI string, subscriptionID string) RoleAssignmentsClient
NewRoleAssignmentsClientWithBaseURI creates an instance of the RoleAssignmentsClient 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 RoleAssignmentsClient) DeleteByBillingAccount(ctx context.Context, billingAccountName string, billingRoleAssignmentName string) (result RoleAssignment, err error)
DeleteByBillingAccount deletes a role assignment for the caller on a billing account. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. billingRoleAssignmentName - the ID that uniquely identifies a role assignment.
func (client RoleAssignmentsClient) DeleteByBillingAccountPreparer(ctx context.Context, billingAccountName string, billingRoleAssignmentName string) (*http.Request, error)
DeleteByBillingAccountPreparer prepares the DeleteByBillingAccount request.
func (client RoleAssignmentsClient) DeleteByBillingAccountResponder(resp *http.Response) (result RoleAssignment, err error)
DeleteByBillingAccountResponder handles the response to the DeleteByBillingAccount request. The method always closes the http.Response Body.
func (client RoleAssignmentsClient) DeleteByBillingAccountSender(req *http.Request) (*http.Response, error)
DeleteByBillingAccountSender sends the DeleteByBillingAccount request. The method will close the http.Response Body if it receives an error.
func (client RoleAssignmentsClient) DeleteByBillingProfile(ctx context.Context, billingAccountName string, billingProfileName string, billingRoleAssignmentName string) (result RoleAssignment, err error)
DeleteByBillingProfile deletes a role assignment for the caller on a billing profile. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. billingProfileName - the ID that uniquely identifies a billing profile. billingRoleAssignmentName - the ID that uniquely identifies a role assignment.
func (client RoleAssignmentsClient) DeleteByBillingProfilePreparer(ctx context.Context, billingAccountName string, billingProfileName string, billingRoleAssignmentName string) (*http.Request, error)
DeleteByBillingProfilePreparer prepares the DeleteByBillingProfile request.
func (client RoleAssignmentsClient) DeleteByBillingProfileResponder(resp *http.Response) (result RoleAssignment, err error)
DeleteByBillingProfileResponder handles the response to the DeleteByBillingProfile request. The method always closes the http.Response Body.
func (client RoleAssignmentsClient) DeleteByBillingProfileSender(req *http.Request) (*http.Response, error)
DeleteByBillingProfileSender sends the DeleteByBillingProfile request. The method will close the http.Response Body if it receives an error.
func (client RoleAssignmentsClient) DeleteByInvoiceSection(ctx context.Context, billingAccountName string, billingProfileName string, invoiceSectionName string, billingRoleAssignmentName string) (result RoleAssignment, err error)
DeleteByInvoiceSection deletes a role assignment for the caller on an invoice section. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. billingProfileName - the ID that uniquely identifies a billing profile. invoiceSectionName - the ID that uniquely identifies an invoice section. billingRoleAssignmentName - the ID that uniquely identifies a role assignment.
func (client RoleAssignmentsClient) DeleteByInvoiceSectionPreparer(ctx context.Context, billingAccountName string, billingProfileName string, invoiceSectionName string, billingRoleAssignmentName string) (*http.Request, error)
DeleteByInvoiceSectionPreparer prepares the DeleteByInvoiceSection request.
func (client RoleAssignmentsClient) DeleteByInvoiceSectionResponder(resp *http.Response) (result RoleAssignment, err error)
DeleteByInvoiceSectionResponder handles the response to the DeleteByInvoiceSection request. The method always closes the http.Response Body.
func (client RoleAssignmentsClient) DeleteByInvoiceSectionSender(req *http.Request) (*http.Response, error)
DeleteByInvoiceSectionSender sends the DeleteByInvoiceSection request. The method will close the http.Response Body if it receives an error.
func (client RoleAssignmentsClient) GetByBillingAccount(ctx context.Context, billingAccountName string, billingRoleAssignmentName string) (result RoleAssignment, err error)
GetByBillingAccount gets a role assignment for the caller on a billing account. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. billingRoleAssignmentName - the ID that uniquely identifies a role assignment.
func (client RoleAssignmentsClient) GetByBillingAccountPreparer(ctx context.Context, billingAccountName string, billingRoleAssignmentName string) (*http.Request, error)
GetByBillingAccountPreparer prepares the GetByBillingAccount request.
func (client RoleAssignmentsClient) GetByBillingAccountResponder(resp *http.Response) (result RoleAssignment, err error)
GetByBillingAccountResponder handles the response to the GetByBillingAccount request. The method always closes the http.Response Body.
func (client RoleAssignmentsClient) GetByBillingAccountSender(req *http.Request) (*http.Response, error)
GetByBillingAccountSender sends the GetByBillingAccount request. The method will close the http.Response Body if it receives an error.
func (client RoleAssignmentsClient) GetByBillingProfile(ctx context.Context, billingAccountName string, billingProfileName string, billingRoleAssignmentName string) (result RoleAssignment, err error)
GetByBillingProfile gets a role assignment for the caller on a billing profile. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. billingProfileName - the ID that uniquely identifies a billing profile. billingRoleAssignmentName - the ID that uniquely identifies a role assignment.
func (client RoleAssignmentsClient) GetByBillingProfilePreparer(ctx context.Context, billingAccountName string, billingProfileName string, billingRoleAssignmentName string) (*http.Request, error)
GetByBillingProfilePreparer prepares the GetByBillingProfile request.
func (client RoleAssignmentsClient) GetByBillingProfileResponder(resp *http.Response) (result RoleAssignment, err error)
GetByBillingProfileResponder handles the response to the GetByBillingProfile request. The method always closes the http.Response Body.
func (client RoleAssignmentsClient) GetByBillingProfileSender(req *http.Request) (*http.Response, error)
GetByBillingProfileSender sends the GetByBillingProfile request. The method will close the http.Response Body if it receives an error.
func (client RoleAssignmentsClient) GetByInvoiceSection(ctx context.Context, billingAccountName string, billingProfileName string, invoiceSectionName string, billingRoleAssignmentName string) (result RoleAssignment, err error)
GetByInvoiceSection gets a role assignment for the caller on an invoice section. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. billingProfileName - the ID that uniquely identifies a billing profile. invoiceSectionName - the ID that uniquely identifies an invoice section. billingRoleAssignmentName - the ID that uniquely identifies a role assignment.
func (client RoleAssignmentsClient) GetByInvoiceSectionPreparer(ctx context.Context, billingAccountName string, billingProfileName string, invoiceSectionName string, billingRoleAssignmentName string) (*http.Request, error)
GetByInvoiceSectionPreparer prepares the GetByInvoiceSection request.
func (client RoleAssignmentsClient) GetByInvoiceSectionResponder(resp *http.Response) (result RoleAssignment, err error)
GetByInvoiceSectionResponder handles the response to the GetByInvoiceSection request. The method always closes the http.Response Body.
func (client RoleAssignmentsClient) GetByInvoiceSectionSender(req *http.Request) (*http.Response, error)
GetByInvoiceSectionSender sends the GetByInvoiceSection request. The method will close the http.Response Body if it receives an error.
func (client RoleAssignmentsClient) ListByBillingAccount(ctx context.Context, billingAccountName string) (result RoleAssignmentListResultPage, err error)
ListByBillingAccount lists the role assignments for the caller on a billing account. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account.
func (client RoleAssignmentsClient) ListByBillingAccountComplete(ctx context.Context, billingAccountName string) (result RoleAssignmentListResultIterator, err error)
ListByBillingAccountComplete enumerates all values, automatically crossing page boundaries as required.
func (client RoleAssignmentsClient) ListByBillingAccountPreparer(ctx context.Context, billingAccountName string) (*http.Request, error)
ListByBillingAccountPreparer prepares the ListByBillingAccount request.
func (client RoleAssignmentsClient) ListByBillingAccountResponder(resp *http.Response) (result RoleAssignmentListResult, err error)
ListByBillingAccountResponder handles the response to the ListByBillingAccount request. The method always closes the http.Response Body.
func (client RoleAssignmentsClient) ListByBillingAccountSender(req *http.Request) (*http.Response, error)
ListByBillingAccountSender sends the ListByBillingAccount request. The method will close the http.Response Body if it receives an error.
func (client RoleAssignmentsClient) ListByBillingProfile(ctx context.Context, billingAccountName string, billingProfileName string) (result RoleAssignmentListResultPage, err error)
ListByBillingProfile lists the role assignments for the caller on a billing profile. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. billingProfileName - the ID that uniquely identifies a billing profile.
func (client RoleAssignmentsClient) ListByBillingProfileComplete(ctx context.Context, billingAccountName string, billingProfileName string) (result RoleAssignmentListResultIterator, err error)
ListByBillingProfileComplete enumerates all values, automatically crossing page boundaries as required.
func (client RoleAssignmentsClient) ListByBillingProfilePreparer(ctx context.Context, billingAccountName string, billingProfileName string) (*http.Request, error)
ListByBillingProfilePreparer prepares the ListByBillingProfile request.
func (client RoleAssignmentsClient) ListByBillingProfileResponder(resp *http.Response) (result RoleAssignmentListResult, err error)
ListByBillingProfileResponder handles the response to the ListByBillingProfile request. The method always closes the http.Response Body.
func (client RoleAssignmentsClient) ListByBillingProfileSender(req *http.Request) (*http.Response, error)
ListByBillingProfileSender sends the ListByBillingProfile request. The method will close the http.Response Body if it receives an error.
func (client RoleAssignmentsClient) ListByInvoiceSection(ctx context.Context, billingAccountName string, billingProfileName string, invoiceSectionName string) (result RoleAssignmentListResultPage, err error)
ListByInvoiceSection lists the role assignments for the caller on an invoice section. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. billingProfileName - the ID that uniquely identifies a billing profile. invoiceSectionName - the ID that uniquely identifies an invoice section.
func (client RoleAssignmentsClient) ListByInvoiceSectionComplete(ctx context.Context, billingAccountName string, billingProfileName string, invoiceSectionName string) (result RoleAssignmentListResultIterator, err error)
ListByInvoiceSectionComplete enumerates all values, automatically crossing page boundaries as required.
func (client RoleAssignmentsClient) ListByInvoiceSectionPreparer(ctx context.Context, billingAccountName string, billingProfileName string, invoiceSectionName string) (*http.Request, error)
ListByInvoiceSectionPreparer prepares the ListByInvoiceSection request.
func (client RoleAssignmentsClient) ListByInvoiceSectionResponder(resp *http.Response) (result RoleAssignmentListResult, err error)
ListByInvoiceSectionResponder handles the response to the ListByInvoiceSection request. The method always closes the http.Response Body.
func (client RoleAssignmentsClient) ListByInvoiceSectionSender(req *http.Request) (*http.Response, error)
ListByInvoiceSectionSender sends the ListByInvoiceSection request. The method will close the http.Response Body if it receives an error.
RoleDefinition the properties of a role definition.
type RoleDefinition struct { autorest.Response `json:"-"` // RoleDefinitionProperties - The properties of the a role definition. *RoleDefinitionProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name. Name *string `json:"name,omitempty"` // Type - READ-ONLY; Resource type. Type *string `json:"type,omitempty"` }
func (rd RoleDefinition) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for RoleDefinition.
func (rd *RoleDefinition) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for RoleDefinition struct.
RoleDefinitionListResult the list of role definitions.
type RoleDefinitionListResult struct { autorest.Response `json:"-"` // Value - READ-ONLY; The role definitions. Value *[]RoleDefinition `json:"value,omitempty"` // NextLink - READ-ONLY; The link (url) to the next page of results. NextLink *string `json:"nextLink,omitempty"` }
func (rdlr RoleDefinitionListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
func (rdlr RoleDefinitionListResult) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for RoleDefinitionListResult.
RoleDefinitionListResultIterator provides access to a complete listing of RoleDefinition values.
type RoleDefinitionListResultIterator struct {
// contains filtered or unexported fields
}
func NewRoleDefinitionListResultIterator(page RoleDefinitionListResultPage) RoleDefinitionListResultIterator
Creates a new instance of the RoleDefinitionListResultIterator type.
func (iter *RoleDefinitionListResultIterator) 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 (iter *RoleDefinitionListResultIterator) 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 (iter RoleDefinitionListResultIterator) NotDone() bool
NotDone returns true if the enumeration should be started or is not yet complete.
func (iter RoleDefinitionListResultIterator) Response() RoleDefinitionListResult
Response returns the raw server response from the last page request.
func (iter RoleDefinitionListResultIterator) Value() RoleDefinition
Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.
RoleDefinitionListResultPage contains a page of RoleDefinition values.
type RoleDefinitionListResultPage struct {
// contains filtered or unexported fields
}
func NewRoleDefinitionListResultPage(cur RoleDefinitionListResult, getNextPage func(context.Context, RoleDefinitionListResult) (RoleDefinitionListResult, error)) RoleDefinitionListResultPage
Creates a new instance of the RoleDefinitionListResultPage type.
func (page *RoleDefinitionListResultPage) 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 (page *RoleDefinitionListResultPage) 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 (page RoleDefinitionListResultPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (page RoleDefinitionListResultPage) Response() RoleDefinitionListResult
Response returns the raw server response from the last page request.
func (page RoleDefinitionListResultPage) Values() []RoleDefinition
Values returns the slice of values for the current page or nil if there are no values.
RoleDefinitionProperties the properties of the a role definition.
type RoleDefinitionProperties struct { // Description - READ-ONLY; The role description Description *string `json:"description,omitempty"` // Permissions - The billingPermissions the role has Permissions *[]PermissionsProperties `json:"permissions,omitempty"` // RoleName - READ-ONLY; The name of the role RoleName *string `json:"roleName,omitempty"` }
func (rdp RoleDefinitionProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for RoleDefinitionProperties.
RoleDefinitionsClient is the billing client provides access to billing resources for Azure subscriptions.
type RoleDefinitionsClient struct { BaseClient }
func NewRoleDefinitionsClient(subscriptionID string) RoleDefinitionsClient
NewRoleDefinitionsClient creates an instance of the RoleDefinitionsClient client.
func NewRoleDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) RoleDefinitionsClient
NewRoleDefinitionsClientWithBaseURI creates an instance of the RoleDefinitionsClient 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 RoleDefinitionsClient) GetByBillingAccount(ctx context.Context, billingAccountName string, billingRoleDefinitionName string) (result RoleDefinition, err error)
GetByBillingAccount gets the definition for a role on a billing account. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. billingRoleDefinitionName - the ID that uniquely identifies a role definition.
func (client RoleDefinitionsClient) GetByBillingAccountPreparer(ctx context.Context, billingAccountName string, billingRoleDefinitionName string) (*http.Request, error)
GetByBillingAccountPreparer prepares the GetByBillingAccount request.
func (client RoleDefinitionsClient) GetByBillingAccountResponder(resp *http.Response) (result RoleDefinition, err error)
GetByBillingAccountResponder handles the response to the GetByBillingAccount request. The method always closes the http.Response Body.
func (client RoleDefinitionsClient) GetByBillingAccountSender(req *http.Request) (*http.Response, error)
GetByBillingAccountSender sends the GetByBillingAccount request. The method will close the http.Response Body if it receives an error.
func (client RoleDefinitionsClient) GetByBillingProfile(ctx context.Context, billingAccountName string, billingProfileName string, billingRoleDefinitionName string) (result RoleDefinition, err error)
GetByBillingProfile gets the definition for a role on a billing profile. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. billingProfileName - the ID that uniquely identifies a billing profile. billingRoleDefinitionName - the ID that uniquely identifies a role definition.
func (client RoleDefinitionsClient) GetByBillingProfilePreparer(ctx context.Context, billingAccountName string, billingProfileName string, billingRoleDefinitionName string) (*http.Request, error)
GetByBillingProfilePreparer prepares the GetByBillingProfile request.
func (client RoleDefinitionsClient) GetByBillingProfileResponder(resp *http.Response) (result RoleDefinition, err error)
GetByBillingProfileResponder handles the response to the GetByBillingProfile request. The method always closes the http.Response Body.
func (client RoleDefinitionsClient) GetByBillingProfileSender(req *http.Request) (*http.Response, error)
GetByBillingProfileSender sends the GetByBillingProfile request. The method will close the http.Response Body if it receives an error.
func (client RoleDefinitionsClient) GetByInvoiceSection(ctx context.Context, billingAccountName string, billingProfileName string, invoiceSectionName string, billingRoleDefinitionName string) (result RoleDefinition, err error)
GetByInvoiceSection gets the definition for a role on an invoice section. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. billingProfileName - the ID that uniquely identifies a billing profile. invoiceSectionName - the ID that uniquely identifies an invoice section. billingRoleDefinitionName - the ID that uniquely identifies a role definition.
func (client RoleDefinitionsClient) GetByInvoiceSectionPreparer(ctx context.Context, billingAccountName string, billingProfileName string, invoiceSectionName string, billingRoleDefinitionName string) (*http.Request, error)
GetByInvoiceSectionPreparer prepares the GetByInvoiceSection request.
func (client RoleDefinitionsClient) GetByInvoiceSectionResponder(resp *http.Response) (result RoleDefinition, err error)
GetByInvoiceSectionResponder handles the response to the GetByInvoiceSection request. The method always closes the http.Response Body.
func (client RoleDefinitionsClient) GetByInvoiceSectionSender(req *http.Request) (*http.Response, error)
GetByInvoiceSectionSender sends the GetByInvoiceSection request. The method will close the http.Response Body if it receives an error.
func (client RoleDefinitionsClient) ListByBillingAccount(ctx context.Context, billingAccountName string) (result RoleDefinitionListResultPage, err error)
ListByBillingAccount lists the role definitions for a billing account. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account.
func (client RoleDefinitionsClient) ListByBillingAccountComplete(ctx context.Context, billingAccountName string) (result RoleDefinitionListResultIterator, err error)
ListByBillingAccountComplete enumerates all values, automatically crossing page boundaries as required.
func (client RoleDefinitionsClient) ListByBillingAccountPreparer(ctx context.Context, billingAccountName string) (*http.Request, error)
ListByBillingAccountPreparer prepares the ListByBillingAccount request.
func (client RoleDefinitionsClient) ListByBillingAccountResponder(resp *http.Response) (result RoleDefinitionListResult, err error)
ListByBillingAccountResponder handles the response to the ListByBillingAccount request. The method always closes the http.Response Body.
func (client RoleDefinitionsClient) ListByBillingAccountSender(req *http.Request) (*http.Response, error)
ListByBillingAccountSender sends the ListByBillingAccount request. The method will close the http.Response Body if it receives an error.
func (client RoleDefinitionsClient) ListByBillingProfile(ctx context.Context, billingAccountName string, billingProfileName string) (result RoleDefinitionListResultPage, err error)
ListByBillingProfile lists the role definitions for a billing profile. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. billingProfileName - the ID that uniquely identifies a billing profile.
func (client RoleDefinitionsClient) ListByBillingProfileComplete(ctx context.Context, billingAccountName string, billingProfileName string) (result RoleDefinitionListResultIterator, err error)
ListByBillingProfileComplete enumerates all values, automatically crossing page boundaries as required.
func (client RoleDefinitionsClient) ListByBillingProfilePreparer(ctx context.Context, billingAccountName string, billingProfileName string) (*http.Request, error)
ListByBillingProfilePreparer prepares the ListByBillingProfile request.
func (client RoleDefinitionsClient) ListByBillingProfileResponder(resp *http.Response) (result RoleDefinitionListResult, err error)
ListByBillingProfileResponder handles the response to the ListByBillingProfile request. The method always closes the http.Response Body.
func (client RoleDefinitionsClient) ListByBillingProfileSender(req *http.Request) (*http.Response, error)
ListByBillingProfileSender sends the ListByBillingProfile request. The method will close the http.Response Body if it receives an error.
func (client RoleDefinitionsClient) ListByInvoiceSection(ctx context.Context, billingAccountName string, billingProfileName string, invoiceSectionName string) (result RoleDefinitionListResultPage, err error)
ListByInvoiceSection lists the role definitions for an invoice section. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. billingProfileName - the ID that uniquely identifies a billing profile. invoiceSectionName - the ID that uniquely identifies an invoice section.
func (client RoleDefinitionsClient) ListByInvoiceSectionComplete(ctx context.Context, billingAccountName string, billingProfileName string, invoiceSectionName string) (result RoleDefinitionListResultIterator, err error)
ListByInvoiceSectionComplete enumerates all values, automatically crossing page boundaries as required.
func (client RoleDefinitionsClient) ListByInvoiceSectionPreparer(ctx context.Context, billingAccountName string, billingProfileName string, invoiceSectionName string) (*http.Request, error)
ListByInvoiceSectionPreparer prepares the ListByInvoiceSection request.
func (client RoleDefinitionsClient) ListByInvoiceSectionResponder(resp *http.Response) (result RoleDefinitionListResult, err error)
ListByInvoiceSectionResponder handles the response to the ListByInvoiceSection request. The method always closes the http.Response Body.
func (client RoleDefinitionsClient) ListByInvoiceSectionSender(req *http.Request) (*http.Response, error)
ListByInvoiceSectionSender sends the ListByInvoiceSection request. The method will close the http.Response Body if it receives an error.
SpendingLimit enumerates the values for spending limit.
type SpendingLimit string
const ( // SpendingLimitOff ... SpendingLimitOff SpendingLimit = "Off" // SpendingLimitOn ... SpendingLimitOn SpendingLimit = "On" )
func PossibleSpendingLimitValues() []SpendingLimit
PossibleSpendingLimitValues returns an array of possible values for the SpendingLimit const type.
SpendingLimitForBillingProfile enumerates the values for spending limit for billing profile.
type SpendingLimitForBillingProfile string
const ( // SpendingLimitForBillingProfileOff ... SpendingLimitForBillingProfileOff SpendingLimitForBillingProfile = "Off" // SpendingLimitForBillingProfileOn ... SpendingLimitForBillingProfileOn SpendingLimitForBillingProfile = "On" )
func PossibleSpendingLimitForBillingProfileValues() []SpendingLimitForBillingProfile
PossibleSpendingLimitForBillingProfileValues returns an array of possible values for the SpendingLimitForBillingProfile const type.
StatusReasonCode enumerates the values for status reason code.
type StatusReasonCode string
const ( // StatusReasonCodePastDue ... StatusReasonCodePastDue StatusReasonCode = "PastDue" // StatusReasonCodeSpendingLimitExpired ... StatusReasonCodeSpendingLimitExpired StatusReasonCode = "SpendingLimitExpired" // StatusReasonCodeSpendingLimitReached ... StatusReasonCodeSpendingLimitReached StatusReasonCode = "SpendingLimitReached" )
func PossibleStatusReasonCodeValues() []StatusReasonCode
PossibleStatusReasonCodeValues returns an array of possible values for the StatusReasonCode const type.
StatusReasonCodeForBillingProfile enumerates the values for status reason code for billing profile.
type StatusReasonCodeForBillingProfile string
const ( // StatusReasonCodeForBillingProfilePastDue ... StatusReasonCodeForBillingProfilePastDue StatusReasonCodeForBillingProfile = "PastDue" // StatusReasonCodeForBillingProfileSpendingLimitExpired ... StatusReasonCodeForBillingProfileSpendingLimitExpired StatusReasonCodeForBillingProfile = "SpendingLimitExpired" // StatusReasonCodeForBillingProfileSpendingLimitReached ... StatusReasonCodeForBillingProfileSpendingLimitReached StatusReasonCodeForBillingProfile = "SpendingLimitReached" )
func PossibleStatusReasonCodeForBillingProfileValues() []StatusReasonCodeForBillingProfile
PossibleStatusReasonCodeForBillingProfileValues returns an array of possible values for the StatusReasonCodeForBillingProfile const type.
Subscription a billing subscription.
type Subscription struct { autorest.Response `json:"-"` *SubscriptionProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name. Name *string `json:"name,omitempty"` // Type - READ-ONLY; Resource type. Type *string `json:"type,omitempty"` }
func (s Subscription) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Subscription.
func (s *Subscription) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for Subscription struct.
SubscriptionProperties the billing properties of a subscription.
type SubscriptionProperties struct { // DisplayName - READ-ONLY; The name of the subscription. DisplayName *string `json:"displayName,omitempty"` // SubscriptionID - READ-ONLY; The ID of the subscription. SubscriptionID *uuid.UUID `json:"subscriptionId,omitempty"` // SubscriptionBillingStatus - The current billing status of the subscription. Possible values include: 'SubscriptionStatusTypeActive', 'SubscriptionStatusTypeInactive', 'SubscriptionStatusTypeAbandoned', 'SubscriptionStatusTypeDeleted', 'SubscriptionStatusTypeWarning' SubscriptionBillingStatus SubscriptionStatusType `json:"subscriptionBillingStatus,omitempty"` // LastMonthCharges - READ-ONLY; The last month charges. LastMonthCharges *Amount `json:"lastMonthCharges,omitempty"` // MonthToDateCharges - READ-ONLY; The current month to date charges. MonthToDateCharges *Amount `json:"monthToDateCharges,omitempty"` // BillingProfileID - READ-ONLY; The ID of the billing profile to which the subscription is billed. BillingProfileID *string `json:"billingProfileId,omitempty"` // BillingProfileDisplayName - READ-ONLY; The name of the billing profile to which the subscription is billed. BillingProfileDisplayName *string `json:"billingProfileDisplayName,omitempty"` // CostCenter - The cost center applied to the subscription. CostCenter *string `json:"costCenter,omitempty"` // CustomerID - READ-ONLY; The ID of the customer for whom the subscription was created. The field is applicable only for Microsoft Partner Agreement billing account. CustomerID *string `json:"customerId,omitempty"` // CustomerDisplayName - READ-ONLY; The name of the customer for whom the subscription was created. The field is applicable only for Microsoft Partner Agreement billing account. CustomerDisplayName *string `json:"customerDisplayName,omitempty"` // InvoiceSectionID - READ-ONLY; The ID of the invoice section to which the subscription is billed. InvoiceSectionID *string `json:"invoiceSectionId,omitempty"` // InvoiceSectionDisplayName - READ-ONLY; The name of the invoice section to which the subscription is billed. InvoiceSectionDisplayName *string `json:"invoiceSectionDisplayName,omitempty"` // Reseller - READ-ONLY; Reseller for this subscription. Reseller *Reseller `json:"reseller,omitempty"` // SkuID - The sku ID of the Azure plan for the subscription. SkuID *string `json:"skuId,omitempty"` // SkuDescription - READ-ONLY; The sku description of the Azure plan for the subscription. SkuDescription *string `json:"skuDescription,omitempty"` }
func (sp SubscriptionProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for SubscriptionProperties.
SubscriptionStatusType enumerates the values for subscription status type.
type SubscriptionStatusType string
const ( // SubscriptionStatusTypeAbandoned ... SubscriptionStatusTypeAbandoned SubscriptionStatusType = "Abandoned" // SubscriptionStatusTypeActive ... SubscriptionStatusTypeActive SubscriptionStatusType = "Active" // SubscriptionStatusTypeDeleted ... SubscriptionStatusTypeDeleted SubscriptionStatusType = "Deleted" // SubscriptionStatusTypeInactive ... SubscriptionStatusTypeInactive SubscriptionStatusType = "Inactive" // SubscriptionStatusTypeWarning ... SubscriptionStatusTypeWarning SubscriptionStatusType = "Warning" )
func PossibleSubscriptionStatusTypeValues() []SubscriptionStatusType
PossibleSubscriptionStatusTypeValues returns an array of possible values for the SubscriptionStatusType const type.
SubscriptionTransferValidationErrorCode enumerates the values for subscription transfer validation error code.
type SubscriptionTransferValidationErrorCode string
const ( // SubscriptionTransferValidationErrorCodeCrossBillingAccountNotAllowed ... SubscriptionTransferValidationErrorCodeCrossBillingAccountNotAllowed SubscriptionTransferValidationErrorCode = "CrossBillingAccountNotAllowed" // SubscriptionTransferValidationErrorCodeDestinationBillingProfilePastDue ... SubscriptionTransferValidationErrorCodeDestinationBillingProfilePastDue SubscriptionTransferValidationErrorCode = "DestinationBillingProfilePastDue" // SubscriptionTransferValidationErrorCodeInsufficientPermissionOnDestination ... SubscriptionTransferValidationErrorCodeInsufficientPermissionOnDestination SubscriptionTransferValidationErrorCode = "InsufficientPermissionOnDestination" // SubscriptionTransferValidationErrorCodeInsufficientPermissionOnSource ... SubscriptionTransferValidationErrorCodeInsufficientPermissionOnSource SubscriptionTransferValidationErrorCode = "InsufficientPermissionOnSource" // SubscriptionTransferValidationErrorCodeInvalidSource ... SubscriptionTransferValidationErrorCodeInvalidSource SubscriptionTransferValidationErrorCode = "InvalidSource" // SubscriptionTransferValidationErrorCodeNotAvailableForDestinationMarket ... SubscriptionTransferValidationErrorCodeNotAvailableForDestinationMarket SubscriptionTransferValidationErrorCode = "NotAvailableForDestinationMarket" // SubscriptionTransferValidationErrorCodeSubscriptionNotActive ... SubscriptionTransferValidationErrorCodeSubscriptionNotActive SubscriptionTransferValidationErrorCode = "SubscriptionNotActive" // SubscriptionTransferValidationErrorCodeSubscriptionTypeNotSupported ... SubscriptionTransferValidationErrorCodeSubscriptionTypeNotSupported SubscriptionTransferValidationErrorCode = "SubscriptionTypeNotSupported" )
func PossibleSubscriptionTransferValidationErrorCodeValues() []SubscriptionTransferValidationErrorCode
PossibleSubscriptionTransferValidationErrorCodeValues returns an array of possible values for the SubscriptionTransferValidationErrorCode const type.
SubscriptionsClient is the billing client provides access to billing resources for Azure subscriptions.
type SubscriptionsClient struct { BaseClient }
func NewSubscriptionsClient(subscriptionID string) SubscriptionsClient
NewSubscriptionsClient creates an instance of the SubscriptionsClient client.
func NewSubscriptionsClientWithBaseURI(baseURI string, subscriptionID 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 (client SubscriptionsClient) Get(ctx context.Context, billingAccountName string) (result Subscription, err error)
Get gets a subscription by its ID. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement and Microsoft Partner Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account.
func (client SubscriptionsClient) GetPreparer(ctx context.Context, billingAccountName string) (*http.Request, error)
GetPreparer prepares the Get request.
func (client SubscriptionsClient) GetResponder(resp *http.Response) (result Subscription, err error)
GetResponder handles the response to the Get request. The method always closes the http.Response Body.
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 (client SubscriptionsClient) ListByBillingAccount(ctx context.Context, billingAccountName string) (result SubscriptionsListResultPage, err error)
ListByBillingAccount lists the subscriptions for a billing account. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account.
func (client SubscriptionsClient) ListByBillingAccountComplete(ctx context.Context, billingAccountName string) (result SubscriptionsListResultIterator, err error)
ListByBillingAccountComplete enumerates all values, automatically crossing page boundaries as required.
func (client SubscriptionsClient) ListByBillingAccountPreparer(ctx context.Context, billingAccountName string) (*http.Request, error)
ListByBillingAccountPreparer prepares the ListByBillingAccount request.
func (client SubscriptionsClient) ListByBillingAccountResponder(resp *http.Response) (result SubscriptionsListResult, err error)
ListByBillingAccountResponder handles the response to the ListByBillingAccount request. The method always closes the http.Response Body.
func (client SubscriptionsClient) ListByBillingAccountSender(req *http.Request) (*http.Response, error)
ListByBillingAccountSender sends the ListByBillingAccount request. The method will close the http.Response Body if it receives an error.
func (client SubscriptionsClient) ListByBillingProfile(ctx context.Context, billingAccountName string, billingProfileName string) (result SubscriptionsListResultPage, err error)
ListByBillingProfile lists the subscriptions that are billed to a billing profile. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. billingProfileName - the ID that uniquely identifies a billing profile.
func (client SubscriptionsClient) ListByBillingProfileComplete(ctx context.Context, billingAccountName string, billingProfileName string) (result SubscriptionsListResultIterator, err error)
ListByBillingProfileComplete enumerates all values, automatically crossing page boundaries as required.
func (client SubscriptionsClient) ListByBillingProfilePreparer(ctx context.Context, billingAccountName string, billingProfileName string) (*http.Request, error)
ListByBillingProfilePreparer prepares the ListByBillingProfile request.
func (client SubscriptionsClient) ListByBillingProfileResponder(resp *http.Response) (result SubscriptionsListResult, err error)
ListByBillingProfileResponder handles the response to the ListByBillingProfile request. The method always closes the http.Response Body.
func (client SubscriptionsClient) ListByBillingProfileSender(req *http.Request) (*http.Response, error)
ListByBillingProfileSender sends the ListByBillingProfile request. The method will close the http.Response Body if it receives an error.
func (client SubscriptionsClient) ListByCustomer(ctx context.Context, billingAccountName string, customerName string) (result SubscriptionsListResultPage, err error)
ListByCustomer lists the subscriptions for a customer. The operation is supported only for billing accounts with agreement type Microsoft Partner Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. customerName - the ID that uniquely identifies a customer.
func (client SubscriptionsClient) ListByCustomerComplete(ctx context.Context, billingAccountName string, customerName string) (result SubscriptionsListResultIterator, err error)
ListByCustomerComplete enumerates all values, automatically crossing page boundaries as required.
func (client SubscriptionsClient) ListByCustomerPreparer(ctx context.Context, billingAccountName string, customerName string) (*http.Request, error)
ListByCustomerPreparer prepares the ListByCustomer request.
func (client SubscriptionsClient) ListByCustomerResponder(resp *http.Response) (result SubscriptionsListResult, err error)
ListByCustomerResponder handles the response to the ListByCustomer request. The method always closes the http.Response Body.
func (client SubscriptionsClient) ListByCustomerSender(req *http.Request) (*http.Response, error)
ListByCustomerSender sends the ListByCustomer request. The method will close the http.Response Body if it receives an error.
func (client SubscriptionsClient) ListByInvoiceSection(ctx context.Context, billingAccountName string, billingProfileName string, invoiceSectionName string) (result SubscriptionsListResultPage, err error)
ListByInvoiceSection lists the subscriptions that are billed to an invoice section. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. billingProfileName - the ID that uniquely identifies a billing profile. invoiceSectionName - the ID that uniquely identifies an invoice section.
func (client SubscriptionsClient) ListByInvoiceSectionComplete(ctx context.Context, billingAccountName string, billingProfileName string, invoiceSectionName string) (result SubscriptionsListResultIterator, err error)
ListByInvoiceSectionComplete enumerates all values, automatically crossing page boundaries as required.
func (client SubscriptionsClient) ListByInvoiceSectionPreparer(ctx context.Context, billingAccountName string, billingProfileName string, invoiceSectionName string) (*http.Request, error)
ListByInvoiceSectionPreparer prepares the ListByInvoiceSection request.
func (client SubscriptionsClient) ListByInvoiceSectionResponder(resp *http.Response) (result SubscriptionsListResult, err error)
ListByInvoiceSectionResponder handles the response to the ListByInvoiceSection request. The method always closes the http.Response Body.
func (client SubscriptionsClient) ListByInvoiceSectionSender(req *http.Request) (*http.Response, error)
ListByInvoiceSectionSender sends the ListByInvoiceSection request. The method will close the http.Response Body if it receives an error.
func (client SubscriptionsClient) Move(ctx context.Context, billingAccountName string, parameters TransferBillingSubscriptionRequestProperties) (result SubscriptionsMoveFuture, err error)
Move moves a subscription's charges to a new invoice section. The new invoice section must belong to the same billing profile as the existing invoice section. This operation is supported for billing accounts with agreement type Microsoft Customer Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. parameters - request parameters that are provided to the move subscription operation.
func (client SubscriptionsClient) MovePreparer(ctx context.Context, billingAccountName string, parameters TransferBillingSubscriptionRequestProperties) (*http.Request, error)
MovePreparer prepares the Move request.
func (client SubscriptionsClient) MoveResponder(resp *http.Response) (result Subscription, err error)
MoveResponder handles the response to the Move request. The method always closes the http.Response Body.
func (client SubscriptionsClient) MoveSender(req *http.Request) (future SubscriptionsMoveFuture, err error)
MoveSender sends the Move request. The method will close the http.Response Body if it receives an error.
func (client SubscriptionsClient) Update(ctx context.Context, billingAccountName string, parameters Subscription) (result Subscription, err error)
Update updates the properties of a billing subscription. Currently, cost center can be updated. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. parameters - request parameters that are provided to the update billing subscription operation.
func (client SubscriptionsClient) UpdatePreparer(ctx context.Context, billingAccountName string, parameters Subscription) (*http.Request, error)
UpdatePreparer prepares the Update request.
func (client SubscriptionsClient) UpdateResponder(resp *http.Response) (result Subscription, err error)
UpdateResponder handles the response to the Update request. The method always closes the http.Response Body.
func (client SubscriptionsClient) UpdateSender(req *http.Request) (*http.Response, error)
UpdateSender sends the Update request. The method will close the http.Response Body if it receives an error.
func (client SubscriptionsClient) ValidateMove(ctx context.Context, billingAccountName string, parameters TransferBillingSubscriptionRequestProperties) (result ValidateSubscriptionTransferEligibilityResult, err error)
ValidateMove validates if a subscription's charges can be moved to a new invoice section. This operation is supported for billing accounts with agreement type Microsoft Customer Agreement. Parameters: billingAccountName - the ID that uniquely identifies a billing account. parameters - request parameters that are provided to the validate move eligibility operation.
func (client SubscriptionsClient) ValidateMovePreparer(ctx context.Context, billingAccountName string, parameters TransferBillingSubscriptionRequestProperties) (*http.Request, error)
ValidateMovePreparer prepares the ValidateMove request.
func (client SubscriptionsClient) ValidateMoveResponder(resp *http.Response) (result ValidateSubscriptionTransferEligibilityResult, err error)
ValidateMoveResponder handles the response to the ValidateMove request. The method always closes the http.Response Body.
func (client SubscriptionsClient) ValidateMoveSender(req *http.Request) (*http.Response, error)
ValidateMoveSender sends the ValidateMove request. The method will close the http.Response Body if it receives an error.
SubscriptionsListResult the list of billing subscriptions.
type SubscriptionsListResult struct { autorest.Response `json:"-"` // Value - READ-ONLY; The list of billing subscriptions. Value *[]Subscription `json:"value,omitempty"` // NextLink - READ-ONLY; The link (url) to the next page of results. NextLink *string `json:"nextLink,omitempty"` }
func (slr SubscriptionsListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
func (slr SubscriptionsListResult) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for SubscriptionsListResult.
SubscriptionsListResultIterator provides access to a complete listing of Subscription values.
type SubscriptionsListResultIterator struct {
// contains filtered or unexported fields
}
func NewSubscriptionsListResultIterator(page SubscriptionsListResultPage) SubscriptionsListResultIterator
Creates a new instance of the SubscriptionsListResultIterator type.
func (iter *SubscriptionsListResultIterator) 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 (iter *SubscriptionsListResultIterator) 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 (iter SubscriptionsListResultIterator) NotDone() bool
NotDone returns true if the enumeration should be started or is not yet complete.
func (iter SubscriptionsListResultIterator) Response() SubscriptionsListResult
Response returns the raw server response from the last page request.
func (iter SubscriptionsListResultIterator) Value() Subscription
Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.
SubscriptionsListResultPage contains a page of Subscription values.
type SubscriptionsListResultPage struct {
// contains filtered or unexported fields
}
func NewSubscriptionsListResultPage(cur SubscriptionsListResult, getNextPage func(context.Context, SubscriptionsListResult) (SubscriptionsListResult, error)) SubscriptionsListResultPage
Creates a new instance of the SubscriptionsListResultPage type.
func (page *SubscriptionsListResultPage) 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 (page *SubscriptionsListResultPage) 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 (page SubscriptionsListResultPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (page SubscriptionsListResultPage) Response() SubscriptionsListResult
Response returns the raw server response from the last page request.
func (page SubscriptionsListResultPage) Values() []Subscription
Values returns the slice of values for the current page or nil if there are no values.
SubscriptionsMoveFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type SubscriptionsMoveFuture struct { azure.FutureAPI // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. Result func(SubscriptionsClient) (Subscription, error) }
func (future *SubscriptionsMoveFuture) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaller for CreateFuture.
TargetCloud enumerates the values for target cloud.
type TargetCloud string
const ( // USGov ... USGov TargetCloud = "USGov" // USNat ... USNat TargetCloud = "USNat" // USSec ... USSec TargetCloud = "USSec" )
func PossibleTargetCloudValues() []TargetCloud
PossibleTargetCloudValues returns an array of possible values for the TargetCloud const type.
Transaction a transaction.
type Transaction struct { *TransactionProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name. Name *string `json:"name,omitempty"` // Type - READ-ONLY; Resource type. Type *string `json:"type,omitempty"` }
func (t Transaction) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Transaction.
func (t *Transaction) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for Transaction struct.
TransactionListResult the list of transactions.
type TransactionListResult struct { autorest.Response `json:"-"` // Value - READ-ONLY; The list of transactions. Value *[]Transaction `json:"value,omitempty"` // NextLink - READ-ONLY; The link (url) to the next page of results. NextLink *string `json:"nextLink,omitempty"` }
func (tlr TransactionListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
func (tlr TransactionListResult) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for TransactionListResult.
TransactionListResultIterator provides access to a complete listing of Transaction values.
type TransactionListResultIterator struct {
// contains filtered or unexported fields
}
func NewTransactionListResultIterator(page TransactionListResultPage) TransactionListResultIterator
Creates a new instance of the TransactionListResultIterator type.
func (iter *TransactionListResultIterator) 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 (iter *TransactionListResultIterator) 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 (iter TransactionListResultIterator) NotDone() bool
NotDone returns true if the enumeration should be started or is not yet complete.
func (iter TransactionListResultIterator) Response() TransactionListResult
Response returns the raw server response from the last page request.
func (iter TransactionListResultIterator) Value() Transaction
Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.
TransactionListResultPage contains a page of Transaction values.
type TransactionListResultPage struct {
// contains filtered or unexported fields
}
func NewTransactionListResultPage(cur TransactionListResult, getNextPage func(context.Context, TransactionListResult) (TransactionListResult, error)) TransactionListResultPage
Creates a new instance of the TransactionListResultPage type.
func (page *TransactionListResultPage) 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 (page *TransactionListResultPage) 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 (page TransactionListResultPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (page TransactionListResultPage) Response() TransactionListResult
Response returns the raw server response from the last page request.
func (page TransactionListResultPage) Values() []Transaction
Values returns the slice of values for the current page or nil if there are no values.
TransactionProperties the properties of a transaction.
type TransactionProperties struct { // Kind - The kind of transaction. Options are all or reservation. Possible values include: 'All', 'Reservation' Kind TransactionTypeKind `json:"kind,omitempty"` // Date - READ-ONLY; The date of transaction. Date *date.Time `json:"date,omitempty"` // Invoice - READ-ONLY; Invoice on which the transaction was billed or 'pending' if the transaction is not billed. Invoice *string `json:"invoice,omitempty"` // InvoiceID - READ-ONLY; The ID of the invoice on which the transaction was billed. This field is only applicable for transactions which are billed. InvoiceID *string `json:"invoiceId,omitempty"` // OrderID - READ-ONLY; The order ID of the reservation. The field is only applicable for transaction of kind reservation. OrderID *string `json:"orderId,omitempty"` // OrderName - READ-ONLY; The name of the reservation order. The field is only applicable for transactions of kind reservation. OrderName *string `json:"orderName,omitempty"` // ProductFamily - READ-ONLY; The family of the product for which the transaction took place. ProductFamily *string `json:"productFamily,omitempty"` // ProductTypeID - READ-ONLY; The ID of the product type for which the transaction took place. ProductTypeID *string `json:"productTypeId,omitempty"` // ProductType - READ-ONLY; The type of the product for which the transaction took place. ProductType *string `json:"productType,omitempty"` // ProductDescription - READ-ONLY; The description of the product for which the transaction took place. ProductDescription *string `json:"productDescription,omitempty"` // TransactionType - The type of transaction. Possible values include: 'Purchase', 'UsageCharge' TransactionType ReservationType `json:"transactionType,omitempty"` // TransactionAmount - READ-ONLY; The charge associated with the transaction. TransactionAmount *Amount `json:"transactionAmount,omitempty"` // Quantity - READ-ONLY; The quantity purchased in the transaction. Quantity *int32 `json:"quantity,omitempty"` // InvoiceSectionID - READ-ONLY; The ID of the invoice section which will be billed for the transaction. InvoiceSectionID *string `json:"invoiceSectionId,omitempty"` // InvoiceSectionDisplayName - READ-ONLY; The name of the invoice section which will be billed for the transaction. InvoiceSectionDisplayName *string `json:"invoiceSectionDisplayName,omitempty"` // BillingProfileID - READ-ONLY; The ID of the billing profile which will be billed for the transaction. BillingProfileID *string `json:"billingProfileId,omitempty"` // BillingProfileDisplayName - READ-ONLY; The name of the billing profile which will be billed for the transaction. BillingProfileDisplayName *string `json:"billingProfileDisplayName,omitempty"` // CustomerID - READ-ONLY; The ID of the customer for which the transaction took place. The field is applicable only for Microsoft Partner Agreement billing account. CustomerID *string `json:"customerId,omitempty"` // CustomerDisplayName - READ-ONLY; The name of the customer for which the transaction took place. The field is applicable only for Microsoft Partner Agreement billing account. CustomerDisplayName *string `json:"customerDisplayName,omitempty"` // SubscriptionID - READ-ONLY; The ID of the subscription that was used for the transaction. The field is only applicable for transaction of kind reservation. SubscriptionID *string `json:"subscriptionId,omitempty"` // SubscriptionName - READ-ONLY; The name of the subscription that was used for the transaction. The field is only applicable for transaction of kind reservation. SubscriptionName *string `json:"subscriptionName,omitempty"` // AzurePlan - READ-ONLY; The type of azure plan of the subscription that was used for the transaction. AzurePlan *string `json:"azurePlan,omitempty"` // AzureCreditApplied - READ-ONLY; The amount of any Azure credits automatically applied to this transaction. AzureCreditApplied *Amount `json:"azureCreditApplied,omitempty"` // BillingCurrency - READ-ONLY; The ISO 4217 code for the currency in which this transaction is billed. BillingCurrency *string `json:"billingCurrency,omitempty"` // Discount - READ-ONLY; The percentage discount, if any, applied to this transaction. Discount *float64 `json:"discount,omitempty"` // EffectivePrice - READ-ONLY; The price of the product after applying any discounts. EffectivePrice *Amount `json:"effectivePrice,omitempty"` // ExchangeRate - READ-ONLY; The exchange rate used to convert charged amount to billing currency, if applicable. ExchangeRate *float64 `json:"exchangeRate,omitempty"` // MarketPrice - READ-ONLY; The retail price of the product. MarketPrice *Amount `json:"marketPrice,omitempty"` // PricingCurrency - READ-ONLY; The ISO 4217 code for the currency in which the product is priced. PricingCurrency *string `json:"pricingCurrency,omitempty"` // ServicePeriodStartDate - READ-ONLY; The date of the purchase of the product, or the start date of the month in which usage started. ServicePeriodStartDate *date.Time `json:"servicePeriodStartDate,omitempty"` // ServicePeriodEndDate - READ-ONLY; The end date of the product term, or the end date of the month in which usage ended. ServicePeriodEndDate *date.Time `json:"servicePeriodEndDate,omitempty"` // SubTotal - READ-ONLY; The pre-tax charged amount for the transaction. SubTotal *Amount `json:"subTotal,omitempty"` // Tax - READ-ONLY; The tax amount applied to the transaction. Tax *Amount `json:"tax,omitempty"` // UnitOfMeasure - READ-ONLY; The unit of measure used to bill for the product. For example, compute services are billed per hour. UnitOfMeasure *string `json:"unitOfMeasure,omitempty"` // Units - READ-ONLY; The number of units used for a given product. Units *float64 `json:"units,omitempty"` // UnitType - READ-ONLY; The description for the unit of measure for a given product. UnitType *string `json:"unitType,omitempty"` }
func (tp TransactionProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for TransactionProperties.
TransactionTypeKind enumerates the values for transaction type kind.
type TransactionTypeKind string
const ( // All ... All TransactionTypeKind = "all" // Reservation ... Reservation TransactionTypeKind = "reservation" )
func PossibleTransactionTypeKindValues() []TransactionTypeKind
PossibleTransactionTypeKindValues returns an array of possible values for the TransactionTypeKind const type.
TransactionsClient is the billing client provides access to billing resources for Azure subscriptions.
type TransactionsClient struct { BaseClient }
func NewTransactionsClient(subscriptionID string) TransactionsClient
NewTransactionsClient creates an instance of the TransactionsClient client.
func NewTransactionsClientWithBaseURI(baseURI string, subscriptionID string) TransactionsClient
NewTransactionsClientWithBaseURI creates an instance of the TransactionsClient 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 TransactionsClient) ListByInvoice(ctx context.Context, billingAccountName string, invoiceName string) (result TransactionListResultPage, err error)
ListByInvoice lists the transactions for an invoice. Transactions include purchases, refunds and Azure usage charges. Parameters: billingAccountName - the ID that uniquely identifies a billing account. invoiceName - the ID that uniquely identifies an invoice.
func (client TransactionsClient) ListByInvoiceComplete(ctx context.Context, billingAccountName string, invoiceName string) (result TransactionListResultIterator, err error)
ListByInvoiceComplete enumerates all values, automatically crossing page boundaries as required.
func (client TransactionsClient) ListByInvoicePreparer(ctx context.Context, billingAccountName string, invoiceName string) (*http.Request, error)
ListByInvoicePreparer prepares the ListByInvoice request.
func (client TransactionsClient) ListByInvoiceResponder(resp *http.Response) (result TransactionListResult, err error)
ListByInvoiceResponder handles the response to the ListByInvoice request. The method always closes the http.Response Body.
func (client TransactionsClient) ListByInvoiceSender(req *http.Request) (*http.Response, error)
ListByInvoiceSender sends the ListByInvoice request. The method will close the http.Response Body if it receives an error.
TransferBillingSubscriptionRequestProperties request parameters to transfer billing subscription.
type TransferBillingSubscriptionRequestProperties struct { // DestinationInvoiceSectionID - The destination invoice section id. DestinationInvoiceSectionID *string `json:"destinationInvoiceSectionId,omitempty"` }
TransferProductRequestProperties the properties of the product to initiate a transfer.
type TransferProductRequestProperties struct { // DestinationInvoiceSectionID - The destination invoice section id. DestinationInvoiceSectionID *string `json:"destinationInvoiceSectionId,omitempty"` }
ValidateAddressResponse result of the address validation
type ValidateAddressResponse struct { autorest.Response `json:"-"` // Status - status of the address validation. Possible values include: 'Valid', 'Invalid' Status AddressValidationStatus `json:"status,omitempty"` // SuggestedAddresses - The list of suggested addresses. SuggestedAddresses *[]AddressDetails `json:"suggestedAddresses,omitempty"` // ValidationMessage - Validation error message. ValidationMessage *string `json:"validationMessage,omitempty"` }
ValidateProductTransferEligibilityError error details of the product transfer eligibility validation.
type ValidateProductTransferEligibilityError struct { // Code - Error code for the product transfer validation. Possible values include: 'InvalidSource', 'ProductNotActive', 'InsufficientPermissionOnSource', 'InsufficientPermissionOnDestination', 'DestinationBillingProfilePastDue', 'ProductTypeNotSupported', 'CrossBillingAccountNotAllowed', 'NotAvailableForDestinationMarket', 'OneTimePurchaseProductTransferNotAllowed' Code ProductTransferValidationErrorCode `json:"code,omitempty"` // Message - The error message. Message *string `json:"message,omitempty"` // Details - Detailed error message explaining the error. Details *string `json:"details,omitempty"` }
ValidateProductTransferEligibilityResult result of the product transfer eligibility validation.
type ValidateProductTransferEligibilityResult struct { autorest.Response `json:"-"` // IsMoveEligible - READ-ONLY; Specifies whether the transfer is eligible or not. IsMoveEligible *bool `json:"isMoveEligible,omitempty"` // ErrorDetails - Validation error details. ErrorDetails *ValidateProductTransferEligibilityError `json:"errorDetails,omitempty"` }
func (vpter ValidateProductTransferEligibilityResult) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ValidateProductTransferEligibilityResult.
ValidateSubscriptionTransferEligibilityError error details of the transfer eligibility validation
type ValidateSubscriptionTransferEligibilityError struct { // Code - Error code for the product transfer validation. Possible values include: 'SubscriptionTransferValidationErrorCodeInvalidSource', 'SubscriptionTransferValidationErrorCodeSubscriptionNotActive', 'SubscriptionTransferValidationErrorCodeInsufficientPermissionOnSource', 'SubscriptionTransferValidationErrorCodeInsufficientPermissionOnDestination', 'SubscriptionTransferValidationErrorCodeDestinationBillingProfilePastDue', 'SubscriptionTransferValidationErrorCodeSubscriptionTypeNotSupported', 'SubscriptionTransferValidationErrorCodeCrossBillingAccountNotAllowed', 'SubscriptionTransferValidationErrorCodeNotAvailableForDestinationMarket' Code SubscriptionTransferValidationErrorCode `json:"code,omitempty"` // Message - The error message. Message *string `json:"message,omitempty"` // Details - Detailed error message explaining the error. Details *string `json:"details,omitempty"` }
ValidateSubscriptionTransferEligibilityResult result of the transfer eligibility validation.
type ValidateSubscriptionTransferEligibilityResult struct { autorest.Response `json:"-"` // IsMoveEligible - READ-ONLY; Specifies whether the subscription is eligible to be transferred. IsMoveEligible *bool `json:"isMoveEligible,omitempty"` // ErrorDetails - Validation error details. ErrorDetails *ValidateSubscriptionTransferEligibilityError `json:"errorDetails,omitempty"` }
func (vster ValidateSubscriptionTransferEligibilityResult) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ValidateSubscriptionTransferEligibilityResult.
ViewCharges enumerates the values for view charges.
type ViewCharges string
const ( // ViewChargesAllowed ... ViewChargesAllowed ViewCharges = "Allowed" // ViewChargesNotAllowed ... ViewChargesNotAllowed ViewCharges = "NotAllowed" )
func PossibleViewChargesValues() []ViewCharges
PossibleViewChargesValues returns an array of possible values for the ViewCharges const type.
ViewChargesPolicy enumerates the values for view charges policy.
type ViewChargesPolicy string
const ( // ViewChargesPolicyAllowed ... ViewChargesPolicyAllowed ViewChargesPolicy = "Allowed" // ViewChargesPolicyNotAllowed ... ViewChargesPolicyNotAllowed ViewChargesPolicy = "NotAllowed" )
func PossibleViewChargesPolicyValues() []ViewChargesPolicy
PossibleViewChargesPolicyValues returns an array of possible values for the ViewChargesPolicy const type.
Name | Synopsis |
---|---|
.. | |
billingapi | Deprecated: Please note, this package has been deprecated. |