reservationorder

package
v0.20241212.1154051 Latest Latest
Warning

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

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

README

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

The reservationorder 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/reservationorder"

Client Initialization

client := reservationorder.NewReservationOrderClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ReservationOrderClient.GetByBillingAccount

ctx := context.TODO()
id := reservationorder.NewReservationOrderID("billingAccountName", "reservationOrderId")

read, err := client.GetByBillingAccount(ctx, id, reservationorder.DefaultGetByBillingAccountOperationOptions())
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 PossibleValuesForAppliedScopeType

func PossibleValuesForAppliedScopeType() []string

func PossibleValuesForInstanceFlexibility

func PossibleValuesForInstanceFlexibility() []string

func PossibleValuesForPaymentStatus

func PossibleValuesForPaymentStatus() []string

func PossibleValuesForReservationBillingPlan

func PossibleValuesForReservationBillingPlan() []string

func PossibleValuesForReservationStatusCode

func PossibleValuesForReservationStatusCode() []string

func ValidateReservationOrderID

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

ValidateReservationOrderID checks that 'input' can be parsed as a Reservation Order ID

Types

type AppliedScopeType

type AppliedScopeType string
const (
	AppliedScopeTypeManagementGroup AppliedScopeType = "ManagementGroup"
	AppliedScopeTypeShared          AppliedScopeType = "Shared"
	AppliedScopeTypeSingle          AppliedScopeType = "Single"
)

func (*AppliedScopeType) UnmarshalJSON

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

type ExtendedStatusDefinitionProperties

type ExtendedStatusDefinitionProperties 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        *ReservationOrder
}

type InstanceFlexibility

type InstanceFlexibility string
const (
	InstanceFlexibilityOff InstanceFlexibility = "Off"
	InstanceFlexibilityOn  InstanceFlexibility = "On"
)

func (*InstanceFlexibility) UnmarshalJSON

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

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 RenewPropertiesResponse

type RenewPropertiesResponse struct {
	BillingCurrencyTotal *Price                      `json:"billingCurrencyTotal,omitempty"`
	PricingCurrencyTotal *Price                      `json:"pricingCurrencyTotal,omitempty"`
	PurchaseProperties   *ReservationPurchaseRequest `json:"purchaseProperties,omitempty"`
}

type Reservation

type Reservation struct {
	Etag       *int64                  `json:"etag,omitempty"`
	Id         *string                 `json:"id,omitempty"`
	Location   *string                 `json:"location,omitempty"`
	Name       *string                 `json:"name,omitempty"`
	Properties *ReservationProperty    `json:"properties,omitempty"`
	Sku        *ReservationSkuProperty `json:"sku,omitempty"`
	SystemData *systemdata.SystemData  `json:"systemData,omitempty"`
	Tags       *map[string]string      `json:"tags,omitempty"`
	Type       *string                 `json:"type,omitempty"`
}

type ReservationAppliedScopeProperties

type ReservationAppliedScopeProperties struct {
	DisplayName       *string `json:"displayName,omitempty"`
	ManagementGroupId *string `json:"managementGroupId,omitempty"`
	ResourceGroupId   *string `json:"resourceGroupId,omitempty"`
	SubscriptionId    *string `json:"subscriptionId,omitempty"`
	TenantId          *string `json:"tenantId,omitempty"`
}

type ReservationBillingPlan

type ReservationBillingPlan string
const (
	ReservationBillingPlanMonthly ReservationBillingPlan = "Monthly"
	ReservationBillingPlanUpfront ReservationBillingPlan = "Upfront"
)

func (*ReservationBillingPlan) UnmarshalJSON

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

type ReservationExtendedStatusInfo

type ReservationExtendedStatusInfo struct {
	Message    *string                             `json:"message,omitempty"`
	Properties *ExtendedStatusDefinitionProperties `json:"properties,omitempty"`
	StatusCode *ReservationStatusCode              `json:"statusCode,omitempty"`
}

type ReservationMergeProperties

type ReservationMergeProperties struct {
	MergeDestination *string   `json:"mergeDestination,omitempty"`
	MergeSources     *[]string `json:"mergeSources,omitempty"`
}

type ReservationOrder

type ReservationOrder struct {
	Etag       *int64                    `json:"etag,omitempty"`
	Id         *string                   `json:"id,omitempty"`
	Name       *string                   `json:"name,omitempty"`
	Properties *ReservationOrderProperty `json:"properties,omitempty"`
	SystemData *systemdata.SystemData    `json:"systemData,omitempty"`
	Tags       *map[string]string        `json:"tags,omitempty"`
	Type       *string                   `json:"type,omitempty"`
}

type ReservationOrderBillingPlanInformation

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

type ReservationOrderClient

type ReservationOrderClient struct {
	Client *resourcemanager.Client
}

func NewReservationOrderClientWithBaseURI

func NewReservationOrderClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservationOrderClient, error)

func (ReservationOrderClient) GetByBillingAccount

GetByBillingAccount ...

type ReservationOrderId

type ReservationOrderId struct {
	BillingAccountName string
	ReservationOrderId string
}

ReservationOrderId is a struct representing the Resource ID for a Reservation Order

func NewReservationOrderID

func NewReservationOrderID(billingAccountName string, reservationOrderId string) ReservationOrderId

NewReservationOrderID returns a new ReservationOrderId struct

func ParseReservationOrderID

func ParseReservationOrderID(input string) (*ReservationOrderId, error)

ParseReservationOrderID parses 'input' into a ReservationOrderId

func ParseReservationOrderIDInsensitively

func ParseReservationOrderIDInsensitively(input string) (*ReservationOrderId, error)

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

func (*ReservationOrderId) FromParseResult

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

func (ReservationOrderId) ID

func (id ReservationOrderId) ID() string

ID returns the formatted Reservation Order ID

func (ReservationOrderId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Reservation Order ID

func (ReservationOrderId) String

func (id ReservationOrderId) String() string

String returns a human-readable description of this Reservation Order ID

type ReservationOrderProperty

type ReservationOrderProperty struct {
	BenefitStartTime   *string                                 `json:"benefitStartTime,omitempty"`
	BillingAccountId   *string                                 `json:"billingAccountId,omitempty"`
	BillingPlan        *ReservationBillingPlan                 `json:"billingPlan,omitempty"`
	BillingProfileId   *string                                 `json:"billingProfileId,omitempty"`
	CreatedDateTime    *string                                 `json:"createdDateTime,omitempty"`
	CustomerId         *string                                 `json:"customerId,omitempty"`
	DisplayName        *string                                 `json:"displayName,omitempty"`
	EnrollmentId       *string                                 `json:"enrollmentId,omitempty"`
	ExpiryDate         *string                                 `json:"expiryDate,omitempty"`
	ExpiryDateTime     *string                                 `json:"expiryDateTime,omitempty"`
	ExtendedStatusInfo *ReservationExtendedStatusInfo          `json:"extendedStatusInfo,omitempty"`
	OriginalQuantity   *int64                                  `json:"originalQuantity,omitempty"`
	PlanInformation    *ReservationOrderBillingPlanInformation `json:"planInformation,omitempty"`
	ProductCode        *string                                 `json:"productCode,omitempty"`
	ProvisioningState  *string                                 `json:"provisioningState,omitempty"`
	RequestDateTime    *string                                 `json:"requestDateTime,omitempty"`
	Reservations       *[]Reservation                          `json:"reservations,omitempty"`
	ReviewDateTime     *string                                 `json:"reviewDateTime,omitempty"`
	Term               *string                                 `json:"term,omitempty"`
}

func (*ReservationOrderProperty) GetBenefitStartTimeAsTime

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

func (*ReservationOrderProperty) GetCreatedDateTimeAsTime

func (o *ReservationOrderProperty) GetCreatedDateTimeAsTime() (*time.Time, error)

func (*ReservationOrderProperty) GetExpiryDateTimeAsTime

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

func (*ReservationOrderProperty) GetRequestDateTimeAsTime

func (o *ReservationOrderProperty) GetRequestDateTimeAsTime() (*time.Time, error)

func (*ReservationOrderProperty) GetReviewDateTimeAsTime

func (o *ReservationOrderProperty) GetReviewDateTimeAsTime() (*time.Time, error)

func (*ReservationOrderProperty) SetBenefitStartTimeAsTime

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

func (*ReservationOrderProperty) SetCreatedDateTimeAsTime

func (o *ReservationOrderProperty) SetCreatedDateTimeAsTime(input time.Time)

func (*ReservationOrderProperty) SetExpiryDateTimeAsTime

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

func (*ReservationOrderProperty) SetRequestDateTimeAsTime

func (o *ReservationOrderProperty) SetRequestDateTimeAsTime(input time.Time)

func (*ReservationOrderProperty) SetReviewDateTimeAsTime

func (o *ReservationOrderProperty) SetReviewDateTimeAsTime(input time.Time)

type ReservationPaymentDetail

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

type ReservationProperty

type ReservationProperty struct {
	AppliedScopeProperties       *ReservationAppliedScopeProperties `json:"appliedScopeProperties,omitempty"`
	AppliedScopeType             *string                            `json:"appliedScopeType,omitempty"`
	AppliedScopes                *[]string                          `json:"appliedScopes,omitempty"`
	Archived                     *bool                              `json:"archived,omitempty"`
	BenefitStartTime             *string                            `json:"benefitStartTime,omitempty"`
	BillingPlan                  *ReservationBillingPlan            `json:"billingPlan,omitempty"`
	BillingScopeId               *string                            `json:"billingScopeId,omitempty"`
	Capabilities                 *string                            `json:"capabilities,omitempty"`
	DisplayName                  *string                            `json:"displayName,omitempty"`
	DisplayProvisioningState     *string                            `json:"displayProvisioningState,omitempty"`
	EffectiveDateTime            *string                            `json:"effectiveDateTime,omitempty"`
	ExpiryDate                   *string                            `json:"expiryDate,omitempty"`
	ExpiryDateTime               *string                            `json:"expiryDateTime,omitempty"`
	ExtendedStatusInfo           *ReservationExtendedStatusInfo     `json:"extendedStatusInfo,omitempty"`
	InstanceFlexibility          *InstanceFlexibility               `json:"instanceFlexibility,omitempty"`
	LastUpdatedDateTime          *string                            `json:"lastUpdatedDateTime,omitempty"`
	MergeProperties              *ReservationMergeProperties        `json:"mergeProperties,omitempty"`
	ProductCode                  *string                            `json:"productCode,omitempty"`
	ProvisioningState            *string                            `json:"provisioningState,omitempty"`
	ProvisioningSubState         *string                            `json:"provisioningSubState,omitempty"`
	PurchaseDate                 *string                            `json:"purchaseDate,omitempty"`
	PurchaseDateTime             *string                            `json:"purchaseDateTime,omitempty"`
	Quantity                     *float64                           `json:"quantity,omitempty"`
	Renew                        *bool                              `json:"renew,omitempty"`
	RenewDestination             *string                            `json:"renewDestination,omitempty"`
	RenewProperties              *RenewPropertiesResponse           `json:"renewProperties,omitempty"`
	RenewSource                  *string                            `json:"renewSource,omitempty"`
	ReservedResourceType         *string                            `json:"reservedResourceType,omitempty"`
	ReviewDateTime               *string                            `json:"reviewDateTime,omitempty"`
	SkuDescription               *string                            `json:"skuDescription,omitempty"`
	SplitProperties              *ReservationSplitProperties        `json:"splitProperties,omitempty"`
	SwapProperties               *ReservationSwapProperties         `json:"swapProperties,omitempty"`
	Term                         *string                            `json:"term,omitempty"`
	UserFriendlyAppliedScopeType *string                            `json:"userFriendlyAppliedScopeType,omitempty"`
	UserFriendlyRenewState       *string                            `json:"userFriendlyRenewState,omitempty"`
	Utilization                  *ReservationPropertyUtilization    `json:"utilization,omitempty"`
}

func (*ReservationProperty) GetBenefitStartTimeAsTime

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

func (*ReservationProperty) GetEffectiveDateTimeAsTime

func (o *ReservationProperty) GetEffectiveDateTimeAsTime() (*time.Time, error)

func (*ReservationProperty) GetExpiryDateTimeAsTime

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

func (*ReservationProperty) GetLastUpdatedDateTimeAsTime

func (o *ReservationProperty) GetLastUpdatedDateTimeAsTime() (*time.Time, error)

func (*ReservationProperty) GetPurchaseDateTimeAsTime

func (o *ReservationProperty) GetPurchaseDateTimeAsTime() (*time.Time, error)

func (*ReservationProperty) GetReviewDateTimeAsTime

func (o *ReservationProperty) GetReviewDateTimeAsTime() (*time.Time, error)

func (*ReservationProperty) SetBenefitStartTimeAsTime

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

func (*ReservationProperty) SetEffectiveDateTimeAsTime

func (o *ReservationProperty) SetEffectiveDateTimeAsTime(input time.Time)

func (*ReservationProperty) SetExpiryDateTimeAsTime

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

func (*ReservationProperty) SetLastUpdatedDateTimeAsTime

func (o *ReservationProperty) SetLastUpdatedDateTimeAsTime(input time.Time)

func (*ReservationProperty) SetPurchaseDateTimeAsTime

func (o *ReservationProperty) SetPurchaseDateTimeAsTime(input time.Time)

func (*ReservationProperty) SetReviewDateTimeAsTime

func (o *ReservationProperty) SetReviewDateTimeAsTime(input time.Time)

type ReservationPropertyUtilization

type ReservationPropertyUtilization struct {
	Aggregates *[]ReservationUtilizationAggregates `json:"aggregates,omitempty"`
	Trend      *string                             `json:"trend,omitempty"`
}

type ReservationPurchaseRequest

type ReservationPurchaseRequest struct {
	Location   *string                               `json:"location,omitempty"`
	Properties *ReservationPurchaseRequestProperties `json:"properties,omitempty"`
	Sku        *SkuName                              `json:"sku,omitempty"`
}

type ReservationPurchaseRequestProperties

type ReservationPurchaseRequestProperties struct {
	AppliedScopeProperties     *ReservationAppliedScopeProperties                              `json:"appliedScopeProperties,omitempty"`
	AppliedScopeType           *AppliedScopeType                                               `json:"appliedScopeType,omitempty"`
	AppliedScopes              *[]string                                                       `json:"appliedScopes,omitempty"`
	BillingPlan                *ReservationBillingPlan                                         `json:"billingPlan,omitempty"`
	BillingScopeId             *string                                                         `json:"billingScopeId,omitempty"`
	DisplayName                *string                                                         `json:"displayName,omitempty"`
	InstanceFlexibility        *InstanceFlexibility                                            `json:"instanceFlexibility,omitempty"`
	Quantity                   *int64                                                          `json:"quantity,omitempty"`
	Renew                      *bool                                                           `json:"renew,omitempty"`
	ReservedResourceProperties *ReservationPurchaseRequestPropertiesReservedResourceProperties `json:"reservedResourceProperties,omitempty"`
	ReservedResourceType       *string                                                         `json:"reservedResourceType,omitempty"`
	ReviewDateTime             *string                                                         `json:"reviewDateTime,omitempty"`
	Term                       *string                                                         `json:"term,omitempty"`
}

func (*ReservationPurchaseRequestProperties) GetReviewDateTimeAsTime

func (o *ReservationPurchaseRequestProperties) GetReviewDateTimeAsTime() (*time.Time, error)

func (*ReservationPurchaseRequestProperties) SetReviewDateTimeAsTime

func (o *ReservationPurchaseRequestProperties) SetReviewDateTimeAsTime(input time.Time)

type ReservationPurchaseRequestPropertiesReservedResourceProperties

type ReservationPurchaseRequestPropertiesReservedResourceProperties struct {
	InstanceFlexibility *InstanceFlexibility `json:"instanceFlexibility,omitempty"`
}

type ReservationSkuProperty

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

type ReservationSplitProperties

type ReservationSplitProperties struct {
	SplitDestinations *[]string `json:"splitDestinations,omitempty"`
	SplitSource       *string   `json:"splitSource,omitempty"`
}

type ReservationStatusCode

type ReservationStatusCode string
const (
	ReservationStatusCodeActive                             ReservationStatusCode = "Active"
	ReservationStatusCodeCapacityError                      ReservationStatusCode = "CapacityError"
	ReservationStatusCodeCapacityRestricted                 ReservationStatusCode = "CapacityRestricted"
	ReservationStatusCodeCreditLineCheckFailed              ReservationStatusCode = "CreditLineCheckFailed"
	ReservationStatusCodeExchanged                          ReservationStatusCode = "Exchanged"
	ReservationStatusCodeExpired                            ReservationStatusCode = "Expired"
	ReservationStatusCodeMerged                             ReservationStatusCode = "Merged"
	ReservationStatusCodeNoBenefit                          ReservationStatusCode = "NoBenefit"
	ReservationStatusCodeNoBenefitDueToSubscriptionDeletion ReservationStatusCode = "NoBenefitDueToSubscriptionDeletion"
	ReservationStatusCodeNoBenefitDueToSubscriptionTransfer ReservationStatusCode = "NoBenefitDueToSubscriptionTransfer"
	ReservationStatusCodeNone                               ReservationStatusCode = "None"
	ReservationStatusCodePaymentInstrumentError             ReservationStatusCode = "PaymentInstrumentError"
	ReservationStatusCodePending                            ReservationStatusCode = "Pending"
	ReservationStatusCodeProcessing                         ReservationStatusCode = "Processing"
	ReservationStatusCodePurchaseError                      ReservationStatusCode = "PurchaseError"
	ReservationStatusCodeRiskCheckFailed                    ReservationStatusCode = "RiskCheckFailed"
	ReservationStatusCodeSplit                              ReservationStatusCode = "Split"
	ReservationStatusCodeSucceeded                          ReservationStatusCode = "Succeeded"
	ReservationStatusCodeUnknownError                       ReservationStatusCode = "UnknownError"
	ReservationStatusCodeWarning                            ReservationStatusCode = "Warning"
)

func (*ReservationStatusCode) UnmarshalJSON

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

type ReservationSwapProperties

type ReservationSwapProperties struct {
	SwapDestination *string `json:"swapDestination,omitempty"`
	SwapSource      *string `json:"swapSource,omitempty"`
}

type ReservationUtilizationAggregates

type ReservationUtilizationAggregates struct {
	Grain     *float64 `json:"grain,omitempty"`
	GrainUnit *string  `json:"grainUnit,omitempty"`
	Value     *float64 `json:"value,omitempty"`
	ValueUnit *string  `json:"valueUnit,omitempty"`
}

type SkuName

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

Jump to

Keyboard shortcuts

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