costdetails

package
v0.20240521.1173452 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: MPL-2.0 Imports: 13 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-03-01/costdetails Documentation

The costdetails SDK allows for interaction with the Azure Resource Manager Service costmanagement (API Version 2023-03-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/costmanagement/2023-03-01/costdetails"

Client Initialization

client := costdetails.NewCostDetailsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: CostDetailsClient.GenerateCostDetailsReportCreateOperation

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

payload := costdetails.GenerateCostDetailsReportRequestDefinition{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForCostDetailsDataFormat

func PossibleValuesForCostDetailsDataFormat() []string

func PossibleValuesForCostDetailsMetricType

func PossibleValuesForCostDetailsMetricType() []string

func PossibleValuesForCostDetailsStatusType

func PossibleValuesForCostDetailsStatusType() []string

Types

type BlobInfo

type BlobInfo struct {
	BlobLink  *string `json:"blobLink,omitempty"`
	ByteCount *int64  `json:"byteCount,omitempty"`
}

type CostDetailsClient

type CostDetailsClient struct {
	Client *resourcemanager.Client
}

func NewCostDetailsClientWithBaseURI

func NewCostDetailsClientWithBaseURI(sdkApi sdkEnv.Api) (*CostDetailsClient, error)

func (CostDetailsClient) GenerateCostDetailsReportCreateOperation

GenerateCostDetailsReportCreateOperation ...

func (CostDetailsClient) GenerateCostDetailsReportCreateOperationThenPoll

func (c CostDetailsClient) GenerateCostDetailsReportCreateOperationThenPoll(ctx context.Context, id commonids.ScopeId, input GenerateCostDetailsReportRequestDefinition) error

GenerateCostDetailsReportCreateOperationThenPoll performs GenerateCostDetailsReportCreateOperation then polls until it's completed

type CostDetailsDataFormat

type CostDetailsDataFormat string
const (
	CostDetailsDataFormatCsv CostDetailsDataFormat = "Csv"
)

func (*CostDetailsDataFormat) UnmarshalJSON

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

type CostDetailsMetricType

type CostDetailsMetricType string
const (
	CostDetailsMetricTypeActualCost    CostDetailsMetricType = "ActualCost"
	CostDetailsMetricTypeAmortizedCost CostDetailsMetricType = "AmortizedCost"
)

func (*CostDetailsMetricType) UnmarshalJSON

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

type CostDetailsOperationResults

type CostDetailsOperationResults struct {
	Error     *ErrorDetails          `json:"error,omitempty"`
	Id        *string                `json:"id,omitempty"`
	Manifest  *ReportManifest        `json:"manifest,omitempty"`
	Name      *string                `json:"name,omitempty"`
	Status    *CostDetailsStatusType `json:"status,omitempty"`
	Type      *string                `json:"type,omitempty"`
	ValidTill *string                `json:"validTill,omitempty"`
}

func (*CostDetailsOperationResults) GetValidTillAsTime

func (o *CostDetailsOperationResults) GetValidTillAsTime() (*time.Time, error)

func (*CostDetailsOperationResults) SetValidTillAsTime

func (o *CostDetailsOperationResults) SetValidTillAsTime(input time.Time)

type CostDetailsStatusType

type CostDetailsStatusType string
const (
	CostDetailsStatusTypeCompleted   CostDetailsStatusType = "Completed"
	CostDetailsStatusTypeFailed      CostDetailsStatusType = "Failed"
	CostDetailsStatusTypeNoDataFound CostDetailsStatusType = "NoDataFound"
)

func (*CostDetailsStatusType) UnmarshalJSON

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

type CostDetailsTimePeriod

type CostDetailsTimePeriod struct {
	End   string `json:"end"`
	Start string `json:"start"`
}

type ErrorDetails

type ErrorDetails struct {
	Code    *string `json:"code,omitempty"`
	Message *string `json:"message,omitempty"`
}

type GenerateCostDetailsReportCreateOperationOperationResponse

type GenerateCostDetailsReportCreateOperationOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *CostDetailsOperationResults
}

type GenerateCostDetailsReportRequestDefinition

type GenerateCostDetailsReportRequestDefinition struct {
	BillingPeriod *string                `json:"billingPeriod,omitempty"`
	InvoiceId     *string                `json:"invoiceId,omitempty"`
	Metric        *CostDetailsMetricType `json:"metric,omitempty"`
	TimePeriod    *CostDetailsTimePeriod `json:"timePeriod,omitempty"`
}

type ReportManifest

type ReportManifest struct {
	BlobCount       *int64                 `json:"blobCount,omitempty"`
	Blobs           *[]BlobInfo            `json:"blobs,omitempty"`
	ByteCount       *int64                 `json:"byteCount,omitempty"`
	CompressData    *bool                  `json:"compressData,omitempty"`
	DataFormat      *CostDetailsDataFormat `json:"dataFormat,omitempty"`
	ManifestVersion *string                `json:"manifestVersion,omitempty"`
	RequestContext  *RequestContext        `json:"requestContext,omitempty"`
}

type RequestContext

type RequestContext struct {
	RequestBody  *GenerateCostDetailsReportRequestDefinition `json:"requestBody,omitempty"`
	RequestScope *string                                     `json:"requestScope,omitempty"`
}

Jump to

Keyboard shortcuts

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