billingsubscriptions

package
v0.20240125.1115017 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: MPL-2.0 Imports: 10 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/billing/2020-05-01/billingsubscriptions Documentation

The billingsubscriptions SDK allows for interaction with the Azure Resource Manager Service billing (API Version 2020-05-01).

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/2020-05-01/billingsubscriptions"

Client Initialization

client := billingsubscriptions.NewBillingSubscriptionsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: BillingSubscriptionsClient.Get

ctx := context.TODO()
id := billingsubscriptions.NewBillingAccountBillingSubscriptionID("billingAccountValue", "subscriptionIdValue")

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

Example Usage: BillingSubscriptionsClient.ListByBillingAccount

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

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

Example Usage: BillingSubscriptionsClient.ListByBillingProfile

ctx := context.TODO()
id := billingsubscriptions.NewBillingProfileID("billingAccountValue", "billingProfileValue")

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

Example Usage: BillingSubscriptionsClient.ListByCustomer

ctx := context.TODO()
id := billingsubscriptions.NewCustomerID("billingAccountValue", "customerValue")

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

Example Usage: BillingSubscriptionsClient.ListByInvoiceSection

ctx := context.TODO()
id := billingsubscriptions.NewInvoiceSectionID("billingAccountValue", "billingProfileValue", "invoiceSectionValue")

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

Example Usage: BillingSubscriptionsClient.Update

ctx := context.TODO()
id := billingsubscriptions.NewBillingAccountBillingSubscriptionID("billingAccountValue", "subscriptionIdValue")

payload := billingsubscriptions.BillingSubscription{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForBillingSubscriptionStatusType

func PossibleValuesForBillingSubscriptionStatusType() []string

func ValidateBillingAccountBillingSubscriptionID

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

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

func ValidateBillingAccountID

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

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

func ValidateBillingProfileID

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

ValidateBillingProfileID checks that 'input' can be parsed as a Billing Profile ID

func ValidateCustomerID

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

ValidateCustomerID checks that 'input' can be parsed as a Customer ID

func ValidateInvoiceSectionID

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

ValidateInvoiceSectionID checks that 'input' can be parsed as a Invoice Section ID

Types

type Amount

type Amount struct {
	Currency *string  `json:"currency,omitempty"`
	Value    *float64 `json:"value,omitempty"`
}

type BillingAccountBillingSubscriptionId

type BillingAccountBillingSubscriptionId struct {
	BillingAccountName string
	SubscriptionId     string
}

BillingAccountBillingSubscriptionId is a struct representing the Resource ID for a Billing Account Billing Subscription

func NewBillingAccountBillingSubscriptionID

func NewBillingAccountBillingSubscriptionID(billingAccountName string, subscriptionId string) BillingAccountBillingSubscriptionId

NewBillingAccountBillingSubscriptionID returns a new BillingAccountBillingSubscriptionId struct

func ParseBillingAccountBillingSubscriptionID

func ParseBillingAccountBillingSubscriptionID(input string) (*BillingAccountBillingSubscriptionId, error)

ParseBillingAccountBillingSubscriptionID parses 'input' into a BillingAccountBillingSubscriptionId

func ParseBillingAccountBillingSubscriptionIDInsensitively

func ParseBillingAccountBillingSubscriptionIDInsensitively(input string) (*BillingAccountBillingSubscriptionId, error)

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

func (*BillingAccountBillingSubscriptionId) FromParseResult

func (BillingAccountBillingSubscriptionId) ID

ID returns the formatted Billing Account Billing Subscription ID

func (BillingAccountBillingSubscriptionId) Segments

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

func (BillingAccountBillingSubscriptionId) String

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

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 BillingProfileId

type BillingProfileId struct {
	BillingAccountName string
	BillingProfileName string
}

BillingProfileId is a struct representing the Resource ID for a Billing Profile

func NewBillingProfileID

func NewBillingProfileID(billingAccountName string, billingProfileName string) BillingProfileId

NewBillingProfileID returns a new BillingProfileId struct

func ParseBillingProfileID

func ParseBillingProfileID(input string) (*BillingProfileId, error)

ParseBillingProfileID parses 'input' into a BillingProfileId

func ParseBillingProfileIDInsensitively

func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error)

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

func (*BillingProfileId) FromParseResult

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

func (BillingProfileId) ID

func (id BillingProfileId) ID() string

ID returns the formatted Billing Profile ID

func (BillingProfileId) Segments

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

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

func (BillingProfileId) String

func (id BillingProfileId) String() string

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

type BillingSubscription

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

type BillingSubscriptionOperationPredicate

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

func (BillingSubscriptionOperationPredicate) Matches

type BillingSubscriptionProperties

type BillingSubscriptionProperties struct {
	BillingProfileDisplayName *string                        `json:"billingProfileDisplayName,omitempty"`
	BillingProfileId          *string                        `json:"billingProfileId,omitempty"`
	CostCenter                *string                        `json:"costCenter,omitempty"`
	CustomerDisplayName       *string                        `json:"customerDisplayName,omitempty"`
	CustomerId                *string                        `json:"customerId,omitempty"`
	DisplayName               *string                        `json:"displayName,omitempty"`
	InvoiceSectionDisplayName *string                        `json:"invoiceSectionDisplayName,omitempty"`
	InvoiceSectionId          *string                        `json:"invoiceSectionId,omitempty"`
	LastMonthCharges          *Amount                        `json:"lastMonthCharges,omitempty"`
	MonthToDateCharges        *Amount                        `json:"monthToDateCharges,omitempty"`
	Reseller                  *Reseller                      `json:"reseller,omitempty"`
	SkuDescription            *string                        `json:"skuDescription,omitempty"`
	SkuId                     *string                        `json:"skuId,omitempty"`
	SubscriptionBillingStatus *BillingSubscriptionStatusType `json:"subscriptionBillingStatus,omitempty"`
	SubscriptionId            *string                        `json:"subscriptionId,omitempty"`
	SuspensionReasons         *[]string                      `json:"suspensionReasons,omitempty"`
}

type BillingSubscriptionStatusType

type BillingSubscriptionStatusType string
const (
	BillingSubscriptionStatusTypeAbandoned BillingSubscriptionStatusType = "Abandoned"
	BillingSubscriptionStatusTypeActive    BillingSubscriptionStatusType = "Active"
	BillingSubscriptionStatusTypeDeleted   BillingSubscriptionStatusType = "Deleted"
	BillingSubscriptionStatusTypeInactive  BillingSubscriptionStatusType = "Inactive"
	BillingSubscriptionStatusTypeWarning   BillingSubscriptionStatusType = "Warning"
)

func (*BillingSubscriptionStatusType) UnmarshalJSON

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

type BillingSubscriptionsClient

type BillingSubscriptionsClient struct {
	Client *resourcemanager.Client
}

func NewBillingSubscriptionsClientWithBaseURI

func NewBillingSubscriptionsClientWithBaseURI(sdkApi sdkEnv.Api) (*BillingSubscriptionsClient, error)

func (BillingSubscriptionsClient) Get

Get ...

func (BillingSubscriptionsClient) ListByBillingAccount

ListByBillingAccount ...

func (BillingSubscriptionsClient) ListByBillingAccountComplete

ListByBillingAccountComplete retrieves all the results into a single object

func (BillingSubscriptionsClient) ListByBillingAccountCompleteMatchingPredicate

func (c BillingSubscriptionsClient) ListByBillingAccountCompleteMatchingPredicate(ctx context.Context, id BillingAccountId, predicate BillingSubscriptionOperationPredicate) (result ListByBillingAccountCompleteResult, err error)

ListByBillingAccountCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (BillingSubscriptionsClient) ListByBillingProfile

ListByBillingProfile ...

func (BillingSubscriptionsClient) ListByBillingProfileComplete

ListByBillingProfileComplete retrieves all the results into a single object

func (BillingSubscriptionsClient) ListByBillingProfileCompleteMatchingPredicate

func (c BillingSubscriptionsClient) ListByBillingProfileCompleteMatchingPredicate(ctx context.Context, id BillingProfileId, predicate BillingSubscriptionOperationPredicate) (result ListByBillingProfileCompleteResult, err error)

ListByBillingProfileCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (BillingSubscriptionsClient) ListByCustomer

ListByCustomer ...

func (BillingSubscriptionsClient) ListByCustomerComplete

ListByCustomerComplete retrieves all the results into a single object

func (BillingSubscriptionsClient) ListByCustomerCompleteMatchingPredicate

func (c BillingSubscriptionsClient) ListByCustomerCompleteMatchingPredicate(ctx context.Context, id CustomerId, predicate BillingSubscriptionOperationPredicate) (result ListByCustomerCompleteResult, err error)

ListByCustomerCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (BillingSubscriptionsClient) ListByInvoiceSection

ListByInvoiceSection ...

func (BillingSubscriptionsClient) ListByInvoiceSectionComplete

ListByInvoiceSectionComplete retrieves all the results into a single object

func (BillingSubscriptionsClient) ListByInvoiceSectionCompleteMatchingPredicate

func (c BillingSubscriptionsClient) ListByInvoiceSectionCompleteMatchingPredicate(ctx context.Context, id InvoiceSectionId, predicate BillingSubscriptionOperationPredicate) (result ListByInvoiceSectionCompleteResult, err error)

ListByInvoiceSectionCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (BillingSubscriptionsClient) Update

Update ...

type CustomerId

type CustomerId struct {
	BillingAccountName string
	CustomerName       string
}

CustomerId is a struct representing the Resource ID for a Customer

func NewCustomerID

func NewCustomerID(billingAccountName string, customerName string) CustomerId

NewCustomerID returns a new CustomerId struct

func ParseCustomerID

func ParseCustomerID(input string) (*CustomerId, error)

ParseCustomerID parses 'input' into a CustomerId

func ParseCustomerIDInsensitively

func ParseCustomerIDInsensitively(input string) (*CustomerId, error)

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

func (*CustomerId) FromParseResult

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

func (CustomerId) ID

func (id CustomerId) ID() string

ID returns the formatted Customer ID

func (CustomerId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Customer ID

func (CustomerId) String

func (id CustomerId) String() string

String returns a human-readable description of this Customer ID

type GetOperationResponse

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

type InvoiceSectionId

type InvoiceSectionId struct {
	BillingAccountName string
	BillingProfileName string
	InvoiceSectionName string
}

InvoiceSectionId is a struct representing the Resource ID for a Invoice Section

func NewInvoiceSectionID

func NewInvoiceSectionID(billingAccountName string, billingProfileName string, invoiceSectionName string) InvoiceSectionId

NewInvoiceSectionID returns a new InvoiceSectionId struct

func ParseInvoiceSectionID

func ParseInvoiceSectionID(input string) (*InvoiceSectionId, error)

ParseInvoiceSectionID parses 'input' into a InvoiceSectionId

func ParseInvoiceSectionIDInsensitively

func ParseInvoiceSectionIDInsensitively(input string) (*InvoiceSectionId, error)

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

func (*InvoiceSectionId) FromParseResult

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

func (InvoiceSectionId) ID

func (id InvoiceSectionId) ID() string

ID returns the formatted Invoice Section ID

func (InvoiceSectionId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Invoice Section ID

func (InvoiceSectionId) String

func (id InvoiceSectionId) String() string

String returns a human-readable description of this Invoice Section ID

type ListByBillingAccountCompleteResult

type ListByBillingAccountCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []BillingSubscription
}

type ListByBillingAccountOperationResponse

type ListByBillingAccountOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]BillingSubscription
}

type ListByBillingProfileCompleteResult

type ListByBillingProfileCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []BillingSubscription
}

type ListByBillingProfileOperationResponse

type ListByBillingProfileOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]BillingSubscription
}

type ListByCustomerCompleteResult

type ListByCustomerCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []BillingSubscription
}

type ListByCustomerOperationResponse

type ListByCustomerOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]BillingSubscription
}

type ListByInvoiceSectionCompleteResult

type ListByInvoiceSectionCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []BillingSubscription
}

type ListByInvoiceSectionOperationResponse

type ListByInvoiceSectionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]BillingSubscription
}

type Reseller

type Reseller struct {
	Description *string `json:"description,omitempty"`
	ResellerId  *string `json:"resellerId,omitempty"`
}

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *BillingSubscription
}

Jump to

Keyboard shortcuts

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