Documentation ¶
Index ¶
- type AcceptanceMode
- type Account
- type AccountListResult
- type AccountProperties
- type AccountStatus
- type AccountType
- type AccountUpdateRequest
- type AccountsClient
- func (client *AccountsClient) BeginUpdate(ctx context.Context, billingAccountName string, ...) (*runtime.Poller[AccountsClientUpdateResponse], error)
- func (client *AccountsClient) Get(ctx context.Context, billingAccountName string, ...) (AccountsClientGetResponse, error)
- func (client *AccountsClient) NewListInvoiceSectionsByCreateSubscriptionPermissionPager(billingAccountName string, ...) ...
- func (client *AccountsClient) NewListPager(options *AccountsClientListOptions) *runtime.Pager[AccountsClientListResponse]
- type AccountsClientBeginUpdateOptions
- type AccountsClientGetOptions
- type AccountsClientGetResponse
- type AccountsClientListInvoiceSectionsByCreateSubscriptionPermissionOptions
- type AccountsClientListInvoiceSectionsByCreateSubscriptionPermissionResponse
- type AccountsClientListOptions
- type AccountsClientListResponse
- type AccountsClientUpdateResponse
- type AddressClient
- type AddressClientValidateOptions
- type AddressClientValidateResponse
- type AddressDetails
- type AddressValidationStatus
- type Agreement
- type AgreementListResult
- type AgreementProperties
- type AgreementType
- type AgreementsClient
- func (client *AgreementsClient) Get(ctx context.Context, billingAccountName string, agreementName string, ...) (AgreementsClientGetResponse, error)
- func (client *AgreementsClient) NewListByBillingAccountPager(billingAccountName string, ...) *runtime.Pager[AgreementsClientListByBillingAccountResponse]
- type AgreementsClientGetOptions
- type AgreementsClientGetResponse
- type AgreementsClientListByBillingAccountOptions
- type AgreementsClientListByBillingAccountResponse
- type Amount
- type AutoRenew
- type AvailableBalance
- type AvailableBalanceProperties
- type AvailableBalancesClient
- type AvailableBalancesClientGetOptions
- type AvailableBalancesClientGetResponse
- type AzurePlan
- type BillingFrequency
- type BillingProfileSpendingLimit
- type BillingProfileStatus
- type BillingProfileStatusReasonCode
- type BillingRelationshipType
- type BillingSubscriptionStatusType
- type Category
- type Customer
- type CustomerListResult
- type CustomerPolicy
- type CustomerPolicyProperties
- type CustomerProperties
- type CustomersClient
- func (client *CustomersClient) Get(ctx context.Context, billingAccountName string, customerName string, ...) (CustomersClientGetResponse, error)
- func (client *CustomersClient) NewListByBillingAccountPager(billingAccountName string, options *CustomersClientListByBillingAccountOptions) *runtime.Pager[CustomersClientListByBillingAccountResponse]
- func (client *CustomersClient) NewListByBillingProfilePager(billingAccountName string, billingProfileName string, ...) *runtime.Pager[CustomersClientListByBillingProfileResponse]
- type CustomersClientGetOptions
- type CustomersClientGetResponse
- type CustomersClientListByBillingAccountOptions
- type CustomersClientListByBillingAccountResponse
- type CustomersClientListByBillingProfileOptions
- type CustomersClientListByBillingProfileResponse
- type Department
- type DepartmentProperties
- type Document
- type DocumentSource
- type DocumentType
- type DownloadURL
- type Enrollment
- type EnrollmentAccount
- type EnrollmentAccountContext
- type EnrollmentAccountListResult
- type EnrollmentAccountProperties
- type EnrollmentAccountSummary
- type EnrollmentAccountSummaryProperties
- type EnrollmentAccountsClient
- func (client *EnrollmentAccountsClient) Get(ctx context.Context, name string, options *EnrollmentAccountsClientGetOptions) (EnrollmentAccountsClientGetResponse, error)
- func (client *EnrollmentAccountsClient) NewListPager(options *EnrollmentAccountsClientListOptions) *runtime.Pager[EnrollmentAccountsClientListResponse]
- type EnrollmentAccountsClientGetOptions
- type EnrollmentAccountsClientGetResponse
- type EnrollmentAccountsClientListOptions
- type EnrollmentAccountsClientListResponse
- type EnrollmentPolicies
- type ErrorDetails
- type ErrorResponse
- type ErrorSubDetailsItem
- type IndirectRelationshipInfo
- type Instruction
- type InstructionListResult
- type InstructionProperties
- type InstructionsClient
- func (client *InstructionsClient) Get(ctx context.Context, billingAccountName string, billingProfileName string, ...) (InstructionsClientGetResponse, error)
- func (client *InstructionsClient) NewListByBillingProfilePager(billingAccountName string, billingProfileName string, ...) *runtime.Pager[InstructionsClientListByBillingProfileResponse]
- func (client *InstructionsClient) Put(ctx context.Context, billingAccountName string, billingProfileName string, ...) (InstructionsClientPutResponse, error)
- type InstructionsClientGetOptions
- type InstructionsClientGetResponse
- type InstructionsClientListByBillingProfileOptions
- type InstructionsClientListByBillingProfileResponse
- type InstructionsClientPutOptions
- type InstructionsClientPutResponse
- type Invoice
- type InvoiceDocumentType
- type InvoiceListResult
- type InvoiceProperties
- type InvoiceSection
- type InvoiceSectionCreationRequest
- type InvoiceSectionListResult
- type InvoiceSectionListWithCreateSubPermissionResult
- type InvoiceSectionProperties
- type InvoiceSectionState
- type InvoiceSectionWithCreateSubPermission
- type InvoiceSectionsClient
- func (client *InvoiceSectionsClient) BeginCreateOrUpdate(ctx context.Context, billingAccountName string, billingProfileName string, ...) (*runtime.Poller[InvoiceSectionsClientCreateOrUpdateResponse], error)
- func (client *InvoiceSectionsClient) Get(ctx context.Context, billingAccountName string, billingProfileName string, ...) (InvoiceSectionsClientGetResponse, error)
- func (client *InvoiceSectionsClient) NewListByBillingProfilePager(billingAccountName string, billingProfileName string, ...) *runtime.Pager[InvoiceSectionsClientListByBillingProfileResponse]
- type InvoiceSectionsClientBeginCreateOrUpdateOptions
- type InvoiceSectionsClientCreateOrUpdateResponse
- type InvoiceSectionsClientGetOptions
- type InvoiceSectionsClientGetResponse
- type InvoiceSectionsClientListByBillingProfileOptions
- type InvoiceSectionsClientListByBillingProfileResponse
- type InvoiceSectionsOnExpand
- type InvoiceStatus
- type InvoiceType
- type InvoicesClient
- func (client *InvoicesClient) BeginDownloadBillingSubscriptionInvoice(ctx context.Context, invoiceName string, downloadToken string, ...) (*runtime.Poller[InvoicesClientDownloadBillingSubscriptionInvoiceResponse], ...)
- func (client *InvoicesClient) BeginDownloadInvoice(ctx context.Context, billingAccountName string, invoiceName string, ...) (*runtime.Poller[InvoicesClientDownloadInvoiceResponse], error)
- func (client *InvoicesClient) BeginDownloadMultipleBillingProfileInvoices(ctx context.Context, billingAccountName string, downloadUrls []*string, ...) (*runtime.Poller[InvoicesClientDownloadMultipleBillingProfileInvoicesResponse], ...)
- func (client *InvoicesClient) BeginDownloadMultipleBillingSubscriptionInvoices(ctx context.Context, downloadUrls []*string, ...) (...)
- func (client *InvoicesClient) Get(ctx context.Context, billingAccountName string, invoiceName string, ...) (InvoicesClientGetResponse, error)
- func (client *InvoicesClient) GetByID(ctx context.Context, invoiceName string, options *InvoicesClientGetByIDOptions) (InvoicesClientGetByIDResponse, error)
- func (client *InvoicesClient) GetBySubscriptionAndInvoiceID(ctx context.Context, invoiceName string, ...) (InvoicesClientGetBySubscriptionAndInvoiceIDResponse, error)
- func (client *InvoicesClient) NewListByBillingAccountPager(billingAccountName string, periodStartDate string, periodEndDate string, ...) *runtime.Pager[InvoicesClientListByBillingAccountResponse]
- func (client *InvoicesClient) NewListByBillingProfilePager(billingAccountName string, billingProfileName string, periodStartDate string, ...) *runtime.Pager[InvoicesClientListByBillingProfileResponse]
- func (client *InvoicesClient) NewListByBillingSubscriptionPager(periodStartDate string, periodEndDate string, ...) *runtime.Pager[InvoicesClientListByBillingSubscriptionResponse]
- type InvoicesClientBeginDownloadBillingSubscriptionInvoiceOptions
- type InvoicesClientBeginDownloadInvoiceOptions
- type InvoicesClientBeginDownloadMultipleBillingProfileInvoicesOptions
- type InvoicesClientBeginDownloadMultipleBillingSubscriptionInvoicesOptions
- type InvoicesClientDownloadBillingSubscriptionInvoiceResponse
- type InvoicesClientDownloadInvoiceResponse
- type InvoicesClientDownloadMultipleBillingProfileInvoicesResponse
- type InvoicesClientDownloadMultipleBillingSubscriptionInvoicesResponse
- type InvoicesClientGetByIDOptions
- type InvoicesClientGetByIDResponse
- type InvoicesClientGetBySubscriptionAndInvoiceIDOptions
- type InvoicesClientGetBySubscriptionAndInvoiceIDResponse
- type InvoicesClientGetOptions
- type InvoicesClientGetResponse
- type InvoicesClientListByBillingAccountOptions
- type InvoicesClientListByBillingAccountResponse
- type InvoicesClientListByBillingProfileOptions
- type InvoicesClientListByBillingProfileResponse
- type InvoicesClientListByBillingSubscriptionOptions
- type InvoicesClientListByBillingSubscriptionResponse
- type MarketplacePurchasesPolicy
- type Operation
- type OperationDisplay
- type OperationListResult
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type OperationsErrorDetails
- type OperationsErrorResponse
- type Participants
- type PaymentMethodFamily
- type PaymentProperties
- type Period
- type PeriodProperties
- type PeriodsClient
- type PeriodsClientGetOptions
- type PeriodsClientGetResponse
- type PeriodsClientListOptions
- type PeriodsClientListResponse
- type PeriodsListResult
- type PermissionsClient
- func (client *PermissionsClient) NewListByBillingAccountPager(billingAccountName string, ...) *runtime.Pager[PermissionsClientListByBillingAccountResponse]
- func (client *PermissionsClient) NewListByBillingProfilePager(billingAccountName string, billingProfileName string, ...) *runtime.Pager[PermissionsClientListByBillingProfileResponse]
- func (client *PermissionsClient) NewListByCustomerPager(billingAccountName string, customerName string, ...) *runtime.Pager[PermissionsClientListByCustomerResponse]
- func (client *PermissionsClient) NewListByInvoiceSectionsPager(billingAccountName string, billingProfileName string, ...) *runtime.Pager[PermissionsClientListByInvoiceSectionsResponse]
- type PermissionsClientListByBillingAccountOptions
- type PermissionsClientListByBillingAccountResponse
- type PermissionsClientListByBillingProfileOptions
- type PermissionsClientListByBillingProfileResponse
- type PermissionsClientListByCustomerOptions
- type PermissionsClientListByCustomerResponse
- type PermissionsClientListByInvoiceSectionsOptions
- type PermissionsClientListByInvoiceSectionsResponse
- type PermissionsListResult
- type PermissionsProperties
- type PoliciesClient
- func (client *PoliciesClient) GetByBillingProfile(ctx context.Context, billingAccountName string, billingProfileName string, ...) (PoliciesClientGetByBillingProfileResponse, error)
- func (client *PoliciesClient) GetByCustomer(ctx context.Context, billingAccountName string, customerName string, ...) (PoliciesClientGetByCustomerResponse, error)
- func (client *PoliciesClient) Update(ctx context.Context, billingAccountName string, billingProfileName string, ...) (PoliciesClientUpdateResponse, error)
- func (client *PoliciesClient) UpdateCustomer(ctx context.Context, billingAccountName string, customerName string, ...) (PoliciesClientUpdateCustomerResponse, error)
- type PoliciesClientGetByBillingProfileOptions
- type PoliciesClientGetByBillingProfileResponse
- type PoliciesClientGetByCustomerOptions
- type PoliciesClientGetByCustomerResponse
- type PoliciesClientUpdateCustomerOptions
- type PoliciesClientUpdateCustomerResponse
- type PoliciesClientUpdateOptions
- type PoliciesClientUpdateResponse
- type Policy
- type PolicyProperties
- type Product
- type ProductProperties
- type ProductStatusType
- type ProductTransferValidationErrorCode
- type ProductsClient
- func (client *ProductsClient) Get(ctx context.Context, billingAccountName string, productName string, ...) (ProductsClientGetResponse, error)
- func (client *ProductsClient) Move(ctx context.Context, billingAccountName string, productName string, ...) (ProductsClientMoveResponse, error)
- func (client *ProductsClient) NewListByBillingAccountPager(billingAccountName string, options *ProductsClientListByBillingAccountOptions) *runtime.Pager[ProductsClientListByBillingAccountResponse]
- func (client *ProductsClient) NewListByBillingProfilePager(billingAccountName string, billingProfileName string, ...) *runtime.Pager[ProductsClientListByBillingProfileResponse]
- func (client *ProductsClient) NewListByCustomerPager(billingAccountName string, customerName string, ...) *runtime.Pager[ProductsClientListByCustomerResponse]
- func (client *ProductsClient) NewListByInvoiceSectionPager(billingAccountName string, billingProfileName string, ...) *runtime.Pager[ProductsClientListByInvoiceSectionResponse]
- func (client *ProductsClient) Update(ctx context.Context, billingAccountName string, productName string, ...) (ProductsClientUpdateResponse, error)
- func (client *ProductsClient) ValidateMove(ctx context.Context, billingAccountName string, productName string, ...) (ProductsClientValidateMoveResponse, error)
- type ProductsClientGetOptions
- type ProductsClientGetResponse
- type ProductsClientListByBillingAccountOptions
- type ProductsClientListByBillingAccountResponse
- type ProductsClientListByBillingProfileOptions
- type ProductsClientListByBillingProfileResponse
- type ProductsClientListByCustomerOptions
- type ProductsClientListByCustomerResponse
- type ProductsClientListByInvoiceSectionOptions
- type ProductsClientListByInvoiceSectionResponse
- type ProductsClientMoveOptions
- type ProductsClientMoveResponse
- type ProductsClientUpdateOptions
- type ProductsClientUpdateResponse
- type ProductsClientValidateMoveOptions
- type ProductsClientValidateMoveResponse
- type ProductsListResult
- type Profile
- type ProfileCreationRequest
- type ProfileInfo
- type ProfileListResult
- type ProfileProperties
- type ProfilesClient
- func (client *ProfilesClient) BeginCreateOrUpdate(ctx context.Context, billingAccountName string, billingProfileName string, ...) (*runtime.Poller[ProfilesClientCreateOrUpdateResponse], error)
- func (client *ProfilesClient) Get(ctx context.Context, billingAccountName string, billingProfileName string, ...) (ProfilesClientGetResponse, error)
- func (client *ProfilesClient) NewListByBillingAccountPager(billingAccountName string, options *ProfilesClientListByBillingAccountOptions) *runtime.Pager[ProfilesClientListByBillingAccountResponse]
- type ProfilesClientBeginCreateOrUpdateOptions
- type ProfilesClientCreateOrUpdateResponse
- type ProfilesClientGetOptions
- type ProfilesClientGetResponse
- type ProfilesClientListByBillingAccountOptions
- type ProfilesClientListByBillingAccountResponse
- type ProfilesOnExpand
- type Property
- type PropertyClient
- type PropertyClientGetOptions
- type PropertyClientGetResponse
- type PropertyClientUpdateOptions
- type PropertyClientUpdateResponse
- type PropertyProperties
- type RebillDetails
- type Reseller
- type Reservation
- type ReservationProperty
- type ReservationPropertyUtilization
- type ReservationPurchasesPolicy
- type ReservationSKUProperty
- type ReservationSummary
- type ReservationType
- type ReservationUtilizationAggregates
- type ReservationsClient
- func (client *ReservationsClient) NewListByBillingAccountPager(billingAccountName string, ...) *runtime.Pager[ReservationsClientListByBillingAccountResponse]
- func (client *ReservationsClient) NewListByBillingProfilePager(billingAccountName string, billingProfileName string, ...) *runtime.Pager[ReservationsClientListByBillingProfileResponse]
- type ReservationsClientListByBillingAccountOptions
- type ReservationsClientListByBillingAccountResponse
- type ReservationsClientListByBillingProfileOptions
- type ReservationsClientListByBillingProfileResponse
- type ReservationsListResult
- type Resource
- type RoleAssignment
- type RoleAssignmentListResult
- type RoleAssignmentProperties
- type RoleAssignmentsClient
- func (client *RoleAssignmentsClient) DeleteByBillingAccount(ctx context.Context, billingAccountName string, ...) (RoleAssignmentsClientDeleteByBillingAccountResponse, error)
- func (client *RoleAssignmentsClient) DeleteByBillingProfile(ctx context.Context, billingAccountName string, billingProfileName string, ...) (RoleAssignmentsClientDeleteByBillingProfileResponse, error)
- func (client *RoleAssignmentsClient) DeleteByInvoiceSection(ctx context.Context, billingAccountName string, billingProfileName string, ...) (RoleAssignmentsClientDeleteByInvoiceSectionResponse, error)
- func (client *RoleAssignmentsClient) GetByBillingAccount(ctx context.Context, billingAccountName string, ...) (RoleAssignmentsClientGetByBillingAccountResponse, error)
- func (client *RoleAssignmentsClient) GetByBillingProfile(ctx context.Context, billingAccountName string, billingProfileName string, ...) (RoleAssignmentsClientGetByBillingProfileResponse, error)
- func (client *RoleAssignmentsClient) GetByInvoiceSection(ctx context.Context, billingAccountName string, billingProfileName string, ...) (RoleAssignmentsClientGetByInvoiceSectionResponse, error)
- func (client *RoleAssignmentsClient) NewListByBillingAccountPager(billingAccountName string, ...) *runtime.Pager[RoleAssignmentsClientListByBillingAccountResponse]
- func (client *RoleAssignmentsClient) NewListByBillingProfilePager(billingAccountName string, billingProfileName string, ...) *runtime.Pager[RoleAssignmentsClientListByBillingProfileResponse]
- func (client *RoleAssignmentsClient) NewListByInvoiceSectionPager(billingAccountName string, billingProfileName string, ...) *runtime.Pager[RoleAssignmentsClientListByInvoiceSectionResponse]
- type RoleAssignmentsClientDeleteByBillingAccountOptions
- type RoleAssignmentsClientDeleteByBillingAccountResponse
- type RoleAssignmentsClientDeleteByBillingProfileOptions
- type RoleAssignmentsClientDeleteByBillingProfileResponse
- type RoleAssignmentsClientDeleteByInvoiceSectionOptions
- type RoleAssignmentsClientDeleteByInvoiceSectionResponse
- type RoleAssignmentsClientGetByBillingAccountOptions
- type RoleAssignmentsClientGetByBillingAccountResponse
- type RoleAssignmentsClientGetByBillingProfileOptions
- type RoleAssignmentsClientGetByBillingProfileResponse
- type RoleAssignmentsClientGetByInvoiceSectionOptions
- type RoleAssignmentsClientGetByInvoiceSectionResponse
- type RoleAssignmentsClientListByBillingAccountOptions
- type RoleAssignmentsClientListByBillingAccountResponse
- type RoleAssignmentsClientListByBillingProfileOptions
- type RoleAssignmentsClientListByBillingProfileResponse
- type RoleAssignmentsClientListByInvoiceSectionOptions
- type RoleAssignmentsClientListByInvoiceSectionResponse
- type RoleDefinition
- type RoleDefinitionListResult
- type RoleDefinitionProperties
- type RoleDefinitionsClient
- func (client *RoleDefinitionsClient) GetByBillingAccount(ctx context.Context, billingAccountName string, ...) (RoleDefinitionsClientGetByBillingAccountResponse, error)
- func (client *RoleDefinitionsClient) GetByBillingProfile(ctx context.Context, billingAccountName string, billingProfileName string, ...) (RoleDefinitionsClientGetByBillingProfileResponse, error)
- func (client *RoleDefinitionsClient) GetByInvoiceSection(ctx context.Context, billingAccountName string, billingProfileName string, ...) (RoleDefinitionsClientGetByInvoiceSectionResponse, error)
- func (client *RoleDefinitionsClient) NewListByBillingAccountPager(billingAccountName string, ...) *runtime.Pager[RoleDefinitionsClientListByBillingAccountResponse]
- func (client *RoleDefinitionsClient) NewListByBillingProfilePager(billingAccountName string, billingProfileName string, ...) *runtime.Pager[RoleDefinitionsClientListByBillingProfileResponse]
- func (client *RoleDefinitionsClient) NewListByInvoiceSectionPager(billingAccountName string, billingProfileName string, ...) *runtime.Pager[RoleDefinitionsClientListByInvoiceSectionResponse]
- type RoleDefinitionsClientGetByBillingAccountOptions
- type RoleDefinitionsClientGetByBillingAccountResponse
- type RoleDefinitionsClientGetByBillingProfileOptions
- type RoleDefinitionsClientGetByBillingProfileResponse
- type RoleDefinitionsClientGetByInvoiceSectionOptions
- type RoleDefinitionsClientGetByInvoiceSectionResponse
- type RoleDefinitionsClientListByBillingAccountOptions
- type RoleDefinitionsClientListByBillingAccountResponse
- type RoleDefinitionsClientListByBillingProfileOptions
- type RoleDefinitionsClientListByBillingProfileResponse
- type RoleDefinitionsClientListByInvoiceSectionOptions
- type RoleDefinitionsClientListByInvoiceSectionResponse
- type SpendingLimit
- type SpendingLimitForBillingProfile
- type StatusReasonCode
- type StatusReasonCodeForBillingProfile
- type Subscription
- type SubscriptionProperties
- type SubscriptionTransferValidationErrorCode
- type SubscriptionsClient
- func (client *SubscriptionsClient) BeginMove(ctx context.Context, billingAccountName string, ...) (*runtime.Poller[SubscriptionsClientMoveResponse], error)
- func (client *SubscriptionsClient) Get(ctx context.Context, billingAccountName string, ...) (SubscriptionsClientGetResponse, error)
- func (client *SubscriptionsClient) NewListByBillingAccountPager(billingAccountName string, ...) *runtime.Pager[SubscriptionsClientListByBillingAccountResponse]
- func (client *SubscriptionsClient) NewListByBillingProfilePager(billingAccountName string, billingProfileName string, ...) *runtime.Pager[SubscriptionsClientListByBillingProfileResponse]
- func (client *SubscriptionsClient) NewListByCustomerPager(billingAccountName string, customerName string, ...) *runtime.Pager[SubscriptionsClientListByCustomerResponse]
- func (client *SubscriptionsClient) NewListByInvoiceSectionPager(billingAccountName string, billingProfileName string, ...) *runtime.Pager[SubscriptionsClientListByInvoiceSectionResponse]
- func (client *SubscriptionsClient) Update(ctx context.Context, billingAccountName string, parameters Subscription, ...) (SubscriptionsClientUpdateResponse, error)
- func (client *SubscriptionsClient) ValidateMove(ctx context.Context, billingAccountName string, ...) (SubscriptionsClientValidateMoveResponse, error)
- type SubscriptionsClientBeginMoveOptions
- type SubscriptionsClientGetOptions
- type SubscriptionsClientGetResponse
- type SubscriptionsClientListByBillingAccountOptions
- type SubscriptionsClientListByBillingAccountResponse
- type SubscriptionsClientListByBillingProfileOptions
- type SubscriptionsClientListByBillingProfileResponse
- type SubscriptionsClientListByCustomerOptions
- type SubscriptionsClientListByCustomerResponse
- type SubscriptionsClientListByInvoiceSectionOptions
- type SubscriptionsClientListByInvoiceSectionResponse
- type SubscriptionsClientMoveResponse
- type SubscriptionsClientUpdateOptions
- type SubscriptionsClientUpdateResponse
- type SubscriptionsClientValidateMoveOptions
- type SubscriptionsClientValidateMoveResponse
- type SubscriptionsListResult
- type TargetCloud
- type Transaction
- type TransactionListResult
- type TransactionProperties
- type TransactionTypeKind
- type TransactionsClient
- type TransactionsClientListByInvoiceOptions
- type TransactionsClientListByInvoiceResponse
- type TransferBillingSubscriptionRequestProperties
- type TransferProductRequestProperties
- type ValidateAddressResponse
- type ValidateProductTransferEligibilityError
- type ValidateProductTransferEligibilityResult
- type ValidateSubscriptionTransferEligibilityError
- type ValidateSubscriptionTransferEligibilityResult
- type ViewCharges
- type ViewChargesPolicy
Examples ¶
- AccountsClient.BeginUpdate
- AccountsClient.Get
- AccountsClient.NewListInvoiceSectionsByCreateSubscriptionPermissionPager
- AccountsClient.NewListPager
- AddressClient.Validate
- AgreementsClient.Get
- AgreementsClient.NewListByBillingAccountPager
- AvailableBalancesClient.Get
- CustomersClient.Get
- CustomersClient.NewListByBillingAccountPager
- CustomersClient.NewListByBillingProfilePager
- EnrollmentAccountsClient.Get
- EnrollmentAccountsClient.NewListPager
- InstructionsClient.Get
- InstructionsClient.NewListByBillingProfilePager
- InstructionsClient.Put
- InvoiceSectionsClient.BeginCreateOrUpdate
- InvoiceSectionsClient.Get
- InvoiceSectionsClient.NewListByBillingProfilePager
- InvoicesClient.BeginDownloadBillingSubscriptionInvoice
- InvoicesClient.BeginDownloadInvoice
- InvoicesClient.BeginDownloadMultipleBillingProfileInvoices
- InvoicesClient.BeginDownloadMultipleBillingSubscriptionInvoices
- InvoicesClient.Get
- InvoicesClient.NewListByBillingAccountPager
- InvoicesClient.NewListByBillingProfilePager
- InvoicesClient.NewListByBillingSubscriptionPager
- PeriodsClient.Get
- PeriodsClient.NewListPager
- PermissionsClient.NewListByBillingAccountPager
- PermissionsClient.NewListByBillingProfilePager
- PermissionsClient.NewListByCustomerPager
- PermissionsClient.NewListByInvoiceSectionsPager
- PoliciesClient.GetByBillingProfile
- PoliciesClient.GetByCustomer
- PoliciesClient.Update
- PoliciesClient.UpdateCustomer
- ProductsClient.Get
- ProductsClient.Move
- ProductsClient.NewListByBillingAccountPager
- ProductsClient.NewListByBillingProfilePager
- ProductsClient.NewListByCustomerPager
- ProductsClient.NewListByInvoiceSectionPager
- ProductsClient.Update
- ProductsClient.ValidateMove
- ProfilesClient.BeginCreateOrUpdate
- ProfilesClient.Get
- ProfilesClient.NewListByBillingAccountPager
- PropertyClient.Get
- PropertyClient.Update
- ReservationsClient.NewListByBillingAccountPager
- ReservationsClient.NewListByBillingProfilePager
- RoleAssignmentsClient.DeleteByBillingAccount
- RoleAssignmentsClient.DeleteByBillingProfile
- RoleAssignmentsClient.DeleteByInvoiceSection
- RoleAssignmentsClient.GetByBillingAccount
- RoleAssignmentsClient.GetByBillingProfile
- RoleAssignmentsClient.GetByInvoiceSection
- RoleAssignmentsClient.NewListByBillingAccountPager
- RoleAssignmentsClient.NewListByBillingProfilePager
- RoleAssignmentsClient.NewListByInvoiceSectionPager
- RoleDefinitionsClient.GetByBillingAccount
- RoleDefinitionsClient.GetByBillingProfile
- RoleDefinitionsClient.GetByInvoiceSection
- RoleDefinitionsClient.NewListByBillingAccountPager
- RoleDefinitionsClient.NewListByBillingProfilePager
- RoleDefinitionsClient.NewListByInvoiceSectionPager
- SubscriptionsClient.BeginMove
- SubscriptionsClient.Get
- SubscriptionsClient.NewListByBillingAccountPager
- SubscriptionsClient.NewListByBillingProfilePager
- SubscriptionsClient.NewListByCustomerPager
- SubscriptionsClient.NewListByInvoiceSectionPager
- SubscriptionsClient.Update
- SubscriptionsClient.ValidateMove
- TransactionsClient.NewListByInvoicePager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AcceptanceMode ¶
type AcceptanceMode string
AcceptanceMode - The mode of acceptance for an agreement.
const ( AcceptanceModeClickToAccept AcceptanceMode = "ClickToAccept" AcceptanceModeESignEmbedded AcceptanceMode = "ESignEmbedded" AcceptanceModeESignOffline AcceptanceMode = "ESignOffline" )
func PossibleAcceptanceModeValues ¶
func PossibleAcceptanceModeValues() []AcceptanceMode
PossibleAcceptanceModeValues returns the possible values for the AcceptanceMode const type.
type Account ¶ added in v0.2.0
type Account struct { // The properties of the billing account. Properties *AccountProperties `json:"properties,omitempty"` // READ-ONLY; Resource Id. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
Account - A billing account.
type AccountListResult ¶ added in v0.2.0
type AccountListResult struct { // READ-ONLY; The link (url) to the next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; The list of billing accounts. Value []*Account `json:"value,omitempty" azure:"ro"` }
AccountListResult - The list of billing accounts.
type AccountProperties ¶ added in v0.2.0
type AccountProperties struct { // 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"` // The departments associated to the enrollment. Departments []*Department `json:"departments,omitempty"` // The billing account name. DisplayName *string `json:"displayName,omitempty"` // The accounts associated to the enrollment. EnrollmentAccounts []*EnrollmentAccount `json:"enrollmentAccounts,omitempty"` // Notification email address, only for legacy accounts NotificationEmailAddress *string `json:"notificationEmailAddress,omitempty"` // The address of the individual or organization that is responsible for the billing account. SoldTo *AddressDetails `json:"soldTo,omitempty"` // READ-ONLY; The current status of the billing account. AccountStatus *AccountStatus `json:"accountStatus,omitempty" azure:"ro"` // READ-ONLY; The type of customer. AccountType *AccountType `json:"accountType,omitempty" azure:"ro"` // READ-ONLY; The type of agreement. AgreementType *AgreementType `json:"agreementType,omitempty" azure:"ro"` // 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" azure:"ro"` // READ-ONLY; Indicates whether user has read access to the billing account. HasReadAccess *bool `json:"hasReadAccess,omitempty" azure:"ro"` }
AccountProperties - The properties of the billing account.
func (AccountProperties) MarshalJSON ¶ added in v0.2.0
func (a AccountProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccountProperties.
type AccountStatus ¶
type AccountStatus string
AccountStatus - The current status of the billing account.
const ( AccountStatusActive AccountStatus = "Active" AccountStatusDeleted AccountStatus = "Deleted" AccountStatusDisabled AccountStatus = "Disabled" AccountStatusExpired AccountStatus = "Expired" AccountStatusExtended AccountStatus = "Extended" AccountStatusTerminated AccountStatus = "Terminated" AccountStatusTransferred AccountStatus = "Transferred" )
func PossibleAccountStatusValues ¶
func PossibleAccountStatusValues() []AccountStatus
PossibleAccountStatusValues returns the possible values for the AccountStatus const type.
type AccountType ¶
type AccountType string
AccountType - The type of customer.
const ( AccountTypeEnterprise AccountType = "Enterprise" AccountTypeIndividual AccountType = "Individual" AccountTypePartner AccountType = "Partner" )
func PossibleAccountTypeValues ¶
func PossibleAccountTypeValues() []AccountType
PossibleAccountTypeValues returns the possible values for the AccountType const type.
type AccountUpdateRequest ¶ added in v0.2.0
type AccountUpdateRequest struct { // A billing property. Properties *AccountProperties `json:"properties,omitempty"` }
AccountUpdateRequest - The request properties of the billing account that can be updated.
func (AccountUpdateRequest) MarshalJSON ¶ added in v0.2.0
func (a AccountUpdateRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AccountUpdateRequest.
type AccountsClient ¶ added in v0.2.0
type AccountsClient struct {
// contains filtered or unexported fields
}
AccountsClient contains the methods for the BillingAccounts group. Don't use this type directly, use NewAccountsClient() instead.
func NewAccountsClient ¶ added in v0.2.0
func NewAccountsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*AccountsClient, error)
NewAccountsClient creates a new instance of AccountsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*AccountsClient) BeginUpdate ¶ added in v0.2.0
func (client *AccountsClient) BeginUpdate(ctx context.Context, billingAccountName string, parameters AccountUpdateRequest, options *AccountsClientBeginUpdateOptions) (*runtime.Poller[AccountsClientUpdateResponse], error)
BeginUpdate - 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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. parameters - Request parameters that are provided to the update billing account operation. options - AccountsClientBeginUpdateOptions contains the optional parameters for the AccountsClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/UpdateBillingAccount.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewAccountsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginUpdate(ctx, "{billingAccountName}", armbilling.AccountUpdateRequest{ Properties: &armbilling.AccountProperties{ DisplayName: to.Ptr("Test Account"), SoldTo: &armbilling.AddressDetails{ AddressLine1: to.Ptr("Test Address 1"), City: to.Ptr("Redmond"), CompanyName: to.Ptr("Contoso"), Country: to.Ptr("US"), FirstName: to.Ptr("Test"), LastName: to.Ptr("User"), PostalCode: to.Ptr("12345"), Region: to.Ptr("WA"), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
func (*AccountsClient) Get ¶ added in v0.2.0
func (client *AccountsClient) Get(ctx context.Context, billingAccountName string, options *AccountsClientGetOptions) (AccountsClientGetResponse, error)
Get - Gets a billing account by its ID. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. options - AccountsClientGetOptions contains the optional parameters for the AccountsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingAccountWithExpand.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewAccountsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "{billingAccountName}", &armbilling.AccountsClientGetOptions{Expand: to.Ptr("soldTo,billingProfiles,billingProfiles/invoiceSections")}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*AccountsClient) NewListInvoiceSectionsByCreateSubscriptionPermissionPager ¶ added in v0.4.0
func (client *AccountsClient) NewListInvoiceSectionsByCreateSubscriptionPermissionPager(billingAccountName string, options *AccountsClientListInvoiceSectionsByCreateSubscriptionPermissionOptions) *runtime.Pager[AccountsClientListInvoiceSectionsByCreateSubscriptionPermissionResponse]
NewListInvoiceSectionsByCreateSubscriptionPermissionPager - 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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. options - AccountsClientListInvoiceSectionsByCreateSubscriptionPermissionOptions contains the optional parameters for the AccountsClient.ListInvoiceSectionsByCreateSubscriptionPermission method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/InvoiceSectionsListWithCreateSubPermission.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewAccountsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListInvoiceSectionsByCreateSubscriptionPermissionPager("{billingAccountName}", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*AccountsClient) NewListPager ¶ added in v0.4.0
func (client *AccountsClient) NewListPager(options *AccountsClientListOptions) *runtime.Pager[AccountsClientListResponse]
NewListPager - Lists the billing accounts that a user has access to. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 options - AccountsClientListOptions contains the optional parameters for the AccountsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingAccountsList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewAccountsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager(&armbilling.AccountsClientListOptions{Expand: nil}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type AccountsClientBeginUpdateOptions ¶ added in v0.2.0
type AccountsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
AccountsClientBeginUpdateOptions contains the optional parameters for the AccountsClient.BeginUpdate method.
type AccountsClientGetOptions ¶ added in v0.2.0
type AccountsClientGetOptions struct { // May be used to expand the soldTo, invoice sections and billing profiles. Expand *string }
AccountsClientGetOptions contains the optional parameters for the AccountsClient.Get method.
type AccountsClientGetResponse ¶ added in v0.2.0
type AccountsClientGetResponse struct {
Account
}
AccountsClientGetResponse contains the response from method AccountsClient.Get.
type AccountsClientListInvoiceSectionsByCreateSubscriptionPermissionOptions ¶ added in v0.2.0
type AccountsClientListInvoiceSectionsByCreateSubscriptionPermissionOptions struct { }
AccountsClientListInvoiceSectionsByCreateSubscriptionPermissionOptions contains the optional parameters for the AccountsClient.ListInvoiceSectionsByCreateSubscriptionPermission method.
type AccountsClientListInvoiceSectionsByCreateSubscriptionPermissionResponse ¶ added in v0.2.0
type AccountsClientListInvoiceSectionsByCreateSubscriptionPermissionResponse struct {
InvoiceSectionListWithCreateSubPermissionResult
}
AccountsClientListInvoiceSectionsByCreateSubscriptionPermissionResponse contains the response from method AccountsClient.ListInvoiceSectionsByCreateSubscriptionPermission.
type AccountsClientListOptions ¶ added in v0.2.0
type AccountsClientListOptions struct { // May be used to expand the soldTo, invoice sections and billing profiles. Expand *string }
AccountsClientListOptions contains the optional parameters for the AccountsClient.List method.
type AccountsClientListResponse ¶ added in v0.2.0
type AccountsClientListResponse struct {
AccountListResult
}
AccountsClientListResponse contains the response from method AccountsClient.List.
type AccountsClientUpdateResponse ¶ added in v0.2.0
type AccountsClientUpdateResponse struct {
Account
}
AccountsClientUpdateResponse contains the response from method AccountsClient.Update.
type AddressClient ¶
type AddressClient struct {
// contains filtered or unexported fields
}
AddressClient contains the methods for the Address group. Don't use this type directly, use NewAddressClient() instead.
func NewAddressClient ¶
func NewAddressClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*AddressClient, error)
NewAddressClient creates a new instance of AddressClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*AddressClient) Validate ¶
func (client *AddressClient) Validate(ctx context.Context, address AddressDetails, options *AddressClientValidateOptions) (AddressClientValidateResponse, error)
Validate - Validates an address. Use the operation to validate an address before using it as soldTo or a billTo address. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 options - AddressClientValidateOptions contains the optional parameters for the AddressClient.Validate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/AddressInvalid.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewAddressClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Validate(ctx, armbilling.AddressDetails{ AddressLine1: to.Ptr("1 Test"), City: to.Ptr("bellevue"), Country: to.Ptr("us"), PostalCode: to.Ptr("12345"), Region: to.Ptr("wa"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
type AddressClientValidateOptions ¶ added in v0.2.0
type AddressClientValidateOptions struct { }
AddressClientValidateOptions contains the optional parameters for the AddressClient.Validate method.
type AddressClientValidateResponse ¶ added in v0.2.0
type AddressClientValidateResponse struct {
ValidateAddressResponse
}
AddressClientValidateResponse contains the response from method AddressClient.Validate.
type AddressDetails ¶
type AddressDetails struct { // REQUIRED; Address line 1. AddressLine1 *string `json:"addressLine1,omitempty"` // REQUIRED; Country code uses ISO2, 2-digit format. Country *string `json:"country,omitempty"` // Address line 2. AddressLine2 *string `json:"addressLine2,omitempty"` // Address line 3. AddressLine3 *string `json:"addressLine3,omitempty"` // Address city. City *string `json:"city,omitempty"` // Company name. CompanyName *string `json:"companyName,omitempty"` // Address district. District *string `json:"district,omitempty"` // Email address. Email *string `json:"email,omitempty"` // First name. FirstName *string `json:"firstName,omitempty"` // Last name. LastName *string `json:"lastName,omitempty"` // Middle name. MiddleName *string `json:"middleName,omitempty"` // Phone number. PhoneNumber *string `json:"phoneNumber,omitempty"` // Postal code. PostalCode *string `json:"postalCode,omitempty"` // Address region. Region *string `json:"region,omitempty"` }
AddressDetails - Address details.
type AddressValidationStatus ¶
type AddressValidationStatus string
AddressValidationStatus - Status of the address validation.
const ( AddressValidationStatusInvalid AddressValidationStatus = "Invalid" AddressValidationStatusValid AddressValidationStatus = "Valid" )
func PossibleAddressValidationStatusValues ¶
func PossibleAddressValidationStatusValues() []AddressValidationStatus
PossibleAddressValidationStatusValues returns the possible values for the AddressValidationStatus const type.
type Agreement ¶
type Agreement struct { // The properties of an agreement. Properties *AgreementProperties `json:"properties,omitempty"` // READ-ONLY; Resource Id. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
Agreement - An agreement.
type AgreementListResult ¶
type AgreementListResult struct { // READ-ONLY; The link (url) to the next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; The list of agreements. Value []*Agreement `json:"value,omitempty" azure:"ro"` }
AgreementListResult - Result of listing agreements.
type AgreementProperties ¶
type AgreementProperties struct { // The list of participants that participates in acceptance of an agreement. Participants []*Participants `json:"participants,omitempty"` // READ-ONLY; The mode of acceptance for an agreement. AcceptanceMode *AcceptanceMode `json:"acceptanceMode,omitempty" azure:"ro"` // READ-ONLY; The URL to download the agreement. AgreementLink *string `json:"agreementLink,omitempty" azure:"ro"` // READ-ONLY; The list of billing profiles associated with agreement and present only for specific agreements. BillingProfileInfo *ProfileInfo `json:"billingProfileInfo,omitempty" azure:"ro"` // READ-ONLY; The category of the agreement signed by a customer. Category *Category `json:"category,omitempty" azure:"ro"` // READ-ONLY; The date from which the agreement is effective. EffectiveDate *time.Time `json:"effectiveDate,omitempty" azure:"ro"` // READ-ONLY; The date when the agreement expires. ExpirationDate *time.Time `json:"expirationDate,omitempty" azure:"ro"` // READ-ONLY; The current status of the agreement. Status *string `json:"status,omitempty" azure:"ro"` }
AgreementProperties - The properties of an agreement.
func (AgreementProperties) MarshalJSON ¶
func (a AgreementProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AgreementProperties.
func (*AgreementProperties) UnmarshalJSON ¶
func (a *AgreementProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AgreementProperties.
type AgreementType ¶
type AgreementType string
AgreementType - The type of agreement.
const ( AgreementTypeEnterpriseAgreement AgreementType = "EnterpriseAgreement" AgreementTypeMicrosoftCustomerAgreement AgreementType = "MicrosoftCustomerAgreement" AgreementTypeMicrosoftOnlineServicesProgram AgreementType = "MicrosoftOnlineServicesProgram" AgreementTypeMicrosoftPartnerAgreement AgreementType = "MicrosoftPartnerAgreement" )
func PossibleAgreementTypeValues ¶
func PossibleAgreementTypeValues() []AgreementType
PossibleAgreementTypeValues returns the possible values for the AgreementType const type.
type AgreementsClient ¶
type AgreementsClient struct {
// contains filtered or unexported fields
}
AgreementsClient contains the methods for the Agreements group. Don't use this type directly, use NewAgreementsClient() instead.
func NewAgreementsClient ¶
func NewAgreementsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*AgreementsClient, error)
NewAgreementsClient creates a new instance of AgreementsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*AgreementsClient) Get ¶
func (client *AgreementsClient) Get(ctx context.Context, billingAccountName string, agreementName string, options *AgreementsClientGetOptions) (AgreementsClientGetResponse, error)
Get - Gets an agreement by ID. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. agreementName - The ID that uniquely identifies an agreement. options - AgreementsClientGetOptions contains the optional parameters for the AgreementsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/AgreementByName.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewAgreementsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "{billingAccountName}", "{agreementName}", &armbilling.AgreementsClientGetOptions{Expand: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*AgreementsClient) NewListByBillingAccountPager ¶ added in v0.4.0
func (client *AgreementsClient) NewListByBillingAccountPager(billingAccountName string, options *AgreementsClientListByBillingAccountOptions) *runtime.Pager[AgreementsClientListByBillingAccountResponse]
NewListByBillingAccountPager - Lists the agreements for a billing account. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. options - AgreementsClientListByBillingAccountOptions contains the optional parameters for the AgreementsClient.ListByBillingAccount method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/AgreementsListByBillingAccount.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewAgreementsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByBillingAccountPager("{billingAccountName}", &armbilling.AgreementsClientListByBillingAccountOptions{Expand: nil}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type AgreementsClientGetOptions ¶ added in v0.2.0
type AgreementsClientGetOptions struct { // May be used to expand the participants. Expand *string }
AgreementsClientGetOptions contains the optional parameters for the AgreementsClient.Get method.
type AgreementsClientGetResponse ¶ added in v0.2.0
type AgreementsClientGetResponse struct {
Agreement
}
AgreementsClientGetResponse contains the response from method AgreementsClient.Get.
type AgreementsClientListByBillingAccountOptions ¶ added in v0.2.0
type AgreementsClientListByBillingAccountOptions struct { // May be used to expand the participants. Expand *string }
AgreementsClientListByBillingAccountOptions contains the optional parameters for the AgreementsClient.ListByBillingAccount method.
type AgreementsClientListByBillingAccountResponse ¶ added in v0.2.0
type AgreementsClientListByBillingAccountResponse struct {
AgreementListResult
}
AgreementsClientListByBillingAccountResponse contains the response from method AgreementsClient.ListByBillingAccount.
type Amount ¶
type Amount struct { // Amount value. Value *float32 `json:"value,omitempty"` // READ-ONLY; The currency for the amount value. Currency *string `json:"currency,omitempty" azure:"ro"` }
Amount - The amount.
type AutoRenew ¶
type AutoRenew string
AutoRenew - Indicates whether auto renewal is turned on or off for a product.
func PossibleAutoRenewValues ¶
func PossibleAutoRenewValues() []AutoRenew
PossibleAutoRenewValues returns the possible values for the AutoRenew const type.
type AvailableBalance ¶
type AvailableBalance struct { // The properties of available balance. Properties *AvailableBalanceProperties `json:"properties,omitempty"` // READ-ONLY; Resource Id. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
AvailableBalance - The latest Azure credit balance. This is the balance available for pay now.
type AvailableBalanceProperties ¶
type AvailableBalanceProperties struct { // READ-ONLY; Balance amount. Amount *Amount `json:"amount,omitempty" azure:"ro"` }
AvailableBalanceProperties - The properties of available balance.
type AvailableBalancesClient ¶
type AvailableBalancesClient struct {
// contains filtered or unexported fields
}
AvailableBalancesClient contains the methods for the AvailableBalances group. Don't use this type directly, use NewAvailableBalancesClient() instead.
func NewAvailableBalancesClient ¶
func NewAvailableBalancesClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*AvailableBalancesClient, error)
NewAvailableBalancesClient creates a new instance of AvailableBalancesClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*AvailableBalancesClient) Get ¶
func (client *AvailableBalancesClient) Get(ctx context.Context, billingAccountName string, billingProfileName string, options *AvailableBalancesClientGetOptions) (AvailableBalancesClientGetResponse, 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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. billingProfileName - The ID that uniquely identifies a billing profile. options - AvailableBalancesClientGetOptions contains the optional parameters for the AvailableBalancesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/AvailableBalanceByBillingProfile.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewAvailableBalancesClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "{billingAccountName}", "{billingProfileName}", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
type AvailableBalancesClientGetOptions ¶ added in v0.2.0
type AvailableBalancesClientGetOptions struct { }
AvailableBalancesClientGetOptions contains the optional parameters for the AvailableBalancesClient.Get method.
type AvailableBalancesClientGetResponse ¶ added in v0.2.0
type AvailableBalancesClientGetResponse struct {
AvailableBalance
}
AvailableBalancesClientGetResponse contains the response from method AvailableBalancesClient.Get.
type AzurePlan ¶
type AzurePlan struct { // The sku id. SKUID *string `json:"skuId,omitempty"` // READ-ONLY; The sku description. SKUDescription *string `json:"skuDescription,omitempty" azure:"ro"` }
AzurePlan - Details of the Azure plan.
type BillingFrequency ¶
type BillingFrequency string
BillingFrequency - The frequency at which the product will be billed.
const ( BillingFrequencyMonthly BillingFrequency = "Monthly" BillingFrequencyOneTime BillingFrequency = "OneTime" BillingFrequencyUsageBased BillingFrequency = "UsageBased" )
func PossibleBillingFrequencyValues ¶
func PossibleBillingFrequencyValues() []BillingFrequency
PossibleBillingFrequencyValues returns the possible values for the BillingFrequency const type.
type BillingProfileSpendingLimit ¶
type BillingProfileSpendingLimit string
BillingProfileSpendingLimit - The billing profile spending limit.
const ( BillingProfileSpendingLimitOff BillingProfileSpendingLimit = "Off" BillingProfileSpendingLimitOn BillingProfileSpendingLimit = "On" )
func PossibleBillingProfileSpendingLimitValues ¶
func PossibleBillingProfileSpendingLimitValues() []BillingProfileSpendingLimit
PossibleBillingProfileSpendingLimitValues returns the possible values for the BillingProfileSpendingLimit const type.
type BillingProfileStatus ¶
type BillingProfileStatus string
BillingProfileStatus - The status of the billing profile.
const ( BillingProfileStatusActive BillingProfileStatus = "Active" BillingProfileStatusDisabled BillingProfileStatus = "Disabled" BillingProfileStatusWarned BillingProfileStatus = "Warned" )
func PossibleBillingProfileStatusValues ¶
func PossibleBillingProfileStatusValues() []BillingProfileStatus
PossibleBillingProfileStatusValues returns the possible values for the BillingProfileStatus const type.
type BillingProfileStatusReasonCode ¶
type BillingProfileStatusReasonCode string
BillingProfileStatusReasonCode - Reason for the specified billing profile status.
const ( BillingProfileStatusReasonCodePastDue BillingProfileStatusReasonCode = "PastDue" BillingProfileStatusReasonCodeSpendingLimitExpired BillingProfileStatusReasonCode = "SpendingLimitExpired" BillingProfileStatusReasonCodeSpendingLimitReached BillingProfileStatusReasonCode = "SpendingLimitReached" )
func PossibleBillingProfileStatusReasonCodeValues ¶
func PossibleBillingProfileStatusReasonCodeValues() []BillingProfileStatusReasonCode
PossibleBillingProfileStatusReasonCodeValues returns the possible values for the BillingProfileStatusReasonCode const type.
type BillingRelationshipType ¶
type BillingRelationshipType string
BillingRelationshipType - Identifies which services and purchases are paid by a billing profile.
const ( BillingRelationshipTypeCSPPartner BillingRelationshipType = "CSPPartner" BillingRelationshipTypeDirect BillingRelationshipType = "Direct" BillingRelationshipTypeIndirectCustomer BillingRelationshipType = "IndirectCustomer" BillingRelationshipTypeIndirectPartner BillingRelationshipType = "IndirectPartner" )
func PossibleBillingRelationshipTypeValues ¶
func PossibleBillingRelationshipTypeValues() []BillingRelationshipType
PossibleBillingRelationshipTypeValues returns the possible values for the BillingRelationshipType const type.
type BillingSubscriptionStatusType ¶
type BillingSubscriptionStatusType string
BillingSubscriptionStatusType - The current billing status of the subscription.
const ( BillingSubscriptionStatusTypeAbandoned BillingSubscriptionStatusType = "Abandoned" BillingSubscriptionStatusTypeActive BillingSubscriptionStatusType = "Active" BillingSubscriptionStatusTypeDeleted BillingSubscriptionStatusType = "Deleted" BillingSubscriptionStatusTypeInactive BillingSubscriptionStatusType = "Inactive" BillingSubscriptionStatusTypeWarning BillingSubscriptionStatusType = "Warning" )
func PossibleBillingSubscriptionStatusTypeValues ¶
func PossibleBillingSubscriptionStatusTypeValues() []BillingSubscriptionStatusType
PossibleBillingSubscriptionStatusTypeValues returns the possible values for the BillingSubscriptionStatusType const type.
type Category ¶
type Category string
Category - The category of the agreement signed by a customer.
func PossibleCategoryValues ¶
func PossibleCategoryValues() []Category
PossibleCategoryValues returns the possible values for the Category const type.
type Customer ¶
type Customer struct { // The customer. Properties *CustomerProperties `json:"properties,omitempty"` // READ-ONLY; Resource Id. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
Customer - A partner's customer.
type CustomerListResult ¶
type CustomerListResult struct { // READ-ONLY; The link (url) to the next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Total number of records. TotalCount *int32 `json:"totalCount,omitempty" azure:"ro"` // READ-ONLY; The list of customers. Value []*Customer `json:"value,omitempty" azure:"ro"` }
CustomerListResult - The list of customers.
type CustomerPolicy ¶
type CustomerPolicy struct { // The properties of a customer's policy. Properties *CustomerPolicyProperties `json:"properties,omitempty"` // READ-ONLY; Resource Id. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
CustomerPolicy - The customer's Policy.
type CustomerPolicyProperties ¶
type CustomerPolicyProperties struct { // The policy that controls whether the users in customer's organization can view charges at pay-as-you-go prices. ViewCharges *ViewCharges `json:"viewCharges,omitempty"` }
CustomerPolicyProperties - The properties of a customer's policy.
type CustomerProperties ¶
type CustomerProperties struct { // The name of the customer. DisplayName *string `json:"displayName,omitempty"` // Azure plans enabled for the customer. EnabledAzurePlans []*AzurePlan `json:"enabledAzurePlans,omitempty"` // The list of resellers for which an Azure plan is enabled for the customer. Resellers []*Reseller `json:"resellers,omitempty"` // READ-ONLY; The name of the billing profile for the invoice section. BillingProfileDisplayName *string `json:"billingProfileDisplayName,omitempty" azure:"ro"` // READ-ONLY; The ID of the billing profile for the invoice section. BillingProfileID *string `json:"billingProfileId,omitempty" azure:"ro"` }
CustomerProperties - The properties of a customer.
func (CustomerProperties) MarshalJSON ¶
func (c CustomerProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CustomerProperties.
type CustomersClient ¶
type CustomersClient struct {
// contains filtered or unexported fields
}
CustomersClient contains the methods for the Customers group. Don't use this type directly, use NewCustomersClient() instead.
func NewCustomersClient ¶
func NewCustomersClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*CustomersClient, error)
NewCustomersClient creates a new instance of CustomersClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*CustomersClient) Get ¶
func (client *CustomersClient) Get(ctx context.Context, billingAccountName string, customerName string, options *CustomersClientGetOptions) (CustomersClientGetResponse, error)
Get - Gets a customer by its ID. The operation is supported only for billing accounts with agreement type Microsoft Partner Agreement. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. customerName - The ID that uniquely identifies a customer. options - CustomersClientGetOptions contains the optional parameters for the CustomersClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/Customer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewCustomersClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "{billingAccountName}", "{customerName}", &armbilling.CustomersClientGetOptions{Expand: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*CustomersClient) NewListByBillingAccountPager ¶ added in v0.4.0
func (client *CustomersClient) NewListByBillingAccountPager(billingAccountName string, options *CustomersClientListByBillingAccountOptions) *runtime.Pager[CustomersClientListByBillingAccountResponse]
NewListByBillingAccountPager - Lists the customers that are billed to a billing account. The operation is supported only for billing accounts with agreement type Microsoft Partner Agreement. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. options - CustomersClientListByBillingAccountOptions contains the optional parameters for the CustomersClient.ListByBillingAccount method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/CustomersListByBillingAccount.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewCustomersClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByBillingAccountPager("{billingAccountName}", &armbilling.CustomersClientListByBillingAccountOptions{Search: nil, Filter: nil, }) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*CustomersClient) NewListByBillingProfilePager ¶ added in v0.4.0
func (client *CustomersClient) NewListByBillingProfilePager(billingAccountName string, billingProfileName string, options *CustomersClientListByBillingProfileOptions) *runtime.Pager[CustomersClientListByBillingProfileResponse]
NewListByBillingProfilePager - Lists the customers that are billed to a billing profile. The operation is supported only for billing accounts with agreement type Microsoft Partner Agreement. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. billingProfileName - The ID that uniquely identifies a billing profile. options - CustomersClientListByBillingProfileOptions contains the optional parameters for the CustomersClient.ListByBillingProfile method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/CustomersListByBillingProfile.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewCustomersClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByBillingProfilePager("{billingAccountName}", "{billingProfileName}", &armbilling.CustomersClientListByBillingProfileOptions{Search: nil, Filter: nil, }) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type CustomersClientGetOptions ¶ added in v0.2.0
type CustomersClientGetOptions struct { // May be used to expand enabledAzurePlans and resellers Expand *string }
CustomersClientGetOptions contains the optional parameters for the CustomersClient.Get method.
type CustomersClientGetResponse ¶ added in v0.2.0
type CustomersClientGetResponse struct {
Customer
}
CustomersClientGetResponse contains the response from method CustomersClient.Get.
type CustomersClientListByBillingAccountOptions ¶ added in v0.2.0
type CustomersClientListByBillingAccountOptions struct { // May be used to filter the list of customers. Filter *string // Used for searching customers by their name. Any customer with name containing the search text will be included in the response Search *string }
CustomersClientListByBillingAccountOptions contains the optional parameters for the CustomersClient.ListByBillingAccount method.
type CustomersClientListByBillingAccountResponse ¶ added in v0.2.0
type CustomersClientListByBillingAccountResponse struct {
CustomerListResult
}
CustomersClientListByBillingAccountResponse contains the response from method CustomersClient.ListByBillingAccount.
type CustomersClientListByBillingProfileOptions ¶ added in v0.2.0
type CustomersClientListByBillingProfileOptions struct { // May be used to filter the list of customers. Filter *string // Used for searching customers by their name. Any customer with name containing the search text will be included in the response Search *string }
CustomersClientListByBillingProfileOptions contains the optional parameters for the CustomersClient.ListByBillingProfile method.
type CustomersClientListByBillingProfileResponse ¶ added in v0.2.0
type CustomersClientListByBillingProfileResponse struct {
CustomerListResult
}
CustomersClientListByBillingProfileResponse contains the response from method CustomersClient.ListByBillingProfile.
type Department ¶
type Department struct { // A department. Properties *DepartmentProperties `json:"properties,omitempty"` // READ-ONLY; Resource Id. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
Department - A department.
type DepartmentProperties ¶
type DepartmentProperties struct { // The cost center associated with the department. CostCenter *string `json:"costCenter,omitempty"` // The name of the department. DepartmentName *string `json:"departmentName,omitempty"` // Associated enrollment accounts. By default this is not populated, unless it's specified in $expand. EnrollmentAccounts []*EnrollmentAccount `json:"enrollmentAccounts,omitempty"` // The status of the department. Status *string `json:"status,omitempty"` }
DepartmentProperties - The properties of a department.
func (DepartmentProperties) MarshalJSON ¶
func (d DepartmentProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DepartmentProperties.
type Document ¶
type Document struct { // READ-ONLY; The type of the document. Kind *DocumentType `json:"kind,omitempty" azure:"ro"` // READ-ONLY; The source of the document. ENF for Brazil and DRS for rest of the world. Source *DocumentSource `json:"source,omitempty" azure:"ro"` // READ-ONLY; Document URL. URL *string `json:"url,omitempty" azure:"ro"` }
Document - The properties of a document.
type DocumentSource ¶
type DocumentSource string
DocumentSource - The source of the document. ENF for Brazil and DRS for rest of the world.
const ( DocumentSourceDRS DocumentSource = "DRS" DocumentSourceENF DocumentSource = "ENF" )
func PossibleDocumentSourceValues ¶
func PossibleDocumentSourceValues() []DocumentSource
PossibleDocumentSourceValues returns the possible values for the DocumentSource const type.
type DocumentType ¶
type DocumentType string
DocumentType - The type of the document.
const ( DocumentTypeCreditNote DocumentType = "CreditNote" DocumentTypeInvoice DocumentType = "Invoice" DocumentTypeTaxReceipt DocumentType = "TaxReceipt" DocumentTypeVoidNote DocumentType = "VoidNote" )
func PossibleDocumentTypeValues ¶
func PossibleDocumentTypeValues() []DocumentType
PossibleDocumentTypeValues returns the possible values for the DocumentType const type.
type DownloadURL ¶
type DownloadURL struct { // READ-ONLY; The time in UTC when the download URL will expire. ExpiryTime *time.Time `json:"expiryTime,omitempty" azure:"ro"` // READ-ONLY; The URL to the PDF file. URL *string `json:"url,omitempty" azure:"ro"` }
DownloadURL - A secure URL that can be used to download a an entity until the URL expires.
func (*DownloadURL) UnmarshalJSON ¶
func (d *DownloadURL) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DownloadURL.
type Enrollment ¶
type Enrollment struct { // The end date of the enrollment. EndDate *time.Time `json:"endDate,omitempty"` // The start date of the enrollment. StartDate *time.Time `json:"startDate,omitempty"` // READ-ONLY; The billing cycle for the enrollment. BillingCycle *string `json:"billingCycle,omitempty" azure:"ro"` // READ-ONLY; The channel type of the enrollment. Channel *string `json:"channel,omitempty" azure:"ro"` // READ-ONLY; The country code of the enrollment. CountryCode *string `json:"countryCode,omitempty" azure:"ro"` // READ-ONLY; The billing currency for the enrollment. Currency *string `json:"currency,omitempty" azure:"ro"` // READ-ONLY; The language for the enrollment. Language *string `json:"language,omitempty" azure:"ro"` // READ-ONLY; The policies for Enterprise Agreement enrollments. Policies *EnrollmentPolicies `json:"policies,omitempty" azure:"ro"` // READ-ONLY; The current status of the enrollment. Status *string `json:"status,omitempty" azure:"ro"` }
Enrollment - The properties of an enrollment.
func (Enrollment) MarshalJSON ¶
func (e Enrollment) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type Enrollment.
func (*Enrollment) UnmarshalJSON ¶
func (e *Enrollment) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type Enrollment.
type EnrollmentAccount ¶
type EnrollmentAccount struct { // The properties of an enrollment account. Properties *EnrollmentAccountProperties `json:"properties,omitempty"` // READ-ONLY; Resource Id. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
EnrollmentAccount - An enrollment account.
type EnrollmentAccountContext ¶
type EnrollmentAccountContext struct { // The cost center associated with the enrollment account. CostCenter *string `json:"costCenter,omitempty"` // The end date of the enrollment account. EndDate *time.Time `json:"endDate,omitempty"` // The ID of the enrollment account. EnrollmentAccountName *string `json:"enrollmentAccountName,omitempty"` // The start date of the enrollment account. StartDate *time.Time `json:"startDate,omitempty"` }
EnrollmentAccountContext - The enrollment account context
func (*EnrollmentAccountContext) UnmarshalJSON ¶
func (e *EnrollmentAccountContext) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EnrollmentAccountContext.
type EnrollmentAccountListResult ¶
type EnrollmentAccountListResult struct { // READ-ONLY; The link (url) to the next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; The list of enrollment accounts. Value []*EnrollmentAccountSummary `json:"value,omitempty" azure:"ro"` }
EnrollmentAccountListResult - Result of listing enrollment accounts.
type EnrollmentAccountProperties ¶
type EnrollmentAccountProperties struct { // The name of the enrollment account. AccountName *string `json:"accountName,omitempty"` // The owner of the enrollment account. AccountOwner *string `json:"accountOwner,omitempty"` // The enrollment account owner email address. AccountOwnerEmail *string `json:"accountOwnerEmail,omitempty"` // The cost center associated with the enrollment account. CostCenter *string `json:"costCenter,omitempty"` // Associated department. By default this is not populated, unless it's specified in $expand. Department *Department `json:"department,omitempty"` // The end date of the enrollment account. EndDate *time.Time `json:"endDate,omitempty"` // The start date of the enrollment account. StartDate *time.Time `json:"startDate,omitempty"` // The status of the enrollment account. Status *string `json:"status,omitempty"` }
EnrollmentAccountProperties - The properties of an enrollment account.
func (EnrollmentAccountProperties) MarshalJSON ¶
func (e EnrollmentAccountProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EnrollmentAccountProperties.
func (*EnrollmentAccountProperties) UnmarshalJSON ¶
func (e *EnrollmentAccountProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EnrollmentAccountProperties.
type EnrollmentAccountSummary ¶
type EnrollmentAccountSummary struct { // An enrollment account. Properties *EnrollmentAccountSummaryProperties `json:"properties,omitempty"` // READ-ONLY; Resource Id. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
EnrollmentAccountSummary - An enrollment account resource.
type EnrollmentAccountSummaryProperties ¶
type EnrollmentAccountSummaryProperties struct { // READ-ONLY; The account owner's principal name. PrincipalName *string `json:"principalName,omitempty" azure:"ro"` }
EnrollmentAccountSummaryProperties - The properties of the enrollment account.
type EnrollmentAccountsClient ¶
type EnrollmentAccountsClient struct {
// contains filtered or unexported fields
}
EnrollmentAccountsClient contains the methods for the EnrollmentAccounts group. Don't use this type directly, use NewEnrollmentAccountsClient() instead.
func NewEnrollmentAccountsClient ¶
func NewEnrollmentAccountsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*EnrollmentAccountsClient, error)
NewEnrollmentAccountsClient creates a new instance of EnrollmentAccountsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*EnrollmentAccountsClient) Get ¶
func (client *EnrollmentAccountsClient) Get(ctx context.Context, name string, options *EnrollmentAccountsClientGetOptions) (EnrollmentAccountsClientGetResponse, error)
Get - Gets a enrollment account by name. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2018-03-01-preview name - Enrollment Account name. options - EnrollmentAccountsClientGetOptions contains the optional parameters for the EnrollmentAccountsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/EnrollmentAccountsGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewEnrollmentAccountsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "e1bf1c8c-5ac6-44a0-bdcd-aa7c1cf60556", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*EnrollmentAccountsClient) NewListPager ¶ added in v0.4.0
func (client *EnrollmentAccountsClient) NewListPager(options *EnrollmentAccountsClientListOptions) *runtime.Pager[EnrollmentAccountsClientListResponse]
NewListPager - Lists the enrollment accounts the caller has access to. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2018-03-01-preview options - EnrollmentAccountsClientListOptions contains the optional parameters for the EnrollmentAccountsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/EnrollmentAccountsList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewEnrollmentAccountsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type EnrollmentAccountsClientGetOptions ¶ added in v0.2.0
type EnrollmentAccountsClientGetOptions struct { }
EnrollmentAccountsClientGetOptions contains the optional parameters for the EnrollmentAccountsClient.Get method.
type EnrollmentAccountsClientGetResponse ¶ added in v0.2.0
type EnrollmentAccountsClientGetResponse struct {
EnrollmentAccountSummary
}
EnrollmentAccountsClientGetResponse contains the response from method EnrollmentAccountsClient.Get.
type EnrollmentAccountsClientListOptions ¶ added in v0.2.0
type EnrollmentAccountsClientListOptions struct { }
EnrollmentAccountsClientListOptions contains the optional parameters for the EnrollmentAccountsClient.List method.
type EnrollmentAccountsClientListResponse ¶ added in v0.2.0
type EnrollmentAccountsClientListResponse struct {
EnrollmentAccountListResult
}
EnrollmentAccountsClientListResponse contains the response from method EnrollmentAccountsClient.List.
type EnrollmentPolicies ¶
type EnrollmentPolicies struct { // READ-ONLY; The policy that controls whether Account Owners can view charges. AccountOwnerViewCharges *bool `json:"accountOwnerViewCharges,omitempty" azure:"ro"` // READ-ONLY; The policy that controls whether Department Administrators can view charges. DepartmentAdminViewCharges *bool `json:"departmentAdminViewCharges,omitempty" azure:"ro"` // READ-ONLY; The policy that controls whether Azure marketplace purchases are allowed in the enrollment. MarketplaceEnabled *bool `json:"marketplaceEnabled,omitempty" azure:"ro"` // READ-ONLY; The policy that controls whether Azure reservation purchases are allowed in the enrollment. ReservedInstancesEnabled *bool `json:"reservedInstancesEnabled,omitempty" azure:"ro"` }
EnrollmentPolicies - The policies for Enterprise Agreement enrollments.
type ErrorDetails ¶
type ErrorDetails struct { // READ-ONLY; Error code. Code *string `json:"code,omitempty" azure:"ro"` // READ-ONLY; The sub details of the error. Details []*ErrorSubDetailsItem `json:"details,omitempty" azure:"ro"` // READ-ONLY; Error message indicating why the operation failed. Message *string `json:"message,omitempty" azure:"ro"` // READ-ONLY; The target of the particular error. Target *string `json:"target,omitempty" azure:"ro"` }
ErrorDetails - The details of the error.
type ErrorResponse ¶
type ErrorResponse struct { // 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 ¶
type ErrorSubDetailsItem struct { // READ-ONLY; Error code. Code *string `json:"code,omitempty" azure:"ro"` // READ-ONLY; Error message indicating why the operation failed. Message *string `json:"message,omitempty" azure:"ro"` // READ-ONLY; The target of the particular error. Target *string `json:"target,omitempty" azure:"ro"` }
type IndirectRelationshipInfo ¶
type IndirectRelationshipInfo struct { // The billing account name of the partner or the customer for an indirect motion. BillingAccountName *string `json:"billingAccountName,omitempty"` // The billing profile name of the partner or the customer for an indirect motion. BillingProfileName *string `json:"billingProfileName,omitempty"` // 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 ¶
type Instruction struct { // A billing instruction used during invoice generation. Properties *InstructionProperties `json:"properties,omitempty"` // READ-ONLY; Resource Id. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
Instruction - An instruction.
type InstructionListResult ¶
type InstructionListResult struct { // READ-ONLY; The link (url) to the next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; The list of billing instructions used during invoice generation. Value []*Instruction `json:"value,omitempty" azure:"ro"` }
InstructionListResult - The list of billing instructions used during invoice generation.
type InstructionProperties ¶
type InstructionProperties struct { // REQUIRED; The amount budgeted for this billing instruction. Amount *float32 `json:"amount,omitempty"` // REQUIRED; The date this billing instruction is no longer in effect. EndDate *time.Time `json:"endDate,omitempty"` // REQUIRED; The date this billing instruction goes into effect. StartDate *time.Time `json:"startDate,omitempty"` // The date this billing instruction was created. CreationDate *time.Time `json:"creationDate,omitempty"` }
InstructionProperties - A billing instruction used during invoice generation.
func (InstructionProperties) MarshalJSON ¶
func (i InstructionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type InstructionProperties.
func (*InstructionProperties) UnmarshalJSON ¶
func (i *InstructionProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type InstructionProperties.
type InstructionsClient ¶
type InstructionsClient struct {
// contains filtered or unexported fields
}
InstructionsClient contains the methods for the Instructions group. Don't use this type directly, use NewInstructionsClient() instead.
func NewInstructionsClient ¶
func NewInstructionsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*InstructionsClient, error)
NewInstructionsClient creates a new instance of InstructionsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*InstructionsClient) Get ¶
func (client *InstructionsClient) Get(ctx context.Context, billingAccountName string, billingProfileName string, instructionName string, options *InstructionsClientGetOptions) (InstructionsClientGetResponse, error)
Get - Get the instruction by name. These are custom billing instructions and are only applicable for certain customers. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. billingProfileName - The ID that uniquely identifies a billing profile. instructionName - Instruction Name. options - InstructionsClientGetOptions contains the optional parameters for the InstructionsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/Instruction.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewInstructionsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "{billingAccountName}", "{billingProfileName}", "{instructionName}", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*InstructionsClient) NewListByBillingProfilePager ¶ added in v0.4.0
func (client *InstructionsClient) NewListByBillingProfilePager(billingAccountName string, billingProfileName string, options *InstructionsClientListByBillingProfileOptions) *runtime.Pager[InstructionsClientListByBillingProfileResponse]
NewListByBillingProfilePager - Lists the instructions by billing profile id. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. billingProfileName - The ID that uniquely identifies a billing profile. options - InstructionsClientListByBillingProfileOptions contains the optional parameters for the InstructionsClient.ListByBillingProfile method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/InstructionsListByBillingProfile.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewInstructionsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByBillingProfilePager("{billingAccountName}", "{billingProfileName}", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*InstructionsClient) Put ¶
func (client *InstructionsClient) Put(ctx context.Context, billingAccountName string, billingProfileName string, instructionName string, parameters Instruction, options *InstructionsClientPutOptions) (InstructionsClientPutResponse, error)
Put - Creates or updates an instruction. These are custom billing instructions and are only applicable for certain customers. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 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. options - InstructionsClientPutOptions contains the optional parameters for the InstructionsClient.Put method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/PutInstruction.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewInstructionsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Put(ctx, "{billingAccountName}", "{billingProfileName}", "{instructionName}", armbilling.Instruction{ Properties: &armbilling.InstructionProperties{ Amount: to.Ptr[float32](5000), EndDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-30T21:26:47.997Z"); return t }()), StartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-30T21:26:47.997Z"); return t }()), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
type InstructionsClientGetOptions ¶ added in v0.2.0
type InstructionsClientGetOptions struct { }
InstructionsClientGetOptions contains the optional parameters for the InstructionsClient.Get method.
type InstructionsClientGetResponse ¶ added in v0.2.0
type InstructionsClientGetResponse struct {
Instruction
}
InstructionsClientGetResponse contains the response from method InstructionsClient.Get.
type InstructionsClientListByBillingProfileOptions ¶ added in v0.2.0
type InstructionsClientListByBillingProfileOptions struct { }
InstructionsClientListByBillingProfileOptions contains the optional parameters for the InstructionsClient.ListByBillingProfile method.
type InstructionsClientListByBillingProfileResponse ¶ added in v0.2.0
type InstructionsClientListByBillingProfileResponse struct {
InstructionListResult
}
InstructionsClientListByBillingProfileResponse contains the response from method InstructionsClient.ListByBillingProfile.
type InstructionsClientPutOptions ¶ added in v0.2.0
type InstructionsClientPutOptions struct { }
InstructionsClientPutOptions contains the optional parameters for the InstructionsClient.Put method.
type InstructionsClientPutResponse ¶ added in v0.2.0
type InstructionsClientPutResponse struct {
Instruction
}
InstructionsClientPutResponse contains the response from method InstructionsClient.Put.
type Invoice ¶
type Invoice struct { // An invoice. Properties *InvoiceProperties `json:"properties,omitempty"` // READ-ONLY; Resource Id. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
Invoice - An invoice.
type InvoiceDocumentType ¶
type InvoiceDocumentType string
InvoiceDocumentType - The type of the document.
const ( InvoiceDocumentTypeCreditNote InvoiceDocumentType = "CreditNote" InvoiceDocumentTypeInvoice InvoiceDocumentType = "Invoice" )
func PossibleInvoiceDocumentTypeValues ¶
func PossibleInvoiceDocumentTypeValues() []InvoiceDocumentType
PossibleInvoiceDocumentTypeValues returns the possible values for the InvoiceDocumentType const type.
type InvoiceListResult ¶
type InvoiceListResult struct { // READ-ONLY; The link (url) to the next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Total number of records. TotalCount *int32 `json:"totalCount,omitempty" azure:"ro"` // READ-ONLY; The list of invoices. Value []*Invoice `json:"value,omitempty" azure:"ro"` }
InvoiceListResult - The list of invoices.
type InvoiceProperties ¶
type InvoiceProperties struct { // READ-ONLY; The amount due as of now. AmountDue *Amount `json:"amountDue,omitempty" azure:"ro"` // 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" azure:"ro"` // READ-ONLY; The total charges for the invoice billing period. BilledAmount *Amount `json:"billedAmount,omitempty" azure:"ro"` // 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" azure:"ro"` // READ-ONLY; The name of the billing profile for which the invoice is generated. BillingProfileDisplayName *string `json:"billingProfileDisplayName,omitempty" azure:"ro"` // READ-ONLY; The ID of the billing profile for which the invoice is generated. BillingProfileID *string `json:"billingProfileId,omitempty" azure:"ro"` // 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" azure:"ro"` // 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" azure:"ro"` // READ-ONLY; The type of the document. DocumentType *InvoiceDocumentType `json:"documentType,omitempty" azure:"ro"` // READ-ONLY; List of documents available to download such as invoice and tax receipt. Documents []*Document `json:"documents,omitempty" azure:"ro"` // READ-ONLY; The due date for the invoice. DueDate *time.Time `json:"dueDate,omitempty" azure:"ro"` // 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" azure:"ro"` // READ-ONLY; The date when the invoice was generated. InvoiceDate *time.Time `json:"invoiceDate,omitempty" azure:"ro"` // READ-ONLY; The end date of the billing period for which the invoice is generated. InvoicePeriodEndDate *time.Time `json:"invoicePeriodEndDate,omitempty" azure:"ro"` // READ-ONLY; The start date of the billing period for which the invoice is generated. InvoicePeriodStartDate *time.Time `json:"invoicePeriodStartDate,omitempty" azure:"ro"` // READ-ONLY; Invoice type. InvoiceType *InvoiceType `json:"invoiceType,omitempty" azure:"ro"` // 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" azure:"ro"` // READ-ONLY; List of payments. Payments []*PaymentProperties `json:"payments,omitempty" azure:"ro"` // READ-ONLY; An optional purchase order number for the invoice. PurchaseOrderNumber *string `json:"purchaseOrderNumber,omitempty" azure:"ro"` // READ-ONLY; Rebill details for an invoice. RebillDetails map[string]*RebillDetails `json:"rebillDetails,omitempty" azure:"ro"` // READ-ONLY; The current status of the invoice. Status *InvoiceStatus `json:"status,omitempty" azure:"ro"` // 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" azure:"ro"` // READ-ONLY; The ID of the subscription for which the invoice is generated. SubscriptionID *string `json:"subscriptionId,omitempty" azure:"ro"` // 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" azure:"ro"` // 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" azure:"ro"` }
InvoiceProperties - The properties of the invoice.
func (InvoiceProperties) MarshalJSON ¶
func (i InvoiceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type InvoiceProperties.
func (*InvoiceProperties) UnmarshalJSON ¶
func (i *InvoiceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type InvoiceProperties.
type InvoiceSection ¶
type InvoiceSection struct { // The properties of an invoice section. Properties *InvoiceSectionProperties `json:"properties,omitempty"` // READ-ONLY; Resource Id. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
InvoiceSection - An invoice section.
type InvoiceSectionCreationRequest ¶
type InvoiceSectionCreationRequest struct { // The name of the invoice section. DisplayName *string `json:"displayName,omitempty"` }
InvoiceSectionCreationRequest - The properties of the invoice section.
type InvoiceSectionListResult ¶
type InvoiceSectionListResult struct { // READ-ONLY; The link (url) to the next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Total number of records. TotalCount *int32 `json:"totalCount,omitempty" azure:"ro"` // READ-ONLY; The list of invoice sections. Value []*InvoiceSection `json:"value,omitempty" azure:"ro"` }
InvoiceSectionListResult - The list of invoice sections.
type InvoiceSectionListWithCreateSubPermissionResult ¶
type InvoiceSectionListWithCreateSubPermissionResult struct { // The list of invoice section properties with create subscription permission. Value []*InvoiceSectionWithCreateSubPermission `json:"value,omitempty"` // READ-ONLY; The link (url) to the next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` }
InvoiceSectionListWithCreateSubPermissionResult - The list of invoice section properties with create subscription permission.
type InvoiceSectionProperties ¶
type InvoiceSectionProperties struct { // The name of the invoice section. DisplayName *string `json:"displayName,omitempty"` // Dictionary of metadata associated with the invoice section. Labels map[string]*string `json:"labels,omitempty"` // Dictionary of metadata associated with the invoice section. Maximum key/value length supported of 256 characters. Keys/value // should not empty value nor null. Keys can not contain < > % & \ ? / Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Identifies the state of an invoice section. State *InvoiceSectionState `json:"state,omitempty" azure:"ro"` // READ-ONLY; The system generated unique identifier for an invoice section. SystemID *string `json:"systemId,omitempty" azure:"ro"` // 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. TargetCloud *TargetCloud `json:"targetCloud,omitempty" azure:"ro"` }
InvoiceSectionProperties - The properties of an invoice section.
func (InvoiceSectionProperties) MarshalJSON ¶
func (i InvoiceSectionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type InvoiceSectionProperties.
type InvoiceSectionState ¶
type InvoiceSectionState string
InvoiceSectionState - Identifies the state of an invoice section.
const ( InvoiceSectionStateActive InvoiceSectionState = "Active" InvoiceSectionStateRestricted InvoiceSectionState = "Restricted" )
func PossibleInvoiceSectionStateValues ¶
func PossibleInvoiceSectionStateValues() []InvoiceSectionState
PossibleInvoiceSectionStateValues returns the possible values for the InvoiceSectionState const type.
type InvoiceSectionWithCreateSubPermission ¶
type InvoiceSectionWithCreateSubPermission struct { // Enabled azure plans for the associated billing profile. EnabledAzurePlans []*AzurePlan `json:"enabledAzurePlans,omitempty"` // READ-ONLY; The name of the billing profile for the invoice section. BillingProfileDisplayName *string `json:"billingProfileDisplayName,omitempty" azure:"ro"` // READ-ONLY; The ID of the billing profile for the invoice section. BillingProfileID *string `json:"billingProfileId,omitempty" azure:"ro"` // READ-ONLY; The billing profile spending limit. BillingProfileSpendingLimit *SpendingLimitForBillingProfile `json:"billingProfileSpendingLimit,omitempty" azure:"ro"` // READ-ONLY; The status of the billing profile. BillingProfileStatus *BillingProfileStatus `json:"billingProfileStatus,omitempty" azure:"ro"` // READ-ONLY; Reason for the specified billing profile status. BillingProfileStatusReasonCode *StatusReasonCodeForBillingProfile `json:"billingProfileStatusReasonCode,omitempty" azure:"ro"` // READ-ONLY; The system generated unique identifier for a billing profile. BillingProfileSystemID *string `json:"billingProfileSystemId,omitempty" azure:"ro"` // READ-ONLY; The name of the invoice section. InvoiceSectionDisplayName *string `json:"invoiceSectionDisplayName,omitempty" azure:"ro"` // READ-ONLY; The ID of the invoice section. InvoiceSectionID *string `json:"invoiceSectionId,omitempty" azure:"ro"` // READ-ONLY; The system generated unique identifier for an invoice section. InvoiceSectionSystemID *string `json:"invoiceSectionSystemId,omitempty" azure:"ro"` }
InvoiceSectionWithCreateSubPermission - Invoice section properties with create subscription permission.
type InvoiceSectionsClient ¶
type InvoiceSectionsClient struct {
// contains filtered or unexported fields
}
InvoiceSectionsClient contains the methods for the InvoiceSections group. Don't use this type directly, use NewInvoiceSectionsClient() instead.
func NewInvoiceSectionsClient ¶
func NewInvoiceSectionsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*InvoiceSectionsClient, error)
NewInvoiceSectionsClient creates a new instance of InvoiceSectionsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*InvoiceSectionsClient) BeginCreateOrUpdate ¶
func (client *InvoiceSectionsClient) BeginCreateOrUpdate(ctx context.Context, billingAccountName string, billingProfileName string, invoiceSectionName string, parameters InvoiceSection, options *InvoiceSectionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[InvoiceSectionsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates an invoice section. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 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. options - InvoiceSectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the InvoiceSectionsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/PutInvoiceSection.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewInvoiceSectionsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, "{billingAccountName}", "{billingProfileName}", "{invoiceSectionName}", armbilling.InvoiceSection{ Properties: &armbilling.InvoiceSectionProperties{ DisplayName: to.Ptr("invoiceSection1"), Labels: map[string]*string{ "costCategory": to.Ptr("Support"), "pcCode": to.Ptr("A123456"), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
func (*InvoiceSectionsClient) Get ¶
func (client *InvoiceSectionsClient) Get(ctx context.Context, billingAccountName string, billingProfileName string, invoiceSectionName string, options *InvoiceSectionsClientGetOptions) (InvoiceSectionsClientGetResponse, error)
Get - Gets an invoice section by its ID. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 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. options - InvoiceSectionsClientGetOptions contains the optional parameters for the InvoiceSectionsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/InvoiceSection.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewInvoiceSectionsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "{billingAccountName}", "{billingProfileName}", "{invoiceSectionName}", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*InvoiceSectionsClient) NewListByBillingProfilePager ¶ added in v0.4.0
func (client *InvoiceSectionsClient) NewListByBillingProfilePager(billingAccountName string, billingProfileName string, options *InvoiceSectionsClientListByBillingProfileOptions) *runtime.Pager[InvoiceSectionsClientListByBillingProfileResponse]
NewListByBillingProfilePager - Lists the invoice sections that a user has access to. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. billingProfileName - The ID that uniquely identifies a billing profile. options - InvoiceSectionsClientListByBillingProfileOptions contains the optional parameters for the InvoiceSectionsClient.ListByBillingProfile method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/InvoiceSectionsListByBillingProfile.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewInvoiceSectionsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByBillingProfilePager("{billingAccountName}", "{billingProfileName}", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type InvoiceSectionsClientBeginCreateOrUpdateOptions ¶ added in v0.2.0
type InvoiceSectionsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
InvoiceSectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the InvoiceSectionsClient.BeginCreateOrUpdate method.
type InvoiceSectionsClientCreateOrUpdateResponse ¶ added in v0.2.0
type InvoiceSectionsClientCreateOrUpdateResponse struct {
InvoiceSection
}
InvoiceSectionsClientCreateOrUpdateResponse contains the response from method InvoiceSectionsClient.CreateOrUpdate.
type InvoiceSectionsClientGetOptions ¶ added in v0.2.0
type InvoiceSectionsClientGetOptions struct { }
InvoiceSectionsClientGetOptions contains the optional parameters for the InvoiceSectionsClient.Get method.
type InvoiceSectionsClientGetResponse ¶ added in v0.2.0
type InvoiceSectionsClientGetResponse struct {
InvoiceSection
}
InvoiceSectionsClientGetResponse contains the response from method InvoiceSectionsClient.Get.
type InvoiceSectionsClientListByBillingProfileOptions ¶ added in v0.2.0
type InvoiceSectionsClientListByBillingProfileOptions struct { }
InvoiceSectionsClientListByBillingProfileOptions contains the optional parameters for the InvoiceSectionsClient.ListByBillingProfile method.
type InvoiceSectionsClientListByBillingProfileResponse ¶ added in v0.2.0
type InvoiceSectionsClientListByBillingProfileResponse struct {
InvoiceSectionListResult
}
InvoiceSectionsClientListByBillingProfileResponse contains the response from method InvoiceSectionsClient.ListByBillingProfile.
type InvoiceSectionsOnExpand ¶
type InvoiceSectionsOnExpand struct { // The invoice sections associated to the billing profile. Value []*InvoiceSection `json:"value,omitempty"` // 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" azure:"ro"` }
InvoiceSectionsOnExpand - The invoice sections associated to the billing profile. By default this is not populated, unless it's specified in $expand.
func (InvoiceSectionsOnExpand) MarshalJSON ¶
func (i InvoiceSectionsOnExpand) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type InvoiceSectionsOnExpand.
type InvoiceStatus ¶
type InvoiceStatus string
InvoiceStatus - The current status of the invoice.
const ( InvoiceStatusDue InvoiceStatus = "Due" InvoiceStatusOverDue InvoiceStatus = "OverDue" InvoiceStatusPaid InvoiceStatus = "Paid" InvoiceStatusVoid InvoiceStatus = "Void" )
func PossibleInvoiceStatusValues ¶
func PossibleInvoiceStatusValues() []InvoiceStatus
PossibleInvoiceStatusValues returns the possible values for the InvoiceStatus const type.
type InvoiceType ¶
type InvoiceType string
InvoiceType - Invoice type.
const ( InvoiceTypeAzureMarketplace InvoiceType = "AzureMarketplace" InvoiceTypeAzureService InvoiceType = "AzureService" InvoiceTypeAzureSupport InvoiceType = "AzureSupport" )
func PossibleInvoiceTypeValues ¶
func PossibleInvoiceTypeValues() []InvoiceType
PossibleInvoiceTypeValues returns the possible values for the InvoiceType const type.
type InvoicesClient ¶
type InvoicesClient struct {
// contains filtered or unexported fields
}
InvoicesClient contains the methods for the Invoices group. Don't use this type directly, use NewInvoicesClient() instead.
func NewInvoicesClient ¶
func NewInvoicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*InvoicesClient, error)
NewInvoicesClient creates a new instance of InvoicesClient with the specified values. subscriptionID - The ID that uniquely identifies an Azure subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*InvoicesClient) BeginDownloadBillingSubscriptionInvoice ¶
func (client *InvoicesClient) BeginDownloadBillingSubscriptionInvoice(ctx context.Context, invoiceName string, downloadToken string, options *InvoicesClientBeginDownloadBillingSubscriptionInvoiceOptions) (*runtime.Poller[InvoicesClientDownloadBillingSubscriptionInvoiceResponse], error)
BeginDownloadBillingSubscriptionInvoice - Gets a URL to download an invoice. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 invoiceName - The ID that uniquely identifies an invoice. downloadToken - Download token with document source and document ID. options - InvoicesClientBeginDownloadBillingSubscriptionInvoiceOptions contains the optional parameters for the InvoicesClient.BeginDownloadBillingSubscriptionInvoice method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingSubscriptionInvoiceDownload.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewInvoicesClient("{subscriptionId}", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDownloadBillingSubscriptionInvoice(ctx, "{invoiceName}", "DRS_12345", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
func (*InvoicesClient) BeginDownloadInvoice ¶
func (client *InvoicesClient) BeginDownloadInvoice(ctx context.Context, billingAccountName string, invoiceName string, downloadToken string, options *InvoicesClientBeginDownloadInvoiceOptions) (*runtime.Poller[InvoicesClientDownloadInvoiceResponse], error)
BeginDownloadInvoice - Gets a URL to download an invoice. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 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. options - InvoicesClientBeginDownloadInvoiceOptions contains the optional parameters for the InvoicesClient.BeginDownloadInvoice method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/ModernInvoiceDownload.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewInvoicesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDownloadInvoice(ctx, "{billingAccountName}", "{invoiceName}", "DRS_12345", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
func (*InvoicesClient) BeginDownloadMultipleBillingProfileInvoices ¶
func (client *InvoicesClient) BeginDownloadMultipleBillingProfileInvoices(ctx context.Context, billingAccountName string, downloadUrls []*string, options *InvoicesClientBeginDownloadMultipleBillingProfileInvoicesOptions) (*runtime.Poller[InvoicesClientDownloadMultipleBillingProfileInvoicesResponse], error)
BeginDownloadMultipleBillingProfileInvoices - 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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. downloadUrls - An array of download urls for individual documents options - InvoicesClientBeginDownloadMultipleBillingProfileInvoicesOptions contains the optional parameters for the InvoicesClient.BeginDownloadMultipleBillingProfileInvoices method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/MultipleModernInvoiceDownload.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewInvoicesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDownloadMultipleBillingProfileInvoices(ctx, "{billingAccountName}", []*string{ to.Ptr("https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/download?downloadToken={downloadToken}&useCache=True&api-version=2020-05-01"), to.Ptr("https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/download?downloadToken={downloadToken}&useCache=True&api-version=2020-05-01"), to.Ptr("https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/download?downloadToken={downloadToken}&useCache=True&api-version=2020-05-01")}, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
func (*InvoicesClient) BeginDownloadMultipleBillingSubscriptionInvoices ¶
func (client *InvoicesClient) BeginDownloadMultipleBillingSubscriptionInvoices(ctx context.Context, downloadUrls []*string, options *InvoicesClientBeginDownloadMultipleBillingSubscriptionInvoicesOptions) (*runtime.Poller[InvoicesClientDownloadMultipleBillingSubscriptionInvoicesResponse], error)
BeginDownloadMultipleBillingSubscriptionInvoices - Gets a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 downloadUrls - An array of download urls for individual documents options - InvoicesClientBeginDownloadMultipleBillingSubscriptionInvoicesOptions contains the optional parameters for the InvoicesClient.BeginDownloadMultipleBillingSubscriptionInvoices method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/MultipleBillingSubscriptionInvoiceDownload.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewInvoicesClient("{subscriptionId}", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDownloadMultipleBillingSubscriptionInvoices(ctx, []*string{ to.Ptr("https://management.azure.com/providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/{subscriptionId}/invoices/{invoiceName}/download?downloadToken={downloadToken}&useCache=True&api-version=2020-05-01"), to.Ptr("https://management.azure.com/providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/{subscriptionId}/invoices/{invoiceName}/download?downloadToken={downloadToken}&useCache=True&api-version=2020-05-01"), to.Ptr("https://management.azure.com/providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/{subscriptionId}/invoices/{invoiceName}/download?downloadToken={downloadToken}&useCache=True&api-version=2020-05-01")}, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
func (*InvoicesClient) Get ¶
func (client *InvoicesClient) Get(ctx context.Context, billingAccountName string, invoiceName string, options *InvoicesClientGetOptions) (InvoicesClientGetResponse, 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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. invoiceName - The ID that uniquely identifies an invoice. options - InvoicesClientGetOptions contains the optional parameters for the InvoicesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/CreditNote.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewInvoicesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "{billingAccountName}", "{invoiceName}", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*InvoicesClient) GetByID ¶
func (client *InvoicesClient) GetByID(ctx context.Context, invoiceName string, options *InvoicesClientGetByIDOptions) (InvoicesClientGetByIDResponse, error)
GetByID - Gets an invoice by ID. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 invoiceName - The ID that uniquely identifies an invoice. options - InvoicesClientGetByIDOptions contains the optional parameters for the InvoicesClient.GetByID method.
func (*InvoicesClient) GetBySubscriptionAndInvoiceID ¶
func (client *InvoicesClient) GetBySubscriptionAndInvoiceID(ctx context.Context, invoiceName string, options *InvoicesClientGetBySubscriptionAndInvoiceIDOptions) (InvoicesClientGetBySubscriptionAndInvoiceIDResponse, error)
GetBySubscriptionAndInvoiceID - Gets an invoice by subscription ID and invoice ID. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 invoiceName - The ID that uniquely identifies an invoice. options - InvoicesClientGetBySubscriptionAndInvoiceIDOptions contains the optional parameters for the InvoicesClient.GetBySubscriptionAndInvoiceID method.
func (*InvoicesClient) NewListByBillingAccountPager ¶ added in v0.4.0
func (client *InvoicesClient) NewListByBillingAccountPager(billingAccountName string, periodStartDate string, periodEndDate string, options *InvoicesClientListByBillingAccountOptions) *runtime.Pager[InvoicesClientListByBillingAccountResponse]
NewListByBillingAccountPager - 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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 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. options - InvoicesClientListByBillingAccountOptions contains the optional parameters for the InvoicesClient.ListByBillingAccount method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingAccountInvoicesList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewInvoicesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByBillingAccountPager("{billingAccountName}", "2018-01-01", "2018-06-30", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*InvoicesClient) NewListByBillingProfilePager ¶ added in v0.4.0
func (client *InvoicesClient) NewListByBillingProfilePager(billingAccountName string, billingProfileName string, periodStartDate string, periodEndDate string, options *InvoicesClientListByBillingProfileOptions) *runtime.Pager[InvoicesClientListByBillingProfileResponse]
NewListByBillingProfilePager - 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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 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. options - InvoicesClientListByBillingProfileOptions contains the optional parameters for the InvoicesClient.ListByBillingProfile method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/InvoicesListByBillingProfile.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewInvoicesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByBillingProfilePager("{billingAccountName}", "{billingProfileName}", "2018-01-01", "2018-06-30", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*InvoicesClient) NewListByBillingSubscriptionPager ¶ added in v0.4.0
func (client *InvoicesClient) NewListByBillingSubscriptionPager(periodStartDate string, periodEndDate string, options *InvoicesClientListByBillingSubscriptionOptions) *runtime.Pager[InvoicesClientListByBillingSubscriptionResponse]
NewListByBillingSubscriptionPager - Lists the invoices for a subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 periodStartDate - Invoice period start date. periodEndDate - Invoice period end date. options - InvoicesClientListByBillingSubscriptionOptions contains the optional parameters for the InvoicesClient.ListByBillingSubscription method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingSubscriptionInvoicesList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewInvoicesClient("{subscriptionId}", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByBillingSubscriptionPager("2018-01-01", "2018-06-30", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type InvoicesClientBeginDownloadBillingSubscriptionInvoiceOptions ¶ added in v0.2.0
type InvoicesClientBeginDownloadBillingSubscriptionInvoiceOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
InvoicesClientBeginDownloadBillingSubscriptionInvoiceOptions contains the optional parameters for the InvoicesClient.BeginDownloadBillingSubscriptionInvoice method.
type InvoicesClientBeginDownloadInvoiceOptions ¶ added in v0.2.0
type InvoicesClientBeginDownloadInvoiceOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
InvoicesClientBeginDownloadInvoiceOptions contains the optional parameters for the InvoicesClient.BeginDownloadInvoice method.
type InvoicesClientBeginDownloadMultipleBillingProfileInvoicesOptions ¶ added in v0.2.0
type InvoicesClientBeginDownloadMultipleBillingProfileInvoicesOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
InvoicesClientBeginDownloadMultipleBillingProfileInvoicesOptions contains the optional parameters for the InvoicesClient.BeginDownloadMultipleBillingProfileInvoices method.
type InvoicesClientBeginDownloadMultipleBillingSubscriptionInvoicesOptions ¶ added in v0.2.0
type InvoicesClientBeginDownloadMultipleBillingSubscriptionInvoicesOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
InvoicesClientBeginDownloadMultipleBillingSubscriptionInvoicesOptions contains the optional parameters for the InvoicesClient.BeginDownloadMultipleBillingSubscriptionInvoices method.
type InvoicesClientDownloadBillingSubscriptionInvoiceResponse ¶ added in v0.2.0
type InvoicesClientDownloadBillingSubscriptionInvoiceResponse struct {
DownloadURL
}
InvoicesClientDownloadBillingSubscriptionInvoiceResponse contains the response from method InvoicesClient.DownloadBillingSubscriptionInvoice.
type InvoicesClientDownloadInvoiceResponse ¶ added in v0.2.0
type InvoicesClientDownloadInvoiceResponse struct {
DownloadURL
}
InvoicesClientDownloadInvoiceResponse contains the response from method InvoicesClient.DownloadInvoice.
type InvoicesClientDownloadMultipleBillingProfileInvoicesResponse ¶ added in v0.2.0
type InvoicesClientDownloadMultipleBillingProfileInvoicesResponse struct {
DownloadURL
}
InvoicesClientDownloadMultipleBillingProfileInvoicesResponse contains the response from method InvoicesClient.DownloadMultipleBillingProfileInvoices.
type InvoicesClientDownloadMultipleBillingSubscriptionInvoicesResponse ¶ added in v0.2.0
type InvoicesClientDownloadMultipleBillingSubscriptionInvoicesResponse struct {
DownloadURL
}
InvoicesClientDownloadMultipleBillingSubscriptionInvoicesResponse contains the response from method InvoicesClient.DownloadMultipleBillingSubscriptionInvoices.
type InvoicesClientGetByIDOptions ¶ added in v0.2.0
type InvoicesClientGetByIDOptions struct { }
InvoicesClientGetByIDOptions contains the optional parameters for the InvoicesClient.GetByID method.
type InvoicesClientGetByIDResponse ¶ added in v0.2.0
type InvoicesClientGetByIDResponse struct {
Invoice
}
InvoicesClientGetByIDResponse contains the response from method InvoicesClient.GetByID.
type InvoicesClientGetBySubscriptionAndInvoiceIDOptions ¶ added in v0.2.0
type InvoicesClientGetBySubscriptionAndInvoiceIDOptions struct { }
InvoicesClientGetBySubscriptionAndInvoiceIDOptions contains the optional parameters for the InvoicesClient.GetBySubscriptionAndInvoiceID method.
type InvoicesClientGetBySubscriptionAndInvoiceIDResponse ¶ added in v0.2.0
type InvoicesClientGetBySubscriptionAndInvoiceIDResponse struct {
Invoice
}
InvoicesClientGetBySubscriptionAndInvoiceIDResponse contains the response from method InvoicesClient.GetBySubscriptionAndInvoiceID.
type InvoicesClientGetOptions ¶ added in v0.2.0
type InvoicesClientGetOptions struct { }
InvoicesClientGetOptions contains the optional parameters for the InvoicesClient.Get method.
type InvoicesClientGetResponse ¶ added in v0.2.0
type InvoicesClientGetResponse struct {
Invoice
}
InvoicesClientGetResponse contains the response from method InvoicesClient.Get.
type InvoicesClientListByBillingAccountOptions ¶ added in v0.2.0
type InvoicesClientListByBillingAccountOptions struct { }
InvoicesClientListByBillingAccountOptions contains the optional parameters for the InvoicesClient.ListByBillingAccount method.
type InvoicesClientListByBillingAccountResponse ¶ added in v0.2.0
type InvoicesClientListByBillingAccountResponse struct {
InvoiceListResult
}
InvoicesClientListByBillingAccountResponse contains the response from method InvoicesClient.ListByBillingAccount.
type InvoicesClientListByBillingProfileOptions ¶ added in v0.2.0
type InvoicesClientListByBillingProfileOptions struct { }
InvoicesClientListByBillingProfileOptions contains the optional parameters for the InvoicesClient.ListByBillingProfile method.
type InvoicesClientListByBillingProfileResponse ¶ added in v0.2.0
type InvoicesClientListByBillingProfileResponse struct {
InvoiceListResult
}
InvoicesClientListByBillingProfileResponse contains the response from method InvoicesClient.ListByBillingProfile.
type InvoicesClientListByBillingSubscriptionOptions ¶ added in v0.2.0
type InvoicesClientListByBillingSubscriptionOptions struct { }
InvoicesClientListByBillingSubscriptionOptions contains the optional parameters for the InvoicesClient.ListByBillingSubscription method.
type InvoicesClientListByBillingSubscriptionResponse ¶ added in v0.2.0
type InvoicesClientListByBillingSubscriptionResponse struct {
InvoiceListResult
}
InvoicesClientListByBillingSubscriptionResponse contains the response from method InvoicesClient.ListByBillingSubscription.
type MarketplacePurchasesPolicy ¶
type MarketplacePurchasesPolicy string
MarketplacePurchasesPolicy - The policy that controls whether Azure marketplace purchases are allowed for a billing profile.
const ( MarketplacePurchasesPolicyAllAllowed MarketplacePurchasesPolicy = "AllAllowed" MarketplacePurchasesPolicyNotAllowed MarketplacePurchasesPolicy = "NotAllowed" MarketplacePurchasesPolicyOnlyFreeAllowed MarketplacePurchasesPolicy = "OnlyFreeAllowed" )
func PossibleMarketplacePurchasesPolicyValues ¶
func PossibleMarketplacePurchasesPolicyValues() []MarketplacePurchasesPolicy
PossibleMarketplacePurchasesPolicyValues returns the possible values for the MarketplacePurchasesPolicy const type.
type Operation ¶
type Operation struct { // The object that represents the operation. Display *OperationDisplay `json:"display,omitempty"` // READ-ONLY; Identifies if the operation is a data operation. IsDataAction *bool `json:"isDataAction,omitempty" azure:"ro"` // READ-ONLY; Operation name: {provider}/{resource}/{operation}. Name *string `json:"name,omitempty" azure:"ro"` }
Operation - A Billing REST API operation.
type OperationDisplay ¶
type OperationDisplay struct { // READ-ONLY; Description of operation. Description *string `json:"description,omitempty" azure:"ro"` // READ-ONLY; Operation type such as read, write and delete. Operation *string `json:"operation,omitempty" azure:"ro"` // READ-ONLY; Service provider: Microsoft.Billing. Provider *string `json:"provider,omitempty" azure:"ro"` // READ-ONLY; Resource on which the operation is performed such as invoice and billing subscription. Resource *string `json:"resource,omitempty" azure:"ro"` }
OperationDisplay - The object that represents the operation.
type OperationListResult ¶
type OperationListResult struct { // READ-ONLY; URL to get the next set of operation list results if there are any. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; The list of billing operations supported by the Microsoft.Billing resource provider. Value []*Operation `json:"value,omitempty" azure:"ro"` }
OperationListResult - The list of billing operations and a URL link to get the next set of results.
type OperationsClient ¶
type OperationsClient struct {
// contains filtered or unexported fields
}
OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.
func NewOperationsClient ¶
func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)
NewOperationsClient creates a new instance of OperationsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*OperationsClient) NewListPager ¶ added in v0.4.0
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - Lists the available billing REST API operations. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.
type OperationsClientListOptions ¶ added in v0.2.0
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.
type OperationsClientListResponse ¶ added in v0.2.0
type OperationsClientListResponse struct {
OperationListResult
}
OperationsClientListResponse contains the response from method OperationsClient.List.
type OperationsErrorDetails ¶ added in v0.3.0
type OperationsErrorDetails struct { // READ-ONLY; Error code. Code *string `json:"code,omitempty" azure:"ro"` // READ-ONLY; Error message indicating why the operation failed. Message *string `json:"message,omitempty" azure:"ro"` // READ-ONLY; The target of the particular error. Target *string `json:"target,omitempty" azure:"ro"` }
OperationsErrorDetails - The details of the error.
type OperationsErrorResponse ¶ added in v0.3.0
type OperationsErrorResponse struct { // The details of the error. Error *OperationsErrorDetails `json:"error,omitempty"` }
OperationsErrorResponse - Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.
type Participants ¶
type Participants struct { // READ-ONLY; The email address of the participant. Email *string `json:"email,omitempty" azure:"ro"` // READ-ONLY; The acceptance status of the participant. Status *string `json:"status,omitempty" azure:"ro"` // READ-ONLY; The date when the status got changed. StatusDate *time.Time `json:"statusDate,omitempty" azure:"ro"` }
Participants - The details about a participant.
func (Participants) MarshalJSON ¶
func (p Participants) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type Participants.
func (*Participants) UnmarshalJSON ¶
func (p *Participants) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type Participants.
type PaymentMethodFamily ¶
type PaymentMethodFamily string
PaymentMethodFamily - The family of payment method.
const ( PaymentMethodFamilyCheckWire PaymentMethodFamily = "CheckWire" PaymentMethodFamilyCreditCard PaymentMethodFamily = "CreditCard" PaymentMethodFamilyCredits PaymentMethodFamily = "Credits" PaymentMethodFamilyNone PaymentMethodFamily = "None" )
func PossiblePaymentMethodFamilyValues ¶
func PossiblePaymentMethodFamilyValues() []PaymentMethodFamily
PossiblePaymentMethodFamilyValues returns the possible values for the PaymentMethodFamily const type.
type PaymentProperties ¶
type PaymentProperties struct { // The family of payment method. PaymentMethodFamily *PaymentMethodFamily `json:"paymentMethodFamily,omitempty"` // READ-ONLY; The paid amount. Amount *Amount `json:"amount,omitempty" azure:"ro"` // READ-ONLY; The date when the payment was made. Date *time.Time `json:"date,omitempty" azure:"ro"` // READ-ONLY; The type of payment method. PaymentMethodType *string `json:"paymentMethodType,omitempty" azure:"ro"` // READ-ONLY; The type of payment. PaymentType *string `json:"paymentType,omitempty" azure:"ro"` }
PaymentProperties - The properties of a payment.
func (PaymentProperties) MarshalJSON ¶
func (p PaymentProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PaymentProperties.
func (*PaymentProperties) UnmarshalJSON ¶
func (p *PaymentProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PaymentProperties.
type Period ¶ added in v0.2.0
type Period struct { // A billing period. Properties *PeriodProperties `json:"properties,omitempty"` // READ-ONLY; Resource Id. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
Period - A billing period resource.
type PeriodProperties ¶ added in v0.2.0
type PeriodProperties struct { // READ-ONLY; The end of the date range covered by the billing period. BillingPeriodEndDate *time.Time `json:"billingPeriodEndDate,omitempty" azure:"ro"` // READ-ONLY; The start of the date range covered by the billing period. BillingPeriodStartDate *time.Time `json:"billingPeriodStartDate,omitempty" azure:"ro"` // READ-ONLY; Array of invoice ids that associated with. InvoiceIDs []*string `json:"invoiceIds,omitempty" azure:"ro"` }
PeriodProperties - The properties of the billing period.
func (PeriodProperties) MarshalJSON ¶ added in v0.2.0
func (p PeriodProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PeriodProperties.
func (*PeriodProperties) UnmarshalJSON ¶ added in v0.2.0
func (p *PeriodProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PeriodProperties.
type PeriodsClient ¶ added in v0.2.0
type PeriodsClient struct {
// contains filtered or unexported fields
}
PeriodsClient contains the methods for the BillingPeriods group. Don't use this type directly, use NewPeriodsClient() instead.
func NewPeriodsClient ¶ added in v0.2.0
func NewPeriodsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PeriodsClient, error)
NewPeriodsClient creates a new instance of PeriodsClient with the specified values. subscriptionID - The ID that uniquely identifies an Azure subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*PeriodsClient) Get ¶ added in v0.2.0
func (client *PeriodsClient) Get(ctx context.Context, billingPeriodName string, options *PeriodsClientGetOptions) (PeriodsClientGetResponse, 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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2018-03-01-preview billingPeriodName - The name of a BillingPeriod resource. options - PeriodsClientGetOptions contains the optional parameters for the PeriodsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/BillingPeriodsGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewPeriodsClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "201702-1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*PeriodsClient) NewListPager ¶ added in v0.4.0
func (client *PeriodsClient) NewListPager(options *PeriodsClientListOptions) *runtime.Pager[PeriodsClientListResponse]
NewListPager - 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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2018-03-01-preview options - PeriodsClientListOptions contains the optional parameters for the PeriodsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/examples/BillingPeriodsList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewPeriodsClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager(&armbilling.PeriodsClientListOptions{Filter: nil, Skiptoken: nil, Top: nil, }) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type PeriodsClientGetOptions ¶ added in v0.2.0
type PeriodsClientGetOptions struct { }
PeriodsClientGetOptions contains the optional parameters for the PeriodsClient.Get method.
type PeriodsClientGetResponse ¶ added in v0.2.0
type PeriodsClientGetResponse struct {
Period
}
PeriodsClientGetResponse contains the response from method PeriodsClient.Get.
type PeriodsClientListOptions ¶ added in v0.2.0
type PeriodsClientListOptions struct { // 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'. Filter *string // 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. Skiptoken *string // May be used to limit the number of results to the most recent N billing periods. Top *int32 }
PeriodsClientListOptions contains the optional parameters for the PeriodsClient.List method.
type PeriodsClientListResponse ¶ added in v0.2.0
type PeriodsClientListResponse struct {
PeriodsListResult
}
PeriodsClientListResponse contains the response from method PeriodsClient.List.
type PeriodsListResult ¶ added in v0.2.0
type PeriodsListResult struct { // READ-ONLY; The link (url) to the next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; The list of billing periods. Value []*Period `json:"value,omitempty" azure:"ro"` }
PeriodsListResult - Result of listing billing periods. It contains a list of available billing periods in reverse chronological order.
type PermissionsClient ¶ added in v0.2.0
type PermissionsClient struct {
// contains filtered or unexported fields
}
PermissionsClient contains the methods for the BillingPermissions group. Don't use this type directly, use NewPermissionsClient() instead.
func NewPermissionsClient ¶ added in v0.2.0
func NewPermissionsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*PermissionsClient, error)
NewPermissionsClient creates a new instance of PermissionsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*PermissionsClient) NewListByBillingAccountPager ¶ added in v0.4.0
func (client *PermissionsClient) NewListByBillingAccountPager(billingAccountName string, options *PermissionsClientListByBillingAccountOptions) *runtime.Pager[PermissionsClientListByBillingAccountResponse]
NewListByBillingAccountPager - Lists the billing permissions the caller has on a billing account. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. options - PermissionsClientListByBillingAccountOptions contains the optional parameters for the PermissionsClient.ListByBillingAccount method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingAccountPermissionsList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewPermissionsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByBillingAccountPager("{billingAccountName}", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*PermissionsClient) NewListByBillingProfilePager ¶ added in v0.4.0
func (client *PermissionsClient) NewListByBillingProfilePager(billingAccountName string, billingProfileName string, options *PermissionsClientListByBillingProfileOptions) *runtime.Pager[PermissionsClientListByBillingProfileResponse]
NewListByBillingProfilePager - Lists the billing permissions the caller has on a billing profile. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. billingProfileName - The ID that uniquely identifies a billing profile. options - PermissionsClientListByBillingProfileOptions contains the optional parameters for the PermissionsClient.ListByBillingProfile method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingProfilePermissionsList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewPermissionsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByBillingProfilePager("{billingAccountName}", "{billingProfileName}", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*PermissionsClient) NewListByCustomerPager ¶ added in v0.4.0
func (client *PermissionsClient) NewListByCustomerPager(billingAccountName string, customerName string, options *PermissionsClientListByCustomerOptions) *runtime.Pager[PermissionsClientListByCustomerResponse]
NewListByCustomerPager - Lists the billing permissions the caller has for a customer. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. customerName - The ID that uniquely identifies a customer. options - PermissionsClientListByCustomerOptions contains the optional parameters for the PermissionsClient.ListByCustomer method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/CustomerPermissionsList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewPermissionsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByCustomerPager("{billingAccountName}", "{customerName}", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*PermissionsClient) NewListByInvoiceSectionsPager ¶ added in v0.4.0
func (client *PermissionsClient) NewListByInvoiceSectionsPager(billingAccountName string, billingProfileName string, invoiceSectionName string, options *PermissionsClientListByInvoiceSectionsOptions) *runtime.Pager[PermissionsClientListByInvoiceSectionsResponse]
NewListByInvoiceSectionsPager - Lists the billing permissions the caller has on an invoice section. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 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. options - PermissionsClientListByInvoiceSectionsOptions contains the optional parameters for the PermissionsClient.ListByInvoiceSections method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/InvoiceSectionPermissionsList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewPermissionsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByInvoiceSectionsPager("{billingAccountName}", "{billingProfileName}", "{invoiceSectionName}", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type PermissionsClientListByBillingAccountOptions ¶ added in v0.2.0
type PermissionsClientListByBillingAccountOptions struct { }
PermissionsClientListByBillingAccountOptions contains the optional parameters for the PermissionsClient.ListByBillingAccount method.
type PermissionsClientListByBillingAccountResponse ¶ added in v0.2.0
type PermissionsClientListByBillingAccountResponse struct {
PermissionsListResult
}
PermissionsClientListByBillingAccountResponse contains the response from method PermissionsClient.ListByBillingAccount.
type PermissionsClientListByBillingProfileOptions ¶ added in v0.2.0
type PermissionsClientListByBillingProfileOptions struct { }
PermissionsClientListByBillingProfileOptions contains the optional parameters for the PermissionsClient.ListByBillingProfile method.
type PermissionsClientListByBillingProfileResponse ¶ added in v0.2.0
type PermissionsClientListByBillingProfileResponse struct {
PermissionsListResult
}
PermissionsClientListByBillingProfileResponse contains the response from method PermissionsClient.ListByBillingProfile.
type PermissionsClientListByCustomerOptions ¶ added in v0.2.0
type PermissionsClientListByCustomerOptions struct { }
PermissionsClientListByCustomerOptions contains the optional parameters for the PermissionsClient.ListByCustomer method.
type PermissionsClientListByCustomerResponse ¶ added in v0.2.0
type PermissionsClientListByCustomerResponse struct {
PermissionsListResult
}
PermissionsClientListByCustomerResponse contains the response from method PermissionsClient.ListByCustomer.
type PermissionsClientListByInvoiceSectionsOptions ¶ added in v0.2.0
type PermissionsClientListByInvoiceSectionsOptions struct { }
PermissionsClientListByInvoiceSectionsOptions contains the optional parameters for the PermissionsClient.ListByInvoiceSections method.
type PermissionsClientListByInvoiceSectionsResponse ¶ added in v0.2.0
type PermissionsClientListByInvoiceSectionsResponse struct {
PermissionsListResult
}
PermissionsClientListByInvoiceSectionsResponse contains the response from method PermissionsClient.ListByInvoiceSections.
type PermissionsListResult ¶ added in v0.2.0
type PermissionsListResult struct { // READ-ONLY; The link (url) to the next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; The list of billingPermissions a caller has on a billing account. Value []*PermissionsProperties `json:"value,omitempty" azure:"ro"` }
PermissionsListResult - Result of list billingPermissions a caller has on a billing account.
type PermissionsProperties ¶ added in v0.2.0
type PermissionsProperties struct { // READ-ONLY; The set of actions that the caller is allowed to perform. Actions []*string `json:"actions,omitempty" azure:"ro"` // READ-ONLY; The set of actions that the caller is not allowed to perform. NotActions []*string `json:"notActions,omitempty" azure:"ro"` }
PermissionsProperties - The set of allowed action and not allowed actions a caller has on a billing account
func (PermissionsProperties) MarshalJSON ¶ added in v0.2.0
func (p PermissionsProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PermissionsProperties.
type PoliciesClient ¶
type PoliciesClient struct {
// contains filtered or unexported fields
}
PoliciesClient contains the methods for the Policies group. Don't use this type directly, use NewPoliciesClient() instead.
func NewPoliciesClient ¶
func NewPoliciesClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*PoliciesClient, error)
NewPoliciesClient creates a new instance of PoliciesClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*PoliciesClient) GetByBillingProfile ¶
func (client *PoliciesClient) GetByBillingProfile(ctx context.Context, billingAccountName string, billingProfileName string, options *PoliciesClientGetByBillingProfileOptions) (PoliciesClientGetByBillingProfileResponse, error)
GetByBillingProfile - Lists the policies for a billing profile. This operation is supported only for billing accounts with agreement type Microsoft Customer Agreement. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. billingProfileName - The ID that uniquely identifies a billing profile. options - PoliciesClientGetByBillingProfileOptions contains the optional parameters for the PoliciesClient.GetByBillingProfile method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/Policy.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewPoliciesClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.GetByBillingProfile(ctx, "{billingAccountName}", "{billingProfileName}", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*PoliciesClient) GetByCustomer ¶
func (client *PoliciesClient) GetByCustomer(ctx context.Context, billingAccountName string, customerName string, options *PoliciesClientGetByCustomerOptions) (PoliciesClientGetByCustomerResponse, error)
GetByCustomer - Lists the policies for a customer. This operation is supported only for billing accounts with agreement type Microsoft Partner Agreement. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. customerName - The ID that uniquely identifies a customer. options - PoliciesClientGetByCustomerOptions contains the optional parameters for the PoliciesClient.GetByCustomer method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/CustomerPolicy.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewPoliciesClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.GetByCustomer(ctx, "{billingAccountName}", "{customerName}", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*PoliciesClient) Update ¶
func (client *PoliciesClient) Update(ctx context.Context, billingAccountName string, billingProfileName string, parameters Policy, options *PoliciesClientUpdateOptions) (PoliciesClientUpdateResponse, error)
Update - Updates the policies for a billing profile. This operation is supported only for billing accounts with agreement type Microsoft Customer Agreement. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 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. options - PoliciesClientUpdateOptions contains the optional parameters for the PoliciesClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/UpdatePolicy.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewPoliciesClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Update(ctx, "{billingAccountName}", "{billingProfileName}", armbilling.Policy{ Properties: &armbilling.PolicyProperties{ MarketplacePurchases: to.Ptr(armbilling.MarketplacePurchasesPolicyOnlyFreeAllowed), ReservationPurchases: to.Ptr(armbilling.ReservationPurchasesPolicyNotAllowed), ViewCharges: to.Ptr(armbilling.ViewChargesPolicyAllowed), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*PoliciesClient) UpdateCustomer ¶
func (client *PoliciesClient) UpdateCustomer(ctx context.Context, billingAccountName string, customerName string, parameters CustomerPolicy, options *PoliciesClientUpdateCustomerOptions) (PoliciesClientUpdateCustomerResponse, error)
UpdateCustomer - Updates the policies for a customer. This operation is supported only for billing accounts with agreement type Microsoft Partner Agreement. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 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. options - PoliciesClientUpdateCustomerOptions contains the optional parameters for the PoliciesClient.UpdateCustomer method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/UpdateCustomerPolicy.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewPoliciesClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.UpdateCustomer(ctx, "{billingAccountName}", "{customerName}", armbilling.CustomerPolicy{ Properties: &armbilling.CustomerPolicyProperties{ ViewCharges: to.Ptr(armbilling.ViewChargesNotAllowed), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
type PoliciesClientGetByBillingProfileOptions ¶ added in v0.2.0
type PoliciesClientGetByBillingProfileOptions struct { }
PoliciesClientGetByBillingProfileOptions contains the optional parameters for the PoliciesClient.GetByBillingProfile method.
type PoliciesClientGetByBillingProfileResponse ¶ added in v0.2.0
type PoliciesClientGetByBillingProfileResponse struct {
Policy
}
PoliciesClientGetByBillingProfileResponse contains the response from method PoliciesClient.GetByBillingProfile.
type PoliciesClientGetByCustomerOptions ¶ added in v0.2.0
type PoliciesClientGetByCustomerOptions struct { }
PoliciesClientGetByCustomerOptions contains the optional parameters for the PoliciesClient.GetByCustomer method.
type PoliciesClientGetByCustomerResponse ¶ added in v0.2.0
type PoliciesClientGetByCustomerResponse struct {
CustomerPolicy
}
PoliciesClientGetByCustomerResponse contains the response from method PoliciesClient.GetByCustomer.
type PoliciesClientUpdateCustomerOptions ¶ added in v0.2.0
type PoliciesClientUpdateCustomerOptions struct { }
PoliciesClientUpdateCustomerOptions contains the optional parameters for the PoliciesClient.UpdateCustomer method.
type PoliciesClientUpdateCustomerResponse ¶ added in v0.2.0
type PoliciesClientUpdateCustomerResponse struct {
CustomerPolicy
}
PoliciesClientUpdateCustomerResponse contains the response from method PoliciesClient.UpdateCustomer.
type PoliciesClientUpdateOptions ¶ added in v0.2.0
type PoliciesClientUpdateOptions struct { }
PoliciesClientUpdateOptions contains the optional parameters for the PoliciesClient.Update method.
type PoliciesClientUpdateResponse ¶ added in v0.2.0
type PoliciesClientUpdateResponse struct {
Policy
}
PoliciesClientUpdateResponse contains the response from method PoliciesClient.Update.
type Policy ¶
type Policy struct { // The properties of a policy. Properties *PolicyProperties `json:"properties,omitempty"` // READ-ONLY; Resource Id. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
Policy - A policy.
type PolicyProperties ¶
type PolicyProperties struct { // The policy that controls whether Azure marketplace purchases are allowed for a billing profile. MarketplacePurchases *MarketplacePurchasesPolicy `json:"marketplacePurchases,omitempty"` // The policy that controls whether Azure reservation purchases are allowed for a billing profile. ReservationPurchases *ReservationPurchasesPolicy `json:"reservationPurchases,omitempty"` // The policy that controls whether users with Azure RBAC access to a subscription can view its charges. ViewCharges *ViewChargesPolicy `json:"viewCharges,omitempty"` }
PolicyProperties - The properties of a policy.
type Product ¶
type Product struct { // The properties of a product. Properties *ProductProperties `json:"properties,omitempty"` // READ-ONLY; Resource Id. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
Product - A product.
func (Product) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Product.
type ProductProperties ¶
type ProductProperties struct { // Indicates whether auto renewal is turned on or off for a product. AutoRenew *AutoRenew `json:"autoRenew,omitempty"` // The frequency at which the product will be billed. BillingFrequency *BillingFrequency `json:"billingFrequency,omitempty"` // The current status of the product. Status *ProductStatusType `json:"status,omitempty"` // READ-ONLY; The availability of the product. AvailabilityID *string `json:"availabilityId,omitempty" azure:"ro"` // READ-ONLY; The name of the billing profile to which the product is billed. BillingProfileDisplayName *string `json:"billingProfileDisplayName,omitempty" azure:"ro"` // READ-ONLY; The ID of the billing profile to which the product is billed. BillingProfileID *string `json:"billingProfileId,omitempty" azure:"ro"` // 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" azure:"ro"` // 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" azure:"ro"` // READ-ONLY; The display name of the product. DisplayName *string `json:"displayName,omitempty" azure:"ro"` // READ-ONLY; The date when the product will be renewed or canceled. EndDate *time.Time `json:"endDate,omitempty" azure:"ro"` // READ-ONLY; The name of the invoice section to which the product is billed. InvoiceSectionDisplayName *string `json:"invoiceSectionDisplayName,omitempty" azure:"ro"` // READ-ONLY; The ID of the invoice section to which the product is billed. InvoiceSectionID *string `json:"invoiceSectionId,omitempty" azure:"ro"` // READ-ONLY; The last month charges. LastCharge *Amount `json:"lastCharge,omitempty" azure:"ro"` // READ-ONLY; The date of the last charge. LastChargeDate *time.Time `json:"lastChargeDate,omitempty" azure:"ro"` // READ-ONLY; The description of the type of product. ProductType *string `json:"productType,omitempty" azure:"ro"` // READ-ONLY; The ID of the type of product. ProductTypeID *string `json:"productTypeId,omitempty" azure:"ro"` // READ-ONLY; The date when the product was purchased. PurchaseDate *time.Time `json:"purchaseDate,omitempty" azure:"ro"` // READ-ONLY; The quantity purchased for the product. Quantity *float32 `json:"quantity,omitempty" azure:"ro"` // READ-ONLY; Reseller for this product. Reseller *Reseller `json:"reseller,omitempty" azure:"ro"` // READ-ONLY; The sku description of the product. SKUDescription *string `json:"skuDescription,omitempty" azure:"ro"` // READ-ONLY; The sku ID of the product. SKUID *string `json:"skuId,omitempty" azure:"ro"` // READ-ONLY; The id of the tenant in which the product is used. TenantID *string `json:"tenantId,omitempty" azure:"ro"` }
ProductProperties - The properties of a product.
func (ProductProperties) MarshalJSON ¶
func (p ProductProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProductProperties.
func (*ProductProperties) UnmarshalJSON ¶
func (p *ProductProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProductProperties.
type ProductStatusType ¶
type ProductStatusType string
ProductStatusType - The current status of the product.
const ( ProductStatusTypeActive ProductStatusType = "Active" ProductStatusTypeAutoRenew ProductStatusType = "AutoRenew" ProductStatusTypeCancelled ProductStatusType = "Cancelled" ProductStatusTypeDisabled ProductStatusType = "Disabled" ProductStatusTypeExpired ProductStatusType = "Expired" ProductStatusTypeExpiring ProductStatusType = "Expiring" ProductStatusTypeInactive ProductStatusType = "Inactive" ProductStatusTypePastDue ProductStatusType = "PastDue" )
func PossibleProductStatusTypeValues ¶
func PossibleProductStatusTypeValues() []ProductStatusType
PossibleProductStatusTypeValues returns the possible values for the ProductStatusType const type.
type ProductTransferValidationErrorCode ¶
type ProductTransferValidationErrorCode string
ProductTransferValidationErrorCode - Error code of the transfer validation response.
const ( ProductTransferValidationErrorCodeCrossBillingAccountNotAllowed ProductTransferValidationErrorCode = "CrossBillingAccountNotAllowed" ProductTransferValidationErrorCodeDestinationBillingProfilePastDue ProductTransferValidationErrorCode = "DestinationBillingProfilePastDue" ProductTransferValidationErrorCodeInsufficientPermissionOnDestination ProductTransferValidationErrorCode = "InsufficientPermissionOnDestination" ProductTransferValidationErrorCodeInsufficientPermissionOnSource ProductTransferValidationErrorCode = "InsufficientPermissionOnSource" ProductTransferValidationErrorCodeInvalidSource ProductTransferValidationErrorCode = "InvalidSource" ProductTransferValidationErrorCodeNotAvailableForDestinationMarket ProductTransferValidationErrorCode = "NotAvailableForDestinationMarket" ProductTransferValidationErrorCodeOneTimePurchaseProductTransferNotAllowed ProductTransferValidationErrorCode = "OneTimePurchaseProductTransferNotAllowed" ProductTransferValidationErrorCodeProductNotActive ProductTransferValidationErrorCode = "ProductNotActive" ProductTransferValidationErrorCodeProductTypeNotSupported ProductTransferValidationErrorCode = "ProductTypeNotSupported" )
func PossibleProductTransferValidationErrorCodeValues ¶
func PossibleProductTransferValidationErrorCodeValues() []ProductTransferValidationErrorCode
PossibleProductTransferValidationErrorCodeValues returns the possible values for the ProductTransferValidationErrorCode const type.
type ProductsClient ¶
type ProductsClient struct {
// contains filtered or unexported fields
}
ProductsClient contains the methods for the Products group. Don't use this type directly, use NewProductsClient() instead.
func NewProductsClient ¶
func NewProductsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*ProductsClient, error)
NewProductsClient creates a new instance of ProductsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*ProductsClient) Get ¶
func (client *ProductsClient) Get(ctx context.Context, billingAccountName string, productName string, options *ProductsClientGetOptions) (ProductsClientGetResponse, error)
Get - Gets a product by ID. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. productName - The ID that uniquely identifies a product. options - ProductsClientGetOptions contains the optional parameters for the ProductsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/Product.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewProductsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "{billingAccountName}", "{productName}", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*ProductsClient) Move ¶
func (client *ProductsClient) Move(ctx context.Context, billingAccountName string, productName string, parameters TransferProductRequestProperties, options *ProductsClientMoveOptions) (ProductsClientMoveResponse, 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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 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. options - ProductsClientMoveOptions contains the optional parameters for the ProductsClient.Move method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/MoveProduct.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewProductsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Move(ctx, "{billingAccountName}", "{productName}", armbilling.TransferProductRequestProperties{ DestinationInvoiceSectionID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{newInvoiceSectionName}"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*ProductsClient) NewListByBillingAccountPager ¶ added in v0.4.0
func (client *ProductsClient) NewListByBillingAccountPager(billingAccountName string, options *ProductsClientListByBillingAccountOptions) *runtime.Pager[ProductsClientListByBillingAccountResponse]
NewListByBillingAccountPager - 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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. options - ProductsClientListByBillingAccountOptions contains the optional parameters for the ProductsClient.ListByBillingAccount method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/ProductsListByBillingAccount.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewProductsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByBillingAccountPager("{billingAccountName}", &armbilling.ProductsClientListByBillingAccountOptions{Filter: nil}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*ProductsClient) NewListByBillingProfilePager ¶ added in v0.4.0
func (client *ProductsClient) NewListByBillingProfilePager(billingAccountName string, billingProfileName string, options *ProductsClientListByBillingProfileOptions) *runtime.Pager[ProductsClientListByBillingProfileResponse]
NewListByBillingProfilePager - 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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. billingProfileName - The ID that uniquely identifies a billing profile. options - ProductsClientListByBillingProfileOptions contains the optional parameters for the ProductsClient.ListByBillingProfile method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/ProductsListByBillingProfile.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewProductsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByBillingProfilePager("{billingAccountName}", "{billingProfileName}", &armbilling.ProductsClientListByBillingProfileOptions{Filter: nil}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*ProductsClient) NewListByCustomerPager ¶ added in v0.4.0
func (client *ProductsClient) NewListByCustomerPager(billingAccountName string, customerName string, options *ProductsClientListByCustomerOptions) *runtime.Pager[ProductsClientListByCustomerResponse]
NewListByCustomerPager - 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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. customerName - The ID that uniquely identifies a customer. options - ProductsClientListByCustomerOptions contains the optional parameters for the ProductsClient.ListByCustomer method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/ProductsListByCustomer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewProductsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByCustomerPager("{billingAccountName}", "{customerName}", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*ProductsClient) NewListByInvoiceSectionPager ¶ added in v0.4.0
func (client *ProductsClient) NewListByInvoiceSectionPager(billingAccountName string, billingProfileName string, invoiceSectionName string, options *ProductsClientListByInvoiceSectionOptions) *runtime.Pager[ProductsClientListByInvoiceSectionResponse]
NewListByInvoiceSectionPager - 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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 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. options - ProductsClientListByInvoiceSectionOptions contains the optional parameters for the ProductsClient.ListByInvoiceSection method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/ProductsListByInvoiceSection.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewProductsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByInvoiceSectionPager("{billingAccountName}", "{billingProfileName}", "{invoiceSectionName}", &armbilling.ProductsClientListByInvoiceSectionOptions{Filter: nil}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*ProductsClient) Update ¶
func (client *ProductsClient) Update(ctx context.Context, billingAccountName string, productName string, parameters Product, options *ProductsClientUpdateOptions) (ProductsClientUpdateResponse, 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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 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. options - ProductsClientUpdateOptions contains the optional parameters for the ProductsClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/UpdateProduct.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewProductsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Update(ctx, "{billingAccountName}", "{productName}", armbilling.Product{ Properties: &armbilling.ProductProperties{ AutoRenew: to.Ptr(armbilling.AutoRenewOff), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*ProductsClient) ValidateMove ¶
func (client *ProductsClient) ValidateMove(ctx context.Context, billingAccountName string, productName string, parameters TransferProductRequestProperties, options *ProductsClientValidateMoveOptions) (ProductsClientValidateMoveResponse, 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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 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. options - ProductsClientValidateMoveOptions contains the optional parameters for the ProductsClient.ValidateMove method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/ValidateProductMoveFailure.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewProductsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.ValidateMove(ctx, "{billingAccountName}", "{productName}", armbilling.TransferProductRequestProperties{ DestinationInvoiceSectionID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{newInvoiceSectionName}"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
type ProductsClientGetOptions ¶ added in v0.2.0
type ProductsClientGetOptions struct { }
ProductsClientGetOptions contains the optional parameters for the ProductsClient.Get method.
type ProductsClientGetResponse ¶ added in v0.2.0
type ProductsClientGetResponse struct {
Product
}
ProductsClientGetResponse contains the response from method ProductsClient.Get.
type ProductsClientListByBillingAccountOptions ¶ added in v0.2.0
type ProductsClientListByBillingAccountOptions struct { // 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 (:). Filter *string }
ProductsClientListByBillingAccountOptions contains the optional parameters for the ProductsClient.ListByBillingAccount method.
type ProductsClientListByBillingAccountResponse ¶ added in v0.2.0
type ProductsClientListByBillingAccountResponse struct {
ProductsListResult
}
ProductsClientListByBillingAccountResponse contains the response from method ProductsClient.ListByBillingAccount.
type ProductsClientListByBillingProfileOptions ¶ added in v0.2.0
type ProductsClientListByBillingProfileOptions struct { // 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 (:). Filter *string }
ProductsClientListByBillingProfileOptions contains the optional parameters for the ProductsClient.ListByBillingProfile method.
type ProductsClientListByBillingProfileResponse ¶ added in v0.2.0
type ProductsClientListByBillingProfileResponse struct {
ProductsListResult
}
ProductsClientListByBillingProfileResponse contains the response from method ProductsClient.ListByBillingProfile.
type ProductsClientListByCustomerOptions ¶ added in v0.2.0
type ProductsClientListByCustomerOptions struct { }
ProductsClientListByCustomerOptions contains the optional parameters for the ProductsClient.ListByCustomer method.
type ProductsClientListByCustomerResponse ¶ added in v0.2.0
type ProductsClientListByCustomerResponse struct {
ProductsListResult
}
ProductsClientListByCustomerResponse contains the response from method ProductsClient.ListByCustomer.
type ProductsClientListByInvoiceSectionOptions ¶ added in v0.2.0
type ProductsClientListByInvoiceSectionOptions struct { // 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 (:). Filter *string }
ProductsClientListByInvoiceSectionOptions contains the optional parameters for the ProductsClient.ListByInvoiceSection method.
type ProductsClientListByInvoiceSectionResponse ¶ added in v0.2.0
type ProductsClientListByInvoiceSectionResponse struct {
ProductsListResult
}
ProductsClientListByInvoiceSectionResponse contains the response from method ProductsClient.ListByInvoiceSection.
type ProductsClientMoveOptions ¶ added in v0.2.0
type ProductsClientMoveOptions struct { }
ProductsClientMoveOptions contains the optional parameters for the ProductsClient.Move method.
type ProductsClientMoveResponse ¶ added in v0.2.0
type ProductsClientMoveResponse struct { Product // Location contains the information returned from the Location header response. Location *string // RetryAfter contains the information returned from the Retry-After header response. RetryAfter *int32 }
ProductsClientMoveResponse contains the response from method ProductsClient.Move.
type ProductsClientUpdateOptions ¶ added in v0.2.0
type ProductsClientUpdateOptions struct { }
ProductsClientUpdateOptions contains the optional parameters for the ProductsClient.Update method.
type ProductsClientUpdateResponse ¶ added in v0.2.0
type ProductsClientUpdateResponse struct {
Product
}
ProductsClientUpdateResponse contains the response from method ProductsClient.Update.
type ProductsClientValidateMoveOptions ¶ added in v0.2.0
type ProductsClientValidateMoveOptions struct { }
ProductsClientValidateMoveOptions contains the optional parameters for the ProductsClient.ValidateMove method.
type ProductsClientValidateMoveResponse ¶ added in v0.2.0
type ProductsClientValidateMoveResponse struct {
ValidateProductTransferEligibilityResult
}
ProductsClientValidateMoveResponse contains the response from method ProductsClient.ValidateMove.
type ProductsListResult ¶
type ProductsListResult struct { // READ-ONLY; The link (url) to the next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Total number of records. TotalCount *int32 `json:"totalCount,omitempty" azure:"ro"` // READ-ONLY; The list of products. Value []*Product `json:"value,omitempty" azure:"ro"` }
ProductsListResult - The list of products. It contains a list of available product summaries in reverse chronological order by purchase date.
type Profile ¶ added in v0.2.0
type Profile struct { // The properties of the billing profile. Properties *ProfileProperties `json:"properties,omitempty"` // READ-ONLY; Resource Id. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
Profile - A billing profile.
type ProfileCreationRequest ¶ added in v0.2.0
type ProfileCreationRequest struct { // The address of the individual or organization that is responsible for the billing profile. BillTo *AddressDetails `json:"billTo,omitempty"` // The name of the billing profile. DisplayName *string `json:"displayName,omitempty"` // Enabled azure plans for the billing profile. EnabledAzurePlans []*AzurePlan `json:"enabledAzurePlans,omitempty"` // Flag controlling whether the invoices for the billing profile are sent through email. InvoiceEmailOptIn *bool `json:"invoiceEmailOptIn,omitempty"` // The purchase order name that will appear on the invoices generated for the billing profile. PoNumber *string `json:"poNumber,omitempty"` }
ProfileCreationRequest - The request parameters for creating a new billing profile.
type ProfileInfo ¶ added in v0.3.0
type ProfileInfo struct { // The name of the billing profile BillingProfileDisplayName *string `json:"billingProfileDisplayName,omitempty"` // The unique identifier for the billing profile. BillingProfileID *string `json:"billingProfileId,omitempty"` // Billing account name. This property is available for a specific type of agreement. IndirectRelationshipOrganizationName *string `json:"indirectRelationshipOrganizationName,omitempty"` }
ProfileInfo - Details about billing profile associated with agreement and available only for specific agreements.
type ProfileListResult ¶ added in v0.2.0
type ProfileListResult struct { // READ-ONLY; The link (url) to the next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Total number of records. TotalCount *int32 `json:"totalCount,omitempty" azure:"ro"` // READ-ONLY; The list of billing profiles. Value []*Profile `json:"value,omitempty" azure:"ro"` }
ProfileListResult - The list of billing profiles.
type ProfileProperties ¶ added in v0.2.0
type ProfileProperties struct { // Billing address. BillTo *AddressDetails `json:"billTo,omitempty"` // The name of the billing profile. DisplayName *string `json:"displayName,omitempty"` // Information about the enabled azure plans. EnabledAzurePlans []*AzurePlan `json:"enabledAzurePlans,omitempty"` // Flag controlling whether the invoices for the billing profile are sent through email. InvoiceEmailOptIn *bool `json:"invoiceEmailOptIn,omitempty"` // 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"` // The purchase order name that will appear on the invoices generated for the billing profile. PoNumber *string `json:"poNumber,omitempty"` // Tags of billing profiles. Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Identifies which services and purchases are paid by a billing profile. BillingRelationshipType *BillingRelationshipType `json:"billingRelationshipType,omitempty" azure:"ro"` // READ-ONLY; The currency in which the charges for the billing profile are billed. Currency *string `json:"currency,omitempty" azure:"ro"` // READ-ONLY; Indicates whether user has read access to the billing profile. HasReadAccess *bool `json:"hasReadAccess,omitempty" azure:"ro"` // READ-ONLY; Identifies the billing profile that is linked to another billing profile in indirect purchase motion. IndirectRelationshipInfo *IndirectRelationshipInfo `json:"indirectRelationshipInfo,omitempty" azure:"ro"` // READ-ONLY; The day of the month when the invoice for the billing profile is generated. InvoiceDay *int32 `json:"invoiceDay,omitempty" azure:"ro"` // READ-ONLY; The billing profile spending limit. SpendingLimit *SpendingLimit `json:"spendingLimit,omitempty" azure:"ro"` // READ-ONLY; The status of the billing profile. Status *BillingProfileStatus `json:"status,omitempty" azure:"ro"` // READ-ONLY; Reason for the specified billing profile status. StatusReasonCode *StatusReasonCode `json:"statusReasonCode,omitempty" azure:"ro"` // READ-ONLY; The system generated unique identifier for a billing profile. SystemID *string `json:"systemId,omitempty" azure:"ro"` // 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" azure:"ro"` }
ProfileProperties - The properties of the billing profile.
func (ProfileProperties) MarshalJSON ¶ added in v0.2.0
func (p ProfileProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProfileProperties.
type ProfilesClient ¶ added in v0.2.0
type ProfilesClient struct {
// contains filtered or unexported fields
}
ProfilesClient contains the methods for the BillingProfiles group. Don't use this type directly, use NewProfilesClient() instead.
func NewProfilesClient ¶ added in v0.2.0
func NewProfilesClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*ProfilesClient, error)
NewProfilesClient creates a new instance of ProfilesClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*ProfilesClient) BeginCreateOrUpdate ¶ added in v0.2.0
func (client *ProfilesClient) BeginCreateOrUpdate(ctx context.Context, billingAccountName string, billingProfileName string, parameters Profile, options *ProfilesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ProfilesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a billing profile. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 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. options - ProfilesClientBeginCreateOrUpdateOptions contains the optional parameters for the ProfilesClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/PutBillingProfile.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewProfilesClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, "{billingAccountName}", "{billingProfileName}", armbilling.Profile{ Properties: &armbilling.ProfileProperties{ BillTo: &armbilling.AddressDetails{ AddressLine1: to.Ptr("Test Address 1"), City: to.Ptr("Redmond"), Country: to.Ptr("US"), FirstName: to.Ptr("Test"), LastName: to.Ptr("User"), PostalCode: to.Ptr("12345"), Region: to.Ptr("WA"), }, DisplayName: to.Ptr("Finance"), EnabledAzurePlans: []*armbilling.AzurePlan{ { SKUID: to.Ptr("0001"), }, { SKUID: to.Ptr("0002"), }}, InvoiceEmailOptIn: to.Ptr(true), PoNumber: to.Ptr("ABC12345"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
func (*ProfilesClient) Get ¶ added in v0.2.0
func (client *ProfilesClient) Get(ctx context.Context, billingAccountName string, billingProfileName string, options *ProfilesClientGetOptions) (ProfilesClientGetResponse, 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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. billingProfileName - The ID that uniquely identifies a billing profile. options - ProfilesClientGetOptions contains the optional parameters for the ProfilesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingProfile.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewProfilesClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "{billingAccountName}", "{billingProfileName}", &armbilling.ProfilesClientGetOptions{Expand: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*ProfilesClient) NewListByBillingAccountPager ¶ added in v0.4.0
func (client *ProfilesClient) NewListByBillingAccountPager(billingAccountName string, options *ProfilesClientListByBillingAccountOptions) *runtime.Pager[ProfilesClientListByBillingAccountResponse]
NewListByBillingAccountPager - 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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. options - ProfilesClientListByBillingAccountOptions contains the optional parameters for the ProfilesClient.ListByBillingAccount method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingProfilesListByBillingAccount.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewProfilesClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByBillingAccountPager("{billingAccountName}", &armbilling.ProfilesClientListByBillingAccountOptions{Expand: nil}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ProfilesClientBeginCreateOrUpdateOptions ¶ added in v0.2.0
type ProfilesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ProfilesClientBeginCreateOrUpdateOptions contains the optional parameters for the ProfilesClient.BeginCreateOrUpdate method.
type ProfilesClientCreateOrUpdateResponse ¶ added in v0.2.0
type ProfilesClientCreateOrUpdateResponse struct {
Profile
}
ProfilesClientCreateOrUpdateResponse contains the response from method ProfilesClient.CreateOrUpdate.
type ProfilesClientGetOptions ¶ added in v0.2.0
type ProfilesClientGetOptions struct { // May be used to expand the invoice sections. Expand *string }
ProfilesClientGetOptions contains the optional parameters for the ProfilesClient.Get method.
type ProfilesClientGetResponse ¶ added in v0.2.0
type ProfilesClientGetResponse struct {
Profile
}
ProfilesClientGetResponse contains the response from method ProfilesClient.Get.
type ProfilesClientListByBillingAccountOptions ¶ added in v0.2.0
type ProfilesClientListByBillingAccountOptions struct { // May be used to expand the invoice sections. Expand *string }
ProfilesClientListByBillingAccountOptions contains the optional parameters for the ProfilesClient.ListByBillingAccount method.
type ProfilesClientListByBillingAccountResponse ¶ added in v0.2.0
type ProfilesClientListByBillingAccountResponse struct {
ProfileListResult
}
ProfilesClientListByBillingAccountResponse contains the response from method ProfilesClient.ListByBillingAccount.
type ProfilesOnExpand ¶ added in v0.2.0
type ProfilesOnExpand struct { // The billing profiles associated with the billing account. Value []*Profile `json:"value,omitempty"` // 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" azure:"ro"` }
ProfilesOnExpand - The billing profiles associated with the billing account. By default this is not populated, unless it's specified in $expand.
func (ProfilesOnExpand) MarshalJSON ¶ added in v0.2.0
func (p ProfilesOnExpand) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProfilesOnExpand.
type Property ¶ added in v0.2.0
type Property struct { // A billing property. Properties *PropertyProperties `json:"properties,omitempty"` // READ-ONLY; Resource Id. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
Property - A billing property.
func (Property) MarshalJSON ¶ added in v0.2.0
MarshalJSON implements the json.Marshaller interface for type Property.
type PropertyClient ¶ added in v0.2.0
type PropertyClient struct {
// contains filtered or unexported fields
}
PropertyClient contains the methods for the BillingProperty group. Don't use this type directly, use NewPropertyClient() instead.
func NewPropertyClient ¶ added in v0.2.0
func NewPropertyClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PropertyClient, error)
NewPropertyClient creates a new instance of PropertyClient with the specified values. subscriptionID - The ID that uniquely identifies an Azure subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*PropertyClient) Get ¶ added in v0.2.0
func (client *PropertyClient) Get(ctx context.Context, options *PropertyClientGetOptions) (PropertyClientGetResponse, error)
Get - Get the billing properties for a subscription. This operation is not supported for billing accounts with agreement type Enterprise Agreement. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 options - PropertyClientGetOptions contains the optional parameters for the PropertyClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingProperty.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewPropertyClient("{subscriptionId}", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*PropertyClient) Update ¶ added in v0.2.0
func (client *PropertyClient) Update(ctx context.Context, parameters Property, options *PropertyClientUpdateOptions) (PropertyClientUpdateResponse, 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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 parameters - Request parameters that are provided to the update billing property operation. options - PropertyClientUpdateOptions contains the optional parameters for the PropertyClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/UpdateBillingProperty.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewPropertyClient("{subscriptionId}", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Update(ctx, armbilling.Property{ Properties: &armbilling.PropertyProperties{ CostCenter: to.Ptr("1010"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
type PropertyClientGetOptions ¶ added in v0.2.0
type PropertyClientGetOptions struct { }
PropertyClientGetOptions contains the optional parameters for the PropertyClient.Get method.
type PropertyClientGetResponse ¶ added in v0.2.0
type PropertyClientGetResponse struct {
Property
}
PropertyClientGetResponse contains the response from method PropertyClient.Get.
type PropertyClientUpdateOptions ¶ added in v0.2.0
type PropertyClientUpdateOptions struct { }
PropertyClientUpdateOptions contains the optional parameters for the PropertyClient.Update method.
type PropertyClientUpdateResponse ¶ added in v0.2.0
type PropertyClientUpdateResponse struct {
Property
}
PropertyClientUpdateResponse contains the response from method PropertyClient.Update.
type PropertyProperties ¶ added in v0.2.0
type PropertyProperties struct { // The cost center applied to the subscription. CostCenter *string `json:"costCenter,omitempty"` // READ-ONLY; The email address on which the account admin gets all Azure notifications. AccountAdminNotificationEmailAddress *string `json:"accountAdminNotificationEmailAddress,omitempty" azure:"ro"` // READ-ONLY; The name of the billing account to which the subscription is billed. BillingAccountDisplayName *string `json:"billingAccountDisplayName,omitempty" azure:"ro"` // READ-ONLY; The ID of the billing account to which the subscription is billed. BillingAccountID *string `json:"billingAccountId,omitempty" azure:"ro"` // READ-ONLY; The name of the billing profile to which the subscription is billed. BillingProfileDisplayName *string `json:"billingProfileDisplayName,omitempty" azure:"ro"` // READ-ONLY; The ID of the billing profile to which the subscription is billed. BillingProfileID *string `json:"billingProfileId,omitempty" azure:"ro"` // READ-ONLY; The billing profile spending limit. BillingProfileSpendingLimit *BillingProfileSpendingLimit `json:"billingProfileSpendingLimit,omitempty" azure:"ro"` // READ-ONLY; The status of the billing profile. BillingProfileStatus *BillingProfileStatus `json:"billingProfileStatus,omitempty" azure:"ro"` // READ-ONLY; Reason for the specified billing profile status. BillingProfileStatusReasonCode *BillingProfileStatusReasonCode `json:"billingProfileStatusReasonCode,omitempty" azure:"ro"` // READ-ONLY; The Azure AD tenant ID of the billing account for the subscription. BillingTenantID *string `json:"billingTenantId,omitempty" azure:"ro"` // READ-ONLY; The name of the invoice section to which the subscription is billed. InvoiceSectionDisplayName *string `json:"invoiceSectionDisplayName,omitempty" azure:"ro"` // READ-ONLY; The ID of the invoice section to which the subscription is billed. InvoiceSectionID *string `json:"invoiceSectionId,omitempty" azure:"ro"` // READ-ONLY; Indicates whether user is the account admin. IsAccountAdmin *bool `json:"isAccountAdmin,omitempty" azure:"ro"` // READ-ONLY; The product ID of the Azure plan. ProductID *string `json:"productId,omitempty" azure:"ro"` // READ-ONLY; The product name of the Azure plan. ProductName *string `json:"productName,omitempty" azure:"ro"` // READ-ONLY; The sku description of the Azure plan for the subscription. SKUDescription *string `json:"skuDescription,omitempty" azure:"ro"` // READ-ONLY; The sku ID of the Azure plan for the subscription. SKUID *string `json:"skuId,omitempty" azure:"ro"` }
PropertyProperties - The billing property.
type RebillDetails ¶
type RebillDetails struct { // READ-ONLY; The ID of credit note. CreditNoteDocumentID *string `json:"creditNoteDocumentId,omitempty" azure:"ro"` // READ-ONLY; The ID of invoice. InvoiceDocumentID *string `json:"invoiceDocumentId,omitempty" azure:"ro"` // READ-ONLY; Rebill details for an invoice. RebillDetails map[string]*RebillDetails `json:"rebillDetails,omitempty" azure:"ro"` }
RebillDetails - The rebill details of an invoice.
func (RebillDetails) MarshalJSON ¶
func (r RebillDetails) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RebillDetails.
type Reseller ¶
type Reseller struct { // READ-ONLY; The name of the reseller. Description *string `json:"description,omitempty" azure:"ro"` // READ-ONLY; The MPN ID of the reseller. ResellerID *string `json:"resellerId,omitempty" azure:"ro"` }
Reseller - Details of the reseller.
type Reservation ¶
type Reservation struct { // The properties associated to this reservation Properties *ReservationProperty `json:"properties,omitempty"` // The sku information associated to this reservation SKU *ReservationSKUProperty `json:"sku,omitempty"` // READ-ONLY; The id of the reservation. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The location of the reservation. Location *string `json:"location,omitempty" azure:"ro"` // READ-ONLY; The name of the reservation. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of the reservation. Type *string `json:"type,omitempty" azure:"ro"` }
Reservation - The definition of the reservation.
type ReservationProperty ¶
type ReservationProperty struct { // The array of applied scopes of a reservation. Will be null if the reservation is in Shared scope AppliedScopes []*string `json:"appliedScopes,omitempty"` // READ-ONLY; The applied scope type of the reservation. AppliedScopeType *string `json:"appliedScopeType,omitempty" azure:"ro"` // READ-ONLY; The display name of the reservation DisplayName *string `json:"displayName,omitempty" azure:"ro"` // READ-ONLY; The provisioning state of the reservation for display, e.g. Succeeded DisplayProvisioningState *string `json:"displayProvisioningState,omitempty" azure:"ro"` // READ-ONLY; The effective date time of the reservation EffectiveDateTime *string `json:"effectiveDateTime,omitempty" azure:"ro"` // READ-ONLY; The expiry date of the reservation ExpiryDate *string `json:"expiryDate,omitempty" azure:"ro"` // READ-ONLY; The provisioning state of the reservation, e.g. Succeeded ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` // READ-ONLY; The provisioning state of the reservation, e.g. Succeeded ProvisioningSubState *string `json:"provisioningSubState,omitempty" azure:"ro"` // READ-ONLY; The number of the reservation. Quantity *float32 `json:"quantity,omitempty" azure:"ro"` // READ-ONLY; The renew state of the reservation Renew *bool `json:"renew,omitempty" azure:"ro"` // READ-ONLY; The renew source of the reservation RenewSource *string `json:"renewSource,omitempty" azure:"ro"` // READ-ONLY; The reserved source type of the reservation, e.g. virtual machine. ReservedResourceType *string `json:"reservedResourceType,omitempty" azure:"ro"` // READ-ONLY; The sku description of the reservation SKUDescription *string `json:"skuDescription,omitempty" azure:"ro"` // READ-ONLY; The term of the reservation, e.g. P1Y Term *string `json:"term,omitempty" azure:"ro"` // READ-ONLY; The applied scope type of the reservation for display, e.g. Shared UserFriendlyAppliedScopeType *string `json:"userFriendlyAppliedScopeType,omitempty" azure:"ro"` // READ-ONLY; The renew state of the reservation for display, e.g. On UserFriendlyRenewState *string `json:"userFriendlyRenewState,omitempty" azure:"ro"` // READ-ONLY; Reservation utilization Utilization *ReservationPropertyUtilization `json:"utilization,omitempty" azure:"ro"` }
ReservationProperty - The property of reservation object.
type ReservationPropertyUtilization ¶
type ReservationPropertyUtilization struct { // The array of aggregates of a reservation's utilization Aggregates []*ReservationUtilizationAggregates `json:"aggregates,omitempty"` // READ-ONLY; The number of days trend for a reservation Trend *string `json:"trend,omitempty" azure:"ro"` }
ReservationPropertyUtilization - Reservation utilization
type ReservationPurchasesPolicy ¶
type ReservationPurchasesPolicy string
ReservationPurchasesPolicy - The policy that controls whether Azure reservation purchases are allowed for a billing profile.
const ( ReservationPurchasesPolicyAllowed ReservationPurchasesPolicy = "Allowed" ReservationPurchasesPolicyNotAllowed ReservationPurchasesPolicy = "NotAllowed" )
func PossibleReservationPurchasesPolicyValues ¶
func PossibleReservationPurchasesPolicyValues() []ReservationPurchasesPolicy
PossibleReservationPurchasesPolicyValues returns the possible values for the ReservationPurchasesPolicy const type.
type ReservationSKUProperty ¶
type ReservationSKUProperty struct { // READ-ONLY; The name of the reservation sku. Name *string `json:"name,omitempty" azure:"ro"` }
ReservationSKUProperty - The property of reservation sku object.
type ReservationSummary ¶
type ReservationSummary struct { // READ-ONLY; The number of reservation in Cancelled state CancelledCount *float32 `json:"cancelledCount,omitempty" azure:"ro"` // READ-ONLY; The number of reservation in Expired state ExpiredCount *float32 `json:"expiredCount,omitempty" azure:"ro"` // READ-ONLY; The number of reservation in Expiring state ExpiringCount *float32 `json:"expiringCount,omitempty" azure:"ro"` // READ-ONLY; The number of reservation in Failed state FailedCount *float32 `json:"failedCount,omitempty" azure:"ro"` // READ-ONLY; The number of reservation in Pending state PendingCount *float32 `json:"pendingCount,omitempty" azure:"ro"` // READ-ONLY; The number of reservation in Succeeded state SucceededCount *float32 `json:"succeededCount,omitempty" azure:"ro"` }
ReservationSummary - The roll up count summary of reservations in each state
type ReservationType ¶
type ReservationType string
ReservationType - The type of transaction.
const ( ReservationTypePurchase ReservationType = "Purchase" ReservationTypeUsageCharge ReservationType = "Usage Charge" )
func PossibleReservationTypeValues ¶
func PossibleReservationTypeValues() []ReservationType
PossibleReservationTypeValues returns the possible values for the ReservationType const type.
type ReservationUtilizationAggregates ¶
type ReservationUtilizationAggregates struct { // READ-ONLY; The grain of the aggregate Grain *float32 `json:"grain,omitempty" azure:"ro"` // READ-ONLY; The grain unit of the aggregate GrainUnit *string `json:"grainUnit,omitempty" azure:"ro"` // READ-ONLY; The aggregate value Value *float32 `json:"value,omitempty" azure:"ro"` // READ-ONLY; The aggregate value unit ValueUnit *string `json:"valueUnit,omitempty" azure:"ro"` }
ReservationUtilizationAggregates - The aggregate values of reservation utilization
type ReservationsClient ¶
type ReservationsClient struct {
// contains filtered or unexported fields
}
ReservationsClient contains the methods for the Reservations group. Don't use this type directly, use NewReservationsClient() instead.
func NewReservationsClient ¶
func NewReservationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*ReservationsClient, error)
NewReservationsClient creates a new instance of ReservationsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*ReservationsClient) NewListByBillingAccountPager ¶ added in v0.4.0
func (client *ReservationsClient) NewListByBillingAccountPager(billingAccountName string, options *ReservationsClientListByBillingAccountOptions) *runtime.Pager[ReservationsClientListByBillingAccountResponse]
NewListByBillingAccountPager - Lists the reservations for a billing account and the roll up counts of reservations group by provisioning states. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. options - ReservationsClientListByBillingAccountOptions contains the optional parameters for the ReservationsClient.ListByBillingAccount method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/ReservationsListByBillingAccount.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewReservationsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByBillingAccountPager("{billingAccountName}", &armbilling.ReservationsClientListByBillingAccountOptions{Filter: to.Ptr("properties/reservedResourceType eq 'VirtualMachines'"), Orderby: to.Ptr("properties/userFriendlyAppliedScopeType asc"), RefreshSummary: nil, SelectedState: to.Ptr("Succeeded"), }) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*ReservationsClient) NewListByBillingProfilePager ¶ added in v0.4.0
func (client *ReservationsClient) NewListByBillingProfilePager(billingAccountName string, billingProfileName string, options *ReservationsClientListByBillingProfileOptions) *runtime.Pager[ReservationsClientListByBillingProfileResponse]
NewListByBillingProfilePager - Lists the reservations for a billing profile and the roll up counts of reservations group by provisioning state. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. billingProfileName - The ID that uniquely identifies a billing profile. options - ReservationsClientListByBillingProfileOptions contains the optional parameters for the ReservationsClient.ListByBillingProfile method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/ReservationsListByBillingProfile.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewReservationsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByBillingProfilePager("{billingAccountName}", "{billingProfileName}", &armbilling.ReservationsClientListByBillingProfileOptions{Filter: to.Ptr("properties/reservedResourceType eq 'VirtualMachines'"), Orderby: to.Ptr("properties/userFriendlyAppliedScopeType asc"), RefreshSummary: nil, SelectedState: to.Ptr("Succeeded"), }) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ReservationsClientListByBillingAccountOptions ¶ added in v0.2.0
type ReservationsClientListByBillingAccountOptions struct { // May be used to filter by reservation properties. The filter supports 'eq', 'or', and 'and'. It does not currently support // 'ne', 'gt', 'le', 'ge', or 'not'. Filter *string // May be used to sort order by reservation properties. Orderby *string // To indicate whether to refresh the roll up counts of the reservations group by provisioning states RefreshSummary *string // The selected provisioning state SelectedState *string }
ReservationsClientListByBillingAccountOptions contains the optional parameters for the ReservationsClient.ListByBillingAccount method.
type ReservationsClientListByBillingAccountResponse ¶ added in v0.2.0
type ReservationsClientListByBillingAccountResponse struct {
ReservationsListResult
}
ReservationsClientListByBillingAccountResponse contains the response from method ReservationsClient.ListByBillingAccount.
type ReservationsClientListByBillingProfileOptions ¶ added in v0.2.0
type ReservationsClientListByBillingProfileOptions struct { // May be used to filter by reservation properties. The filter supports 'eq', 'or', and 'and'. It does not currently support // 'ne', 'gt', 'le', 'ge', or 'not'. Filter *string // May be used to sort order by reservation properties. Orderby *string // To indicate whether to refresh the roll up counts of the reservations group by provisioning state RefreshSummary *string // The selected provisioning state SelectedState *string }
ReservationsClientListByBillingProfileOptions contains the optional parameters for the ReservationsClient.ListByBillingProfile method.
type ReservationsClientListByBillingProfileResponse ¶ added in v0.2.0
type ReservationsClientListByBillingProfileResponse struct {
ReservationsListResult
}
ReservationsClientListByBillingProfileResponse contains the response from method ReservationsClient.ListByBillingProfile.
type ReservationsListResult ¶
type ReservationsListResult struct { // The roll out count summary of the reservations Summary *ReservationSummary `json:"summary,omitempty"` // READ-ONLY; The link (url) to the next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; The list of reservations. Value []*Reservation `json:"value,omitempty" azure:"ro"` }
ReservationsListResult - The list of reservations and summary of roll out count of reservations in each state.
type Resource ¶
type Resource struct { // READ-ONLY; Resource Id. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
Resource - The Resource model definition.
type RoleAssignment ¶ added in v0.2.0
type RoleAssignment struct { // The properties of the role assignment. Properties *RoleAssignmentProperties `json:"properties,omitempty"` // READ-ONLY; Resource Id. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
RoleAssignment - The role assignment
type RoleAssignmentListResult ¶ added in v0.2.0
type RoleAssignmentListResult struct { // READ-ONLY; The link (url) to the next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; The list of role assignments. Value []*RoleAssignment `json:"value,omitempty" azure:"ro"` }
RoleAssignmentListResult - The list of role assignments.
type RoleAssignmentProperties ¶ added in v0.2.0
type RoleAssignmentProperties struct { // The principal id of the user to whom the role was assigned. PrincipalID *string `json:"principalId,omitempty"` // The principal tenant id of the user to whom the role was assigned. PrincipalTenantID *string `json:"principalTenantId,omitempty"` // The ID of the role definition. RoleDefinitionID *string `json:"roleDefinitionId,omitempty"` // The authentication type. UserAuthenticationType *string `json:"userAuthenticationType,omitempty"` // The email address of the user. UserEmailAddress *string `json:"userEmailAddress,omitempty"` // READ-ONLY; The principal Id of the user who created the role assignment. CreatedByPrincipalID *string `json:"createdByPrincipalId,omitempty" azure:"ro"` // READ-ONLY; The tenant Id of the user who created the role assignment. CreatedByPrincipalTenantID *string `json:"createdByPrincipalTenantId,omitempty" azure:"ro"` // READ-ONLY; The email address of the user who created the role assignment. CreatedByUserEmailAddress *string `json:"createdByUserEmailAddress,omitempty" azure:"ro"` // READ-ONLY; The date the role assignment was created. CreatedOn *string `json:"createdOn,omitempty" azure:"ro"` // READ-ONLY; The scope at which the role was assigned. Scope *string `json:"scope,omitempty" azure:"ro"` }
RoleAssignmentProperties - The properties of the role assignment.
type RoleAssignmentsClient ¶ added in v0.2.0
type RoleAssignmentsClient struct {
// contains filtered or unexported fields
}
RoleAssignmentsClient contains the methods for the BillingRoleAssignments group. Don't use this type directly, use NewRoleAssignmentsClient() instead.
func NewRoleAssignmentsClient ¶ added in v0.2.0
func NewRoleAssignmentsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*RoleAssignmentsClient, error)
NewRoleAssignmentsClient creates a new instance of RoleAssignmentsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*RoleAssignmentsClient) DeleteByBillingAccount ¶ added in v0.2.0
func (client *RoleAssignmentsClient) DeleteByBillingAccount(ctx context.Context, billingAccountName string, billingRoleAssignmentName string, options *RoleAssignmentsClientDeleteByBillingAccountOptions) (RoleAssignmentsClientDeleteByBillingAccountResponse, error)
DeleteByBillingAccount - Deletes a role assignment for the caller on a billing account. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. billingRoleAssignmentName - The ID that uniquely identifies a role assignment. options - RoleAssignmentsClientDeleteByBillingAccountOptions contains the optional parameters for the RoleAssignmentsClient.DeleteByBillingAccount method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingAccountRoleAssignmentDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewRoleAssignmentsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.DeleteByBillingAccount(ctx, "{billingAccountName}", "{billingRoleAssignmentName}", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*RoleAssignmentsClient) DeleteByBillingProfile ¶ added in v0.2.0
func (client *RoleAssignmentsClient) DeleteByBillingProfile(ctx context.Context, billingAccountName string, billingProfileName string, billingRoleAssignmentName string, options *RoleAssignmentsClientDeleteByBillingProfileOptions) (RoleAssignmentsClientDeleteByBillingProfileResponse, error)
DeleteByBillingProfile - Deletes a role assignment for the caller on a billing profile. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. billingProfileName - The ID that uniquely identifies a billing profile. billingRoleAssignmentName - The ID that uniquely identifies a role assignment. options - RoleAssignmentsClientDeleteByBillingProfileOptions contains the optional parameters for the RoleAssignmentsClient.DeleteByBillingProfile method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingProfileRoleAssignmentDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewRoleAssignmentsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.DeleteByBillingProfile(ctx, "{billingAccountName}", "{billingProfileName}", "{billingRoleAssignmentName}", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*RoleAssignmentsClient) DeleteByInvoiceSection ¶ added in v0.2.0
func (client *RoleAssignmentsClient) DeleteByInvoiceSection(ctx context.Context, billingAccountName string, billingProfileName string, invoiceSectionName string, billingRoleAssignmentName string, options *RoleAssignmentsClientDeleteByInvoiceSectionOptions) (RoleAssignmentsClientDeleteByInvoiceSectionResponse, error)
DeleteByInvoiceSection - Deletes a role assignment for the caller on an invoice section. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. billingProfileName - The ID that uniquely identifies a billing profile. invoiceSectionName - The ID that uniquely identifies an invoice section. billingRoleAssignmentName - The ID that uniquely identifies a role assignment. options - RoleAssignmentsClientDeleteByInvoiceSectionOptions contains the optional parameters for the RoleAssignmentsClient.DeleteByInvoiceSection method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/InvoiceSectionRoleAssignmentDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewRoleAssignmentsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.DeleteByInvoiceSection(ctx, "{billingAccountName}", "{billingProfileName}", "{invoiceSectionName}", "{billingRoleAssignmentName}", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*RoleAssignmentsClient) GetByBillingAccount ¶ added in v0.2.0
func (client *RoleAssignmentsClient) GetByBillingAccount(ctx context.Context, billingAccountName string, billingRoleAssignmentName string, options *RoleAssignmentsClientGetByBillingAccountOptions) (RoleAssignmentsClientGetByBillingAccountResponse, error)
GetByBillingAccount - Gets a role assignment for the caller on a billing account. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. billingRoleAssignmentName - The ID that uniquely identifies a role assignment. options - RoleAssignmentsClientGetByBillingAccountOptions contains the optional parameters for the RoleAssignmentsClient.GetByBillingAccount method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingAccountRoleAssignment.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewRoleAssignmentsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.GetByBillingAccount(ctx, "{billingAccountName}", "{billingRoleAssignmentId}", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*RoleAssignmentsClient) GetByBillingProfile ¶ added in v0.2.0
func (client *RoleAssignmentsClient) GetByBillingProfile(ctx context.Context, billingAccountName string, billingProfileName string, billingRoleAssignmentName string, options *RoleAssignmentsClientGetByBillingProfileOptions) (RoleAssignmentsClientGetByBillingProfileResponse, error)
GetByBillingProfile - Gets a role assignment for the caller on a billing profile. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. billingProfileName - The ID that uniquely identifies a billing profile. billingRoleAssignmentName - The ID that uniquely identifies a role assignment. options - RoleAssignmentsClientGetByBillingProfileOptions contains the optional parameters for the RoleAssignmentsClient.GetByBillingProfile method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingProfileRoleAssignment.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewRoleAssignmentsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.GetByBillingProfile(ctx, "{billingAccountName}", "{billingProfileName}", "{billingRoleAssignmentName}", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*RoleAssignmentsClient) GetByInvoiceSection ¶ added in v0.2.0
func (client *RoleAssignmentsClient) GetByInvoiceSection(ctx context.Context, billingAccountName string, billingProfileName string, invoiceSectionName string, billingRoleAssignmentName string, options *RoleAssignmentsClientGetByInvoiceSectionOptions) (RoleAssignmentsClientGetByInvoiceSectionResponse, error)
GetByInvoiceSection - Gets a role assignment for the caller on an invoice section. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. billingProfileName - The ID that uniquely identifies a billing profile. invoiceSectionName - The ID that uniquely identifies an invoice section. billingRoleAssignmentName - The ID that uniquely identifies a role assignment. options - RoleAssignmentsClientGetByInvoiceSectionOptions contains the optional parameters for the RoleAssignmentsClient.GetByInvoiceSection method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/InvoiceSectionRoleAssignment.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewRoleAssignmentsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.GetByInvoiceSection(ctx, "{billingAccountName}", "{billingProfileName}", "{invoiceSectionName}", "{billingRoleAssignmentName}", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*RoleAssignmentsClient) NewListByBillingAccountPager ¶ added in v0.4.0
func (client *RoleAssignmentsClient) NewListByBillingAccountPager(billingAccountName string, options *RoleAssignmentsClientListByBillingAccountOptions) *runtime.Pager[RoleAssignmentsClientListByBillingAccountResponse]
NewListByBillingAccountPager - Lists the role assignments for the caller on a billing account. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. options - RoleAssignmentsClientListByBillingAccountOptions contains the optional parameters for the RoleAssignmentsClient.ListByBillingAccount method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingAccountRoleAssignmentList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewRoleAssignmentsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByBillingAccountPager("{billingAccountName}", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*RoleAssignmentsClient) NewListByBillingProfilePager ¶ added in v0.4.0
func (client *RoleAssignmentsClient) NewListByBillingProfilePager(billingAccountName string, billingProfileName string, options *RoleAssignmentsClientListByBillingProfileOptions) *runtime.Pager[RoleAssignmentsClientListByBillingProfileResponse]
NewListByBillingProfilePager - Lists the role assignments for the caller on a billing profile. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. billingProfileName - The ID that uniquely identifies a billing profile. options - RoleAssignmentsClientListByBillingProfileOptions contains the optional parameters for the RoleAssignmentsClient.ListByBillingProfile method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingProfileRoleAssignmentList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewRoleAssignmentsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByBillingProfilePager("{billingAccountName}", "{billingProfileName}", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*RoleAssignmentsClient) NewListByInvoiceSectionPager ¶ added in v0.4.0
func (client *RoleAssignmentsClient) NewListByInvoiceSectionPager(billingAccountName string, billingProfileName string, invoiceSectionName string, options *RoleAssignmentsClientListByInvoiceSectionOptions) *runtime.Pager[RoleAssignmentsClientListByInvoiceSectionResponse]
NewListByInvoiceSectionPager - Lists the role assignments for the caller on an invoice section. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 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. options - RoleAssignmentsClientListByInvoiceSectionOptions contains the optional parameters for the RoleAssignmentsClient.ListByInvoiceSection method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/InvoiceSectionRoleAssignmentList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewRoleAssignmentsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByInvoiceSectionPager("{billingAccountName}", "{billingProfileName}", "{invoiceSectionName}", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type RoleAssignmentsClientDeleteByBillingAccountOptions ¶ added in v0.2.0
type RoleAssignmentsClientDeleteByBillingAccountOptions struct { }
RoleAssignmentsClientDeleteByBillingAccountOptions contains the optional parameters for the RoleAssignmentsClient.DeleteByBillingAccount method.
type RoleAssignmentsClientDeleteByBillingAccountResponse ¶ added in v0.2.0
type RoleAssignmentsClientDeleteByBillingAccountResponse struct {
RoleAssignment
}
RoleAssignmentsClientDeleteByBillingAccountResponse contains the response from method RoleAssignmentsClient.DeleteByBillingAccount.
type RoleAssignmentsClientDeleteByBillingProfileOptions ¶ added in v0.2.0
type RoleAssignmentsClientDeleteByBillingProfileOptions struct { }
RoleAssignmentsClientDeleteByBillingProfileOptions contains the optional parameters for the RoleAssignmentsClient.DeleteByBillingProfile method.
type RoleAssignmentsClientDeleteByBillingProfileResponse ¶ added in v0.2.0
type RoleAssignmentsClientDeleteByBillingProfileResponse struct {
RoleAssignment
}
RoleAssignmentsClientDeleteByBillingProfileResponse contains the response from method RoleAssignmentsClient.DeleteByBillingProfile.
type RoleAssignmentsClientDeleteByInvoiceSectionOptions ¶ added in v0.2.0
type RoleAssignmentsClientDeleteByInvoiceSectionOptions struct { }
RoleAssignmentsClientDeleteByInvoiceSectionOptions contains the optional parameters for the RoleAssignmentsClient.DeleteByInvoiceSection method.
type RoleAssignmentsClientDeleteByInvoiceSectionResponse ¶ added in v0.2.0
type RoleAssignmentsClientDeleteByInvoiceSectionResponse struct {
RoleAssignment
}
RoleAssignmentsClientDeleteByInvoiceSectionResponse contains the response from method RoleAssignmentsClient.DeleteByInvoiceSection.
type RoleAssignmentsClientGetByBillingAccountOptions ¶ added in v0.2.0
type RoleAssignmentsClientGetByBillingAccountOptions struct { }
RoleAssignmentsClientGetByBillingAccountOptions contains the optional parameters for the RoleAssignmentsClient.GetByBillingAccount method.
type RoleAssignmentsClientGetByBillingAccountResponse ¶ added in v0.2.0
type RoleAssignmentsClientGetByBillingAccountResponse struct {
RoleAssignment
}
RoleAssignmentsClientGetByBillingAccountResponse contains the response from method RoleAssignmentsClient.GetByBillingAccount.
type RoleAssignmentsClientGetByBillingProfileOptions ¶ added in v0.2.0
type RoleAssignmentsClientGetByBillingProfileOptions struct { }
RoleAssignmentsClientGetByBillingProfileOptions contains the optional parameters for the RoleAssignmentsClient.GetByBillingProfile method.
type RoleAssignmentsClientGetByBillingProfileResponse ¶ added in v0.2.0
type RoleAssignmentsClientGetByBillingProfileResponse struct {
RoleAssignment
}
RoleAssignmentsClientGetByBillingProfileResponse contains the response from method RoleAssignmentsClient.GetByBillingProfile.
type RoleAssignmentsClientGetByInvoiceSectionOptions ¶ added in v0.2.0
type RoleAssignmentsClientGetByInvoiceSectionOptions struct { }
RoleAssignmentsClientGetByInvoiceSectionOptions contains the optional parameters for the RoleAssignmentsClient.GetByInvoiceSection method.
type RoleAssignmentsClientGetByInvoiceSectionResponse ¶ added in v0.2.0
type RoleAssignmentsClientGetByInvoiceSectionResponse struct {
RoleAssignment
}
RoleAssignmentsClientGetByInvoiceSectionResponse contains the response from method RoleAssignmentsClient.GetByInvoiceSection.
type RoleAssignmentsClientListByBillingAccountOptions ¶ added in v0.2.0
type RoleAssignmentsClientListByBillingAccountOptions struct { }
RoleAssignmentsClientListByBillingAccountOptions contains the optional parameters for the RoleAssignmentsClient.ListByBillingAccount method.
type RoleAssignmentsClientListByBillingAccountResponse ¶ added in v0.2.0
type RoleAssignmentsClientListByBillingAccountResponse struct {
RoleAssignmentListResult
}
RoleAssignmentsClientListByBillingAccountResponse contains the response from method RoleAssignmentsClient.ListByBillingAccount.
type RoleAssignmentsClientListByBillingProfileOptions ¶ added in v0.2.0
type RoleAssignmentsClientListByBillingProfileOptions struct { }
RoleAssignmentsClientListByBillingProfileOptions contains the optional parameters for the RoleAssignmentsClient.ListByBillingProfile method.
type RoleAssignmentsClientListByBillingProfileResponse ¶ added in v0.2.0
type RoleAssignmentsClientListByBillingProfileResponse struct {
RoleAssignmentListResult
}
RoleAssignmentsClientListByBillingProfileResponse contains the response from method RoleAssignmentsClient.ListByBillingProfile.
type RoleAssignmentsClientListByInvoiceSectionOptions ¶ added in v0.2.0
type RoleAssignmentsClientListByInvoiceSectionOptions struct { }
RoleAssignmentsClientListByInvoiceSectionOptions contains the optional parameters for the RoleAssignmentsClient.ListByInvoiceSection method.
type RoleAssignmentsClientListByInvoiceSectionResponse ¶ added in v0.2.0
type RoleAssignmentsClientListByInvoiceSectionResponse struct {
RoleAssignmentListResult
}
RoleAssignmentsClientListByInvoiceSectionResponse contains the response from method RoleAssignmentsClient.ListByInvoiceSection.
type RoleDefinition ¶ added in v0.2.0
type RoleDefinition struct { // The properties of the a role definition. Properties *RoleDefinitionProperties `json:"properties,omitempty"` // READ-ONLY; Resource Id. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
RoleDefinition - The properties of a role definition.
type RoleDefinitionListResult ¶ added in v0.2.0
type RoleDefinitionListResult struct { // READ-ONLY; The link (url) to the next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; The role definitions. Value []*RoleDefinition `json:"value,omitempty" azure:"ro"` }
RoleDefinitionListResult - The list of role definitions.
type RoleDefinitionProperties ¶ added in v0.2.0
type RoleDefinitionProperties struct { // The billingPermissions the role has Permissions []*PermissionsProperties `json:"permissions,omitempty"` // READ-ONLY; The role description Description *string `json:"description,omitempty" azure:"ro"` // READ-ONLY; The name of the role RoleName *string `json:"roleName,omitempty" azure:"ro"` }
RoleDefinitionProperties - The properties of the a role definition.
func (RoleDefinitionProperties) MarshalJSON ¶ added in v0.2.0
func (r RoleDefinitionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RoleDefinitionProperties.
type RoleDefinitionsClient ¶ added in v0.2.0
type RoleDefinitionsClient struct {
// contains filtered or unexported fields
}
RoleDefinitionsClient contains the methods for the BillingRoleDefinitions group. Don't use this type directly, use NewRoleDefinitionsClient() instead.
func NewRoleDefinitionsClient ¶ added in v0.2.0
func NewRoleDefinitionsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*RoleDefinitionsClient, error)
NewRoleDefinitionsClient creates a new instance of RoleDefinitionsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*RoleDefinitionsClient) GetByBillingAccount ¶ added in v0.2.0
func (client *RoleDefinitionsClient) GetByBillingAccount(ctx context.Context, billingAccountName string, billingRoleDefinitionName string, options *RoleDefinitionsClientGetByBillingAccountOptions) (RoleDefinitionsClientGetByBillingAccountResponse, error)
GetByBillingAccount - Gets the definition for a role on a billing account. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. billingRoleDefinitionName - The ID that uniquely identifies a role definition. options - RoleDefinitionsClientGetByBillingAccountOptions contains the optional parameters for the RoleDefinitionsClient.GetByBillingAccount method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingAccountRoleDefinition.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewRoleDefinitionsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.GetByBillingAccount(ctx, "{billingAccountName}", "{billingRoleDefinitionName}", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*RoleDefinitionsClient) GetByBillingProfile ¶ added in v0.2.0
func (client *RoleDefinitionsClient) GetByBillingProfile(ctx context.Context, billingAccountName string, billingProfileName string, billingRoleDefinitionName string, options *RoleDefinitionsClientGetByBillingProfileOptions) (RoleDefinitionsClientGetByBillingProfileResponse, error)
GetByBillingProfile - Gets the definition for a role on a billing profile. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. billingProfileName - The ID that uniquely identifies a billing profile. billingRoleDefinitionName - The ID that uniquely identifies a role definition. options - RoleDefinitionsClientGetByBillingProfileOptions contains the optional parameters for the RoleDefinitionsClient.GetByBillingProfile method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingProfileRoleDefinition.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewRoleDefinitionsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.GetByBillingProfile(ctx, "{billingAccountName}", "{billingProfileName}", "{billingRoleDefinitionName}", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*RoleDefinitionsClient) GetByInvoiceSection ¶ added in v0.2.0
func (client *RoleDefinitionsClient) GetByInvoiceSection(ctx context.Context, billingAccountName string, billingProfileName string, invoiceSectionName string, billingRoleDefinitionName string, options *RoleDefinitionsClientGetByInvoiceSectionOptions) (RoleDefinitionsClientGetByInvoiceSectionResponse, error)
GetByInvoiceSection - Gets the definition for a role on an invoice section. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. billingProfileName - The ID that uniquely identifies a billing profile. invoiceSectionName - The ID that uniquely identifies an invoice section. billingRoleDefinitionName - The ID that uniquely identifies a role definition. options - RoleDefinitionsClientGetByInvoiceSectionOptions contains the optional parameters for the RoleDefinitionsClient.GetByInvoiceSection method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/InvoiceSectionRoleDefinition.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewRoleDefinitionsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.GetByInvoiceSection(ctx, "{billingAccountName}", "{billingProfileName}", "{invoiceSectionName}", "{billingRoleDefinitionName}", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*RoleDefinitionsClient) NewListByBillingAccountPager ¶ added in v0.4.0
func (client *RoleDefinitionsClient) NewListByBillingAccountPager(billingAccountName string, options *RoleDefinitionsClientListByBillingAccountOptions) *runtime.Pager[RoleDefinitionsClientListByBillingAccountResponse]
NewListByBillingAccountPager - Lists the role definitions for a billing account. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. options - RoleDefinitionsClientListByBillingAccountOptions contains the optional parameters for the RoleDefinitionsClient.ListByBillingAccount method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingAccountRoleDefinitionsList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewRoleDefinitionsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByBillingAccountPager("{billingAccountName}", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*RoleDefinitionsClient) NewListByBillingProfilePager ¶ added in v0.4.0
func (client *RoleDefinitionsClient) NewListByBillingProfilePager(billingAccountName string, billingProfileName string, options *RoleDefinitionsClientListByBillingProfileOptions) *runtime.Pager[RoleDefinitionsClientListByBillingProfileResponse]
NewListByBillingProfilePager - Lists the role definitions for a billing profile. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. billingProfileName - The ID that uniquely identifies a billing profile. options - RoleDefinitionsClientListByBillingProfileOptions contains the optional parameters for the RoleDefinitionsClient.ListByBillingProfile method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingProfileRoleDefinitionsList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewRoleDefinitionsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByBillingProfilePager("{billingAccountName}", "{billingProfileName}", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*RoleDefinitionsClient) NewListByInvoiceSectionPager ¶ added in v0.4.0
func (client *RoleDefinitionsClient) NewListByInvoiceSectionPager(billingAccountName string, billingProfileName string, invoiceSectionName string, options *RoleDefinitionsClientListByInvoiceSectionOptions) *runtime.Pager[RoleDefinitionsClientListByInvoiceSectionResponse]
NewListByInvoiceSectionPager - Lists the role definitions for an invoice section. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 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. options - RoleDefinitionsClientListByInvoiceSectionOptions contains the optional parameters for the RoleDefinitionsClient.ListByInvoiceSection method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/InvoiceSectionRoleDefinitionsList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewRoleDefinitionsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByInvoiceSectionPager("{billingAccountName}", "{billingProfileName}", "{invoiceSectionName}", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type RoleDefinitionsClientGetByBillingAccountOptions ¶ added in v0.2.0
type RoleDefinitionsClientGetByBillingAccountOptions struct { }
RoleDefinitionsClientGetByBillingAccountOptions contains the optional parameters for the RoleDefinitionsClient.GetByBillingAccount method.
type RoleDefinitionsClientGetByBillingAccountResponse ¶ added in v0.2.0
type RoleDefinitionsClientGetByBillingAccountResponse struct {
RoleDefinition
}
RoleDefinitionsClientGetByBillingAccountResponse contains the response from method RoleDefinitionsClient.GetByBillingAccount.
type RoleDefinitionsClientGetByBillingProfileOptions ¶ added in v0.2.0
type RoleDefinitionsClientGetByBillingProfileOptions struct { }
RoleDefinitionsClientGetByBillingProfileOptions contains the optional parameters for the RoleDefinitionsClient.GetByBillingProfile method.
type RoleDefinitionsClientGetByBillingProfileResponse ¶ added in v0.2.0
type RoleDefinitionsClientGetByBillingProfileResponse struct {
RoleDefinition
}
RoleDefinitionsClientGetByBillingProfileResponse contains the response from method RoleDefinitionsClient.GetByBillingProfile.
type RoleDefinitionsClientGetByInvoiceSectionOptions ¶ added in v0.2.0
type RoleDefinitionsClientGetByInvoiceSectionOptions struct { }
RoleDefinitionsClientGetByInvoiceSectionOptions contains the optional parameters for the RoleDefinitionsClient.GetByInvoiceSection method.
type RoleDefinitionsClientGetByInvoiceSectionResponse ¶ added in v0.2.0
type RoleDefinitionsClientGetByInvoiceSectionResponse struct {
RoleDefinition
}
RoleDefinitionsClientGetByInvoiceSectionResponse contains the response from method RoleDefinitionsClient.GetByInvoiceSection.
type RoleDefinitionsClientListByBillingAccountOptions ¶ added in v0.2.0
type RoleDefinitionsClientListByBillingAccountOptions struct { }
RoleDefinitionsClientListByBillingAccountOptions contains the optional parameters for the RoleDefinitionsClient.ListByBillingAccount method.
type RoleDefinitionsClientListByBillingAccountResponse ¶ added in v0.2.0
type RoleDefinitionsClientListByBillingAccountResponse struct {
RoleDefinitionListResult
}
RoleDefinitionsClientListByBillingAccountResponse contains the response from method RoleDefinitionsClient.ListByBillingAccount.
type RoleDefinitionsClientListByBillingProfileOptions ¶ added in v0.2.0
type RoleDefinitionsClientListByBillingProfileOptions struct { }
RoleDefinitionsClientListByBillingProfileOptions contains the optional parameters for the RoleDefinitionsClient.ListByBillingProfile method.
type RoleDefinitionsClientListByBillingProfileResponse ¶ added in v0.2.0
type RoleDefinitionsClientListByBillingProfileResponse struct {
RoleDefinitionListResult
}
RoleDefinitionsClientListByBillingProfileResponse contains the response from method RoleDefinitionsClient.ListByBillingProfile.
type RoleDefinitionsClientListByInvoiceSectionOptions ¶ added in v0.2.0
type RoleDefinitionsClientListByInvoiceSectionOptions struct { }
RoleDefinitionsClientListByInvoiceSectionOptions contains the optional parameters for the RoleDefinitionsClient.ListByInvoiceSection method.
type RoleDefinitionsClientListByInvoiceSectionResponse ¶ added in v0.2.0
type RoleDefinitionsClientListByInvoiceSectionResponse struct {
RoleDefinitionListResult
}
RoleDefinitionsClientListByInvoiceSectionResponse contains the response from method RoleDefinitionsClient.ListByInvoiceSection.
type SpendingLimit ¶
type SpendingLimit string
SpendingLimit - The billing profile spending limit.
const ( SpendingLimitOff SpendingLimit = "Off" SpendingLimitOn SpendingLimit = "On" )
func PossibleSpendingLimitValues ¶
func PossibleSpendingLimitValues() []SpendingLimit
PossibleSpendingLimitValues returns the possible values for the SpendingLimit const type.
type SpendingLimitForBillingProfile ¶
type SpendingLimitForBillingProfile string
SpendingLimitForBillingProfile - The billing profile spending limit.
const ( SpendingLimitForBillingProfileOff SpendingLimitForBillingProfile = "Off" SpendingLimitForBillingProfileOn SpendingLimitForBillingProfile = "On" )
func PossibleSpendingLimitForBillingProfileValues ¶
func PossibleSpendingLimitForBillingProfileValues() []SpendingLimitForBillingProfile
PossibleSpendingLimitForBillingProfileValues returns the possible values for the SpendingLimitForBillingProfile const type.
type StatusReasonCode ¶
type StatusReasonCode string
StatusReasonCode - Reason for the specified billing profile status.
const ( StatusReasonCodePastDue StatusReasonCode = "PastDue" StatusReasonCodeSpendingLimitExpired StatusReasonCode = "SpendingLimitExpired" StatusReasonCodeSpendingLimitReached StatusReasonCode = "SpendingLimitReached" )
func PossibleStatusReasonCodeValues ¶
func PossibleStatusReasonCodeValues() []StatusReasonCode
PossibleStatusReasonCodeValues returns the possible values for the StatusReasonCode const type.
type StatusReasonCodeForBillingProfile ¶
type StatusReasonCodeForBillingProfile string
StatusReasonCodeForBillingProfile - Reason for the specified billing profile status.
const ( StatusReasonCodeForBillingProfilePastDue StatusReasonCodeForBillingProfile = "PastDue" StatusReasonCodeForBillingProfileSpendingLimitExpired StatusReasonCodeForBillingProfile = "SpendingLimitExpired" StatusReasonCodeForBillingProfileSpendingLimitReached StatusReasonCodeForBillingProfile = "SpendingLimitReached" )
func PossibleStatusReasonCodeForBillingProfileValues ¶
func PossibleStatusReasonCodeForBillingProfileValues() []StatusReasonCodeForBillingProfile
PossibleStatusReasonCodeForBillingProfileValues returns the possible values for the StatusReasonCodeForBillingProfile const type.
type Subscription ¶ added in v0.2.0
type Subscription struct { // The billing properties of a subscription. Properties *SubscriptionProperties `json:"properties,omitempty"` // READ-ONLY; Resource Id. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
Subscription - A billing subscription.
func (Subscription) MarshalJSON ¶ added in v0.2.0
func (s Subscription) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type Subscription.
type SubscriptionProperties ¶ added in v0.2.0
type SubscriptionProperties struct { // The cost center applied to the subscription. CostCenter *string `json:"costCenter,omitempty"` // The sku ID of the Azure plan for the subscription. SKUID *string `json:"skuId,omitempty"` // The current billing status of the subscription. SubscriptionBillingStatus *BillingSubscriptionStatusType `json:"subscriptionBillingStatus,omitempty"` // READ-ONLY; The name of the billing profile to which the subscription is billed. BillingProfileDisplayName *string `json:"billingProfileDisplayName,omitempty" azure:"ro"` // READ-ONLY; The ID of the billing profile to which the subscription is billed. BillingProfileID *string `json:"billingProfileId,omitempty" azure:"ro"` // READ-ONLY; The name of the customer for whom the subscription was created. The field is applicable only for Microsoft Partner // Agreement billing account. CustomerDisplayName *string `json:"customerDisplayName,omitempty" azure:"ro"` // READ-ONLY; The ID of the customer for whom the subscription was created. The field is applicable only for Microsoft Partner // Agreement billing account. CustomerID *string `json:"customerId,omitempty" azure:"ro"` // READ-ONLY; The name of the subscription. DisplayName *string `json:"displayName,omitempty" azure:"ro"` // READ-ONLY; The name of the invoice section to which the subscription is billed. InvoiceSectionDisplayName *string `json:"invoiceSectionDisplayName,omitempty" azure:"ro"` // READ-ONLY; The ID of the invoice section to which the subscription is billed. InvoiceSectionID *string `json:"invoiceSectionId,omitempty" azure:"ro"` // READ-ONLY; The last month charges. LastMonthCharges *Amount `json:"lastMonthCharges,omitempty" azure:"ro"` // READ-ONLY; The current month to date charges. MonthToDateCharges *Amount `json:"monthToDateCharges,omitempty" azure:"ro"` // READ-ONLY; Reseller for this subscription. Reseller *Reseller `json:"reseller,omitempty" azure:"ro"` // READ-ONLY; The sku description of the Azure plan for the subscription. SKUDescription *string `json:"skuDescription,omitempty" azure:"ro"` // READ-ONLY; The ID of the subscription. SubscriptionID *string `json:"subscriptionId,omitempty" azure:"ro"` // READ-ONLY; The suspension reason for a subscription. Applies only to subscriptions in Microsoft Online Services Program // billing accounts. SuspensionReasons []*string `json:"suspensionReasons,omitempty" azure:"ro"` }
SubscriptionProperties - The billing properties of a subscription.
func (SubscriptionProperties) MarshalJSON ¶ added in v0.2.0
func (s SubscriptionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SubscriptionProperties.
type SubscriptionTransferValidationErrorCode ¶
type SubscriptionTransferValidationErrorCode string
SubscriptionTransferValidationErrorCode - Error code of the transfer validation response.
const ( SubscriptionTransferValidationErrorCodeBillingAccountInactive SubscriptionTransferValidationErrorCode = "BillingAccountInactive" SubscriptionTransferValidationErrorCodeCrossBillingAccountNotAllowed SubscriptionTransferValidationErrorCode = "CrossBillingAccountNotAllowed" SubscriptionTransferValidationErrorCodeDestinationBillingProfileInactive SubscriptionTransferValidationErrorCode = "DestinationBillingProfileInactive" SubscriptionTransferValidationErrorCodeDestinationBillingProfileNotFound SubscriptionTransferValidationErrorCode = "DestinationBillingProfileNotFound" SubscriptionTransferValidationErrorCodeDestinationBillingProfilePastDue SubscriptionTransferValidationErrorCode = "DestinationBillingProfilePastDue" SubscriptionTransferValidationErrorCodeDestinationInvoiceSectionInactive SubscriptionTransferValidationErrorCode = "DestinationInvoiceSectionInactive" SubscriptionTransferValidationErrorCodeDestinationInvoiceSectionNotFound SubscriptionTransferValidationErrorCode = "DestinationInvoiceSectionNotFound" SubscriptionTransferValidationErrorCodeInsufficientPermissionOnDestination SubscriptionTransferValidationErrorCode = "InsufficientPermissionOnDestination" SubscriptionTransferValidationErrorCodeInsufficientPermissionOnSource SubscriptionTransferValidationErrorCode = "InsufficientPermissionOnSource" SubscriptionTransferValidationErrorCodeInvalidDestination SubscriptionTransferValidationErrorCode = "InvalidDestination" SubscriptionTransferValidationErrorCodeInvalidSource SubscriptionTransferValidationErrorCode = "InvalidSource" SubscriptionTransferValidationErrorCodeMarketplaceNotEnabledOnDestination SubscriptionTransferValidationErrorCode = "MarketplaceNotEnabledOnDestination" SubscriptionTransferValidationErrorCodeNotAvailableForDestinationMarket SubscriptionTransferValidationErrorCode = "NotAvailableForDestinationMarket" SubscriptionTransferValidationErrorCodeProductInactive SubscriptionTransferValidationErrorCode = "ProductInactive" SubscriptionTransferValidationErrorCodeProductNotFound SubscriptionTransferValidationErrorCode = "ProductNotFound" SubscriptionTransferValidationErrorCodeProductTypeNotSupported SubscriptionTransferValidationErrorCode = "ProductTypeNotSupported" SubscriptionTransferValidationErrorCodeSourceBillingProfilePastDue SubscriptionTransferValidationErrorCode = "SourceBillingProfilePastDue" SubscriptionTransferValidationErrorCodeSourceInvoiceSectionInactive SubscriptionTransferValidationErrorCode = "SourceInvoiceSectionInactive" SubscriptionTransferValidationErrorCodeSubscriptionNotActive SubscriptionTransferValidationErrorCode = "SubscriptionNotActive" SubscriptionTransferValidationErrorCodeSubscriptionTypeNotSupported SubscriptionTransferValidationErrorCode = "SubscriptionTypeNotSupported" )
func PossibleSubscriptionTransferValidationErrorCodeValues ¶
func PossibleSubscriptionTransferValidationErrorCodeValues() []SubscriptionTransferValidationErrorCode
PossibleSubscriptionTransferValidationErrorCodeValues returns the possible values for the SubscriptionTransferValidationErrorCode const type.
type SubscriptionsClient ¶ added in v0.2.0
type SubscriptionsClient struct {
// contains filtered or unexported fields
}
SubscriptionsClient contains the methods for the BillingSubscriptions group. Don't use this type directly, use NewSubscriptionsClient() instead.
func NewSubscriptionsClient ¶ added in v0.2.0
func NewSubscriptionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SubscriptionsClient, error)
NewSubscriptionsClient creates a new instance of SubscriptionsClient with the specified values. subscriptionID - The ID that uniquely identifies an Azure subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*SubscriptionsClient) BeginMove ¶ added in v0.2.0
func (client *SubscriptionsClient) BeginMove(ctx context.Context, billingAccountName string, parameters TransferBillingSubscriptionRequestProperties, options *SubscriptionsClientBeginMoveOptions) (*runtime.Poller[SubscriptionsClientMoveResponse], error)
BeginMove - Moves a subscription's charges to a new invoice section. The new invoice section must belong to the same billing profile as the existing invoice section. This operation is supported for billing accounts with agreement type Microsoft Customer Agreement. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. parameters - Request parameters that are provided to the move subscription operation. options - SubscriptionsClientBeginMoveOptions contains the optional parameters for the SubscriptionsClient.BeginMove method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/MoveBillingSubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewSubscriptionsClient("{subscriptionId}", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginMove(ctx, "{billingAccountName}", armbilling.TransferBillingSubscriptionRequestProperties{ DestinationInvoiceSectionID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{newInvoiceSectionName}"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
func (*SubscriptionsClient) Get ¶ added in v0.2.0
func (client *SubscriptionsClient) Get(ctx context.Context, billingAccountName string, options *SubscriptionsClientGetOptions) (SubscriptionsClientGetResponse, error)
Get - Gets a subscription by its ID. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement and Microsoft Partner Agreement. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. options - SubscriptionsClientGetOptions contains the optional parameters for the SubscriptionsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingSubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewSubscriptionsClient("{subscriptionId}", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "{billingAccountName}", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*SubscriptionsClient) NewListByBillingAccountPager ¶ added in v0.4.0
func (client *SubscriptionsClient) NewListByBillingAccountPager(billingAccountName string, options *SubscriptionsClientListByBillingAccountOptions) *runtime.Pager[SubscriptionsClientListByBillingAccountResponse]
NewListByBillingAccountPager - Lists the subscriptions for a billing account. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. options - SubscriptionsClientListByBillingAccountOptions contains the optional parameters for the SubscriptionsClient.ListByBillingAccount method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingSubscriptionsListByBillingAccount.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewSubscriptionsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByBillingAccountPager("{billingAccountName}", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*SubscriptionsClient) NewListByBillingProfilePager ¶ added in v0.4.0
func (client *SubscriptionsClient) NewListByBillingProfilePager(billingAccountName string, billingProfileName string, options *SubscriptionsClientListByBillingProfileOptions) *runtime.Pager[SubscriptionsClientListByBillingProfileResponse]
NewListByBillingProfilePager - Lists the subscriptions that are billed to a billing profile. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. billingProfileName - The ID that uniquely identifies a billing profile. options - SubscriptionsClientListByBillingProfileOptions contains the optional parameters for the SubscriptionsClient.ListByBillingProfile method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingSubscriptionsListByBillingProfile.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewSubscriptionsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByBillingProfilePager("{billingAccountName}", "{billingProfileName}", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*SubscriptionsClient) NewListByCustomerPager ¶ added in v0.4.0
func (client *SubscriptionsClient) NewListByCustomerPager(billingAccountName string, customerName string, options *SubscriptionsClientListByCustomerOptions) *runtime.Pager[SubscriptionsClientListByCustomerResponse]
NewListByCustomerPager - Lists the subscriptions for a customer. The operation is supported only for billing accounts with agreement type Microsoft Partner Agreement. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. customerName - The ID that uniquely identifies a customer. options - SubscriptionsClientListByCustomerOptions contains the optional parameters for the SubscriptionsClient.ListByCustomer method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingSubscriptionsListByCustomer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewSubscriptionsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByCustomerPager("{billingAccountName}", "{customerName}", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*SubscriptionsClient) NewListByInvoiceSectionPager ¶ added in v0.4.0
func (client *SubscriptionsClient) NewListByInvoiceSectionPager(billingAccountName string, billingProfileName string, invoiceSectionName string, options *SubscriptionsClientListByInvoiceSectionOptions) *runtime.Pager[SubscriptionsClientListByInvoiceSectionResponse]
NewListByInvoiceSectionPager - Lists the subscriptions that are billed to an invoice section. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 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. options - SubscriptionsClientListByInvoiceSectionOptions contains the optional parameters for the SubscriptionsClient.ListByInvoiceSection method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/BillingSubscriptionsListByInvoiceSection.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewSubscriptionsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByInvoiceSectionPager("{billingAccountName}", "{billingProfileName}", "{invoiceSectionName}", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*SubscriptionsClient) Update ¶ added in v0.2.0
func (client *SubscriptionsClient) Update(ctx context.Context, billingAccountName string, parameters Subscription, options *SubscriptionsClientUpdateOptions) (SubscriptionsClientUpdateResponse, error)
Update - Updates the properties of a billing subscription. Currently, cost center can be updated. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. parameters - Request parameters that are provided to the update billing subscription operation. options - SubscriptionsClientUpdateOptions contains the optional parameters for the SubscriptionsClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/UpdateBillingSubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewSubscriptionsClient("{subscriptionId}", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Update(ctx, "{billingAccountName}", armbilling.Subscription{ Properties: &armbilling.SubscriptionProperties{ CostCenter: to.Ptr("ABC1234"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*SubscriptionsClient) ValidateMove ¶ added in v0.2.0
func (client *SubscriptionsClient) ValidateMove(ctx context.Context, billingAccountName string, parameters TransferBillingSubscriptionRequestProperties, options *SubscriptionsClientValidateMoveOptions) (SubscriptionsClientValidateMoveResponse, error)
ValidateMove - Validates if a subscription's charges can be moved to a new invoice section. This operation is supported for billing accounts with agreement type Microsoft Customer Agreement. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. parameters - Request parameters that are provided to the validate move eligibility operation. options - SubscriptionsClientValidateMoveOptions contains the optional parameters for the SubscriptionsClient.ValidateMove method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/ValidateSubscriptionMoveFailure.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewSubscriptionsClient("{subscriptionId}", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.ValidateMove(ctx, "{billingAccountName}", armbilling.TransferBillingSubscriptionRequestProperties{ DestinationInvoiceSectionID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{newInvoiceSectionName}"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
type SubscriptionsClientBeginMoveOptions ¶ added in v0.2.0
type SubscriptionsClientBeginMoveOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SubscriptionsClientBeginMoveOptions contains the optional parameters for the SubscriptionsClient.BeginMove method.
type SubscriptionsClientGetOptions ¶ added in v0.2.0
type SubscriptionsClientGetOptions struct { }
SubscriptionsClientGetOptions contains the optional parameters for the SubscriptionsClient.Get method.
type SubscriptionsClientGetResponse ¶ added in v0.2.0
type SubscriptionsClientGetResponse struct {
Subscription
}
SubscriptionsClientGetResponse contains the response from method SubscriptionsClient.Get.
type SubscriptionsClientListByBillingAccountOptions ¶ added in v0.2.0
type SubscriptionsClientListByBillingAccountOptions struct { }
SubscriptionsClientListByBillingAccountOptions contains the optional parameters for the SubscriptionsClient.ListByBillingAccount method.
type SubscriptionsClientListByBillingAccountResponse ¶ added in v0.2.0
type SubscriptionsClientListByBillingAccountResponse struct {
SubscriptionsListResult
}
SubscriptionsClientListByBillingAccountResponse contains the response from method SubscriptionsClient.ListByBillingAccount.
type SubscriptionsClientListByBillingProfileOptions ¶ added in v0.2.0
type SubscriptionsClientListByBillingProfileOptions struct { }
SubscriptionsClientListByBillingProfileOptions contains the optional parameters for the SubscriptionsClient.ListByBillingProfile method.
type SubscriptionsClientListByBillingProfileResponse ¶ added in v0.2.0
type SubscriptionsClientListByBillingProfileResponse struct {
SubscriptionsListResult
}
SubscriptionsClientListByBillingProfileResponse contains the response from method SubscriptionsClient.ListByBillingProfile.
type SubscriptionsClientListByCustomerOptions ¶ added in v0.2.0
type SubscriptionsClientListByCustomerOptions struct { }
SubscriptionsClientListByCustomerOptions contains the optional parameters for the SubscriptionsClient.ListByCustomer method.
type SubscriptionsClientListByCustomerResponse ¶ added in v0.2.0
type SubscriptionsClientListByCustomerResponse struct {
SubscriptionsListResult
}
SubscriptionsClientListByCustomerResponse contains the response from method SubscriptionsClient.ListByCustomer.
type SubscriptionsClientListByInvoiceSectionOptions ¶ added in v0.2.0
type SubscriptionsClientListByInvoiceSectionOptions struct { }
SubscriptionsClientListByInvoiceSectionOptions contains the optional parameters for the SubscriptionsClient.ListByInvoiceSection method.
type SubscriptionsClientListByInvoiceSectionResponse ¶ added in v0.2.0
type SubscriptionsClientListByInvoiceSectionResponse struct {
SubscriptionsListResult
}
SubscriptionsClientListByInvoiceSectionResponse contains the response from method SubscriptionsClient.ListByInvoiceSection.
type SubscriptionsClientMoveResponse ¶ added in v0.2.0
type SubscriptionsClientMoveResponse struct {
Subscription
}
SubscriptionsClientMoveResponse contains the response from method SubscriptionsClient.Move.
type SubscriptionsClientUpdateOptions ¶ added in v0.2.0
type SubscriptionsClientUpdateOptions struct { }
SubscriptionsClientUpdateOptions contains the optional parameters for the SubscriptionsClient.Update method.
type SubscriptionsClientUpdateResponse ¶ added in v0.2.0
type SubscriptionsClientUpdateResponse struct {
Subscription
}
SubscriptionsClientUpdateResponse contains the response from method SubscriptionsClient.Update.
type SubscriptionsClientValidateMoveOptions ¶ added in v0.2.0
type SubscriptionsClientValidateMoveOptions struct { }
SubscriptionsClientValidateMoveOptions contains the optional parameters for the SubscriptionsClient.ValidateMove method.
type SubscriptionsClientValidateMoveResponse ¶ added in v0.2.0
type SubscriptionsClientValidateMoveResponse struct {
ValidateSubscriptionTransferEligibilityResult
}
SubscriptionsClientValidateMoveResponse contains the response from method SubscriptionsClient.ValidateMove.
type SubscriptionsListResult ¶ added in v0.2.0
type SubscriptionsListResult struct { // READ-ONLY; The link (url) to the next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Total number of records. TotalCount *int32 `json:"totalCount,omitempty" azure:"ro"` // READ-ONLY; The list of billing subscriptions. Value []*Subscription `json:"value,omitempty" azure:"ro"` }
SubscriptionsListResult - The list of billing subscriptions.
type TargetCloud ¶
type TargetCloud string
TargetCloud - Possible cloud environments.
const ( TargetCloudUSGov TargetCloud = "USGov" TargetCloudUSNat TargetCloud = "USNat" TargetCloudUSSec TargetCloud = "USSec" )
func PossibleTargetCloudValues ¶
func PossibleTargetCloudValues() []TargetCloud
PossibleTargetCloudValues returns the possible values for the TargetCloud const type.
type Transaction ¶
type Transaction struct { // The properties of a transaction. Properties *TransactionProperties `json:"properties,omitempty"` // READ-ONLY; Resource Id. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
Transaction - A transaction.
type TransactionListResult ¶
type TransactionListResult struct { // READ-ONLY; The link (url) to the next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Total number of records. TotalCount *int32 `json:"totalCount,omitempty" azure:"ro"` // READ-ONLY; The list of transactions. Value []*Transaction `json:"value,omitempty" azure:"ro"` }
TransactionListResult - The list of transactions.
type TransactionProperties ¶
type TransactionProperties struct { // The kind of transaction. Options are all or reservation. Kind *TransactionTypeKind `json:"kind,omitempty"` // The type of transaction. TransactionType *ReservationType `json:"transactionType,omitempty"` // READ-ONLY; The amount of any Azure credits automatically applied to this transaction. AzureCreditApplied *Amount `json:"azureCreditApplied,omitempty" azure:"ro"` // READ-ONLY; The type of azure plan of the subscription that was used for the transaction. AzurePlan *string `json:"azurePlan,omitempty" azure:"ro"` // READ-ONLY; The ISO 4217 code for the currency in which this transaction is billed. BillingCurrency *string `json:"billingCurrency,omitempty" azure:"ro"` // READ-ONLY; The name of the billing profile which will be billed for the transaction. BillingProfileDisplayName *string `json:"billingProfileDisplayName,omitempty" azure:"ro"` // READ-ONLY; The ID of the billing profile which will be billed for the transaction. BillingProfileID *string `json:"billingProfileId,omitempty" azure:"ro"` // READ-ONLY; The name of the customer for which the transaction took place. The field is applicable only for Microsoft Partner // Agreement billing account. CustomerDisplayName *string `json:"customerDisplayName,omitempty" azure:"ro"` // READ-ONLY; The ID of the customer for which the transaction took place. The field is applicable only for Microsoft Partner // Agreement billing account. CustomerID *string `json:"customerId,omitempty" azure:"ro"` // READ-ONLY; The date of transaction. Date *time.Time `json:"date,omitempty" azure:"ro"` // READ-ONLY; The percentage discount, if any, applied to this transaction. Discount *float32 `json:"discount,omitempty" azure:"ro"` // READ-ONLY; The price of the product after applying any discounts. EffectivePrice *Amount `json:"effectivePrice,omitempty" azure:"ro"` // READ-ONLY; The exchange rate used to convert charged amount to billing currency, if applicable. ExchangeRate *float32 `json:"exchangeRate,omitempty" azure:"ro"` // READ-ONLY; Invoice on which the transaction was billed or 'pending' if the transaction is not billed. Invoice *string `json:"invoice,omitempty" azure:"ro"` // READ-ONLY; The ID of the invoice on which the transaction was billed. This field is only applicable for transactions which // are billed. InvoiceID *string `json:"invoiceId,omitempty" azure:"ro"` // READ-ONLY; The name of the invoice section which will be billed for the transaction. InvoiceSectionDisplayName *string `json:"invoiceSectionDisplayName,omitempty" azure:"ro"` // READ-ONLY; The ID of the invoice section which will be billed for the transaction. InvoiceSectionID *string `json:"invoiceSectionId,omitempty" azure:"ro"` // READ-ONLY; The retail price of the product. MarketPrice *Amount `json:"marketPrice,omitempty" azure:"ro"` // READ-ONLY; The order ID of the reservation. The field is only applicable for transaction of kind reservation. OrderID *string `json:"orderId,omitempty" azure:"ro"` // READ-ONLY; The name of the reservation order. The field is only applicable for transactions of kind reservation. OrderName *string `json:"orderName,omitempty" azure:"ro"` // READ-ONLY; The ISO 4217 code for the currency in which the product is priced. PricingCurrency *string `json:"pricingCurrency,omitempty" azure:"ro"` // READ-ONLY; The description of the product for which the transaction took place. ProductDescription *string `json:"productDescription,omitempty" azure:"ro"` // READ-ONLY; The family of the product for which the transaction took place. ProductFamily *string `json:"productFamily,omitempty" azure:"ro"` // READ-ONLY; The type of the product for which the transaction took place. ProductType *string `json:"productType,omitempty" azure:"ro"` // READ-ONLY; The ID of the product type for which the transaction took place. ProductTypeID *string `json:"productTypeId,omitempty" azure:"ro"` // READ-ONLY; The quantity purchased in the transaction. Quantity *int32 `json:"quantity,omitempty" azure:"ro"` // READ-ONLY; The end date of the product term, or the end date of the month in which usage ended. ServicePeriodEndDate *time.Time `json:"servicePeriodEndDate,omitempty" azure:"ro"` // READ-ONLY; The date of the purchase of the product, or the start date of the month in which usage started. ServicePeriodStartDate *time.Time `json:"servicePeriodStartDate,omitempty" azure:"ro"` // READ-ONLY; The pre-tax charged amount for the transaction. SubTotal *Amount `json:"subTotal,omitempty" azure:"ro"` // READ-ONLY; The ID of the subscription that was used for the transaction. The field is only applicable for transaction of // kind reservation. SubscriptionID *string `json:"subscriptionId,omitempty" azure:"ro"` // READ-ONLY; The name of the subscription that was used for the transaction. The field is only applicable for transaction // of kind reservation. SubscriptionName *string `json:"subscriptionName,omitempty" azure:"ro"` // READ-ONLY; The tax amount applied to the transaction. Tax *Amount `json:"tax,omitempty" azure:"ro"` // READ-ONLY; The charge associated with the transaction. TransactionAmount *Amount `json:"transactionAmount,omitempty" azure:"ro"` // READ-ONLY; The unit of measure used to bill for the product. For example, compute services are billed per hour. UnitOfMeasure *string `json:"unitOfMeasure,omitempty" azure:"ro"` // READ-ONLY; The description for the unit of measure for a given product. UnitType *string `json:"unitType,omitempty" azure:"ro"` // READ-ONLY; The number of units used for a given product. Units *float32 `json:"units,omitempty" azure:"ro"` }
TransactionProperties - The properties of a transaction.
func (TransactionProperties) MarshalJSON ¶
func (t TransactionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TransactionProperties.
func (*TransactionProperties) UnmarshalJSON ¶
func (t *TransactionProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TransactionProperties.
type TransactionTypeKind ¶
type TransactionTypeKind string
TransactionTypeKind - The kind of transaction. Options are all or reservation.
const ( TransactionTypeKindAll TransactionTypeKind = "all" TransactionTypeKindReservation TransactionTypeKind = "reservation" )
func PossibleTransactionTypeKindValues ¶
func PossibleTransactionTypeKindValues() []TransactionTypeKind
PossibleTransactionTypeKindValues returns the possible values for the TransactionTypeKind const type.
type TransactionsClient ¶
type TransactionsClient struct {
// contains filtered or unexported fields
}
TransactionsClient contains the methods for the Transactions group. Don't use this type directly, use NewTransactionsClient() instead.
func NewTransactionsClient ¶
func NewTransactionsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*TransactionsClient, error)
NewTransactionsClient creates a new instance of TransactionsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*TransactionsClient) NewListByInvoicePager ¶ added in v0.4.0
func (client *TransactionsClient) NewListByInvoicePager(billingAccountName string, invoiceName string, options *TransactionsClientListByInvoiceOptions) *runtime.Pager[TransactionsClientListByInvoiceResponse]
NewListByInvoicePager - Lists the transactions for an invoice. Transactions include purchases, refunds and Azure usage charges. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-05-01 billingAccountName - The ID that uniquely identifies a billing account. invoiceName - The ID that uniquely identifies an invoice. options - TransactionsClientListByInvoiceOptions contains the optional parameters for the TransactionsClient.ListByInvoice method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/TransactionsListByInvoice.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armbilling.NewTransactionsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByInvoicePager("{billingAccountName}", "{invoiceName}", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type TransactionsClientListByInvoiceOptions ¶ added in v0.2.0
type TransactionsClientListByInvoiceOptions struct { }
TransactionsClientListByInvoiceOptions contains the optional parameters for the TransactionsClient.ListByInvoice method.
type TransactionsClientListByInvoiceResponse ¶ added in v0.2.0
type TransactionsClientListByInvoiceResponse struct {
TransactionListResult
}
TransactionsClientListByInvoiceResponse contains the response from method TransactionsClient.ListByInvoice.
type TransferBillingSubscriptionRequestProperties ¶
type TransferBillingSubscriptionRequestProperties struct { // REQUIRED; The destination invoice section id. DestinationInvoiceSectionID *string `json:"destinationInvoiceSectionId,omitempty"` }
TransferBillingSubscriptionRequestProperties - Request parameters to transfer billing subscription.
type TransferProductRequestProperties ¶
type TransferProductRequestProperties struct { // The destination invoice section id. DestinationInvoiceSectionID *string `json:"destinationInvoiceSectionId,omitempty"` }
TransferProductRequestProperties - The properties of the product to initiate a transfer.
type ValidateAddressResponse ¶
type ValidateAddressResponse struct { // status of the address validation. Status *AddressValidationStatus `json:"status,omitempty"` // The list of suggested addresses. SuggestedAddresses []*AddressDetails `json:"suggestedAddresses,omitempty"` // Validation error message. ValidationMessage *string `json:"validationMessage,omitempty"` }
ValidateAddressResponse - Result of the address validation
type ValidateProductTransferEligibilityError ¶
type ValidateProductTransferEligibilityError struct { // Error code for the product transfer validation. Code *ProductTransferValidationErrorCode `json:"code,omitempty"` // Detailed error message explaining the error. Details *string `json:"details,omitempty"` // The error message. Message *string `json:"message,omitempty"` }
ValidateProductTransferEligibilityError - Error details of the product transfer eligibility validation.
type ValidateProductTransferEligibilityResult ¶
type ValidateProductTransferEligibilityResult struct { // Validation error details. ErrorDetails *ValidateProductTransferEligibilityError `json:"errorDetails,omitempty"` // READ-ONLY; Specifies whether the transfer is eligible or not. IsMoveEligible *bool `json:"isMoveEligible,omitempty" azure:"ro"` }
ValidateProductTransferEligibilityResult - Result of the product transfer eligibility validation.
type ValidateSubscriptionTransferEligibilityError ¶
type ValidateSubscriptionTransferEligibilityError struct { // Error code for the product transfer validation. Code *SubscriptionTransferValidationErrorCode `json:"code,omitempty"` // Detailed error message explaining the error. Details *string `json:"details,omitempty"` // The error message. Message *string `json:"message,omitempty"` }
ValidateSubscriptionTransferEligibilityError - Error details of the transfer eligibility validation
type ValidateSubscriptionTransferEligibilityResult ¶
type ValidateSubscriptionTransferEligibilityResult struct { // Validation error details. ErrorDetails *ValidateSubscriptionTransferEligibilityError `json:"errorDetails,omitempty"` // READ-ONLY; Specifies whether the subscription is eligible to be transferred. IsMoveEligible *bool `json:"isMoveEligible,omitempty" azure:"ro"` }
ValidateSubscriptionTransferEligibilityResult - Result of the transfer eligibility validation.
type ViewCharges ¶
type ViewCharges string
ViewCharges - The policy that controls whether the users in customer's organization can view charges at pay-as-you-go prices.
const ( ViewChargesAllowed ViewCharges = "Allowed" ViewChargesNotAllowed ViewCharges = "NotAllowed" )
func PossibleViewChargesValues ¶
func PossibleViewChargesValues() []ViewCharges
PossibleViewChargesValues returns the possible values for the ViewCharges const type.
type ViewChargesPolicy ¶
type ViewChargesPolicy string
ViewChargesPolicy - The policy that controls whether users with Azure RBAC access to a subscription can view its charges.
const ( ViewChargesPolicyAllowed ViewChargesPolicy = "Allowed" ViewChargesPolicyNotAllowed ViewChargesPolicy = "NotAllowed" )
func PossibleViewChargesPolicyValues ¶
func PossibleViewChargesPolicyValues() []ViewChargesPolicy
PossibleViewChargesPolicyValues returns the possible values for the ViewChargesPolicy const type.
Source Files ¶
- build.go
- zz_generated_accounts_client.go
- zz_generated_address_client.go
- zz_generated_agreements_client.go
- zz_generated_availablebalances_client.go
- zz_generated_constants.go
- zz_generated_customers_client.go
- zz_generated_date_type.go
- zz_generated_enrollmentaccounts_client.go
- zz_generated_instructions_client.go
- zz_generated_invoices_client.go
- zz_generated_invoicesections_client.go
- zz_generated_models.go
- zz_generated_models_serde.go
- zz_generated_operations_client.go
- zz_generated_periods_client.go
- zz_generated_permissions_client.go
- zz_generated_policies_client.go
- zz_generated_products_client.go
- zz_generated_profiles_client.go
- zz_generated_property_client.go
- zz_generated_reservations_client.go
- zz_generated_response_types.go
- zz_generated_roleassignments_client.go
- zz_generated_roledefinitions_client.go
- zz_generated_subscriptions_client.go
- zz_generated_time_rfc3339.go
- zz_generated_transactions_client.go