billingaccounts

package
v0.20240731.1212841 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2024 License: MPL-2.0 Imports: 14 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/billing/2019-10-01-preview/billingaccounts Documentation

The billingaccounts SDK allows for interaction with the Azure Resource Manager Service billing (API Version 2019-10-01-preview).

This readme covers example usages, but further information on using this SDK can be found in the project root.

Import Path

import "github.com/hashicorp/go-azure-sdk/resource-manager/billing/2019-10-01-preview/billingaccounts"

Client Initialization

client := billingaccounts.NewBillingAccountsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: BillingAccountsClient.Get

ctx := context.TODO()
id := billingaccounts.NewBillingAccountID("billingAccountValue")

read, err := client.Get(ctx, id, billingaccounts.DefaultGetOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: BillingAccountsClient.List

ctx := context.TODO()


// alternatively `client.List(ctx, billingaccounts.DefaultListOperationOptions())` can be used to do batched pagination
items, err := client.ListComplete(ctx, billingaccounts.DefaultListOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: BillingAccountsClient.ListInvoiceSectionsByCreateSubscriptionPermission

ctx := context.TODO()
id := billingaccounts.NewBillingAccountID("billingAccountValue")

// alternatively `client.ListInvoiceSectionsByCreateSubscriptionPermission(ctx, id)` can be used to do batched pagination
items, err := client.ListInvoiceSectionsByCreateSubscriptionPermissionComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: BillingAccountsClient.Update

ctx := context.TODO()
id := billingaccounts.NewBillingAccountID("billingAccountValue")

payload := billingaccounts.BillingAccountUpdateRequest{
	// ...
}


if err := client.UpdateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForAccountType

func PossibleValuesForAccountType() []string

func PossibleValuesForAgreementType

func PossibleValuesForAgreementType() []string

func PossibleValuesForBillingProfileSpendingLimit

func PossibleValuesForBillingProfileSpendingLimit() []string

func PossibleValuesForBillingProfileStatus

func PossibleValuesForBillingProfileStatus() []string

func PossibleValuesForBillingProfileStatusReasonCode

func PossibleValuesForBillingProfileStatusReasonCode() []string

func PossibleValuesForBillingRelationshipType

func PossibleValuesForBillingRelationshipType() []string

func PossibleValuesForCustomerType

func PossibleValuesForCustomerType() []string

func PossibleValuesForInvoiceSectionState

func PossibleValuesForInvoiceSectionState() []string

func PossibleValuesForSpendingLimit

func PossibleValuesForSpendingLimit() []string

func PossibleValuesForStatusReasonCode

func PossibleValuesForStatusReasonCode() []string

func PossibleValuesForTargetCloud

func PossibleValuesForTargetCloud() []string

func ValidateBillingAccountID

func ValidateBillingAccountID(input interface{}, key string) (warnings []string, errors []error)

ValidateBillingAccountID checks that 'input' can be parsed as a Billing Account ID

Types

type AccountType

type AccountType string
const (
	AccountTypeEnterprise AccountType = "Enterprise"
	AccountTypeIndividual AccountType = "Individual"
	AccountTypePartner    AccountType = "Partner"
)

func (*AccountType) UnmarshalJSON

func (s *AccountType) UnmarshalJSON(bytes []byte) error

type AddressDetails

type AddressDetails struct {
	AddressLine1 *string `json:"addressLine1,omitempty"`
	AddressLine2 *string `json:"addressLine2,omitempty"`
	AddressLine3 *string `json:"addressLine3,omitempty"`
	City         *string `json:"city,omitempty"`
	CompanyName  *string `json:"companyName,omitempty"`
	Country      *string `json:"country,omitempty"`
	FirstName    *string `json:"firstName,omitempty"`
	LastName     *string `json:"lastName,omitempty"`
	PostalCode   *string `json:"postalCode,omitempty"`
	Region       *string `json:"region,omitempty"`
}

type AgreementType

type AgreementType string
const (
	AgreementTypeEnterpriseAgreement            AgreementType = "EnterpriseAgreement"
	AgreementTypeMicrosoftCustomerAgreement     AgreementType = "MicrosoftCustomerAgreement"
	AgreementTypeMicrosoftOnlineServicesProgram AgreementType = "MicrosoftOnlineServicesProgram"
	AgreementTypeMicrosoftPartnerAgreement      AgreementType = "MicrosoftPartnerAgreement"
)

func (*AgreementType) UnmarshalJSON

func (s *AgreementType) UnmarshalJSON(bytes []byte) error

type AzurePlan

type AzurePlan struct {
	SkuDescription *string `json:"skuDescription,omitempty"`
	SkuId          *string `json:"skuId,omitempty"`
}

type BillingAccount

type BillingAccount struct {
	Id         *string                   `json:"id,omitempty"`
	Name       *string                   `json:"name,omitempty"`
	Properties *BillingAccountProperties `json:"properties,omitempty"`
	Type       *string                   `json:"type,omitempty"`
}

type BillingAccountId

type BillingAccountId struct {
	BillingAccountName string
}

BillingAccountId is a struct representing the Resource ID for a Billing Account

func NewBillingAccountID

func NewBillingAccountID(billingAccountName string) BillingAccountId

NewBillingAccountID returns a new BillingAccountId struct

func ParseBillingAccountID

func ParseBillingAccountID(input string) (*BillingAccountId, error)

ParseBillingAccountID parses 'input' into a BillingAccountId

func ParseBillingAccountIDInsensitively

func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error)

ParseBillingAccountIDInsensitively parses 'input' case-insensitively into a BillingAccountId note: this method should only be used for API response data and not user input

func (*BillingAccountId) FromParseResult

func (id *BillingAccountId) FromParseResult(input resourceids.ParseResult) error

func (BillingAccountId) ID

func (id BillingAccountId) ID() string

ID returns the formatted Billing Account ID

func (BillingAccountId) Segments

func (id BillingAccountId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Billing Account ID

func (BillingAccountId) String

func (id BillingAccountId) String() string

String returns a human-readable description of this Billing Account ID

type BillingAccountOperationPredicate added in v0.20240226.1173038

type BillingAccountOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (BillingAccountOperationPredicate) Matches added in v0.20240226.1173038

type BillingAccountProperties

type BillingAccountProperties struct {
	AccountType        *AccountType         `json:"accountType,omitempty"`
	Address            *AddressDetails      `json:"address,omitempty"`
	AgreementType      *AgreementType       `json:"agreementType,omitempty"`
	BillingProfiles    *[]BillingProfile    `json:"billingProfiles,omitempty"`
	CustomerType       *CustomerType        `json:"customerType,omitempty"`
	Departments        *[]Department        `json:"departments,omitempty"`
	DisplayName        *string              `json:"displayName,omitempty"`
	EnrollmentAccounts *[]EnrollmentAccount `json:"enrollmentAccounts,omitempty"`
	EnrollmentDetails  *Enrollment          `json:"enrollmentDetails,omitempty"`
	OrganizationId     *string              `json:"organizationId,omitempty"`
}

type BillingAccountUpdateRequest

type BillingAccountUpdateRequest struct {
	Properties *BillingAccountProperties `json:"properties,omitempty"`
}

type BillingAccountsClient

type BillingAccountsClient struct {
	Client *resourcemanager.Client
}

func NewBillingAccountsClientWithBaseURI

func NewBillingAccountsClientWithBaseURI(sdkApi sdkEnv.Api) (*BillingAccountsClient, error)

func (BillingAccountsClient) Get

Get ...

func (BillingAccountsClient) List

List ...

func (BillingAccountsClient) ListComplete added in v0.20240226.1173038

ListComplete retrieves all the results into a single object

func (BillingAccountsClient) ListCompleteMatchingPredicate added in v0.20240226.1173038

func (c BillingAccountsClient) ListCompleteMatchingPredicate(ctx context.Context, options ListOperationOptions, predicate BillingAccountOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (BillingAccountsClient) ListInvoiceSectionsByCreateSubscriptionPermission

func (c BillingAccountsClient) ListInvoiceSectionsByCreateSubscriptionPermission(ctx context.Context, id BillingAccountId) (result ListInvoiceSectionsByCreateSubscriptionPermissionOperationResponse, err error)

ListInvoiceSectionsByCreateSubscriptionPermission ...

func (BillingAccountsClient) ListInvoiceSectionsByCreateSubscriptionPermissionComplete

func (c BillingAccountsClient) ListInvoiceSectionsByCreateSubscriptionPermissionComplete(ctx context.Context, id BillingAccountId) (ListInvoiceSectionsByCreateSubscriptionPermissionCompleteResult, error)

ListInvoiceSectionsByCreateSubscriptionPermissionComplete retrieves all the results into a single object

func (BillingAccountsClient) ListInvoiceSectionsByCreateSubscriptionPermissionCompleteMatchingPredicate

func (c BillingAccountsClient) ListInvoiceSectionsByCreateSubscriptionPermissionCompleteMatchingPredicate(ctx context.Context, id BillingAccountId, predicate InvoiceSectionWithCreateSubPermissionOperationPredicate) (result ListInvoiceSectionsByCreateSubscriptionPermissionCompleteResult, err error)

ListInvoiceSectionsByCreateSubscriptionPermissionCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (BillingAccountsClient) Update

Update ...

func (BillingAccountsClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

type BillingProfile

type BillingProfile struct {
	Id         *string                   `json:"id,omitempty"`
	Name       *string                   `json:"name,omitempty"`
	Properties *BillingProfileProperties `json:"properties,omitempty"`
	Type       *string                   `json:"type,omitempty"`
}

type BillingProfileProperties

type BillingProfileProperties struct {
	Address                  *AddressDetails           `json:"address,omitempty"`
	BillingRelationshipType  *BillingRelationshipType  `json:"billingRelationshipType,omitempty"`
	Currency                 *string                   `json:"currency,omitempty"`
	DisplayName              *string                   `json:"displayName,omitempty"`
	EnabledAzurePlans        *[]AzurePlan              `json:"enabledAzurePlans,omitempty"`
	IndirectRelationshipInfo *IndirectRelationshipInfo `json:"indirectRelationshipInfo,omitempty"`
	InvoiceDay               *int64                    `json:"invoiceDay,omitempty"`
	InvoiceEmailOptIn        *bool                     `json:"invoiceEmailOptIn,omitempty"`
	InvoiceSections          *[]InvoiceSection         `json:"invoiceSections,omitempty"`
	PoNumber                 *string                   `json:"poNumber,omitempty"`
	SpendingLimit            *SpendingLimit            `json:"spendingLimit,omitempty"`
	Status                   *BillingProfileStatus     `json:"status,omitempty"`
	StatusReasonCode         *StatusReasonCode         `json:"statusReasonCode,omitempty"`
	TargetClouds             *[]TargetCloud            `json:"targetClouds,omitempty"`
}

type BillingProfileSpendingLimit

type BillingProfileSpendingLimit string
const (
	BillingProfileSpendingLimitOff BillingProfileSpendingLimit = "Off"
	BillingProfileSpendingLimitOn  BillingProfileSpendingLimit = "On"
)

func (*BillingProfileSpendingLimit) UnmarshalJSON

func (s *BillingProfileSpendingLimit) UnmarshalJSON(bytes []byte) error

type BillingProfileStatus

type BillingProfileStatus string
const (
	BillingProfileStatusActive   BillingProfileStatus = "Active"
	BillingProfileStatusDisabled BillingProfileStatus = "Disabled"
	BillingProfileStatusWarned   BillingProfileStatus = "Warned"
)

func (*BillingProfileStatus) UnmarshalJSON

func (s *BillingProfileStatus) UnmarshalJSON(bytes []byte) error

type BillingProfileStatusReasonCode

type BillingProfileStatusReasonCode string
const (
	BillingProfileStatusReasonCodePastDue              BillingProfileStatusReasonCode = "PastDue"
	BillingProfileStatusReasonCodeSpendingLimitExpired BillingProfileStatusReasonCode = "SpendingLimitExpired"
	BillingProfileStatusReasonCodeSpendingLimitReached BillingProfileStatusReasonCode = "SpendingLimitReached"
)

func (*BillingProfileStatusReasonCode) UnmarshalJSON

func (s *BillingProfileStatusReasonCode) UnmarshalJSON(bytes []byte) error

type BillingRelationshipType

type BillingRelationshipType string
const (
	BillingRelationshipTypeCSPPartner       BillingRelationshipType = "CSPPartner"
	BillingRelationshipTypeDirect           BillingRelationshipType = "Direct"
	BillingRelationshipTypeIndirectCustomer BillingRelationshipType = "IndirectCustomer"
	BillingRelationshipTypeIndirectPartner  BillingRelationshipType = "IndirectPartner"
)

func (*BillingRelationshipType) UnmarshalJSON

func (s *BillingRelationshipType) UnmarshalJSON(bytes []byte) error

type CustomerType

type CustomerType string
const (
	CustomerTypeEnterprise CustomerType = "Enterprise"
	CustomerTypeIndividual CustomerType = "Individual"
	CustomerTypePartner    CustomerType = "Partner"
)

func (*CustomerType) UnmarshalJSON

func (s *CustomerType) UnmarshalJSON(bytes []byte) error

type Department

type Department struct {
	Id         *string               `json:"id,omitempty"`
	Name       *string               `json:"name,omitempty"`
	Properties *DepartmentProperties `json:"properties,omitempty"`
	Type       *string               `json:"type,omitempty"`
}

type DepartmentProperties

type DepartmentProperties struct {
	CostCenter         *string              `json:"costCenter,omitempty"`
	DepartmentName     *string              `json:"departmentName,omitempty"`
	EnrollmentAccounts *[]EnrollmentAccount `json:"enrollmentAccounts,omitempty"`
	Status             *string              `json:"status,omitempty"`
}

type Enrollment

type Enrollment struct {
	BillingCycle *string             `json:"billingCycle,omitempty"`
	Channel      *string             `json:"channel,omitempty"`
	CountryCode  *string             `json:"countryCode,omitempty"`
	Currency     *string             `json:"currency,omitempty"`
	EndDate      *string             `json:"endDate,omitempty"`
	Language     *string             `json:"language,omitempty"`
	Policies     *EnrollmentPolicies `json:"policies,omitempty"`
	StartDate    *string             `json:"startDate,omitempty"`
	Status       *string             `json:"status,omitempty"`
}

func (*Enrollment) GetEndDateAsTime

func (o *Enrollment) GetEndDateAsTime() (*time.Time, error)

func (*Enrollment) GetStartDateAsTime

func (o *Enrollment) GetStartDateAsTime() (*time.Time, error)

func (*Enrollment) SetEndDateAsTime

func (o *Enrollment) SetEndDateAsTime(input time.Time)

func (*Enrollment) SetStartDateAsTime

func (o *Enrollment) SetStartDateAsTime(input time.Time)

type EnrollmentAccount

type EnrollmentAccount struct {
	Id         *string                      `json:"id,omitempty"`
	Name       *string                      `json:"name,omitempty"`
	Properties *EnrollmentAccountProperties `json:"properties,omitempty"`
	Type       *string                      `json:"type,omitempty"`
}

type EnrollmentAccountProperties

type EnrollmentAccountProperties struct {
	AccountName  *string     `json:"accountName,omitempty"`
	AccountOwner *string     `json:"accountOwner,omitempty"`
	CostCenter   *string     `json:"costCenter,omitempty"`
	Department   *Department `json:"department,omitempty"`
	EndDate      *string     `json:"endDate,omitempty"`
	StartDate    *string     `json:"startDate,omitempty"`
	Status       *string     `json:"status,omitempty"`
}

func (*EnrollmentAccountProperties) GetEndDateAsTime

func (o *EnrollmentAccountProperties) GetEndDateAsTime() (*time.Time, error)

func (*EnrollmentAccountProperties) GetStartDateAsTime

func (o *EnrollmentAccountProperties) GetStartDateAsTime() (*time.Time, error)

func (*EnrollmentAccountProperties) SetEndDateAsTime

func (o *EnrollmentAccountProperties) SetEndDateAsTime(input time.Time)

func (*EnrollmentAccountProperties) SetStartDateAsTime

func (o *EnrollmentAccountProperties) SetStartDateAsTime(input time.Time)

type EnrollmentPolicies

type EnrollmentPolicies struct {
	AccountOwnerViewCharges    *bool `json:"accountOwnerViewCharges,omitempty"`
	DepartmentAdminViewCharges *bool `json:"departmentAdminViewCharges,omitempty"`
	MarketplacesEnabled        *bool `json:"marketplacesEnabled,omitempty"`
	ReservedInstancesEnabled   *bool `json:"reservedInstancesEnabled,omitempty"`
}

type GetOperationOptions

type GetOperationOptions struct {
	Expand *string
}

func DefaultGetOperationOptions

func DefaultGetOperationOptions() GetOperationOptions

func (GetOperationOptions) ToHeaders

func (o GetOperationOptions) ToHeaders() *client.Headers

func (GetOperationOptions) ToOData

func (o GetOperationOptions) ToOData() *odata.Query

func (GetOperationOptions) ToQuery

func (o GetOperationOptions) ToQuery() *client.QueryParams

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *BillingAccount
}

type IndirectRelationshipInfo

type IndirectRelationshipInfo struct {
	BillingAccountName *string `json:"billingAccountName,omitempty"`
	BillingProfileName *string `json:"billingProfileName,omitempty"`
	DisplayName        *string `json:"displayName,omitempty"`
}

type InvoiceSection

type InvoiceSection struct {
	Id         *string                   `json:"id,omitempty"`
	Name       *string                   `json:"name,omitempty"`
	Properties *InvoiceSectionProperties `json:"properties,omitempty"`
	Type       *string                   `json:"type,omitempty"`
}

type InvoiceSectionProperties

type InvoiceSectionProperties struct {
	DisplayName *string              `json:"displayName,omitempty"`
	State       *InvoiceSectionState `json:"state,omitempty"`
	TargetCloud *TargetCloud         `json:"targetCloud,omitempty"`
}

type InvoiceSectionState

type InvoiceSectionState string
const (
	InvoiceSectionStateActive     InvoiceSectionState = "Active"
	InvoiceSectionStateRestricted InvoiceSectionState = "Restricted"
)

func (*InvoiceSectionState) UnmarshalJSON

func (s *InvoiceSectionState) UnmarshalJSON(bytes []byte) error

type InvoiceSectionWithCreateSubPermission

type InvoiceSectionWithCreateSubPermission struct {
	BillingProfileDisplayName      *string                         `json:"billingProfileDisplayName,omitempty"`
	BillingProfileId               *string                         `json:"billingProfileId,omitempty"`
	BillingProfileSpendingLimit    *BillingProfileSpendingLimit    `json:"billingProfileSpendingLimit,omitempty"`
	BillingProfileStatus           *BillingProfileStatus           `json:"billingProfileStatus,omitempty"`
	BillingProfileStatusReasonCode *BillingProfileStatusReasonCode `json:"billingProfileStatusReasonCode,omitempty"`
	EnabledAzurePlans              *[]AzurePlan                    `json:"enabledAzurePlans,omitempty"`
	InvoiceSectionDisplayName      *string                         `json:"invoiceSectionDisplayName,omitempty"`
	InvoiceSectionId               *string                         `json:"invoiceSectionId,omitempty"`
}

type InvoiceSectionWithCreateSubPermissionOperationPredicate

type InvoiceSectionWithCreateSubPermissionOperationPredicate struct {
	BillingProfileDisplayName *string
	BillingProfileId          *string
	InvoiceSectionDisplayName *string
	InvoiceSectionId          *string
}

func (InvoiceSectionWithCreateSubPermissionOperationPredicate) Matches

type ListCompleteResult added in v0.20240226.1173038

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []BillingAccount
}

type ListCustomPager added in v0.20240628.1153531

type ListCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListCustomPager) NextPageLink() *odata.Link

type ListInvoiceSectionsByCreateSubscriptionPermissionCompleteResult

type ListInvoiceSectionsByCreateSubscriptionPermissionCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []InvoiceSectionWithCreateSubPermission
}

type ListInvoiceSectionsByCreateSubscriptionPermissionCustomPager added in v0.20240628.1153531

type ListInvoiceSectionsByCreateSubscriptionPermissionCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}

type ListInvoiceSectionsByCreateSubscriptionPermissionOperationResponse

type ListInvoiceSectionsByCreateSubscriptionPermissionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]InvoiceSectionWithCreateSubPermission
}

type ListOperationOptions

type ListOperationOptions struct {
	Expand *string
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders

func (o ListOperationOptions) ToHeaders() *client.Headers

func (ListOperationOptions) ToOData

func (o ListOperationOptions) ToOData() *odata.Query

func (ListOperationOptions) ToQuery

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]BillingAccount
}

type SpendingLimit

type SpendingLimit string
const (
	SpendingLimitOff SpendingLimit = "Off"
	SpendingLimitOn  SpendingLimit = "On"
)

func (*SpendingLimit) UnmarshalJSON

func (s *SpendingLimit) UnmarshalJSON(bytes []byte) error

type StatusReasonCode

type StatusReasonCode string
const (
	StatusReasonCodePastDue              StatusReasonCode = "PastDue"
	StatusReasonCodeSpendingLimitExpired StatusReasonCode = "SpendingLimitExpired"
	StatusReasonCodeSpendingLimitReached StatusReasonCode = "SpendingLimitReached"
)

func (*StatusReasonCode) UnmarshalJSON

func (s *StatusReasonCode) UnmarshalJSON(bytes []byte) error

type TargetCloud

type TargetCloud string
const (
	TargetCloudUSGov TargetCloud = "USGov"
	TargetCloudUSNat TargetCloud = "USNat"
	TargetCloudUSSec TargetCloud = "USSec"
)

func (*TargetCloud) UnmarshalJSON

func (s *TargetCloud) UnmarshalJSON(bytes []byte) error

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *BillingAccount
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL