events

package
v0.20221118.1114350 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2022 License: MPL-2.0 Imports: 10 Imported by: 1

README

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

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

Client Initialization

client := events.NewEventsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: EventsClient.ListByBillingAccount

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

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

Example Usage: EventsClient.ListByBillingProfile

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

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

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

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

type AmountWithExchangeRate

type AmountWithExchangeRate struct {
	Currency          *string  `json:"currency,omitempty"`
	ExchangeRate      *float64 `json:"exchangeRate,omitempty"`
	ExchangeRateMonth *int64   `json:"exchangeRateMonth,omitempty"`
	Value             *float64 `json:"value,omitempty"`
}

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 EventProperties

type EventProperties struct {
	Adjustments                    *Amount                 `json:"adjustments,omitempty"`
	AdjustmentsInBillingCurrency   *AmountWithExchangeRate `json:"adjustmentsInBillingCurrency,omitempty"`
	BillingCurrency                *string                 `json:"billingCurrency,omitempty"`
	BillingProfileDisplayName      *string                 `json:"billingProfileDisplayName,omitempty"`
	BillingProfileId               *string                 `json:"billingProfileId,omitempty"`
	CanceledCredit                 *Amount                 `json:"canceledCredit,omitempty"`
	Charges                        *Amount                 `json:"charges,omitempty"`
	ChargesInBillingCurrency       *AmountWithExchangeRate `json:"chargesInBillingCurrency,omitempty"`
	ClosedBalance                  *Amount                 `json:"closedBalance,omitempty"`
	ClosedBalanceInBillingCurrency *AmountWithExchangeRate `json:"closedBalanceInBillingCurrency,omitempty"`
	CreditCurrency                 *string                 `json:"creditCurrency,omitempty"`
	CreditExpired                  *Amount                 `json:"creditExpired,omitempty"`
	CreditExpiredInBillingCurrency *AmountWithExchangeRate `json:"creditExpiredInBillingCurrency,omitempty"`
	Description                    *string                 `json:"description,omitempty"`
	ETag                           *string                 `json:"eTag,omitempty"`
	EventType                      *EventType              `json:"eventType,omitempty"`
	InvoiceNumber                  *string                 `json:"invoiceNumber,omitempty"`
	LotId                          *string                 `json:"lotId,omitempty"`
	LotSource                      *string                 `json:"lotSource,omitempty"`
	NewCredit                      *Amount                 `json:"newCredit,omitempty"`
	NewCreditInBillingCurrency     *AmountWithExchangeRate `json:"newCreditInBillingCurrency,omitempty"`
	Reseller                       *Reseller               `json:"reseller,omitempty"`
	TransactionDate                *string                 `json:"transactionDate,omitempty"`
}

func (*EventProperties) GetTransactionDateAsTime

func (o *EventProperties) GetTransactionDateAsTime() (*time.Time, error)

func (*EventProperties) SetTransactionDateAsTime

func (o *EventProperties) SetTransactionDateAsTime(input time.Time)

type EventSummary

type EventSummary struct {
	ETag       *string          `json:"eTag,omitempty"`
	Id         *string          `json:"id,omitempty"`
	Name       *string          `json:"name,omitempty"`
	Properties *EventProperties `json:"properties,omitempty"`
	Type       *string          `json:"type,omitempty"`
}

type EventSummaryOperationPredicate

type EventSummaryOperationPredicate struct {
	ETag *string
	Id   *string
	Name *string
	Type *string
}

func (EventSummaryOperationPredicate) Matches

type EventType

type EventType string
const (
	EventTypeCreditExpired        EventType = "CreditExpired"
	EventTypeNewCredit            EventType = "NewCredit"
	EventTypePendingAdjustments   EventType = "PendingAdjustments"
	EventTypePendingCharges       EventType = "PendingCharges"
	EventTypePendingExpiredCredit EventType = "PendingExpiredCredit"
	EventTypePendingNewCredit     EventType = "PendingNewCredit"
	EventTypeSettledCharges       EventType = "SettledCharges"
	EventTypeUnKnown              EventType = "UnKnown"
)

type EventsClient

type EventsClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewEventsClientWithBaseURI

func NewEventsClientWithBaseURI(endpoint string) EventsClient

func (EventsClient) ListByBillingAccount

ListByBillingAccount ...

func (EventsClient) ListByBillingAccountComplete

ListByBillingAccountComplete retrieves all of the results into a single object

func (EventsClient) ListByBillingAccountCompleteMatchingPredicate

func (c EventsClient) ListByBillingAccountCompleteMatchingPredicate(ctx context.Context, id BillingAccountId, options ListByBillingAccountOperationOptions, predicate EventSummaryOperationPredicate) (resp ListByBillingAccountCompleteResult, err error)

ListByBillingAccountCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (EventsClient) ListByBillingProfile

ListByBillingProfile ...

func (EventsClient) ListByBillingProfileComplete

ListByBillingProfileComplete retrieves all of the results into a single object

func (EventsClient) ListByBillingProfileCompleteMatchingPredicate

func (c EventsClient) ListByBillingProfileCompleteMatchingPredicate(ctx context.Context, id BillingProfileId, options ListByBillingProfileOperationOptions, predicate EventSummaryOperationPredicate) (resp ListByBillingProfileCompleteResult, err error)

ListByBillingProfileCompleteMatchingPredicate retrieves all of the results and then applied the predicate

type ListByBillingAccountCompleteResult

type ListByBillingAccountCompleteResult struct {
	Items []EventSummary
}

type ListByBillingAccountOperationOptions

type ListByBillingAccountOperationOptions struct {
	Filter *string
}

func DefaultListByBillingAccountOperationOptions

func DefaultListByBillingAccountOperationOptions() ListByBillingAccountOperationOptions

type ListByBillingAccountOperationResponse

type ListByBillingAccountOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]EventSummary
	// contains filtered or unexported fields
}

func (ListByBillingAccountOperationResponse) HasMore

func (ListByBillingAccountOperationResponse) LoadMore

type ListByBillingProfileCompleteResult

type ListByBillingProfileCompleteResult struct {
	Items []EventSummary
}

type ListByBillingProfileOperationOptions

type ListByBillingProfileOperationOptions struct {
	EndDate   *string
	StartDate *string
}

func DefaultListByBillingProfileOperationOptions

func DefaultListByBillingProfileOperationOptions() ListByBillingProfileOperationOptions

type ListByBillingProfileOperationResponse

type ListByBillingProfileOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]EventSummary
	// contains filtered or unexported fields
}

func (ListByBillingProfileOperationResponse) HasMore

func (ListByBillingProfileOperationResponse) LoadMore

type Reseller

type Reseller struct {
	ResellerDescription *string `json:"resellerDescription,omitempty"`
	ResellerId          *string `json:"resellerId,omitempty"`
}

Jump to

Keyboard shortcuts

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