events

package
v0.20240321.1111417 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: MPL-2.0 Imports: 12 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-helpers/resourcemanager/commonids"
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 := commonids.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"
)

func (*EventType) UnmarshalJSON

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

type EventsClient

type EventsClient struct {
	Client *resourcemanager.Client
}

func NewEventsClientWithBaseURI

func NewEventsClientWithBaseURI(sdkApi sdkEnv.Api) (*EventsClient, error)

func (EventsClient) List

List ...

func (EventsClient) ListComplete

ListComplete retrieves all the results into a single object

func (EventsClient) ListCompleteMatchingPredicate

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

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []EventSummary
}

type ListOperationOptions

type ListOperationOptions struct {
	EndDate   *string
	StartDate *string
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders

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

func (ListOperationOptions) ToOData

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

func (ListOperationOptions) ToQuery

type ListOperationResponse

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

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