usagedetails

package
v0.20230123.1111713 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2023 License: MPL-2.0 Imports: 11 Imported by: 0

README

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

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

Client Initialization

client := usagedetails.NewUsageDetailsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: UsageDetailsClient.List

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

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

func PossibleValuesForMetrictype() []string

func PossibleValuesForUsageDetailsKind

func PossibleValuesForUsageDetailsKind() []string

Types

type LegacyUsageDetail

type LegacyUsageDetail struct {
	Properties LegacyUsageDetailProperties `json:"properties"`

	// Fields inherited from UsageDetail
	Etag *string            `json:"etag,omitempty"`
	Id   *string            `json:"id,omitempty"`
	Name *string            `json:"name,omitempty"`
	Tags *map[string]string `json:"tags,omitempty"`
	Type *string            `json:"type,omitempty"`
}

func (LegacyUsageDetail) MarshalJSON

func (s LegacyUsageDetail) MarshalJSON() ([]byte, error)

type LegacyUsageDetailProperties

type LegacyUsageDetailProperties struct {
	AccountName            *string               `json:"accountName,omitempty"`
	AccountOwnerId         *string               `json:"accountOwnerId,omitempty"`
	AdditionalInfo         *string               `json:"additionalInfo,omitempty"`
	BillingAccountId       *string               `json:"billingAccountId,omitempty"`
	BillingAccountName     *string               `json:"billingAccountName,omitempty"`
	BillingCurrency        *string               `json:"billingCurrency,omitempty"`
	BillingPeriodEndDate   *string               `json:"billingPeriodEndDate,omitempty"`
	BillingPeriodStartDate *string               `json:"billingPeriodStartDate,omitempty"`
	BillingProfileId       *string               `json:"billingProfileId,omitempty"`
	BillingProfileName     *string               `json:"billingProfileName,omitempty"`
	ChargeType             *string               `json:"chargeType,omitempty"`
	ConsumedService        *string               `json:"consumedService,omitempty"`
	Cost                   *float64              `json:"cost,omitempty"`
	CostCenter             *string               `json:"costCenter,omitempty"`
	Date                   *string               `json:"date,omitempty"`
	EffectivePrice         *float64              `json:"effectivePrice,omitempty"`
	Frequency              *string               `json:"frequency,omitempty"`
	InvoiceSection         *string               `json:"invoiceSection,omitempty"`
	IsAzureCreditEligible  *bool                 `json:"isAzureCreditEligible,omitempty"`
	MeterDetails           *MeterDetailsResponse `json:"meterDetails,omitempty"`
	MeterId                *string               `json:"meterId,omitempty"`
	OfferId                *string               `json:"offerId,omitempty"`
	PartNumber             *string               `json:"partNumber,omitempty"`
	PlanName               *string               `json:"planName,omitempty"`
	Product                *string               `json:"product,omitempty"`
	ProductOrderId         *string               `json:"productOrderId,omitempty"`
	ProductOrderName       *string               `json:"productOrderName,omitempty"`
	PublisherName          *string               `json:"publisherName,omitempty"`
	PublisherType          *string               `json:"publisherType,omitempty"`
	Quantity               *float64              `json:"quantity,omitempty"`
	ReservationId          *string               `json:"reservationId,omitempty"`
	ReservationName        *string               `json:"reservationName,omitempty"`
	ResourceGroup          *string               `json:"resourceGroup,omitempty"`
	ResourceId             *string               `json:"resourceId,omitempty"`
	ResourceLocation       *string               `json:"resourceLocation,omitempty"`
	ResourceName           *string               `json:"resourceName,omitempty"`
	ServiceInfo1           *string               `json:"serviceInfo1,omitempty"`
	ServiceInfo2           *string               `json:"serviceInfo2,omitempty"`
	SubscriptionId         *string               `json:"subscriptionId,omitempty"`
	SubscriptionName       *string               `json:"subscriptionName,omitempty"`
	Term                   *string               `json:"term,omitempty"`
	UnitPrice              *float64              `json:"unitPrice,omitempty"`
}

func (*LegacyUsageDetailProperties) GetBillingPeriodEndDateAsTime

func (o *LegacyUsageDetailProperties) GetBillingPeriodEndDateAsTime() (*time.Time, error)

func (*LegacyUsageDetailProperties) GetBillingPeriodStartDateAsTime

func (o *LegacyUsageDetailProperties) GetBillingPeriodStartDateAsTime() (*time.Time, error)

func (*LegacyUsageDetailProperties) GetDateAsTime

func (o *LegacyUsageDetailProperties) GetDateAsTime() (*time.Time, error)

func (*LegacyUsageDetailProperties) SetBillingPeriodEndDateAsTime

func (o *LegacyUsageDetailProperties) SetBillingPeriodEndDateAsTime(input time.Time)

func (*LegacyUsageDetailProperties) SetBillingPeriodStartDateAsTime

func (o *LegacyUsageDetailProperties) SetBillingPeriodStartDateAsTime(input time.Time)

func (*LegacyUsageDetailProperties) SetDateAsTime

func (o *LegacyUsageDetailProperties) SetDateAsTime(input time.Time)

type ListCompleteResult

type ListCompleteResult struct {
	Items []UsageDetail
}

type ListOperationOptions

type ListOperationOptions struct {
	Expand *string
	Filter *string
	Metric *Metrictype
	Top    *int64
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]UsageDetail
	// 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 MeterDetailsResponse

type MeterDetailsResponse struct {
	MeterCategory    *string `json:"meterCategory,omitempty"`
	MeterName        *string `json:"meterName,omitempty"`
	MeterSubCategory *string `json:"meterSubCategory,omitempty"`
	ServiceFamily    *string `json:"serviceFamily,omitempty"`
	UnitOfMeasure    *string `json:"unitOfMeasure,omitempty"`
}

type Metrictype

type Metrictype string
const (
	MetrictypeActualcost    Metrictype = "actualcost"
	MetrictypeAmortizedcost Metrictype = "amortizedcost"
	MetrictypeUsage         Metrictype = "usage"
)

type ModernUsageDetail

type ModernUsageDetail struct {
	Properties ModernUsageDetailProperties `json:"properties"`

	// Fields inherited from UsageDetail
	Etag *string            `json:"etag,omitempty"`
	Id   *string            `json:"id,omitempty"`
	Name *string            `json:"name,omitempty"`
	Tags *map[string]string `json:"tags,omitempty"`
	Type *string            `json:"type,omitempty"`
}

func (ModernUsageDetail) MarshalJSON

func (s ModernUsageDetail) MarshalJSON() ([]byte, error)

type ModernUsageDetailProperties

type ModernUsageDetailProperties struct {
	AdditionalInfo               *string  `json:"additionalInfo,omitempty"`
	BillingAccountId             *string  `json:"billingAccountId,omitempty"`
	BillingAccountName           *string  `json:"billingAccountName,omitempty"`
	BillingCurrencyCode          *string  `json:"billingCurrencyCode,omitempty"`
	BillingPeriodEndDate         *string  `json:"billingPeriodEndDate,omitempty"`
	BillingPeriodStartDate       *string  `json:"billingPeriodStartDate,omitempty"`
	BillingProfileId             *string  `json:"billingProfileId,omitempty"`
	BillingProfileName           *string  `json:"billingProfileName,omitempty"`
	ChargeType                   *string  `json:"chargeType,omitempty"`
	ConsumedService              *string  `json:"consumedService,omitempty"`
	CostCenter                   *string  `json:"costCenter,omitempty"`
	CostInBillingCurrency        *float64 `json:"costInBillingCurrency,omitempty"`
	CostInPricingCurrency        *float64 `json:"costInPricingCurrency,omitempty"`
	CostInUSD                    *float64 `json:"costInUSD,omitempty"`
	CustomerName                 *string  `json:"customerName,omitempty"`
	CustomerTenantId             *string  `json:"customerTenantId,omitempty"`
	Date                         *string  `json:"date,omitempty"`
	ExchangeRate                 *string  `json:"exchangeRate,omitempty"`
	ExchangeRateDate             *string  `json:"exchangeRateDate,omitempty"`
	ExchangeRatePricingToBilling *float64 `json:"exchangeRatePricingToBilling,omitempty"`
	Frequency                    *string  `json:"frequency,omitempty"`
	InstanceName                 *string  `json:"instanceName,omitempty"`
	InvoiceId                    *string  `json:"invoiceId,omitempty"`
	InvoiceSectionId             *string  `json:"invoiceSectionId,omitempty"`
	InvoiceSectionName           *string  `json:"invoiceSectionName,omitempty"`
	IsAzureCreditEligible        *bool    `json:"isAzureCreditEligible,omitempty"`
	MarketPrice                  *float64 `json:"marketPrice,omitempty"`
	MeterCategory                *string  `json:"meterCategory,omitempty"`
	MeterId                      *string  `json:"meterId,omitempty"`
	MeterName                    *string  `json:"meterName,omitempty"`
	MeterRegion                  *string  `json:"meterRegion,omitempty"`
	MeterSubCategory             *string  `json:"meterSubCategory,omitempty"`
	PartnerEarnedCreditApplied   *string  `json:"partnerEarnedCreditApplied,omitempty"`
	PartnerEarnedCreditRate      *float64 `json:"partnerEarnedCreditRate,omitempty"`
	PartnerName                  *string  `json:"partnerName,omitempty"`
	PartnerTenantId              *string  `json:"partnerTenantId,omitempty"`
	PayGPrice                    *float64 `json:"payGPrice,omitempty"`
	PaygCostInBillingCurrency    *float64 `json:"paygCostInBillingCurrency,omitempty"`
	PaygCostInUSD                *float64 `json:"paygCostInUSD,omitempty"`
	PreviousInvoiceId            *string  `json:"previousInvoiceId,omitempty"`
	PricingCurrencyCode          *string  `json:"pricingCurrencyCode,omitempty"`
	Product                      *string  `json:"product,omitempty"`
	ProductIdentifier            *string  `json:"productIdentifier,omitempty"`
	ProductOrderId               *string  `json:"productOrderId,omitempty"`
	ProductOrderName             *string  `json:"productOrderName,omitempty"`
	PublisherId                  *string  `json:"publisherId,omitempty"`
	PublisherName                *string  `json:"publisherName,omitempty"`
	PublisherType                *string  `json:"publisherType,omitempty"`
	Quantity                     *float64 `json:"quantity,omitempty"`
	ResellerMpnId                *string  `json:"resellerMpnId,omitempty"`
	ResellerName                 *string  `json:"resellerName,omitempty"`
	ReservationId                *string  `json:"reservationId,omitempty"`
	ReservationName              *string  `json:"reservationName,omitempty"`
	ResourceGroup                *string  `json:"resourceGroup,omitempty"`
	ResourceLocation             *string  `json:"resourceLocation,omitempty"`
	ResourceLocationNormalized   *string  `json:"resourceLocationNormalized,omitempty"`
	ServiceFamily                *string  `json:"serviceFamily,omitempty"`
	ServiceInfo1                 *string  `json:"serviceInfo1,omitempty"`
	ServiceInfo2                 *string  `json:"serviceInfo2,omitempty"`
	ServicePeriodEndDate         *string  `json:"servicePeriodEndDate,omitempty"`
	ServicePeriodStartDate       *string  `json:"servicePeriodStartDate,omitempty"`
	SubscriptionGuid             *string  `json:"subscriptionGuid,omitempty"`
	SubscriptionName             *string  `json:"subscriptionName,omitempty"`
	Term                         *string  `json:"term,omitempty"`
	UnitOfMeasure                *string  `json:"unitOfMeasure,omitempty"`
	UnitPrice                    *float64 `json:"unitPrice,omitempty"`
}

func (*ModernUsageDetailProperties) GetBillingPeriodEndDateAsTime

func (o *ModernUsageDetailProperties) GetBillingPeriodEndDateAsTime() (*time.Time, error)

func (*ModernUsageDetailProperties) GetBillingPeriodStartDateAsTime

func (o *ModernUsageDetailProperties) GetBillingPeriodStartDateAsTime() (*time.Time, error)

func (*ModernUsageDetailProperties) GetDateAsTime

func (o *ModernUsageDetailProperties) GetDateAsTime() (*time.Time, error)

func (*ModernUsageDetailProperties) GetExchangeRateDateAsTime

func (o *ModernUsageDetailProperties) GetExchangeRateDateAsTime() (*time.Time, error)

func (*ModernUsageDetailProperties) GetServicePeriodEndDateAsTime

func (o *ModernUsageDetailProperties) GetServicePeriodEndDateAsTime() (*time.Time, error)

func (*ModernUsageDetailProperties) GetServicePeriodStartDateAsTime

func (o *ModernUsageDetailProperties) GetServicePeriodStartDateAsTime() (*time.Time, error)

func (*ModernUsageDetailProperties) SetBillingPeriodEndDateAsTime

func (o *ModernUsageDetailProperties) SetBillingPeriodEndDateAsTime(input time.Time)

func (*ModernUsageDetailProperties) SetBillingPeriodStartDateAsTime

func (o *ModernUsageDetailProperties) SetBillingPeriodStartDateAsTime(input time.Time)

func (*ModernUsageDetailProperties) SetDateAsTime

func (o *ModernUsageDetailProperties) SetDateAsTime(input time.Time)

func (*ModernUsageDetailProperties) SetExchangeRateDateAsTime

func (o *ModernUsageDetailProperties) SetExchangeRateDateAsTime(input time.Time)

func (*ModernUsageDetailProperties) SetServicePeriodEndDateAsTime

func (o *ModernUsageDetailProperties) SetServicePeriodEndDateAsTime(input time.Time)

func (*ModernUsageDetailProperties) SetServicePeriodStartDateAsTime

func (o *ModernUsageDetailProperties) SetServicePeriodStartDateAsTime(input time.Time)

type UsageDetail

type UsageDetail interface {
}

type UsageDetailOperationPredicate

type UsageDetailOperationPredicate struct {
}

func (UsageDetailOperationPredicate) Matches

type UsageDetailsClient

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

func NewUsageDetailsClientWithBaseURI

func NewUsageDetailsClientWithBaseURI(endpoint string) UsageDetailsClient

func (UsageDetailsClient) List

List ...

func (UsageDetailsClient) ListComplete

ListComplete retrieves all of the results into a single object

func (UsageDetailsClient) ListCompleteMatchingPredicate

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

ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate

type UsageDetailsKind

type UsageDetailsKind string
const (
	UsageDetailsKindLegacy UsageDetailsKind = "legacy"
	UsageDetailsKindModern UsageDetailsKind = "modern"
)

Jump to

Keyboard shortcuts

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