events

package
v0.20221024.1140539 Latest Latest
Warning

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

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

README

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

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

Client Initialization

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

Example Usage: EventsClient.List

ctx := context.TODO()
id := events.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

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

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 *float64 `json:"exchangeRateMonth,omitempty"`
	Value             *float64 `json:"value,omitempty"`
}

type EventProperties

type EventProperties struct {
	Adjustments                    *Amount                 `json:"adjustments,omitempty"`
	AdjustmentsInBillingCurrency   *AmountWithExchangeRate `json:"adjustmentsInBillingCurrency,omitempty"`
	BillingCurrency                *string                 `json:"billingCurrency,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"`
	EventType                      *EventType              `json:"eventType,omitempty"`
	InvoiceNumber                  *string                 `json:"invoiceNumber,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 (
	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) List

List ...

func (EventsClient) ListComplete

ListComplete retrieves all of the results into a single object

func (EventsClient) ListCompleteMatchingPredicate

func (c EventsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ScopeId, options ListOperationOptions, predicate EventSummaryOperationPredicate) (resp ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate

type ListCompleteResult

type ListCompleteResult struct {
	Items []EventSummary
}

type ListOperationOptions

type ListOperationOptions struct {
	EndDate   *string
	StartDate *string
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

type ListOperationResponse

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

func (ListOperationResponse) HasMore

func (r ListOperationResponse) HasMore() bool

func (ListOperationResponse) LoadMore

func (r ListOperationResponse) LoadMore(ctx context.Context) (resp ListOperationResponse, err error)

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