savingsplanorder

package
v0.20240923.1142107 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: MPL-2.0 Imports: 14 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/billing/2024-04-01/savingsplanorder Documentation

The savingsplanorder SDK allows for interaction with Azure Resource Manager billing (API Version 2024-04-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/2024-04-01/savingsplanorder"

Client Initialization

client := savingsplanorder.NewSavingsPlanOrderClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: SavingsPlanOrderClient.GetByBillingAccount

ctx := context.TODO()
id := savingsplanorder.NewSavingsPlanOrderID("billingAccountName", "savingsPlanOrderId")

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

Example Usage: SavingsPlanOrderClient.ListByBillingAccount

ctx := context.TODO()
id := savingsplanorder.NewBillingAccountID("billingAccountName")

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForBillingPlan

func PossibleValuesForBillingPlan() []string

func PossibleValuesForPaymentStatus

func PossibleValuesForPaymentStatus() []string

func PossibleValuesForSavingsPlanTerm

func PossibleValuesForSavingsPlanTerm() []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

func ValidateSavingsPlanOrderID

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

ValidateSavingsPlanOrderID checks that 'input' can be parsed as a Savings Plan Order ID

Types

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 BillingPlan

type BillingPlan string
const (
	BillingPlanPOneM BillingPlan = "P1M"
)

func (*BillingPlan) UnmarshalJSON

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

type BillingPlanInformation

type BillingPlanInformation struct {
	NextPaymentDueDate   *string          `json:"nextPaymentDueDate,omitempty"`
	PricingCurrencyTotal *Price           `json:"pricingCurrencyTotal,omitempty"`
	StartDate            *string          `json:"startDate,omitempty"`
	Transactions         *[]PaymentDetail `json:"transactions,omitempty"`
}

type ExtendedStatusInfo

type ExtendedStatusInfo struct {
	Message    *string                       `json:"message,omitempty"`
	Properties *ExtendedStatusInfoProperties `json:"properties,omitempty"`
	StatusCode *string                       `json:"statusCode,omitempty"`
}

type ExtendedStatusInfoProperties

type ExtendedStatusInfoProperties struct {
	SubscriptionId *string `json:"subscriptionId,omitempty"`
}

type GetByBillingAccountOperationOptions

type GetByBillingAccountOperationOptions struct {
	Expand *string
}

func DefaultGetByBillingAccountOperationOptions

func DefaultGetByBillingAccountOperationOptions() GetByBillingAccountOperationOptions

func (GetByBillingAccountOperationOptions) ToHeaders

func (GetByBillingAccountOperationOptions) ToOData

func (GetByBillingAccountOperationOptions) ToQuery

type GetByBillingAccountOperationResponse

type GetByBillingAccountOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *SavingsPlanOrderModel
}

type ListByBillingAccountCompleteResult

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

type ListByBillingAccountCustomPager added in v0.20240628.1153531

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

type ListByBillingAccountOperationOptions

type ListByBillingAccountOperationOptions struct {
	Filter    *string
	OrderBy   *string
	Skiptoken *int64
}

func DefaultListByBillingAccountOperationOptions

func DefaultListByBillingAccountOperationOptions() ListByBillingAccountOperationOptions

func (ListByBillingAccountOperationOptions) ToHeaders

func (ListByBillingAccountOperationOptions) ToOData

func (ListByBillingAccountOperationOptions) ToQuery

type ListByBillingAccountOperationResponse

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

type PaymentDetail

type PaymentDetail struct {
	BillingCurrencyTotal *Price              `json:"billingCurrencyTotal,omitempty"`
	DueDate              *string             `json:"dueDate,omitempty"`
	ExtendedStatusInfo   *ExtendedStatusInfo `json:"extendedStatusInfo,omitempty"`
	PaymentDate          *string             `json:"paymentDate,omitempty"`
	PricingCurrencyTotal *Price              `json:"pricingCurrencyTotal,omitempty"`
	Status               *PaymentStatus      `json:"status,omitempty"`
}

type PaymentStatus

type PaymentStatus string
const (
	PaymentStatusCancelled PaymentStatus = "Cancelled"
	PaymentStatusCompleted PaymentStatus = "Completed"
	PaymentStatusFailed    PaymentStatus = "Failed"
	PaymentStatusPending   PaymentStatus = "Pending"
	PaymentStatusScheduled PaymentStatus = "Scheduled"
	PaymentStatusSucceeded PaymentStatus = "Succeeded"
)

func (*PaymentStatus) UnmarshalJSON

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

type Price

type Price struct {
	Amount       *float64 `json:"amount,omitempty"`
	CurrencyCode *string  `json:"currencyCode,omitempty"`
}

type SavingsPlanOrderClient

type SavingsPlanOrderClient struct {
	Client *resourcemanager.Client
}

func NewSavingsPlanOrderClientWithBaseURI

func NewSavingsPlanOrderClientWithBaseURI(sdkApi sdkEnv.Api) (*SavingsPlanOrderClient, error)

func (SavingsPlanOrderClient) GetByBillingAccount

GetByBillingAccount ...

func (SavingsPlanOrderClient) ListByBillingAccount

ListByBillingAccount ...

func (SavingsPlanOrderClient) ListByBillingAccountComplete

ListByBillingAccountComplete retrieves all the results into a single object

func (SavingsPlanOrderClient) ListByBillingAccountCompleteMatchingPredicate

ListByBillingAccountCompleteMatchingPredicate retrieves all the results and then applies the predicate

type SavingsPlanOrderId

type SavingsPlanOrderId struct {
	BillingAccountName string
	SavingsPlanOrderId string
}

SavingsPlanOrderId is a struct representing the Resource ID for a Savings Plan Order

func NewSavingsPlanOrderID

func NewSavingsPlanOrderID(billingAccountName string, savingsPlanOrderId string) SavingsPlanOrderId

NewSavingsPlanOrderID returns a new SavingsPlanOrderId struct

func ParseSavingsPlanOrderID

func ParseSavingsPlanOrderID(input string) (*SavingsPlanOrderId, error)

ParseSavingsPlanOrderID parses 'input' into a SavingsPlanOrderId

func ParseSavingsPlanOrderIDInsensitively

func ParseSavingsPlanOrderIDInsensitively(input string) (*SavingsPlanOrderId, error)

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

func (*SavingsPlanOrderId) FromParseResult

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

func (SavingsPlanOrderId) ID

func (id SavingsPlanOrderId) ID() string

ID returns the formatted Savings Plan Order ID

func (SavingsPlanOrderId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Savings Plan Order ID

func (SavingsPlanOrderId) String

func (id SavingsPlanOrderId) String() string

String returns a human-readable description of this Savings Plan Order ID

type SavingsPlanOrderModel

type SavingsPlanOrderModel struct {
	Id         *string                          `json:"id,omitempty"`
	Name       *string                          `json:"name,omitempty"`
	Properties *SavingsPlanOrderModelProperties `json:"properties,omitempty"`
	Sku        Sku                              `json:"sku"`
	SystemData *systemdata.SystemData           `json:"systemData,omitempty"`
	Tags       *map[string]string               `json:"tags,omitempty"`
	Type       *string                          `json:"type,omitempty"`
}

type SavingsPlanOrderModelOperationPredicate

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

func (SavingsPlanOrderModelOperationPredicate) Matches

type SavingsPlanOrderModelProperties

type SavingsPlanOrderModelProperties struct {
	BenefitStartTime   *string                 `json:"benefitStartTime,omitempty"`
	BillingAccountId   *string                 `json:"billingAccountId,omitempty"`
	BillingPlan        *BillingPlan            `json:"billingPlan,omitempty"`
	BillingProfileId   *string                 `json:"billingProfileId,omitempty"`
	BillingScopeId     *string                 `json:"billingScopeId,omitempty"`
	CustomerId         *string                 `json:"customerId,omitempty"`
	DisplayName        *string                 `json:"displayName,omitempty"`
	ExpiryDateTime     *string                 `json:"expiryDateTime,omitempty"`
	ExtendedStatusInfo *ExtendedStatusInfo     `json:"extendedStatusInfo,omitempty"`
	PlanInformation    *BillingPlanInformation `json:"planInformation,omitempty"`
	ProductCode        *string                 `json:"productCode,omitempty"`
	ProvisioningState  *string                 `json:"provisioningState,omitempty"`
	SavingsPlans       *[]string               `json:"savingsPlans,omitempty"`
	Term               *SavingsPlanTerm        `json:"term,omitempty"`
}

func (*SavingsPlanOrderModelProperties) GetBenefitStartTimeAsTime

func (o *SavingsPlanOrderModelProperties) GetBenefitStartTimeAsTime() (*time.Time, error)

func (*SavingsPlanOrderModelProperties) GetExpiryDateTimeAsTime

func (o *SavingsPlanOrderModelProperties) GetExpiryDateTimeAsTime() (*time.Time, error)

func (*SavingsPlanOrderModelProperties) SetBenefitStartTimeAsTime

func (o *SavingsPlanOrderModelProperties) SetBenefitStartTimeAsTime(input time.Time)

func (*SavingsPlanOrderModelProperties) SetExpiryDateTimeAsTime

func (o *SavingsPlanOrderModelProperties) SetExpiryDateTimeAsTime(input time.Time)

type SavingsPlanTerm

type SavingsPlanTerm string
const (
	SavingsPlanTermPFiveY  SavingsPlanTerm = "P5Y"
	SavingsPlanTermPOneY   SavingsPlanTerm = "P1Y"
	SavingsPlanTermPThreeY SavingsPlanTerm = "P3Y"
)

func (*SavingsPlanTerm) UnmarshalJSON

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

type Sku

type Sku struct {
	Name *string `json:"name,omitempty"`
}

Jump to

Keyboard shortcuts

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