import "github.com/Azure/azure-sdk-for-go/services/preview/billing/mgmt/2020-05-01-preview/billing"
Package billing implements the Azure ARM Billing service API version .
Billing client provides access to billing resources for Azure subscriptions.
accounts.go address.go agreements.go availablebalances.go client.go customers.go enrollmentaccounts.go enums.go instructions.go invoices.go invoicesections.go models.go operations.go periods.go permissions.go policies.go products.go profiles.go property.go roleassignments.go roledefinitions.go subscriptions.go transactions.go version.go
const ( // DefaultBaseURI is the default URI used for the service Billing DefaultBaseURI = "https://management.azure.com" )
UserAgent returns the UserAgent string to use when sending http.Requests.
Version returns the semantic version (see http://semver.org) of the client.
AcceptanceMode enumerates the values for acceptance mode.
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.
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"` }
Account a billing account.
MarshalJSON is the custom marshaler for Account.
UnmarshalJSON is the custom unmarshaler for Account struct.
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"` }
AccountListResult the list of billing accounts.
func (alr AccountListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
type AccountListResultIterator struct {
// contains filtered or unexported fields
}
AccountListResultIterator provides access to a complete listing of Account values.
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.
type AccountListResultPage struct {
// contains filtered or unexported fields
}
AccountListResultPage contains a page of Account values.
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.
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"` }
AccountProperties the properties of the billing account.
func (ap AccountProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for AccountProperties.
AccountStatus enumerates the values for account status.
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.
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.
type AccountUpdateRequest struct { // AccountProperties - A billing property. *AccountProperties `json:"properties,omitempty"` }
AccountUpdateRequest the request properties of the billing account that can be updated.
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.
type AccountsClient struct { BaseClient }
AccountsClient is the billing client provides access to billing resources for Azure subscriptions.
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.
GetResponder handles the response to the Get request. The method always closes the http.Response Body.
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.
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.
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.
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) }
AccountsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type AddressClient struct { BaseClient }
AddressClient is the billing client provides access to billing resources for Azure subscriptions.
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.
ValidateSender sends the Validate request. The method will close the http.Response Body if it receives an error.
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"` }
AddressDetails address details.
AddressValidationStatus enumerates the values for address validation status.
const ( // Invalid ... Invalid AddressValidationStatus = "Invalid" // Valid ... Valid AddressValidationStatus = "Valid" )
func PossibleAddressValidationStatusValues() []AddressValidationStatus
PossibleAddressValidationStatusValues returns an array of possible values for the AddressValidationStatus const type.
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"` }
Agreement an agreement.
MarshalJSON is the custom marshaler for Agreement.
UnmarshalJSON is the custom unmarshaler for Agreement struct.
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"` }
AgreementListResult result of listing agreements.
func (alr AgreementListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
type AgreementListResultIterator struct {
// contains filtered or unexported fields
}
AgreementListResultIterator provides access to a complete listing of Agreement values.
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.
type AgreementListResultPage struct {
// contains filtered or unexported fields
}
AgreementListResultPage contains a page of Agreement values.
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.
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"` }
AgreementProperties the properties of an agreement.
func (ap AgreementProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for AgreementProperties.
AgreementType enumerates the values for agreement type.
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.
type AgreementsClient struct { BaseClient }
AgreementsClient is the billing client provides access to billing resources for Azure subscriptions.
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.
GetResponder handles the response to the Get request. The method always closes the http.Response Body.
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.
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"` }
Amount the amount.
MarshalJSON is the custom marshaler for Amount.
AutoRenew enumerates the values for auto renew.
PossibleAutoRenewValues returns an array of possible values for the AutoRenew const type.
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"` }
AvailableBalance the latest Azure credit balance. This is the balance available for pay now.
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.
type AvailableBalanceProperties struct { // Amount - READ-ONLY; Balance amount. Amount *Amount `json:"amount,omitempty"` }
AvailableBalanceProperties the properties of available balance.
type AvailableBalancesClient struct { BaseClient }
AvailableBalancesClient is the billing client provides access to billing resources for Azure subscriptions.
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.
GetSender sends the Get request. The method will close the http.Response Body if it receives an error.
type AzurePlan struct { // SkuID - The sku id. SkuID *string `json:"skuId,omitempty"` // SkuDescription - READ-ONLY; The sku description. SkuDescription *string `json:"skuDescription,omitempty"` }
AzurePlan details of the Azure plan.
MarshalJSON is the custom marshaler for AzurePlan.
BaseClient is the base client for Billing.
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.
const ( // CategoryAffiliatePurchaseTerms ... CategoryAffiliatePurchaseTerms Category = "AffiliatePurchaseTerms" // CategoryMicrosoftCustomerAgreement ... CategoryMicrosoftCustomerAgreement Category = "MicrosoftCustomerAgreement" // CategoryOther ... CategoryOther Category = "Other" )
PossibleCategoryValues returns an array of possible values for the Category const type.
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"` }
Customer a partner's customer.
MarshalJSON is the custom marshaler for Customer.
UnmarshalJSON is the custom unmarshaler for Customer struct.
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"` }
CustomerListResult the list of customers.
func (clr CustomerListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
type CustomerListResultIterator struct {
// contains filtered or unexported fields
}
CustomerListResultIterator provides access to a complete listing of Customer values.
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.
type CustomerListResultPage struct {
// contains filtered or unexported fields
}
CustomerListResultPage contains a page of Customer values.
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.
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"` }
CustomerPolicy the customer's Policy.
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.
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"` }
CustomerPolicyProperties the properties of a customer's policy.
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"` }
CustomerProperties the properties of a customer.
func (cp CustomerProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for CustomerProperties.
type CustomersClient struct { BaseClient }
CustomersClient is the billing client provides access to billing resources for Azure subscriptions.
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.
GetResponder handles the response to the Get request. The method always closes the http.Response Body.
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.
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"` }
Department a department.
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.
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"` }
DepartmentProperties the properties of a department.
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"` }
Document the properties of a document.
DocumentSource enumerates the values for document source.
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.
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.
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"` }
DownloadURL a secure URL that can be used to download a an entity until the URL expires.
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"` }
Enrollment the properties of an enrollment.
func (e Enrollment) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Enrollment.
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"` }
EnrollmentAccount an enrollment account.
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.
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"` }
EnrollmentAccountContext the enrollment account context
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"` }
EnrollmentAccountListResult result of listing enrollment accounts.
func (ealr EnrollmentAccountListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
type EnrollmentAccountListResultIterator struct {
// contains filtered or unexported fields
}
EnrollmentAccountListResultIterator provides access to a complete listing of EnrollmentAccountSummary values.
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.
type EnrollmentAccountListResultPage struct {
// contains filtered or unexported fields
}
EnrollmentAccountListResultPage contains a page of EnrollmentAccountSummary values.
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.
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"` }
EnrollmentAccountProperties the properties of an enrollment account.
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"` }
EnrollmentAccountSummary an enrollment account resource.
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.
type EnrollmentAccountSummaryProperties struct { // PrincipalName - READ-ONLY; The account owner's principal name. PrincipalName *string `json:"principalName,omitempty"` }
EnrollmentAccountSummaryProperties the properties of the enrollment account.
type EnrollmentAccountsClient struct { BaseClient }
EnrollmentAccountsClient is the billing client provides access to billing resources for Azure subscriptions.
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.
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.
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.
ListSender sends the List request. The method will close the http.Response Body if it receives an error.
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"` }
EnrollmentPolicies the policies for Enterprise Agreement enrollments.
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"` }
ErrorDetails the details of the error.
type ErrorResponse struct { // Error - The details of the error. Error *ErrorDetails `json:"error,omitempty"` }
ErrorResponse error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.
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"` }
ErrorSubDetailsItem ...
Frequency enumerates the values for frequency.
const ( // Monthly ... Monthly Frequency = "Monthly" // OneTime ... OneTime Frequency = "OneTime" // UsageBased ... UsageBased Frequency = "UsageBased" )
PossibleFrequencyValues returns an array of possible values for the Frequency const type.
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"` }
IndirectRelationshipInfo the billing profile details of the partner of the customer for an indirect motion.
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"` }
Instruction an instruction.
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.
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"` }
InstructionListResult the list of billing instructions used during invoice generation.
func (ilr InstructionListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
type InstructionListResultIterator struct {
// contains filtered or unexported fields
}
InstructionListResultIterator provides access to a complete listing of Instruction values.
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.
type InstructionListResultPage struct {
// contains filtered or unexported fields
}
InstructionListResultPage contains a page of Instruction values.
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.
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"` }
InstructionProperties a billing instruction used during invoice generation.
type InstructionsClient struct { BaseClient }
InstructionsClient is the billing client provides access to billing resources for Azure subscriptions.
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.
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.
PutSender sends the Put request. The method will close the http.Response Body if it receives an error.
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"` }
Invoice an invoice.
MarshalJSON is the custom marshaler for Invoice.
UnmarshalJSON is the custom unmarshaler for Invoice struct.
InvoiceDocumentType enumerates the values for invoice document type.
const ( // InvoiceDocumentTypeCreditNote ... InvoiceDocumentTypeCreditNote InvoiceDocumentType = "CreditNote" // InvoiceDocumentTypeInvoice ... InvoiceDocumentTypeInvoice InvoiceDocumentType = "Invoice" )
func PossibleInvoiceDocumentTypeValues() []InvoiceDocumentType
PossibleInvoiceDocumentTypeValues returns an array of possible values for the InvoiceDocumentType const type.
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"` }
InvoiceListResult the list of invoices.
func (ilr InvoiceListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
type InvoiceListResultIterator struct {
// contains filtered or unexported fields
}
InvoiceListResultIterator provides access to a complete listing of Invoice values.
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.
type InvoiceListResultPage struct {
// contains filtered or unexported fields
}
InvoiceListResultPage contains a page of Invoice values.
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.
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"` }
InvoiceProperties the properties of the invoice.
func (IP InvoiceProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for InvoiceProperties.
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"` }
InvoiceSection an invoice section.
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.
type InvoiceSectionCreationRequest struct { // DisplayName - The name of the invoice section. DisplayName *string `json:"displayName,omitempty"` }
InvoiceSectionCreationRequest the properties of the invoice section.
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"` }
InvoiceSectionListResult the list of invoice sections.
func (islr InvoiceSectionListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
type InvoiceSectionListResultIterator struct {
// contains filtered or unexported fields
}
InvoiceSectionListResultIterator provides access to a complete listing of InvoiceSection values.
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.
type InvoiceSectionListResultPage struct {
// contains filtered or unexported fields
}
InvoiceSectionListResultPage contains a page of InvoiceSection values.
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.
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"` }
InvoiceSectionListWithCreateSubPermissionResult the list of invoice section properties with create subscription permission.
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.
type InvoiceSectionListWithCreateSubPermissionResultIterator struct {
// contains filtered or unexported fields
}
InvoiceSectionListWithCreateSubPermissionResultIterator provides access to a complete listing of InvoiceSectionWithCreateSubPermission values.
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.
type InvoiceSectionListWithCreateSubPermissionResultPage struct {
// contains filtered or unexported fields
}
InvoiceSectionListWithCreateSubPermissionResultPage contains a page of InvoiceSectionWithCreateSubPermission values.
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.
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"` }
InvoiceSectionProperties the properties of an invoice section.
func (isp InvoiceSectionProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for InvoiceSectionProperties.
InvoiceSectionState enumerates the values for invoice section state.
const ( // InvoiceSectionStateActive ... InvoiceSectionStateActive InvoiceSectionState = "Active" // InvoiceSectionStateRestricted ... InvoiceSectionStateRestricted InvoiceSectionState = "Restricted" )
func PossibleInvoiceSectionStateValues() []InvoiceSectionState
PossibleInvoiceSectionStateValues returns an array of possible values for the InvoiceSectionState const type.
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"` }
InvoiceSectionWithCreateSubPermission invoice section properties with create subscription permission.
func (iswcsp InvoiceSectionWithCreateSubPermission) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for InvoiceSectionWithCreateSubPermission.
type InvoiceSectionsClient struct { BaseClient }
InvoiceSectionsClient is the billing client provides access to billing resources for Azure subscriptions.
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.
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.
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) }
InvoiceSectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
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"` }
InvoiceSectionsOnExpand the invoice sections associated to the billing profile. By default this is not populated, unless it's specified in $expand.
func (isoe InvoiceSectionsOnExpand) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for InvoiceSectionsOnExpand.
InvoiceStatus enumerates the values for invoice status.
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.
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.
type InvoicesClient struct { BaseClient }
InvoicesClient is the billing client provides access to billing resources for Azure subscriptions.
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.
GetByIDResponder handles the response to the GetByID request. The method always closes the http.Response Body.
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.
GetResponder handles the response to the Get request. The method always closes the http.Response Body.
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.
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.
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.
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) }
InvoicesDownloadBillingSubscriptionInvoiceFuture 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) }
InvoicesDownloadInvoiceFuture 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) }
InvoicesDownloadMultipleBillingProfileInvoicesFuture 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) }
InvoicesDownloadMultipleBillingSubscriptionInvoicesFuture an abstraction for monitoring and retrieving the results of a long-running operation.
MarketplacePurchasesPolicy enumerates the values for marketplace purchases policy.
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.
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"` }
Operation a Billing REST API operation.
MarshalJSON is the custom marshaler for 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"` }
OperationDisplay the object that represents the operation.
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"` }
OperationListResult the list of billing operations and a URL link to get the next set of results.
func (olr OperationListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
type OperationListResultIterator struct {
// contains filtered or unexported fields
}
OperationListResultIterator provides access to a complete listing of Operation values.
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.
type OperationListResultPage struct {
// contains filtered or unexported fields
}
OperationListResultPage contains a page of Operation values.
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.
type OperationsClient struct { BaseClient }
OperationsClient is the billing client provides access to billing resources for Azure subscriptions.
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.
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.
ListSender sends the List request. The method will close the http.Response Body if it receives an error.
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"` }
Participants the details about a participant.
PaymentMethodFamily enumerates the values for payment method family.
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.
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"` }
PaymentProperties the properties of a payment.
func (pp PaymentProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for PaymentProperties.
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"` }
Period a billing period resource.
MarshalJSON is the custom marshaler for Period.
UnmarshalJSON is the custom unmarshaler for Period struct.
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"` }
PeriodProperties the properties of the billing period.
type PeriodsClient struct { BaseClient }
PeriodsClient is the billing client provides access to billing resources for Azure subscriptions.
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.
GetResponder handles the response to the Get request. The method always closes the http.Response Body.
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.
ListSender sends the List request. The method will close the http.Response Body if it receives an error.
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"` }
PeriodsListResult result of listing billing periods. It contains a list of available billing periods in reverse chronological order.
func (plr PeriodsListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
type PeriodsListResultIterator struct {
// contains filtered or unexported fields
}
PeriodsListResultIterator provides access to a complete listing of Period values.
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.
type PeriodsListResultPage struct {
// contains filtered or unexported fields
}
PeriodsListResultPage contains a page of Period values.
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.
type PermissionsClient struct { BaseClient }
PermissionsClient is the billing client provides access to billing resources for Azure subscriptions.
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.
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.
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"` }
PermissionsListResult result of list billingPermissions a caller has on a billing account.
func (plr PermissionsListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
type PermissionsListResultIterator struct {
// contains filtered or unexported fields
}
PermissionsListResultIterator provides access to a complete listing of PermissionsProperties values.
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.
type PermissionsListResultPage struct {
// contains filtered or unexported fields
}
PermissionsListResultPage contains a page of PermissionsProperties values.
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.
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"` }
PermissionsProperties the set of allowed action and not allowed actions a caller has on a billing account
type PoliciesClient struct { BaseClient }
PoliciesClient is the billing client provides access to billing resources for Azure subscriptions.
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.
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.
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.
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.
UpdateResponder handles the response to the Update request. The method always closes the http.Response Body.
UpdateSender sends the Update request. The method will close the http.Response Body if it receives an error.
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"` }
Policy a policy.
MarshalJSON is the custom marshaler for Policy.
UnmarshalJSON is the custom unmarshaler for Policy struct.
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"` }
PolicyProperties the properties of a policy.
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"` }
Product a product.
MarshalJSON is the custom marshaler for Product.
UnmarshalJSON is the custom unmarshaler for Product struct.
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"` }
ProductProperties the properties of a product.
func (pp ProductProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ProductProperties.
ProductStatusType enumerates the values for product status type.
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.
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.
type ProductsClient struct { BaseClient }
ProductsClient is the billing client provides access to billing resources for Azure subscriptions.
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.
GetResponder handles the response to the Get request. The method always closes the http.Response Body.
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.
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.
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.
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.
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.
MoveResponder handles the response to the Move request. The method always closes the http.Response Body.
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.
UpdateResponder handles the response to the Update request. The method always closes the http.Response Body.
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.
ValidateMoveSender sends the ValidateMove request. The method will close the http.Response Body if it receives an error.
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"` }
ProductsListResult the list of products. It contains a list of available product summaries in reverse chronological order by purchase date.
func (plr ProductsListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
type ProductsListResultIterator struct {
// contains filtered or unexported fields
}
ProductsListResultIterator provides access to a complete listing of Product values.
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.
type ProductsListResultPage struct {
// contains filtered or unexported fields
}
ProductsListResultPage contains a page of Product values.
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.
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"` }
Profile a billing profile.
MarshalJSON is the custom marshaler for Profile.
UnmarshalJSON is the custom unmarshaler for Profile struct.
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"` }
ProfileCreationRequest the request parameters for creating a new billing profile.
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"` }
ProfileListResult the list of billing profiles.
func (plr ProfileListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
type ProfileListResultIterator struct {
// contains filtered or unexported fields
}
ProfileListResultIterator provides access to a complete listing of Profile values.
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.
type ProfileListResultPage struct {
// contains filtered or unexported fields
}
ProfileListResultPage contains a page of Profile values.
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.
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"` }
ProfileProperties the properties of the billing profile.
func (pp ProfileProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ProfileProperties.
ProfileSpendingLimit enumerates the values for profile spending limit.
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.
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.
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.
type ProfilesClient struct { BaseClient }
ProfilesClient is the billing client provides access to billing resources for Azure subscriptions.
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.
GetResponder handles the response to the Get request. The method always closes the http.Response Body.
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.
ListByBillingAccountSender sends the ListByBillingAccount request. The method will close the http.Response Body if it receives an error.
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) }
ProfilesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
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"` }
ProfilesOnExpand the billing profiles associated with the billing account. By default this is not populated, unless it's specified in $expand.
func (poe ProfilesOnExpand) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ProfilesOnExpand.
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"` }
Property a billing property.
MarshalJSON is the custom marshaler for Property.
UnmarshalJSON is the custom unmarshaler for Property struct.
type PropertyClient struct { BaseClient }
PropertyClient is the billing client provides access to billing resources for Azure subscriptions.
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).
Get get the billing properties for a subscription. This operation is not supported for billing accounts with agreement type Enterprise Agreement.
GetPreparer prepares the Get request.
GetResponder handles the response to the Get request. The method always closes the http.Response Body.
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.
UpdateResponder handles the response to the Update request. The method always closes the http.Response Body.
UpdateSender sends the Update request. The method will close the http.Response Body if it receives an error.
type PropertyProperties struct { // AccountAdminNotificationEmailAddress - READ-ONLY; The email address on which the account admin gets all Azure notifications. AccountAdminNotifi