reservedinstances

package
v0.20220906.1081850 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/reservedinstances Documentation

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

Client Initialization

client := reservedinstances.NewReservedInstancesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ReservedInstancesClient.GenerateReservationDetailsReportByBillingAccountId

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

if err := client.GenerateReservationDetailsReportByBillingAccountIdThenPoll(ctx, id, reservedinstances.DefaultGenerateReservationDetailsReportByBillingAccountIdOperationOptions()); err != nil {
	// handle the error
}

Example Usage: ReservedInstancesClient.GenerateReservationDetailsReportByBillingProfileId

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

if err := client.GenerateReservationDetailsReportByBillingProfileIdThenPoll(ctx, id, reservedinstances.DefaultGenerateReservationDetailsReportByBillingProfileIdOperationOptions()); err != nil {
	// handle the error
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForOperationStatusType

func PossibleValuesForOperationStatusType() []string

func PossibleValuesForReservationReportSchema

func PossibleValuesForReservationReportSchema() []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 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 GenerateReservationDetailsReportByBillingAccountIdOperationOptions

type GenerateReservationDetailsReportByBillingAccountIdOperationOptions struct {
	EndDate   *string
	StartDate *string
}

type GenerateReservationDetailsReportByBillingAccountIdOperationResponse

type GenerateReservationDetailsReportByBillingAccountIdOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type GenerateReservationDetailsReportByBillingProfileIdOperationOptions

type GenerateReservationDetailsReportByBillingProfileIdOperationOptions struct {
	EndDate   *string
	StartDate *string
}

type GenerateReservationDetailsReportByBillingProfileIdOperationResponse

type GenerateReservationDetailsReportByBillingProfileIdOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type OperationStatus

type OperationStatus struct {
	Properties *ReportURL           `json:"properties,omitempty"`
	Status     *OperationStatusType `json:"status,omitempty"`
}

type OperationStatusType

type OperationStatusType string
const (
	OperationStatusTypeCompleted OperationStatusType = "Completed"
	OperationStatusTypeFailed    OperationStatusType = "Failed"
	OperationStatusTypeRunning   OperationStatusType = "Running"
)

type ReportURL

type ReportURL struct {
	ReportUrl  *ReservationReportSchema `json:"reportUrl,omitempty"`
	ValidUntil *string                  `json:"validUntil,omitempty"`
}

func (*ReportURL) GetValidUntilAsTime

func (o *ReportURL) GetValidUntilAsTime() (*time.Time, error)

func (*ReportURL) SetValidUntilAsTime

func (o *ReportURL) SetValidUntilAsTime(input time.Time)

type ReservationReportSchema

type ReservationReportSchema string
const (
	ReservationReportSchemaInstanceFlexibilityGroup ReservationReportSchema = "InstanceFlexibilityGroup"
	ReservationReportSchemaInstanceFlexibilityRatio ReservationReportSchema = "InstanceFlexibilityRatio"
	ReservationReportSchemaInstanceId               ReservationReportSchema = "InstanceId"
	ReservationReportSchemaKind                     ReservationReportSchema = "Kind"
	ReservationReportSchemaReservationId            ReservationReportSchema = "ReservationId"
	ReservationReportSchemaReservationOrderId       ReservationReportSchema = "ReservationOrderId"
	ReservationReportSchemaReservedHours            ReservationReportSchema = "ReservedHours"
	ReservationReportSchemaSkuName                  ReservationReportSchema = "SkuName"
	ReservationReportSchemaTotalReservedQuantity    ReservationReportSchema = "TotalReservedQuantity"
	ReservationReportSchemaUsageDate                ReservationReportSchema = "UsageDate"
	ReservationReportSchemaUsedHours                ReservationReportSchema = "UsedHours"
)

type ReservedInstancesClient

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

func NewReservedInstancesClientWithBaseURI

func NewReservedInstancesClientWithBaseURI(endpoint string) ReservedInstancesClient

func (ReservedInstancesClient) GenerateReservationDetailsReportByBillingAccountId

GenerateReservationDetailsReportByBillingAccountId ...

func (ReservedInstancesClient) GenerateReservationDetailsReportByBillingAccountIdThenPoll

func (c ReservedInstancesClient) GenerateReservationDetailsReportByBillingAccountIdThenPoll(ctx context.Context, id BillingAccountId, options GenerateReservationDetailsReportByBillingAccountIdOperationOptions) error

GenerateReservationDetailsReportByBillingAccountIdThenPoll performs GenerateReservationDetailsReportByBillingAccountId then polls until it's completed

func (ReservedInstancesClient) GenerateReservationDetailsReportByBillingProfileId

GenerateReservationDetailsReportByBillingProfileId ...

func (ReservedInstancesClient) GenerateReservationDetailsReportByBillingProfileIdThenPoll

func (c ReservedInstancesClient) GenerateReservationDetailsReportByBillingProfileIdThenPoll(ctx context.Context, id BillingProfileId, options GenerateReservationDetailsReportByBillingProfileIdOperationOptions) error

GenerateReservationDetailsReportByBillingProfileIdThenPoll performs GenerateReservationDetailsReportByBillingProfileId then polls until it's completed

Jump to

Keyboard shortcuts

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