reservationtransactions

package
v0.20230726.1190715 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: MPL-2.0 Imports: 11 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2021-10-01/reservationtransactions Documentation

The reservationtransactions SDK allows for interaction with the Azure Resource Manager Service consumption (API Version 2021-10-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/consumption/2021-10-01/reservationtransactions"

Client Initialization

client := reservationtransactions.NewReservationTransactionsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ReservationTransactionsClient.List

ctx := context.TODO()
id := reservationtransactions.NewBillingAccountID("billingAccountIdValue")

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

Example Usage: ReservationTransactionsClient.ListByBillingProfile

ctx := context.TODO()
id := reservationtransactions.NewBillingProfileID("billingAccountIdValue", "billingProfileIdValue")

// alternatively `client.ListByBillingProfile(ctx, id, reservationtransactions.DefaultListByBillingProfileOperationOptions())` can be used to do batched pagination
items, err := client.ListByBillingProfileComplete(ctx, id, reservationtransactions.DefaultListByBillingProfileOperationOptions())
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 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

Types

type BillingAccountId

type BillingAccountId struct {
	BillingAccountId string
}

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

func NewBillingAccountID

func NewBillingAccountID(billingAccountId 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) 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 {
	BillingAccountId string
	BillingProfileId string
}

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

func NewBillingProfileID

func NewBillingProfileID(billingAccountId string, billingProfileId 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) 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 LegacyReservationTransactionProperties

type LegacyReservationTransactionProperties struct {
	AccountName                *string  `json:"accountName,omitempty"`
	AccountOwnerEmail          *string  `json:"accountOwnerEmail,omitempty"`
	Amount                     *float64 `json:"amount,omitempty"`
	ArmSkuName                 *string  `json:"armSkuName,omitempty"`
	BillingFrequency           *string  `json:"billingFrequency,omitempty"`
	BillingMonth               *int64   `json:"billingMonth,omitempty"`
	CostCenter                 *string  `json:"costCenter,omitempty"`
	Currency                   *string  `json:"currency,omitempty"`
	CurrentEnrollment          *string  `json:"currentEnrollment,omitempty"`
	DepartmentName             *string  `json:"departmentName,omitempty"`
	Description                *string  `json:"description,omitempty"`
	EventDate                  *string  `json:"eventDate,omitempty"`
	EventType                  *string  `json:"eventType,omitempty"`
	MonetaryCommitment         *float64 `json:"monetaryCommitment,omitempty"`
	Overage                    *float64 `json:"overage,omitempty"`
	PurchasingEnrollment       *string  `json:"purchasingEnrollment,omitempty"`
	PurchasingSubscriptionGuid *string  `json:"purchasingSubscriptionGuid,omitempty"`
	PurchasingSubscriptionName *string  `json:"purchasingSubscriptionName,omitempty"`
	Quantity                   *float64 `json:"quantity,omitempty"`
	Region                     *string  `json:"region,omitempty"`
	ReservationOrderId         *string  `json:"reservationOrderId,omitempty"`
	ReservationOrderName       *string  `json:"reservationOrderName,omitempty"`
	Term                       *string  `json:"term,omitempty"`
}

func (*LegacyReservationTransactionProperties) GetEventDateAsTime

func (o *LegacyReservationTransactionProperties) GetEventDateAsTime() (*time.Time, error)

func (*LegacyReservationTransactionProperties) SetEventDateAsTime

func (o *LegacyReservationTransactionProperties) SetEventDateAsTime(input time.Time)

type ListByBillingProfileCompleteResult

type ListByBillingProfileCompleteResult struct {
	Items []ModernReservationTransaction
}

type ListByBillingProfileOperationOptions

type ListByBillingProfileOperationOptions struct {
	Filter *string
}

func DefaultListByBillingProfileOperationOptions

func DefaultListByBillingProfileOperationOptions() ListByBillingProfileOperationOptions

func (ListByBillingProfileOperationOptions) ToHeaders added in v0.20230411.1183115

func (ListByBillingProfileOperationOptions) ToOData added in v0.20230411.1183115

func (ListByBillingProfileOperationOptions) ToQuery added in v0.20230411.1183115

type ListByBillingProfileOperationResponse

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

type ListCompleteResult

type ListCompleteResult struct {
	Items []ReservationTransaction
}

type ListOperationOptions

type ListOperationOptions struct {
	Filter *string
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders added in v0.20230411.1183115

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

func (ListOperationOptions) ToOData added in v0.20230411.1183115

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

func (ListOperationOptions) ToQuery added in v0.20230411.1183115

type ListOperationResponse

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

type ModernReservationTransaction

type ModernReservationTransaction struct {
	Id         *string                                `json:"id,omitempty"`
	Name       *string                                `json:"name,omitempty"`
	Properties ModernReservationTransactionProperties `json:"properties"`
	Tags       *[]string                              `json:"tags,omitempty"`
	Type       *string                                `json:"type,omitempty"`
}

type ModernReservationTransactionOperationPredicate

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

func (ModernReservationTransactionOperationPredicate) Matches

type ModernReservationTransactionProperties

type ModernReservationTransactionProperties struct {
	Amount                     *float64 `json:"amount,omitempty"`
	ArmSkuName                 *string  `json:"armSkuName,omitempty"`
	BillingFrequency           *string  `json:"billingFrequency,omitempty"`
	BillingProfileId           *string  `json:"billingProfileId,omitempty"`
	BillingProfileName         *string  `json:"billingProfileName,omitempty"`
	Currency                   *string  `json:"currency,omitempty"`
	Description                *string  `json:"description,omitempty"`
	EventDate                  *string  `json:"eventDate,omitempty"`
	EventType                  *string  `json:"eventType,omitempty"`
	Invoice                    *string  `json:"invoice,omitempty"`
	InvoiceId                  *string  `json:"invoiceId,omitempty"`
	InvoiceSectionId           *string  `json:"invoiceSectionId,omitempty"`
	InvoiceSectionName         *string  `json:"invoiceSectionName,omitempty"`
	PurchasingSubscriptionGuid *string  `json:"purchasingSubscriptionGuid,omitempty"`
	PurchasingSubscriptionName *string  `json:"purchasingSubscriptionName,omitempty"`
	Quantity                   *float64 `json:"quantity,omitempty"`
	Region                     *string  `json:"region,omitempty"`
	ReservationOrderId         *string  `json:"reservationOrderId,omitempty"`
	ReservationOrderName       *string  `json:"reservationOrderName,omitempty"`
	Term                       *string  `json:"term,omitempty"`
}

func (*ModernReservationTransactionProperties) GetEventDateAsTime

func (o *ModernReservationTransactionProperties) GetEventDateAsTime() (*time.Time, error)

func (*ModernReservationTransactionProperties) SetEventDateAsTime

func (o *ModernReservationTransactionProperties) SetEventDateAsTime(input time.Time)

type ReservationTransaction

type ReservationTransaction struct {
	Id         *string                                 `json:"id,omitempty"`
	Name       *string                                 `json:"name,omitempty"`
	Properties *LegacyReservationTransactionProperties `json:"properties,omitempty"`
	Tags       *[]string                               `json:"tags,omitempty"`
	Type       *string                                 `json:"type,omitempty"`
}

type ReservationTransactionOperationPredicate

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

func (ReservationTransactionOperationPredicate) Matches

type ReservationTransactionsClient

type ReservationTransactionsClient struct {
	Client *resourcemanager.Client
}

func NewReservationTransactionsClientWithBaseURI

func NewReservationTransactionsClientWithBaseURI(api environments.Api) (*ReservationTransactionsClient, error)

func (ReservationTransactionsClient) List

List ...

func (ReservationTransactionsClient) ListByBillingProfile

ListByBillingProfile ...

func (ReservationTransactionsClient) ListByBillingProfileComplete

ListByBillingProfileComplete retrieves all the results into a single object

func (ReservationTransactionsClient) ListByBillingProfileCompleteMatchingPredicate

ListByBillingProfileCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ReservationTransactionsClient) ListComplete

ListComplete retrieves all the results into a single object

func (ReservationTransactionsClient) ListCompleteMatchingPredicate

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

Jump to

Keyboard shortcuts

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