usagereportsv4

package
v0.63.1 Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Overview

Package usagereportsv4 : Operations and models for the UsageReportsV4 service

Index

Constants

View Source
const (
	CreateReportsSnapshotConfigOptionsReportTypesAccountResourceInstanceUsageConst = "account_resource_instance_usage"
	CreateReportsSnapshotConfigOptionsReportTypesAccountSummaryConst               = "account_summary"
	CreateReportsSnapshotConfigOptionsReportTypesEnterpriseSummaryConst            = "enterprise_summary"
)

Constants associated with the CreateReportsSnapshotConfigOptions.ReportTypes property.

View Source
const (
	CreateReportsSnapshotConfigOptionsVersioningNewConst       = "new"
	CreateReportsSnapshotConfigOptionsVersioningOverwriteConst = "overwrite"
)

Constants associated with the CreateReportsSnapshotConfigOptions.Versioning property. A new version of report is created or the existing report version is overwritten with every update. Defaults to "new".

View Source
const (
	SnapshotConfigHistoryItemStateDisabledConst = "disabled"
	SnapshotConfigHistoryItemStateEnabledConst  = "enabled"
)

Constants associated with the SnapshotConfigHistoryItem.State property. Status of the billing snapshot configuration. Possible values are [enabled, disabled].

View Source
const (
	SnapshotConfigHistoryItemAccountTypeAccountConst    = "account"
	SnapshotConfigHistoryItemAccountTypeEnterpriseConst = "enterprise"
)

Constants associated with the SnapshotConfigHistoryItem.AccountType property. Type of account. Possible values [enterprise, account].

View Source
const (
	SnapshotConfigHistoryItemVersioningNewConst       = "new"
	SnapshotConfigHistoryItemVersioningOverwriteConst = "overwrite"
)

Constants associated with the SnapshotConfigHistoryItem.Versioning property. A new version of report is created or the existing report version is overwritten with every update.

View Source
const (
	SnapshotConfigHistoryItemReportTypesAccountResourceInstanceUsageConst = "account_resource_instance_usage"
	SnapshotConfigHistoryItemReportTypesAccountSummaryConst               = "account_summary"
	SnapshotConfigHistoryItemReportTypesEnterpriseSummaryConst            = "enterprise_summary"
)

Constants associated with the SnapshotConfigHistoryItem.ReportTypes property.

View Source
const (
	SnapshotListSnapshotsItemAccountTypeAccountConst    = "account"
	SnapshotListSnapshotsItemAccountTypeEnterpriseConst = "enterprise"
)

Constants associated with the SnapshotListSnapshotsItem.AccountType property. Type of account. Possible values are [enterprise, account].

View Source
const (
	SnapshotListSnapshotsItemStateDisabledConst = "disabled"
	SnapshotListSnapshotsItemStateEnabledConst  = "enabled"
)

Constants associated with the SnapshotListSnapshotsItem.State property. Status of the billing snapshot configuration. Possible values are [enabled, disabled].

View Source
const (
	SnapshotListSnapshotsItemFilesItemReportTypesAccountResourceInstanceUsageConst = "account_resource_instance_usage"
	SnapshotListSnapshotsItemFilesItemReportTypesAccountSummaryConst               = "account_summary"
	SnapshotListSnapshotsItemFilesItemReportTypesEnterpriseSummaryConst            = "enterprise_summary"
)

Constants associated with the SnapshotListSnapshotsItemFilesItem.ReportTypes property. The type of billing report stored. Possible values are [account_summary, enterprise_summary, account_resource_instance_usage].

View Source
const (
	SnapshotListSnapshotsItemReportTypesItemTypeAccountResourceInstanceUsageConst = "account_resource_instance_usage"
	SnapshotListSnapshotsItemReportTypesItemTypeAccountSummaryConst               = "account_summary"
	SnapshotListSnapshotsItemReportTypesItemTypeEnterpriseSummaryConst            = "enterprise_summary"
)

Constants associated with the SnapshotListSnapshotsItemReportTypesItem.Type property. The type of billing report of the snapshot. Possible values are [account_summary, enterprise_summary, account_resource_instance_usage].

View Source
const (
	SnapshotConfigStateDisabledConst = "disabled"
	SnapshotConfigStateEnabledConst  = "enabled"
)

Constants associated with the SnapshotConfig.State property. Status of the billing snapshot configuration. Possible values are [enabled, disabled].

View Source
const (
	SnapshotConfigAccountTypeAccountConst    = "account"
	SnapshotConfigAccountTypeEnterpriseConst = "enterprise"
)

Constants associated with the SnapshotConfig.AccountType property. Type of account. Possible values are [enterprise, account].

View Source
const (
	SnapshotConfigVersioningNewConst       = "new"
	SnapshotConfigVersioningOverwriteConst = "overwrite"
)

Constants associated with the SnapshotConfig.Versioning property. A new version of report is created or the existing report version is overwritten with every update.

View Source
const (
	SnapshotConfigReportTypesAccountResourceInstanceUsageConst = "account_resource_instance_usage"
	SnapshotConfigReportTypesAccountSummaryConst               = "account_summary"
	SnapshotConfigReportTypesEnterpriseSummaryConst            = "enterprise_summary"
)

Constants associated with the SnapshotConfig.ReportTypes property.

View Source
const (
	UpdateReportsSnapshotConfigOptionsReportTypesAccountResourceInstanceUsageConst = "account_resource_instance_usage"
	UpdateReportsSnapshotConfigOptionsReportTypesAccountSummaryConst               = "account_summary"
	UpdateReportsSnapshotConfigOptionsReportTypesEnterpriseSummaryConst            = "enterprise_summary"
)

Constants associated with the UpdateReportsSnapshotConfigOptions.ReportTypes property.

View Source
const (
	UpdateReportsSnapshotConfigOptionsVersioningNewConst       = "new"
	UpdateReportsSnapshotConfigOptionsVersioningOverwriteConst = "overwrite"
)

Constants associated with the UpdateReportsSnapshotConfigOptions.Versioning property. A new version of report is created or the existing report version is overwritten with every update.

View Source
const (
	ValidateReportsSnapshotConfigOptionsReportTypesAccountResourceInstanceUsageConst = "account_resource_instance_usage"
	ValidateReportsSnapshotConfigOptionsReportTypesAccountSummaryConst               = "account_summary"
	ValidateReportsSnapshotConfigOptionsReportTypesEnterpriseSummaryConst            = "enterprise_summary"
)

Constants associated with the ValidateReportsSnapshotConfigOptions.ReportTypes property.

View Source
const (
	ValidateReportsSnapshotConfigOptionsVersioningNewConst       = "new"
	ValidateReportsSnapshotConfigOptionsVersioningOverwriteConst = "overwrite"
)

Constants associated with the ValidateReportsSnapshotConfigOptions.Versioning property. A new version of report is created or the existing report version is overwritten with every update. Defaults to "new".

View Source
const (
	CreateReportsSnapshotConfigOptionsIntervalDailyConst = "daily"
)

Constants associated with the CreateReportsSnapshotConfigOptions.Interval property. Frequency of taking the snapshot of the billing reports.

View Source
const DefaultServiceName = "usage_reports"

DefaultServiceName is the default key used to find external configuration information.

View Source
const DefaultServiceURL = "https://billing.cloud.ibm.com"

DefaultServiceURL is the default URL to make service requests to.

View Source
const (
	SnapshotConfigHistoryItemIntervalDailyConst = "daily"
)

Constants associated with the SnapshotConfigHistoryItem.Interval property. Frequency of taking the snapshot of the billing reports.

View Source
const (
	SnapshotConfigIntervalDailyConst = "daily"
)

Constants associated with the SnapshotConfig.Interval property. Frequency of taking the snapshot of the billing reports.

View Source
const (
	UpdateReportsSnapshotConfigOptionsIntervalDailyConst = "daily"
)

Constants associated with the UpdateReportsSnapshotConfigOptions.Interval property. Frequency of taking the snapshot of the billing reports.

View Source
const (
	ValidateReportsSnapshotConfigOptionsIntervalDailyConst = "daily"
)

Constants associated with the ValidateReportsSnapshotConfigOptions.Interval property. Frequency of taking the snapshot of the billing reports.

Variables

This section is empty.

Functions

func GetServiceURLForRegion added in v0.17.2

func GetServiceURLForRegion(region string) (string, error)

GetServiceURLForRegion returns the service URL to be used for the specified region

func UnmarshalAccountSummary

func UnmarshalAccountSummary(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalAccountSummary unmarshals an instance of AccountSummary from the specified map of raw messages.

func UnmarshalAccountUsage

func UnmarshalAccountUsage(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalAccountUsage unmarshals an instance of AccountUsage from the specified map of raw messages.

func UnmarshalDiscount

func UnmarshalDiscount(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalDiscount unmarshals an instance of Discount from the specified map of raw messages.

func UnmarshalInstanceUsage

func UnmarshalInstanceUsage(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalInstanceUsage unmarshals an instance of InstanceUsage from the specified map of raw messages.

func UnmarshalInstancesUsage

func UnmarshalInstancesUsage(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalInstancesUsage unmarshals an instance of InstancesUsage from the specified map of raw messages.

func UnmarshalInstancesUsageFirst

func UnmarshalInstancesUsageFirst(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalInstancesUsageFirst unmarshals an instance of InstancesUsageFirst from the specified map of raw messages.

func UnmarshalInstancesUsageNext

func UnmarshalInstancesUsageNext(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalInstancesUsageNext unmarshals an instance of InstancesUsageNext from the specified map of raw messages.

func UnmarshalMetric

func UnmarshalMetric(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalMetric unmarshals an instance of Metric from the specified map of raw messages.

func UnmarshalOffer

func UnmarshalOffer(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalOffer unmarshals an instance of Offer from the specified map of raw messages.

func UnmarshalOfferCredits

func UnmarshalOfferCredits(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalOfferCredits unmarshals an instance of OfferCredits from the specified map of raw messages.

func UnmarshalOrgUsage

func UnmarshalOrgUsage(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalOrgUsage unmarshals an instance of OrgUsage from the specified map of raw messages.

func UnmarshalPlan

func UnmarshalPlan(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalPlan unmarshals an instance of Plan from the specified map of raw messages.

func UnmarshalResource

func UnmarshalResource(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalResource unmarshals an instance of Resource from the specified map of raw messages.

func UnmarshalResourceGroupUsage

func UnmarshalResourceGroupUsage(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalResourceGroupUsage unmarshals an instance of ResourceGroupUsage from the specified map of raw messages.

func UnmarshalResourcesSummary

func UnmarshalResourcesSummary(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalResourcesSummary unmarshals an instance of ResourcesSummary from the specified map of raw messages.

func UnmarshalSnapshotConfig added in v0.50.0

func UnmarshalSnapshotConfig(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalSnapshotConfig unmarshals an instance of SnapshotConfig from the specified map of raw messages.

func UnmarshalSnapshotConfigHistoryItem added in v0.50.0

func UnmarshalSnapshotConfigHistoryItem(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalSnapshotConfigHistoryItem unmarshals an instance of SnapshotConfigHistoryItem from the specified map of raw messages.

func UnmarshalSnapshotConfigValidateResponse added in v0.55.0

func UnmarshalSnapshotConfigValidateResponse(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalSnapshotConfigValidateResponse unmarshals an instance of SnapshotConfigValidateResponse from the specified map of raw messages.

func UnmarshalSnapshotList added in v0.50.0

func UnmarshalSnapshotList(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalSnapshotList unmarshals an instance of SnapshotList from the specified map of raw messages.

func UnmarshalSnapshotListFirst added in v0.50.0

func UnmarshalSnapshotListFirst(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalSnapshotListFirst unmarshals an instance of SnapshotListFirst from the specified map of raw messages.

func UnmarshalSnapshotListNext added in v0.50.0

func UnmarshalSnapshotListNext(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalSnapshotListNext unmarshals an instance of SnapshotListNext from the specified map of raw messages.

func UnmarshalSnapshotListSnapshotsItem added in v0.50.0

func UnmarshalSnapshotListSnapshotsItem(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalSnapshotListSnapshotsItem unmarshals an instance of SnapshotListSnapshotsItem from the specified map of raw messages.

func UnmarshalSnapshotListSnapshotsItemBillingPeriod added in v0.50.0

func UnmarshalSnapshotListSnapshotsItemBillingPeriod(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalSnapshotListSnapshotsItemBillingPeriod unmarshals an instance of SnapshotListSnapshotsItemBillingPeriod from the specified map of raw messages.

func UnmarshalSnapshotListSnapshotsItemFilesItem added in v0.50.0

func UnmarshalSnapshotListSnapshotsItemFilesItem(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalSnapshotListSnapshotsItemFilesItem unmarshals an instance of SnapshotListSnapshotsItemFilesItem from the specified map of raw messages.

func UnmarshalSnapshotListSnapshotsItemReportTypesItem added in v0.50.0

func UnmarshalSnapshotListSnapshotsItemReportTypesItem(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalSnapshotListSnapshotsItemReportTypesItem unmarshals an instance of SnapshotListSnapshotsItemReportTypesItem from the specified map of raw messages.

func UnmarshalSubscription

func UnmarshalSubscription(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalSubscription unmarshals an instance of Subscription from the specified map of raw messages.

func UnmarshalSubscriptionSummary

func UnmarshalSubscriptionSummary(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalSubscriptionSummary unmarshals an instance of SubscriptionSummary from the specified map of raw messages.

func UnmarshalSubscriptionTerm

func UnmarshalSubscriptionTerm(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalSubscriptionTerm unmarshals an instance of SubscriptionTerm from the specified map of raw messages.

func UnmarshalSubscriptionTermCredits

func UnmarshalSubscriptionTermCredits(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalSubscriptionTermCredits unmarshals an instance of SubscriptionTermCredits from the specified map of raw messages.

func UnmarshalSupportSummary

func UnmarshalSupportSummary(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalSupportSummary unmarshals an instance of SupportSummary from the specified map of raw messages.

Types

type AccountSummary

type AccountSummary struct {
	// The ID of the account.
	AccountID *string `json:"account_id" validate:"required"`

	// The list of account resources for the month.
	AccountResources []Resource `json:"account_resources,omitempty"`

	// The month in which usages were incurred. Represented in yyyy-mm format.
	Month *string `json:"month" validate:"required"`

	// Country.
	BillingCountryCode *string `json:"billing_country_code" validate:"required"`

	// The currency in which the account is billed.
	BillingCurrencyCode *string `json:"billing_currency_code" validate:"required"`

	// Charges related to cloud resources.
	Resources *ResourcesSummary `json:"resources" validate:"required"`

	// The list of offers applicable for the account for the month.
	Offers []Offer `json:"offers" validate:"required"`

	// Support-related charges.
	Support []SupportSummary `json:"support" validate:"required"`

	// The list of support resources for the month.
	SupportResources []interface{} `json:"support_resources,omitempty"`

	// A summary of charges and credits related to a subscription.
	Subscription *SubscriptionSummary `json:"subscription" validate:"required"`
}

AccountSummary : A summary of charges and credits for an account.

type AccountUsage

type AccountUsage struct {
	// The ID of the account.
	AccountID *string `json:"account_id" validate:"required"`

	// The target country pricing that should be used.
	PricingCountry *string `json:"pricing_country" validate:"required"`

	// The currency for the cost fields in the resources, plans and metrics.
	CurrencyCode *string `json:"currency_code" validate:"required"`

	// The month.
	Month *string `json:"month" validate:"required"`

	// All the resource used in the account.
	Resources []Resource `json:"resources" validate:"required"`

	// The value of the account's currency in USD.
	CurrencyRate *float64 `json:"currency_rate,omitempty"`
}

AccountUsage : The aggregated usage and charges for all the plans in the account.

type CreateReportsSnapshotConfigOptions added in v0.50.0

type CreateReportsSnapshotConfigOptions struct {
	// Account ID for which billing report snapshot is configured.
	AccountID *string `json:"account_id" validate:"required"`

	// Frequency of taking the snapshot of the billing reports.
	Interval *string `json:"interval" validate:"required"`

	// The name of the COS bucket to store the snapshot of the billing reports.
	CosBucket *string `json:"cos_bucket" validate:"required"`

	// Region of the COS instance.
	CosLocation *string `json:"cos_location" validate:"required"`

	// The billing reports root folder to store the billing reports snapshots. Defaults to "IBMCloud-Billing-Reports".
	CosReportsFolder *string `json:"cos_reports_folder,omitempty"`

	// The type of billing reports to take snapshot of. Possible values are [account_summary, enterprise_summary,
	// account_resource_instance_usage].
	ReportTypes []string `json:"report_types,omitempty"`

	// A new version of report is created or the existing report version is overwritten with every update. Defaults to
	// "new".
	Versioning *string `json:"versioning,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

CreateReportsSnapshotConfigOptions : The CreateReportsSnapshotConfig options.

func (*CreateReportsSnapshotConfigOptions) SetAccountID added in v0.50.0

SetAccountID : Allow user to set AccountID

func (*CreateReportsSnapshotConfigOptions) SetCosBucket added in v0.50.0

SetCosBucket : Allow user to set CosBucket

func (*CreateReportsSnapshotConfigOptions) SetCosLocation added in v0.50.0

func (_options *CreateReportsSnapshotConfigOptions) SetCosLocation(cosLocation string) *CreateReportsSnapshotConfigOptions

SetCosLocation : Allow user to set CosLocation

func (*CreateReportsSnapshotConfigOptions) SetCosReportsFolder added in v0.50.0

func (_options *CreateReportsSnapshotConfigOptions) SetCosReportsFolder(cosReportsFolder string) *CreateReportsSnapshotConfigOptions

SetCosReportsFolder : Allow user to set CosReportsFolder

func (*CreateReportsSnapshotConfigOptions) SetHeaders added in v0.50.0

SetHeaders : Allow user to set Headers

func (*CreateReportsSnapshotConfigOptions) SetInterval added in v0.50.0

SetInterval : Allow user to set Interval

func (*CreateReportsSnapshotConfigOptions) SetReportTypes added in v0.50.0

func (_options *CreateReportsSnapshotConfigOptions) SetReportTypes(reportTypes []string) *CreateReportsSnapshotConfigOptions

SetReportTypes : Allow user to set ReportTypes

func (*CreateReportsSnapshotConfigOptions) SetVersioning added in v0.50.0

SetVersioning : Allow user to set Versioning

type DeleteReportsSnapshotConfigOptions added in v0.50.0

type DeleteReportsSnapshotConfigOptions struct {
	// Account ID for which the billing report snapshot is configured.
	AccountID *string `json:"account_id" validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

DeleteReportsSnapshotConfigOptions : The DeleteReportsSnapshotConfig options.

func (*DeleteReportsSnapshotConfigOptions) SetAccountID added in v0.50.0

SetAccountID : Allow user to set AccountID

func (*DeleteReportsSnapshotConfigOptions) SetHeaders added in v0.50.0

SetHeaders : Allow user to set Headers

type Discount

type Discount struct {
	// The reference ID of the discount.
	Ref *string `json:"ref" validate:"required"`

	// The name of the discount indicating category.
	Name *string `json:"name,omitempty"`

	// The name of the discount.
	DisplayName *string `json:"display_name,omitempty"`

	// The discount percentage.
	Discount *float64 `json:"discount" validate:"required"`
}

Discount : Information about a discount that is associated with a metric.

type GetAccountSummaryOptions

type GetAccountSummaryOptions struct {
	// Account ID for which the usage report is requested.
	AccountID *string `json:"account_id" validate:"required,ne="`

	// The billing month for which the usage report is requested.  Format is yyyy-mm.
	Billingmonth *string `json:"billingmonth" validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

GetAccountSummaryOptions : The GetAccountSummary options.

func (*GetAccountSummaryOptions) SetAccountID

func (_options *GetAccountSummaryOptions) SetAccountID(accountID string) *GetAccountSummaryOptions

SetAccountID : Allow user to set AccountID

func (*GetAccountSummaryOptions) SetBillingmonth

func (_options *GetAccountSummaryOptions) SetBillingmonth(billingmonth string) *GetAccountSummaryOptions

SetBillingmonth : Allow user to set Billingmonth

func (*GetAccountSummaryOptions) SetHeaders

func (options *GetAccountSummaryOptions) SetHeaders(param map[string]string) *GetAccountSummaryOptions

SetHeaders : Allow user to set Headers

type GetAccountUsageOptions

type GetAccountUsageOptions struct {
	// Account ID for which the usage report is requested.
	AccountID *string `json:"account_id" validate:"required,ne="`

	// The billing month for which the usage report is requested.  Format is yyyy-mm.
	Billingmonth *string `json:"billingmonth" validate:"required,ne="`

	// Include the name of every resource, plan, resource instance, organization, and resource group.
	Names *bool `json:"_names,omitempty"`

	// Prioritize the names returned in the order of the specified languages. Language will default to English.
	AcceptLanguage *string `json:"Accept-Language,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

GetAccountUsageOptions : The GetAccountUsage options.

func (*GetAccountUsageOptions) SetAcceptLanguage

func (_options *GetAccountUsageOptions) SetAcceptLanguage(acceptLanguage string) *GetAccountUsageOptions

SetAcceptLanguage : Allow user to set AcceptLanguage

func (*GetAccountUsageOptions) SetAccountID

func (_options *GetAccountUsageOptions) SetAccountID(accountID string) *GetAccountUsageOptions

SetAccountID : Allow user to set AccountID

func (*GetAccountUsageOptions) SetBillingmonth

func (_options *GetAccountUsageOptions) SetBillingmonth(billingmonth string) *GetAccountUsageOptions

SetBillingmonth : Allow user to set Billingmonth

func (*GetAccountUsageOptions) SetHeaders

func (options *GetAccountUsageOptions) SetHeaders(param map[string]string) *GetAccountUsageOptions

SetHeaders : Allow user to set Headers

func (*GetAccountUsageOptions) SetNames

func (_options *GetAccountUsageOptions) SetNames(names bool) *GetAccountUsageOptions

SetNames : Allow user to set Names

type GetOrgUsageOptions

type GetOrgUsageOptions struct {
	// Account ID for which the usage report is requested.
	AccountID *string `json:"account_id" validate:"required,ne="`

	// ID of the organization.
	OrganizationID *string `json:"organization_id" validate:"required,ne="`

	// The billing month for which the usage report is requested.  Format is yyyy-mm.
	Billingmonth *string `json:"billingmonth" validate:"required,ne="`

	// Include the name of every resource, plan, resource instance, organization, and resource group.
	Names *bool `json:"_names,omitempty"`

	// Prioritize the names returned in the order of the specified languages. Language will default to English.
	AcceptLanguage *string `json:"Accept-Language,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

GetOrgUsageOptions : The GetOrgUsage options.

func (*GetOrgUsageOptions) SetAcceptLanguage

func (_options *GetOrgUsageOptions) SetAcceptLanguage(acceptLanguage string) *GetOrgUsageOptions

SetAcceptLanguage : Allow user to set AcceptLanguage

func (*GetOrgUsageOptions) SetAccountID

func (_options *GetOrgUsageOptions) SetAccountID(accountID string) *GetOrgUsageOptions

SetAccountID : Allow user to set AccountID

func (*GetOrgUsageOptions) SetBillingmonth

func (_options *GetOrgUsageOptions) SetBillingmonth(billingmonth string) *GetOrgUsageOptions

SetBillingmonth : Allow user to set Billingmonth

func (*GetOrgUsageOptions) SetHeaders

func (options *GetOrgUsageOptions) SetHeaders(param map[string]string) *GetOrgUsageOptions

SetHeaders : Allow user to set Headers

func (*GetOrgUsageOptions) SetNames

func (_options *GetOrgUsageOptions) SetNames(names bool) *GetOrgUsageOptions

SetNames : Allow user to set Names

func (*GetOrgUsageOptions) SetOrganizationID

func (_options *GetOrgUsageOptions) SetOrganizationID(organizationID string) *GetOrgUsageOptions

SetOrganizationID : Allow user to set OrganizationID

type GetReportsSnapshotConfigOptions added in v0.50.0

type GetReportsSnapshotConfigOptions struct {
	// Account ID for which the billing report snapshot is configured.
	AccountID *string `json:"account_id" validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

GetReportsSnapshotConfigOptions : The GetReportsSnapshotConfig options.

func (*GetReportsSnapshotConfigOptions) SetAccountID added in v0.50.0

func (_options *GetReportsSnapshotConfigOptions) SetAccountID(accountID string) *GetReportsSnapshotConfigOptions

SetAccountID : Allow user to set AccountID

func (*GetReportsSnapshotConfigOptions) SetHeaders added in v0.50.0

SetHeaders : Allow user to set Headers

type GetReportsSnapshotOptions added in v0.50.0

type GetReportsSnapshotOptions struct {
	// Account ID for which the billing report snapshot is requested.
	AccountID *string `json:"account_id" validate:"required"`

	// The month for which billing report snapshot is requested.  Format is yyyy-mm.
	Month *string `json:"month" validate:"required"`

	// Timestamp in milliseconds for which billing report snapshot is requested.
	DateFrom *int64 `json:"date_from,omitempty"`

	// Timestamp in milliseconds for which billing report snapshot is requested.
	DateTo *int64 `json:"date_to,omitempty"`

	// Number of usage records returned. The default value is 30. Maximum value is 200.
	Limit *int64 `json:"_limit,omitempty"`

	// The offset from which the records must be fetched. Offset information is included in the response.
	Start *string `json:"_start,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

GetReportsSnapshotOptions : The GetReportsSnapshot options.

func (*GetReportsSnapshotOptions) SetAccountID added in v0.50.0

func (_options *GetReportsSnapshotOptions) SetAccountID(accountID string) *GetReportsSnapshotOptions

SetAccountID : Allow user to set AccountID

func (*GetReportsSnapshotOptions) SetDateFrom added in v0.50.0

func (_options *GetReportsSnapshotOptions) SetDateFrom(dateFrom int64) *GetReportsSnapshotOptions

SetDateFrom : Allow user to set DateFrom

func (*GetReportsSnapshotOptions) SetDateTo added in v0.50.0

func (_options *GetReportsSnapshotOptions) SetDateTo(dateTo int64) *GetReportsSnapshotOptions

SetDateTo : Allow user to set DateTo

func (*GetReportsSnapshotOptions) SetHeaders added in v0.50.0

func (options *GetReportsSnapshotOptions) SetHeaders(param map[string]string) *GetReportsSnapshotOptions

SetHeaders : Allow user to set Headers

func (*GetReportsSnapshotOptions) SetLimit added in v0.52.0

func (_options *GetReportsSnapshotOptions) SetLimit(limit int64) *GetReportsSnapshotOptions

SetLimit : Allow user to set Limit

func (*GetReportsSnapshotOptions) SetMonth added in v0.50.0

func (_options *GetReportsSnapshotOptions) SetMonth(month string) *GetReportsSnapshotOptions

SetMonth : Allow user to set Month

func (*GetReportsSnapshotOptions) SetStart added in v0.52.0

func (_options *GetReportsSnapshotOptions) SetStart(start string) *GetReportsSnapshotOptions

SetStart : Allow user to set Start

type GetReportsSnapshotPager added in v0.52.0

type GetReportsSnapshotPager struct {
	// contains filtered or unexported fields
}

GetReportsSnapshotPager can be used to simplify the use of the "GetReportsSnapshot" method.

func (*GetReportsSnapshotPager) GetAll added in v0.52.0

func (pager *GetReportsSnapshotPager) GetAll() (allItems []SnapshotListSnapshotsItem, err error)

GetAll invokes GetAllWithContext() using context.Background() as the Context parameter.

func (*GetReportsSnapshotPager) GetAllWithContext added in v0.52.0

func (pager *GetReportsSnapshotPager) GetAllWithContext(ctx context.Context) (allItems []SnapshotListSnapshotsItem, err error)

GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly until all pages of results have been retrieved.

func (*GetReportsSnapshotPager) GetNext added in v0.52.0

func (pager *GetReportsSnapshotPager) GetNext() (page []SnapshotListSnapshotsItem, err error)

GetNext invokes GetNextWithContext() using context.Background() as the Context parameter.

func (*GetReportsSnapshotPager) GetNextWithContext added in v0.52.0

func (pager *GetReportsSnapshotPager) GetNextWithContext(ctx context.Context) (page []SnapshotListSnapshotsItem, err error)

GetNextWithContext returns the next page of results using the specified Context.

func (*GetReportsSnapshotPager) HasNext added in v0.52.0

func (pager *GetReportsSnapshotPager) HasNext() bool

HasNext returns true if there are potentially more results to be retrieved.

type GetResourceGroupUsageOptions

type GetResourceGroupUsageOptions struct {
	// Account ID for which the usage report is requested.
	AccountID *string `json:"account_id" validate:"required,ne="`

	// Resource group for which the usage report is requested.
	ResourceGroupID *string `json:"resource_group_id" validate:"required,ne="`

	// The billing month for which the usage report is requested.  Format is yyyy-mm.
	Billingmonth *string `json:"billingmonth" validate:"required,ne="`

	// Include the name of every resource, plan, resource instance, organization, and resource group.
	Names *bool `json:"_names,omitempty"`

	// Prioritize the names returned in the order of the specified languages. Language will default to English.
	AcceptLanguage *string `json:"Accept-Language,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

GetResourceGroupUsageOptions : The GetResourceGroupUsage options.

func (*GetResourceGroupUsageOptions) SetAcceptLanguage

func (_options *GetResourceGroupUsageOptions) SetAcceptLanguage(acceptLanguage string) *GetResourceGroupUsageOptions

SetAcceptLanguage : Allow user to set AcceptLanguage

func (*GetResourceGroupUsageOptions) SetAccountID

func (_options *GetResourceGroupUsageOptions) SetAccountID(accountID string) *GetResourceGroupUsageOptions

SetAccountID : Allow user to set AccountID

func (*GetResourceGroupUsageOptions) SetBillingmonth

func (_options *GetResourceGroupUsageOptions) SetBillingmonth(billingmonth string) *GetResourceGroupUsageOptions

SetBillingmonth : Allow user to set Billingmonth

func (*GetResourceGroupUsageOptions) SetHeaders

SetHeaders : Allow user to set Headers

func (*GetResourceGroupUsageOptions) SetNames

SetNames : Allow user to set Names

func (*GetResourceGroupUsageOptions) SetResourceGroupID

func (_options *GetResourceGroupUsageOptions) SetResourceGroupID(resourceGroupID string) *GetResourceGroupUsageOptions

SetResourceGroupID : Allow user to set ResourceGroupID

type GetResourceUsageAccountOptions

type GetResourceUsageAccountOptions struct {
	// Account ID for which the usage report is requested.
	AccountID *string `json:"account_id" validate:"required,ne="`

	// The billing month for which the usage report is requested.  Format is yyyy-mm.
	Billingmonth *string `json:"billingmonth" validate:"required,ne="`

	// Include the name of every resource, plan, resource instance, organization, and resource group.
	Names *bool `json:"_names,omitempty"`

	// Include the tags associated with every resource instance. By default it is always `true`.
	Tags *bool `json:"_tags,omitempty"`

	// Prioritize the names returned in the order of the specified languages. Language will default to English.
	AcceptLanguage *string `json:"Accept-Language,omitempty"`

	// Number of usage records returned. The default value is 30. Maximum value is 200.
	Limit *int64 `json:"_limit,omitempty"`

	// The offset from which the records must be fetched. Offset information is included in the response.
	Start *string `json:"_start,omitempty"`

	// Filter by resource group.
	ResourceGroupID *string `json:"resource_group_id,omitempty"`

	// Filter by organization_id.
	OrganizationID *string `json:"organization_id,omitempty"`

	// Filter by resource instance_id.
	ResourceInstanceID *string `json:"resource_instance_id,omitempty"`

	// Filter by resource_id.
	ResourceID *string `json:"resource_id,omitempty"`

	// Filter by plan_id.
	PlanID *string `json:"plan_id,omitempty"`

	// Region in which the resource instance is provisioned.
	Region *string `json:"region,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

GetResourceUsageAccountOptions : The GetResourceUsageAccount options.

func (*GetResourceUsageAccountOptions) SetAcceptLanguage

func (_options *GetResourceUsageAccountOptions) SetAcceptLanguage(acceptLanguage string) *GetResourceUsageAccountOptions

SetAcceptLanguage : Allow user to set AcceptLanguage

func (*GetResourceUsageAccountOptions) SetAccountID

func (_options *GetResourceUsageAccountOptions) SetAccountID(accountID string) *GetResourceUsageAccountOptions

SetAccountID : Allow user to set AccountID

func (*GetResourceUsageAccountOptions) SetBillingmonth

func (_options *GetResourceUsageAccountOptions) SetBillingmonth(billingmonth string) *GetResourceUsageAccountOptions

SetBillingmonth : Allow user to set Billingmonth

func (*GetResourceUsageAccountOptions) SetHeaders

SetHeaders : Allow user to set Headers

func (*GetResourceUsageAccountOptions) SetLimit

SetLimit : Allow user to set Limit

func (*GetResourceUsageAccountOptions) SetNames

SetNames : Allow user to set Names

func (*GetResourceUsageAccountOptions) SetOrganizationID

func (_options *GetResourceUsageAccountOptions) SetOrganizationID(organizationID string) *GetResourceUsageAccountOptions

SetOrganizationID : Allow user to set OrganizationID

func (*GetResourceUsageAccountOptions) SetPlanID

SetPlanID : Allow user to set PlanID

func (*GetResourceUsageAccountOptions) SetRegion

SetRegion : Allow user to set Region

func (*GetResourceUsageAccountOptions) SetResourceGroupID

func (_options *GetResourceUsageAccountOptions) SetResourceGroupID(resourceGroupID string) *GetResourceUsageAccountOptions

SetResourceGroupID : Allow user to set ResourceGroupID

func (*GetResourceUsageAccountOptions) SetResourceID

func (_options *GetResourceUsageAccountOptions) SetResourceID(resourceID string) *GetResourceUsageAccountOptions

SetResourceID : Allow user to set ResourceID

func (*GetResourceUsageAccountOptions) SetResourceInstanceID

func (_options *GetResourceUsageAccountOptions) SetResourceInstanceID(resourceInstanceID string) *GetResourceUsageAccountOptions

SetResourceInstanceID : Allow user to set ResourceInstanceID

func (*GetResourceUsageAccountOptions) SetStart

SetStart : Allow user to set Start

func (*GetResourceUsageAccountOptions) SetTags added in v0.62.6

SetTags : Allow user to set Tags

type GetResourceUsageAccountPager added in v0.31.1

type GetResourceUsageAccountPager struct {
	// contains filtered or unexported fields
}

GetResourceUsageAccountPager can be used to simplify the use of the "GetResourceUsageAccount" method.

func (*GetResourceUsageAccountPager) GetAll added in v0.31.1

func (pager *GetResourceUsageAccountPager) GetAll() (allItems []InstanceUsage, err error)

GetAll invokes GetAllWithContext() using context.Background() as the Context parameter.

func (*GetResourceUsageAccountPager) GetAllWithContext added in v0.31.1

func (pager *GetResourceUsageAccountPager) GetAllWithContext(ctx context.Context) (allItems []InstanceUsage, err error)

GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly until all pages of results have been retrieved.

func (*GetResourceUsageAccountPager) GetNext added in v0.31.1

func (pager *GetResourceUsageAccountPager) GetNext() (page []InstanceUsage, err error)

GetNext invokes GetNextWithContext() using context.Background() as the Context parameter.

func (*GetResourceUsageAccountPager) GetNextWithContext added in v0.31.1

func (pager *GetResourceUsageAccountPager) GetNextWithContext(ctx context.Context) (page []InstanceUsage, err error)

GetNextWithContext returns the next page of results using the specified Context.

func (*GetResourceUsageAccountPager) HasNext added in v0.31.1

func (pager *GetResourceUsageAccountPager) HasNext() bool

HasNext returns true if there are potentially more results to be retrieved.

type GetResourceUsageOrgOptions

type GetResourceUsageOrgOptions struct {
	// Account ID for which the usage report is requested.
	AccountID *string `json:"account_id" validate:"required,ne="`

	// ID of the organization.
	OrganizationID *string `json:"organization_id" validate:"required,ne="`

	// The billing month for which the usage report is requested.  Format is yyyy-mm.
	Billingmonth *string `json:"billingmonth" validate:"required,ne="`

	// Include the name of every resource, plan, resource instance, organization, and resource group.
	Names *bool `json:"_names,omitempty"`

	// Include the tags associated with every resource instance. By default it is always `true`.
	Tags *bool `json:"_tags,omitempty"`

	// Prioritize the names returned in the order of the specified languages. Language will default to English.
	AcceptLanguage *string `json:"Accept-Language,omitempty"`

	// Number of usage records returned. The default value is 30. Maximum value is 200.
	Limit *int64 `json:"_limit,omitempty"`

	// The offset from which the records must be fetched. Offset information is included in the response.
	Start *string `json:"_start,omitempty"`

	// Filter by resource instance id.
	ResourceInstanceID *string `json:"resource_instance_id,omitempty"`

	// Filter by resource_id.
	ResourceID *string `json:"resource_id,omitempty"`

	// Filter by plan_id.
	PlanID *string `json:"plan_id,omitempty"`

	// Region in which the resource instance is provisioned.
	Region *string `json:"region,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

GetResourceUsageOrgOptions : The GetResourceUsageOrg options.

func (*GetResourceUsageOrgOptions) SetAcceptLanguage

func (_options *GetResourceUsageOrgOptions) SetAcceptLanguage(acceptLanguage string) *GetResourceUsageOrgOptions

SetAcceptLanguage : Allow user to set AcceptLanguage

func (*GetResourceUsageOrgOptions) SetAccountID

func (_options *GetResourceUsageOrgOptions) SetAccountID(accountID string) *GetResourceUsageOrgOptions

SetAccountID : Allow user to set AccountID

func (*GetResourceUsageOrgOptions) SetBillingmonth

func (_options *GetResourceUsageOrgOptions) SetBillingmonth(billingmonth string) *GetResourceUsageOrgOptions

SetBillingmonth : Allow user to set Billingmonth

func (*GetResourceUsageOrgOptions) SetHeaders

func (options *GetResourceUsageOrgOptions) SetHeaders(param map[string]string) *GetResourceUsageOrgOptions

SetHeaders : Allow user to set Headers

func (*GetResourceUsageOrgOptions) SetLimit

func (_options *GetResourceUsageOrgOptions) SetLimit(limit int64) *GetResourceUsageOrgOptions

SetLimit : Allow user to set Limit

func (*GetResourceUsageOrgOptions) SetNames

func (_options *GetResourceUsageOrgOptions) SetNames(names bool) *GetResourceUsageOrgOptions

SetNames : Allow user to set Names

func (*GetResourceUsageOrgOptions) SetOrganizationID

func (_options *GetResourceUsageOrgOptions) SetOrganizationID(organizationID string) *GetResourceUsageOrgOptions

SetOrganizationID : Allow user to set OrganizationID

func (*GetResourceUsageOrgOptions) SetPlanID

func (_options *GetResourceUsageOrgOptions) SetPlanID(planID string) *GetResourceUsageOrgOptions

SetPlanID : Allow user to set PlanID

func (*GetResourceUsageOrgOptions) SetRegion

func (_options *GetResourceUsageOrgOptions) SetRegion(region string) *GetResourceUsageOrgOptions

SetRegion : Allow user to set Region

func (*GetResourceUsageOrgOptions) SetResourceID

func (_options *GetResourceUsageOrgOptions) SetResourceID(resourceID string) *GetResourceUsageOrgOptions

SetResourceID : Allow user to set ResourceID

func (*GetResourceUsageOrgOptions) SetResourceInstanceID

func (_options *GetResourceUsageOrgOptions) SetResourceInstanceID(resourceInstanceID string) *GetResourceUsageOrgOptions

SetResourceInstanceID : Allow user to set ResourceInstanceID

func (*GetResourceUsageOrgOptions) SetStart

SetStart : Allow user to set Start

func (*GetResourceUsageOrgOptions) SetTags added in v0.62.6

SetTags : Allow user to set Tags

type GetResourceUsageOrgPager added in v0.31.1

type GetResourceUsageOrgPager struct {
	// contains filtered or unexported fields
}

GetResourceUsageOrgPager can be used to simplify the use of the "GetResourceUsageOrg" method.

func (*GetResourceUsageOrgPager) GetAll added in v0.31.1

func (pager *GetResourceUsageOrgPager) GetAll() (allItems []InstanceUsage, err error)

GetAll invokes GetAllWithContext() using context.Background() as the Context parameter.

func (*GetResourceUsageOrgPager) GetAllWithContext added in v0.31.1

func (pager *GetResourceUsageOrgPager) GetAllWithContext(ctx context.Context) (allItems []InstanceUsage, err error)

GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly until all pages of results have been retrieved.

func (*GetResourceUsageOrgPager) GetNext added in v0.31.1

func (pager *GetResourceUsageOrgPager) GetNext() (page []InstanceUsage, err error)

GetNext invokes GetNextWithContext() using context.Background() as the Context parameter.

func (*GetResourceUsageOrgPager) GetNextWithContext added in v0.31.1

func (pager *GetResourceUsageOrgPager) GetNextWithContext(ctx context.Context) (page []InstanceUsage, err error)

GetNextWithContext returns the next page of results using the specified Context.

func (*GetResourceUsageOrgPager) HasNext added in v0.31.1

func (pager *GetResourceUsageOrgPager) HasNext() bool

HasNext returns true if there are potentially more results to be retrieved.

type GetResourceUsageResourceGroupOptions

type GetResourceUsageResourceGroupOptions struct {
	// Account ID for which the usage report is requested.
	AccountID *string `json:"account_id" validate:"required,ne="`

	// Resource group for which the usage report is requested.
	ResourceGroupID *string `json:"resource_group_id" validate:"required,ne="`

	// The billing month for which the usage report is requested.  Format is yyyy-mm.
	Billingmonth *string `json:"billingmonth" validate:"required,ne="`

	// Include the name of every resource, plan, resource instance, organization, and resource group.
	Names *bool `json:"_names,omitempty"`

	// Include the tags associated with every resource instance. By default it is always `true`.
	Tags *bool `json:"_tags,omitempty"`

	// Prioritize the names returned in the order of the specified languages. Language will default to English.
	AcceptLanguage *string `json:"Accept-Language,omitempty"`

	// Number of usage records returned. The default value is 30. Maximum value is 200.
	Limit *int64 `json:"_limit,omitempty"`

	// The offset from which the records must be fetched. Offset information is included in the response.
	Start *string `json:"_start,omitempty"`

	// Filter by resource instance id.
	ResourceInstanceID *string `json:"resource_instance_id,omitempty"`

	// Filter by resource_id.
	ResourceID *string `json:"resource_id,omitempty"`

	// Filter by plan_id.
	PlanID *string `json:"plan_id,omitempty"`

	// Region in which the resource instance is provisioned.
	Region *string `json:"region,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

GetResourceUsageResourceGroupOptions : The GetResourceUsageResourceGroup options.

func (*GetResourceUsageResourceGroupOptions) SetAcceptLanguage

func (_options *GetResourceUsageResourceGroupOptions) SetAcceptLanguage(acceptLanguage string) *GetResourceUsageResourceGroupOptions

SetAcceptLanguage : Allow user to set AcceptLanguage

func (*GetResourceUsageResourceGroupOptions) SetAccountID

SetAccountID : Allow user to set AccountID

func (*GetResourceUsageResourceGroupOptions) SetBillingmonth

func (_options *GetResourceUsageResourceGroupOptions) SetBillingmonth(billingmonth string) *GetResourceUsageResourceGroupOptions

SetBillingmonth : Allow user to set Billingmonth

func (*GetResourceUsageResourceGroupOptions) SetHeaders

SetHeaders : Allow user to set Headers

func (*GetResourceUsageResourceGroupOptions) SetLimit

SetLimit : Allow user to set Limit

func (*GetResourceUsageResourceGroupOptions) SetNames

SetNames : Allow user to set Names

func (*GetResourceUsageResourceGroupOptions) SetPlanID

SetPlanID : Allow user to set PlanID

func (*GetResourceUsageResourceGroupOptions) SetRegion

SetRegion : Allow user to set Region

func (*GetResourceUsageResourceGroupOptions) SetResourceGroupID

func (_options *GetResourceUsageResourceGroupOptions) SetResourceGroupID(resourceGroupID string) *GetResourceUsageResourceGroupOptions

SetResourceGroupID : Allow user to set ResourceGroupID

func (*GetResourceUsageResourceGroupOptions) SetResourceID

SetResourceID : Allow user to set ResourceID

func (*GetResourceUsageResourceGroupOptions) SetResourceInstanceID

func (_options *GetResourceUsageResourceGroupOptions) SetResourceInstanceID(resourceInstanceID string) *GetResourceUsageResourceGroupOptions

SetResourceInstanceID : Allow user to set ResourceInstanceID

func (*GetResourceUsageResourceGroupOptions) SetStart

SetStart : Allow user to set Start

func (*GetResourceUsageResourceGroupOptions) SetTags added in v0.62.6

SetTags : Allow user to set Tags

type GetResourceUsageResourceGroupPager added in v0.31.1

type GetResourceUsageResourceGroupPager struct {
	// contains filtered or unexported fields
}

GetResourceUsageResourceGroupPager can be used to simplify the use of the "GetResourceUsageResourceGroup" method.

func (*GetResourceUsageResourceGroupPager) GetAll added in v0.31.1

func (pager *GetResourceUsageResourceGroupPager) GetAll() (allItems []InstanceUsage, err error)

GetAll invokes GetAllWithContext() using context.Background() as the Context parameter.

func (*GetResourceUsageResourceGroupPager) GetAllWithContext added in v0.31.1

func (pager *GetResourceUsageResourceGroupPager) GetAllWithContext(ctx context.Context) (allItems []InstanceUsage, err error)

GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly until all pages of results have been retrieved.

func (*GetResourceUsageResourceGroupPager) GetNext added in v0.31.1

func (pager *GetResourceUsageResourceGroupPager) GetNext() (page []InstanceUsage, err error)

GetNext invokes GetNextWithContext() using context.Background() as the Context parameter.

func (*GetResourceUsageResourceGroupPager) GetNextWithContext added in v0.31.1

func (pager *GetResourceUsageResourceGroupPager) GetNextWithContext(ctx context.Context) (page []InstanceUsage, err error)

GetNextWithContext returns the next page of results using the specified Context.

func (*GetResourceUsageResourceGroupPager) HasNext added in v0.31.1

func (pager *GetResourceUsageResourceGroupPager) HasNext() bool

HasNext returns true if there are potentially more results to be retrieved.

type InstanceUsage

type InstanceUsage struct {
	// The ID of the account.
	AccountID *string `json:"account_id" validate:"required"`

	// The ID of the resource instance.
	ResourceInstanceID *string `json:"resource_instance_id" validate:"required"`

	// The name of the resource instance.
	ResourceInstanceName *string `json:"resource_instance_name,omitempty"`

	// The ID of the resource.
	ResourceID *string `json:"resource_id" validate:"required"`

	// The catalog ID of the resource.
	CatalogID *string `json:"catalog_id,omitempty"`

	// The name of the resource.
	ResourceName *string `json:"resource_name,omitempty"`

	// The ID of the resource group.
	ResourceGroupID *string `json:"resource_group_id,omitempty"`

	// The name of the resource group.
	ResourceGroupName *string `json:"resource_group_name,omitempty"`

	// The ID of the organization.
	OrganizationID *string `json:"organization_id,omitempty"`

	// The name of the organization.
	OrganizationName *string `json:"organization_name,omitempty"`

	// The ID of the space.
	SpaceID *string `json:"space_id,omitempty"`

	// The name of the space.
	SpaceName *string `json:"space_name,omitempty"`

	// The ID of the consumer.
	ConsumerID *string `json:"consumer_id,omitempty"`

	// The region where instance was provisioned.
	Region *string `json:"region,omitempty"`

	// The pricing region where the usage that was submitted was rated.
	PricingRegion *string `json:"pricing_region,omitempty"`

	// The target country pricing that should be used.
	PricingCountry *string `json:"pricing_country" validate:"required"`

	// The currency for the cost fields in the resources, plans and metrics.
	CurrencyCode *string `json:"currency_code" validate:"required"`

	// Is the cost charged to the account.
	Billable *bool `json:"billable" validate:"required"`

	// The resource instance id of the parent resource associated with this instance.
	ParentResourceInstanceID *string `json:"parent_resource_instance_id,omitempty"`

	// The ID of the plan where the instance was provisioned and rated.
	PlanID *string `json:"plan_id" validate:"required"`

	// The name of the plan where the instance was provisioned and rated.
	PlanName *string `json:"plan_name,omitempty"`

	// The ID of the pricing plan used to rate the usage.
	PricingPlanID *string `json:"pricing_plan_id,omitempty"`

	// The month.
	Month *string `json:"month" validate:"required"`

	// All the resource used in the account.
	Usage []Metric `json:"usage" validate:"required"`

	// Pending charge from classic infrastructure.
	Pending *bool `json:"pending,omitempty"`

	// The value of the account's currency in USD.
	CurrencyRate *float64 `json:"currency_rate,omitempty"`

	// The user tags associated with a resource instance.
	Tags []interface{} `json:"tags,omitempty"`

	// The service tags associated with a resource instance.
	ServiceTags []interface{} `json:"service_tags,omitempty"`
}

InstanceUsage : The aggregated usage and charges for an instance.

type InstancesUsage

type InstancesUsage struct {
	// The max number of reports in the response.
	Limit *int64 `json:"limit,omitempty"`

	// The number of reports in the response.
	Count *int64 `json:"count,omitempty"`

	// The link to the first page of the search query.
	First *InstancesUsageFirst `json:"first,omitempty"`

	// The link to the next page of the search query.
	Next *InstancesUsageNext `json:"next,omitempty"`

	// The list of instance usage reports.
	Resources []InstanceUsage `json:"resources,omitempty"`
}

InstancesUsage : The list of instance usage reports.

func (*InstancesUsage) GetNextStart added in v0.31.1

func (resp *InstancesUsage) GetNextStart() (*string, error)

Retrieve the value to be passed to a request to access the next page of results

type InstancesUsageFirst

type InstancesUsageFirst struct {
	// A link to a page of query results.
	Href *string `json:"href,omitempty"`
}

InstancesUsageFirst : The link to the first page of the search query.

type InstancesUsageNext

type InstancesUsageNext struct {
	// A link to a page of query results.
	Href *string `json:"href,omitempty"`

	// The value of the `_start` query parameter to fetch the next page.
	Offset *string `json:"offset,omitempty"`
}

InstancesUsageNext : The link to the next page of the search query.

type Metric

type Metric struct {
	// The ID of the metric.
	Metric *string `json:"metric" validate:"required"`

	// The name of the metric.
	MetricName *string `json:"metric_name,omitempty"`

	// The aggregated value for the metric.
	Quantity *float64 `json:"quantity" validate:"required"`

	// The quantity that is used for calculating charges.
	RateableQuantity *float64 `json:"rateable_quantity,omitempty"`

	// The cost incurred by the metric.
	Cost *float64 `json:"cost" validate:"required"`

	// Pre-discounted cost incurred by the metric.
	RatedCost *float64 `json:"rated_cost" validate:"required"`

	// The price with which the cost was calculated.
	Price []interface{} `json:"price,omitempty"`

	// The unit that qualifies the quantity.
	Unit *string `json:"unit,omitempty"`

	// The name of the unit.
	UnitName *string `json:"unit_name,omitempty"`

	// When set to `true`, the cost is for informational purpose and is not included while calculating the plan charges.
	NonChargeable *bool `json:"non_chargeable,omitempty"`

	// All the discounts applicable to the metric.
	Discounts []Discount `json:"discounts" validate:"required"`
}

Metric : Information about a metric.

type Offer

type Offer struct {
	// The ID of the offer.
	OfferID *string `json:"offer_id" validate:"required"`

	// The total credits before applying the offer.
	CreditsTotal *float64 `json:"credits_total" validate:"required"`

	// The template with which the offer was generated.
	OfferTemplate *string `json:"offer_template" validate:"required"`

	// The date from which the offer is valid.
	ValidFrom *strfmt.DateTime `json:"valid_from" validate:"required"`

	// The date until the offer is valid.
	ExpiresOn *strfmt.DateTime `json:"expires_on" validate:"required"`

	// Credit information related to an offer.
	Credits *OfferCredits `json:"credits" validate:"required"`
}

Offer : Information about an individual offer.

type OfferCredits

type OfferCredits struct {
	// The available credits in the offer at the beginning of the month.
	StartingBalance *float64 `json:"starting_balance" validate:"required"`

	// The credits used in this month.
	Used *float64 `json:"used" validate:"required"`

	// The remaining credits in the offer.
	Balance *float64 `json:"balance" validate:"required"`
}

OfferCredits : Credit information related to an offer.

type OrgUsage

type OrgUsage struct {
	// The ID of the account.
	AccountID *string `json:"account_id" validate:"required"`

	// The ID of the organization.
	OrganizationID *string `json:"organization_id" validate:"required"`

	// The name of the organization.
	OrganizationName *string `json:"organization_name,omitempty"`

	// The target country pricing that should be used.
	PricingCountry *string `json:"pricing_country" validate:"required"`

	// The currency for the cost fields in the resources, plans and metrics.
	CurrencyCode *string `json:"currency_code" validate:"required"`

	// The month.
	Month *string `json:"month" validate:"required"`

	// All the resource used in the account.
	Resources []Resource `json:"resources" validate:"required"`

	// The value of the account's currency in USD.
	CurrencyRate *float64 `json:"currency_rate,omitempty"`
}

OrgUsage : The aggregated usage and charges for all the plans in the org.

type Plan

type Plan struct {
	// The ID of the plan.
	PlanID *string `json:"plan_id" validate:"required"`

	// The name of the plan.
	PlanName *string `json:"plan_name,omitempty"`

	// The pricing region for the plan.
	PricingRegion *string `json:"pricing_region,omitempty"`

	// The ID of the pricing plan used to rate the usage.
	PricingPlanID *string `json:"pricing_plan_id,omitempty"`

	// Indicates if the plan charges are billed to the customer.
	Billable *bool `json:"billable" validate:"required"`

	// The total cost incurred by the plan.
	Cost *float64 `json:"cost" validate:"required"`

	// Total pre-discounted cost incurred by the plan.
	RatedCost *float64 `json:"rated_cost" validate:"required"`

	// All the metrics in the plan.
	Usage []Metric `json:"usage" validate:"required"`

	// All the discounts applicable to the plan.
	Discounts []Discount `json:"discounts" validate:"required"`

	// Pending charge from classic infrastructure.
	Pending *bool `json:"pending,omitempty"`
}

Plan : The aggregated values for the plan.

type Resource

type Resource struct {
	// The ID of the resource.
	ResourceID *string `json:"resource_id" validate:"required"`

	// The catalog ID of the resource.
	CatalogID *string `json:"catalog_id,omitempty"`

	// The name of the resource.
	ResourceName *string `json:"resource_name,omitempty"`

	// The billable charges for the account.
	BillableCost *float64 `json:"billable_cost" validate:"required"`

	// The pre-discounted billable charges for the account.
	BillableRatedCost *float64 `json:"billable_rated_cost" validate:"required"`

	// The non-billable charges for the account.
	NonBillableCost *float64 `json:"non_billable_cost" validate:"required"`

	// The pre-discounted non-billable charges for the account.
	NonBillableRatedCost *float64 `json:"non_billable_rated_cost" validate:"required"`

	// All the plans in the resource.
	Plans []Plan `json:"plans" validate:"required"`

	// All the discounts applicable to the resource.
	Discounts []Discount `json:"discounts" validate:"required"`
}

Resource : The container for all the plans in the resource.

type ResourceGroupUsage

type ResourceGroupUsage struct {
	// The ID of the account.
	AccountID *string `json:"account_id" validate:"required"`

	// The ID of the resource group.
	ResourceGroupID *string `json:"resource_group_id" validate:"required"`

	// The name of the resource group.
	ResourceGroupName *string `json:"resource_group_name,omitempty"`

	// The target country pricing that should be used.
	PricingCountry *string `json:"pricing_country" validate:"required"`

	// The currency for the cost fields in the resources, plans and metrics.
	CurrencyCode *string `json:"currency_code" validate:"required"`

	// The month.
	Month *string `json:"month" validate:"required"`

	// All the resource used in the account.
	Resources []Resource `json:"resources" validate:"required"`

	// The value of the account's currency in USD.
	CurrencyRate *float64 `json:"currency_rate,omitempty"`
}

ResourceGroupUsage : The aggregated usage and charges for all the plans in the resource group.

type ResourcesSummary

type ResourcesSummary struct {
	// The billable charges for all cloud resources used in the account.
	BillableCost *float64 `json:"billable_cost" validate:"required"`

	// Non-billable charges for all cloud resources used in the account.
	NonBillableCost *float64 `json:"non_billable_cost" validate:"required"`
}

ResourcesSummary : Charges related to cloud resources.

type SnapshotConfig added in v0.50.0

type SnapshotConfig struct {
	// Account ID for which billing report snapshot is configured.
	AccountID *string `json:"account_id,omitempty"`

	// Status of the billing snapshot configuration. Possible values are [enabled, disabled].
	State *string `json:"state,omitempty"`

	// Type of account. Possible values are [enterprise, account].
	AccountType *string `json:"account_type,omitempty"`

	// Frequency of taking the snapshot of the billing reports.
	Interval *string `json:"interval,omitempty"`

	// A new version of report is created or the existing report version is overwritten with every update.
	Versioning *string `json:"versioning,omitempty"`

	// The type of billing reports to take snapshot of. Possible values are [account_summary, enterprise_summary,
	// account_resource_instance_usage].
	ReportTypes []string `json:"report_types,omitempty"`

	// Compression format of the snapshot report.
	Compression *string `json:"compression,omitempty"`

	// Type of content stored in snapshot report.
	ContentType *string `json:"content_type,omitempty"`

	// The billing reports root folder to store the billing reports snapshots. Defaults to "IBMCloud-Billing-Reports".
	CosReportsFolder *string `json:"cos_reports_folder,omitempty"`

	// The name of the COS bucket to store the snapshot of the billing reports.
	CosBucket *string `json:"cos_bucket,omitempty"`

	// Region of the COS instance.
	CosLocation *string `json:"cos_location,omitempty"`

	// The endpoint of the COS instance.
	CosEndpoint *string `json:"cos_endpoint,omitempty"`

	// Timestamp in milliseconds when the snapshot configuration was created.
	CreatedAt *int64 `json:"created_at,omitempty"`

	// Timestamp in milliseconds when the snapshot configuration was last updated.
	LastUpdatedAt *int64 `json:"last_updated_at,omitempty"`

	// List of previous versions of the snapshot configurations.
	History []SnapshotConfigHistoryItem `json:"history,omitempty"`
}

SnapshotConfig : Billing reports snapshot configuration.

type SnapshotConfigHistoryItem added in v0.50.0

type SnapshotConfigHistoryItem struct {
	// Timestamp in milliseconds when the snapshot configuration was created.
	StartTime *int64 `json:"start_time,omitempty"`

	// Timestamp in milliseconds when the snapshot configuration ends.
	EndTime *int64 `json:"end_time,omitempty"`

	// Account that updated the billing snapshot configuration.
	UpdatedBy *string `json:"updated_by,omitempty"`

	// Account ID for which billing report snapshot is configured.
	AccountID *string `json:"account_id,omitempty"`

	// Status of the billing snapshot configuration. Possible values are [enabled, disabled].
	State *string `json:"state,omitempty"`

	// Type of account. Possible values [enterprise, account].
	AccountType *string `json:"account_type,omitempty"`

	// Frequency of taking the snapshot of the billing reports.
	Interval *string `json:"interval,omitempty"`

	// A new version of report is created or the existing report version is overwritten with every update.
	Versioning *string `json:"versioning,omitempty"`

	// The type of billing reports to take snapshot of. Possible values are [account_summary, enterprise_summary,
	// account_resource_instance_usage].
	ReportTypes []string `json:"report_types,omitempty"`

	// Compression format of the snapshot report.
	Compression *string `json:"compression,omitempty"`

	// Type of content stored in snapshot report.
	ContentType *string `json:"content_type,omitempty"`

	// The billing reports root folder to store the billing reports snapshots. Defaults to "IBMCloud-Billing-Reports".
	CosReportsFolder *string `json:"cos_reports_folder,omitempty"`

	// The name of the COS bucket to store the snapshot of the billing reports.
	CosBucket *string `json:"cos_bucket,omitempty"`

	// Region of the COS instance.
	CosLocation *string `json:"cos_location,omitempty"`

	// The endpoint of the COS instance.
	CosEndpoint *string `json:"cos_endpoint,omitempty"`
}

SnapshotConfigHistoryItem : SnapshotConfigHistoryItem struct

type SnapshotConfigValidateResponse added in v0.55.0

type SnapshotConfigValidateResponse struct {
	// Account ID for which billing report snapshot is configured.
	AccountID *string `json:"account_id,omitempty"`

	// The name of the COS bucket to store the snapshot of the billing reports.
	CosBucket *string `json:"cos_bucket,omitempty"`

	// Region of the COS instance.
	CosLocation *string `json:"cos_location,omitempty"`
}

SnapshotConfigValidateResponse : Validated billing service to COS bucket authorization.

type SnapshotList added in v0.50.0

type SnapshotList struct {
	// Number of total snapshots.
	Count *int64 `json:"count,omitempty"`

	// Reference to the first page of the search query.
	First *SnapshotListFirst `json:"first,omitempty"`

	// Reference to the next page of the search query if any.
	Next *SnapshotListNext `json:"next,omitempty"`

	Snapshots []SnapshotListSnapshotsItem `json:"snapshots,omitempty"`
}

SnapshotList : List of billing reports snapshots.

func (*SnapshotList) GetNextStart added in v0.52.0

func (resp *SnapshotList) GetNextStart() (*string, error)

Retrieve the value to be passed to a request to access the next page of results

type SnapshotListFirst added in v0.50.0

type SnapshotListFirst struct {
	Href *string `json:"href,omitempty"`
}

SnapshotListFirst : Reference to the first page of the search query.

type SnapshotListNext added in v0.50.0

type SnapshotListNext struct {
	Href *string `json:"href,omitempty"`

	// The value of the `_start` query parameter to fetch the next page.
	Offset *string `json:"offset,omitempty"`
}

SnapshotListNext : Reference to the next page of the search query if any.

type SnapshotListSnapshotsItem added in v0.50.0

type SnapshotListSnapshotsItem struct {
	// Account ID for which billing report snapshot is configured.
	AccountID *string `json:"account_id,omitempty"`

	// Month of captured snapshot.
	Month *string `json:"month,omitempty"`

	// Type of account. Possible values are [enterprise, account].
	AccountType *string `json:"account_type,omitempty"`

	// Timestamp of snapshot processed.
	ExpectedProcessedAt *int64 `json:"expected_processed_at,omitempty"`

	// Status of the billing snapshot configuration. Possible values are [enabled, disabled].
	State *string `json:"state,omitempty"`

	// Period of billing in snapshot.
	BillingPeriod *SnapshotListSnapshotsItemBillingPeriod `json:"billing_period,omitempty"`

	// Id of the snapshot captured.
	SnapshotID *string `json:"snapshot_id,omitempty"`

	// Character encoding used.
	Charset *string `json:"charset,omitempty"`

	// Compression format of the snapshot report.
	Compression *string `json:"compression,omitempty"`

	// Type of content stored in snapshot report.
	ContentType *string `json:"content_type,omitempty"`

	// The name of the COS bucket to store the snapshot of the billing reports.
	Bucket *string `json:"bucket,omitempty"`

	// Version of the snapshot.
	Version *string `json:"version,omitempty"`

	// Date and time of creation of snapshot.
	CreatedOn *string `json:"created_on,omitempty"`

	// List of report types configured for the snapshot.
	ReportTypes []SnapshotListSnapshotsItemReportTypesItem `json:"report_types,omitempty"`

	// List of location of reports.
	Files []SnapshotListSnapshotsItemFilesItem `json:"files,omitempty"`

	// Timestamp at which snapshot is captured.
	ProcessedAt *int64 `json:"processed_at,omitempty"`
}

SnapshotListSnapshotsItem : Snapshot Schema.

type SnapshotListSnapshotsItemBillingPeriod added in v0.50.0

type SnapshotListSnapshotsItemBillingPeriod struct {
	// Date and time of start of billing in the respective snapshot.
	Start *string `json:"start,omitempty"`

	// Date and time of end of billing in the respective snapshot.
	End *string `json:"end,omitempty"`
}

SnapshotListSnapshotsItemBillingPeriod : Period of billing in snapshot.

type SnapshotListSnapshotsItemFilesItem added in v0.50.0

type SnapshotListSnapshotsItemFilesItem struct {
	// The type of billing report stored. Possible values are [account_summary, enterprise_summary,
	// account_resource_instance_usage].
	ReportTypes *string `json:"report_types,omitempty"`

	// Absolute path of the billing report in the COS instance.
	Location *string `json:"location,omitempty"`

	// Account ID for which billing report is captured.
	AccountID *string `json:"account_id,omitempty"`
}

SnapshotListSnapshotsItemFilesItem : SnapshotListSnapshotsItemFilesItem struct

type SnapshotListSnapshotsItemReportTypesItem added in v0.50.0

type SnapshotListSnapshotsItemReportTypesItem struct {
	// The type of billing report of the snapshot. Possible values are [account_summary, enterprise_summary,
	// account_resource_instance_usage].
	Type *string `json:"type,omitempty"`

	// Version of the snapshot.
	Version *string `json:"version,omitempty"`
}

SnapshotListSnapshotsItemReportTypesItem : SnapshotListSnapshotsItemReportTypesItem struct

type Subscription

type Subscription struct {
	// The ID of the subscription.
	SubscriptionID *string `json:"subscription_id" validate:"required"`

	// The charge agreement number of the subsciption.
	ChargeAgreementNumber *string `json:"charge_agreement_number" validate:"required"`

	// Type of the subscription.
	Type *string `json:"type" validate:"required"`

	// The credits available in the subscription for the month.
	SubscriptionAmount *float64 `json:"subscription_amount" validate:"required"`

	// The date from which the subscription was active.
	Start *strfmt.DateTime `json:"start" validate:"required"`

	// The date until which the subscription is active. End time is unavailable for PayGO accounts.
	End *strfmt.DateTime `json:"end,omitempty"`

	// The total credits available in the subscription.
	CreditsTotal *float64 `json:"credits_total" validate:"required"`

	// The terms through which the subscription is split into.
	Terms []SubscriptionTerm `json:"terms" validate:"required"`
}

Subscription : Subscription struct

type SubscriptionSummary

type SubscriptionSummary struct {
	// The charges after exhausting subscription credits and offers credits.
	Overage *float64 `json:"overage,omitempty"`

	// The list of subscriptions applicable for the month.
	Subscriptions []Subscription `json:"subscriptions,omitempty"`
}

SubscriptionSummary : A summary of charges and credits related to a subscription.

type SubscriptionTerm

type SubscriptionTerm struct {
	// The start date of the term.
	Start *strfmt.DateTime `json:"start" validate:"required"`

	// The end date of the term.
	End *strfmt.DateTime `json:"end" validate:"required"`

	// Information about credits related to a subscription.
	Credits *SubscriptionTermCredits `json:"credits" validate:"required"`
}

SubscriptionTerm : SubscriptionTerm struct

type SubscriptionTermCredits

type SubscriptionTermCredits struct {
	// The total credits available for the term.
	Total *float64 `json:"total" validate:"required"`

	// The unused credits in the term at the beginning of the month.
	StartingBalance *float64 `json:"starting_balance" validate:"required"`

	// The credits used in this month.
	Used *float64 `json:"used" validate:"required"`

	// The remaining credits in this term.
	Balance *float64 `json:"balance" validate:"required"`
}

SubscriptionTermCredits : Information about credits related to a subscription.

type SupportSummary

type SupportSummary struct {
	// The monthly support cost.
	Cost *float64 `json:"cost" validate:"required"`

	// The type of support.
	Type *string `json:"type" validate:"required"`

	// Additional support cost for the month.
	Overage *float64 `json:"overage" validate:"required"`
}

SupportSummary : SupportSummary struct

type UpdateReportsSnapshotConfigOptions added in v0.50.0

type UpdateReportsSnapshotConfigOptions struct {
	// Account ID for which billing report snapshot is configured.
	AccountID *string `json:"account_id" validate:"required"`

	// Frequency of taking the snapshot of the billing reports.
	Interval *string `json:"interval,omitempty"`

	// The name of the COS bucket to store the snapshot of the billing reports.
	CosBucket *string `json:"cos_bucket,omitempty"`

	// Region of the COS instance.
	CosLocation *string `json:"cos_location,omitempty"`

	// The billing reports root folder to store the billing reports snapshots.
	CosReportsFolder *string `json:"cos_reports_folder,omitempty"`

	// The type of billing reports to take snapshot of. Possible values are [account_summary, enterprise_summary,
	// account_resource_instance_usage].
	ReportTypes []string `json:"report_types,omitempty"`

	// A new version of report is created or the existing report version is overwritten with every update.
	Versioning *string `json:"versioning,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

UpdateReportsSnapshotConfigOptions : The UpdateReportsSnapshotConfig options.

func (*UpdateReportsSnapshotConfigOptions) SetAccountID added in v0.50.0

SetAccountID : Allow user to set AccountID

func (*UpdateReportsSnapshotConfigOptions) SetCosBucket added in v0.50.0

SetCosBucket : Allow user to set CosBucket

func (*UpdateReportsSnapshotConfigOptions) SetCosLocation added in v0.50.0

func (_options *UpdateReportsSnapshotConfigOptions) SetCosLocation(cosLocation string) *UpdateReportsSnapshotConfigOptions

SetCosLocation : Allow user to set CosLocation

func (*UpdateReportsSnapshotConfigOptions) SetCosReportsFolder added in v0.50.0

func (_options *UpdateReportsSnapshotConfigOptions) SetCosReportsFolder(cosReportsFolder string) *UpdateReportsSnapshotConfigOptions

SetCosReportsFolder : Allow user to set CosReportsFolder

func (*UpdateReportsSnapshotConfigOptions) SetHeaders added in v0.50.0

SetHeaders : Allow user to set Headers

func (*UpdateReportsSnapshotConfigOptions) SetInterval added in v0.50.0

SetInterval : Allow user to set Interval

func (*UpdateReportsSnapshotConfigOptions) SetReportTypes added in v0.50.0

func (_options *UpdateReportsSnapshotConfigOptions) SetReportTypes(reportTypes []string) *UpdateReportsSnapshotConfigOptions

SetReportTypes : Allow user to set ReportTypes

func (*UpdateReportsSnapshotConfigOptions) SetVersioning added in v0.50.0

SetVersioning : Allow user to set Versioning

type UsageReportsV4

type UsageReportsV4 struct {
	Service *core.BaseService
}

UsageReportsV4 : Usage reports for IBM Cloud accounts

API Version: 4.0.6

func NewUsageReportsV4

func NewUsageReportsV4(options *UsageReportsV4Options) (service *UsageReportsV4, err error)

NewUsageReportsV4 : constructs an instance of UsageReportsV4 with passed in options.

func NewUsageReportsV4UsingExternalConfig

func NewUsageReportsV4UsingExternalConfig(options *UsageReportsV4Options) (usageReports *UsageReportsV4, err error)

NewUsageReportsV4UsingExternalConfig : constructs an instance of UsageReportsV4 with passed in options and external configuration.

func (*UsageReportsV4) Clone added in v0.17.2

func (usageReports *UsageReportsV4) Clone() *UsageReportsV4

Clone makes a copy of "usageReports" suitable for processing requests.

func (*UsageReportsV4) CreateReportsSnapshotConfig added in v0.50.0

func (usageReports *UsageReportsV4) CreateReportsSnapshotConfig(createReportsSnapshotConfigOptions *CreateReportsSnapshotConfigOptions) (result *SnapshotConfig, response *core.DetailedResponse, err error)

CreateReportsSnapshotConfig : Setup the snapshot configuration Snapshots of the billing reports would be taken on a periodic interval and stored based on the configuration setup by the customer for the given Account Id.

func (*UsageReportsV4) CreateReportsSnapshotConfigWithContext added in v0.50.0

func (usageReports *UsageReportsV4) CreateReportsSnapshotConfigWithContext(ctx context.Context, createReportsSnapshotConfigOptions *CreateReportsSnapshotConfigOptions) (result *SnapshotConfig, response *core.DetailedResponse, err error)

CreateReportsSnapshotConfigWithContext is an alternate form of the CreateReportsSnapshotConfig method which supports a Context parameter

func (*UsageReportsV4) DeleteReportsSnapshotConfig added in v0.50.0

func (usageReports *UsageReportsV4) DeleteReportsSnapshotConfig(deleteReportsSnapshotConfigOptions *DeleteReportsSnapshotConfigOptions) (response *core.DetailedResponse, err error)

DeleteReportsSnapshotConfig : Delete the snapshot configuration Delete the configuration of snapshot of the billing reports setup by the customer for the given Account Id.

func (*UsageReportsV4) DeleteReportsSnapshotConfigWithContext added in v0.50.0

func (usageReports *UsageReportsV4) DeleteReportsSnapshotConfigWithContext(ctx context.Context, deleteReportsSnapshotConfigOptions *DeleteReportsSnapshotConfigOptions) (response *core.DetailedResponse, err error)

DeleteReportsSnapshotConfigWithContext is an alternate form of the DeleteReportsSnapshotConfig method which supports a Context parameter

func (*UsageReportsV4) DisableRetries

func (usageReports *UsageReportsV4) DisableRetries()

DisableRetries disables automatic retries for requests invoked for this service instance.

func (*UsageReportsV4) EnableRetries

func (usageReports *UsageReportsV4) EnableRetries(maxRetries int, maxRetryInterval time.Duration)

EnableRetries enables automatic retries for requests invoked for this service instance. If either parameter is specified as 0, then a default value is used instead.

func (*UsageReportsV4) GetAccountSummary

func (usageReports *UsageReportsV4) GetAccountSummary(getAccountSummaryOptions *GetAccountSummaryOptions) (result *AccountSummary, response *core.DetailedResponse, err error)

GetAccountSummary : Get account summary Returns the summary for the account for a given month. Account billing managers are authorized to access this report.

func (*UsageReportsV4) GetAccountSummaryWithContext

func (usageReports *UsageReportsV4) GetAccountSummaryWithContext(ctx context.Context, getAccountSummaryOptions *GetAccountSummaryOptions) (result *AccountSummary, response *core.DetailedResponse, err error)

GetAccountSummaryWithContext is an alternate form of the GetAccountSummary method which supports a Context parameter

func (*UsageReportsV4) GetAccountUsage

func (usageReports *UsageReportsV4) GetAccountUsage(getAccountUsageOptions *GetAccountUsageOptions) (result *AccountUsage, response *core.DetailedResponse, err error)

GetAccountUsage : Get account usage Usage for all the resources and plans in an account for a given month. Account billing managers are authorized to access this report.

func (*UsageReportsV4) GetAccountUsageWithContext

func (usageReports *UsageReportsV4) GetAccountUsageWithContext(ctx context.Context, getAccountUsageOptions *GetAccountUsageOptions) (result *AccountUsage, response *core.DetailedResponse, err error)

GetAccountUsageWithContext is an alternate form of the GetAccountUsage method which supports a Context parameter

func (*UsageReportsV4) GetEnableGzipCompression

func (usageReports *UsageReportsV4) GetEnableGzipCompression() bool

GetEnableGzipCompression returns the service's EnableGzipCompression field

func (*UsageReportsV4) GetOrgUsage

func (usageReports *UsageReportsV4) GetOrgUsage(getOrgUsageOptions *GetOrgUsageOptions) (result *OrgUsage, response *core.DetailedResponse, err error)

GetOrgUsage : Get organization usage Usage for all the resources and plans in an organization in a given month. Account billing managers or organization billing managers are authorized to access this report.

func (*UsageReportsV4) GetOrgUsageWithContext

func (usageReports *UsageReportsV4) GetOrgUsageWithContext(ctx context.Context, getOrgUsageOptions *GetOrgUsageOptions) (result *OrgUsage, response *core.DetailedResponse, err error)

GetOrgUsageWithContext is an alternate form of the GetOrgUsage method which supports a Context parameter

func (*UsageReportsV4) GetReportsSnapshot added in v0.50.0

func (usageReports *UsageReportsV4) GetReportsSnapshot(getReportsSnapshotOptions *GetReportsSnapshotOptions) (result *SnapshotList, response *core.DetailedResponse, err error)

GetReportsSnapshot : Fetch the current or past snapshots Returns the billing reports snapshots captured for the given Account Id in the specific time period.

func (*UsageReportsV4) GetReportsSnapshotConfig added in v0.50.0

func (usageReports *UsageReportsV4) GetReportsSnapshotConfig(getReportsSnapshotConfigOptions *GetReportsSnapshotConfigOptions) (result *SnapshotConfig, response *core.DetailedResponse, err error)

GetReportsSnapshotConfig : Fetch the snapshot configuration Returns the configuration of snapshot of the billing reports setup by the customer for the given Account Id.

func (*UsageReportsV4) GetReportsSnapshotConfigWithContext added in v0.50.0

func (usageReports *UsageReportsV4) GetReportsSnapshotConfigWithContext(ctx context.Context, getReportsSnapshotConfigOptions *GetReportsSnapshotConfigOptions) (result *SnapshotConfig, response *core.DetailedResponse, err error)

GetReportsSnapshotConfigWithContext is an alternate form of the GetReportsSnapshotConfig method which supports a Context parameter

func (*UsageReportsV4) GetReportsSnapshotWithContext added in v0.50.0

func (usageReports *UsageReportsV4) GetReportsSnapshotWithContext(ctx context.Context, getReportsSnapshotOptions *GetReportsSnapshotOptions) (result *SnapshotList, response *core.DetailedResponse, err error)

GetReportsSnapshotWithContext is an alternate form of the GetReportsSnapshot method which supports a Context parameter

func (*UsageReportsV4) GetResourceGroupUsage

func (usageReports *UsageReportsV4) GetResourceGroupUsage(getResourceGroupUsageOptions *GetResourceGroupUsageOptions) (result *ResourceGroupUsage, response *core.DetailedResponse, err error)

GetResourceGroupUsage : Get resource group usage Usage for all the resources and plans in a resource group in a given month. Account billing managers or resource group billing managers are authorized to access this report.

func (*UsageReportsV4) GetResourceGroupUsageWithContext

func (usageReports *UsageReportsV4) GetResourceGroupUsageWithContext(ctx context.Context, getResourceGroupUsageOptions *GetResourceGroupUsageOptions) (result *ResourceGroupUsage, response *core.DetailedResponse, err error)

GetResourceGroupUsageWithContext is an alternate form of the GetResourceGroupUsage method which supports a Context parameter

func (*UsageReportsV4) GetResourceUsageAccount

func (usageReports *UsageReportsV4) GetResourceUsageAccount(getResourceUsageAccountOptions *GetResourceUsageAccountOptions) (result *InstancesUsage, response *core.DetailedResponse, err error)

GetResourceUsageAccount : Get resource instance usage in an account Query for resource instance usage in an account. Filter the results with query parameters. Account billing administrator is authorized to access this report.

func (*UsageReportsV4) GetResourceUsageAccountWithContext

func (usageReports *UsageReportsV4) GetResourceUsageAccountWithContext(ctx context.Context, getResourceUsageAccountOptions *GetResourceUsageAccountOptions) (result *InstancesUsage, response *core.DetailedResponse, err error)

GetResourceUsageAccountWithContext is an alternate form of the GetResourceUsageAccount method which supports a Context parameter

func (*UsageReportsV4) GetResourceUsageOrg

func (usageReports *UsageReportsV4) GetResourceUsageOrg(getResourceUsageOrgOptions *GetResourceUsageOrgOptions) (result *InstancesUsage, response *core.DetailedResponse, err error)

GetResourceUsageOrg : Get resource instance usage in an organization Query for resource instance usage in an organization. Filter the results with query parameters. Account billing administrator and organization billing administrators are authorized to access this report.

func (*UsageReportsV4) GetResourceUsageOrgWithContext

func (usageReports *UsageReportsV4) GetResourceUsageOrgWithContext(ctx context.Context, getResourceUsageOrgOptions *GetResourceUsageOrgOptions) (result *InstancesUsage, response *core.DetailedResponse, err error)

GetResourceUsageOrgWithContext is an alternate form of the GetResourceUsageOrg method which supports a Context parameter

func (*UsageReportsV4) GetResourceUsageResourceGroup

func (usageReports *UsageReportsV4) GetResourceUsageResourceGroup(getResourceUsageResourceGroupOptions *GetResourceUsageResourceGroupOptions) (result *InstancesUsage, response *core.DetailedResponse, err error)

GetResourceUsageResourceGroup : Get resource instance usage in a resource group Query for resource instance usage in a resource group. Filter the results with query parameters. Account billing administrator and resource group billing administrators are authorized to access this report.

func (*UsageReportsV4) GetResourceUsageResourceGroupWithContext

func (usageReports *UsageReportsV4) GetResourceUsageResourceGroupWithContext(ctx context.Context, getResourceUsageResourceGroupOptions *GetResourceUsageResourceGroupOptions) (result *InstancesUsage, response *core.DetailedResponse, err error)

GetResourceUsageResourceGroupWithContext is an alternate form of the GetResourceUsageResourceGroup method which supports a Context parameter

func (*UsageReportsV4) GetServiceURL

func (usageReports *UsageReportsV4) GetServiceURL() string

GetServiceURL returns the service URL

func (*UsageReportsV4) NewCreateReportsSnapshotConfigOptions added in v0.50.0

func (*UsageReportsV4) NewCreateReportsSnapshotConfigOptions(accountID string, interval string, cosBucket string, cosLocation string) *CreateReportsSnapshotConfigOptions

NewCreateReportsSnapshotConfigOptions : Instantiate CreateReportsSnapshotConfigOptions

func (*UsageReportsV4) NewDeleteReportsSnapshotConfigOptions added in v0.50.0

func (*UsageReportsV4) NewDeleteReportsSnapshotConfigOptions(accountID string) *DeleteReportsSnapshotConfigOptions

NewDeleteReportsSnapshotConfigOptions : Instantiate DeleteReportsSnapshotConfigOptions

func (*UsageReportsV4) NewGetAccountSummaryOptions

func (*UsageReportsV4) NewGetAccountSummaryOptions(accountID string, billingmonth string) *GetAccountSummaryOptions

NewGetAccountSummaryOptions : Instantiate GetAccountSummaryOptions

func (*UsageReportsV4) NewGetAccountUsageOptions

func (*UsageReportsV4) NewGetAccountUsageOptions(accountID string, billingmonth string) *GetAccountUsageOptions

NewGetAccountUsageOptions : Instantiate GetAccountUsageOptions

func (*UsageReportsV4) NewGetOrgUsageOptions

func (*UsageReportsV4) NewGetOrgUsageOptions(accountID string, organizationID string, billingmonth string) *GetOrgUsageOptions

NewGetOrgUsageOptions : Instantiate GetOrgUsageOptions

func (*UsageReportsV4) NewGetReportsSnapshotConfigOptions added in v0.50.0

func (*UsageReportsV4) NewGetReportsSnapshotConfigOptions(accountID string) *GetReportsSnapshotConfigOptions

NewGetReportsSnapshotConfigOptions : Instantiate GetReportsSnapshotConfigOptions

func (*UsageReportsV4) NewGetReportsSnapshotOptions added in v0.50.0

func (*UsageReportsV4) NewGetReportsSnapshotOptions(accountID string, month string) *GetReportsSnapshotOptions

NewGetReportsSnapshotOptions : Instantiate GetReportsSnapshotOptions

func (*UsageReportsV4) NewGetReportsSnapshotPager added in v0.52.0

func (usageReports *UsageReportsV4) NewGetReportsSnapshotPager(options *GetReportsSnapshotOptions) (pager *GetReportsSnapshotPager, err error)

NewGetReportsSnapshotPager returns a new GetReportsSnapshotPager instance.

func (*UsageReportsV4) NewGetResourceGroupUsageOptions

func (*UsageReportsV4) NewGetResourceGroupUsageOptions(accountID string, resourceGroupID string, billingmonth string) *GetResourceGroupUsageOptions

NewGetResourceGroupUsageOptions : Instantiate GetResourceGroupUsageOptions

func (*UsageReportsV4) NewGetResourceUsageAccountOptions

func (*UsageReportsV4) NewGetResourceUsageAccountOptions(accountID string, billingmonth string) *GetResourceUsageAccountOptions

NewGetResourceUsageAccountOptions : Instantiate GetResourceUsageAccountOptions

func (*UsageReportsV4) NewGetResourceUsageAccountPager added in v0.31.1

func (usageReports *UsageReportsV4) NewGetResourceUsageAccountPager(options *GetResourceUsageAccountOptions) (pager *GetResourceUsageAccountPager, err error)

NewGetResourceUsageAccountPager returns a new GetResourceUsageAccountPager instance.

func (*UsageReportsV4) NewGetResourceUsageOrgOptions

func (*UsageReportsV4) NewGetResourceUsageOrgOptions(accountID string, organizationID string, billingmonth string) *GetResourceUsageOrgOptions

NewGetResourceUsageOrgOptions : Instantiate GetResourceUsageOrgOptions

func (*UsageReportsV4) NewGetResourceUsageOrgPager added in v0.31.1

func (usageReports *UsageReportsV4) NewGetResourceUsageOrgPager(options *GetResourceUsageOrgOptions) (pager *GetResourceUsageOrgPager, err error)

NewGetResourceUsageOrgPager returns a new GetResourceUsageOrgPager instance.

func (*UsageReportsV4) NewGetResourceUsageResourceGroupOptions

func (*UsageReportsV4) NewGetResourceUsageResourceGroupOptions(accountID string, resourceGroupID string, billingmonth string) *GetResourceUsageResourceGroupOptions

NewGetResourceUsageResourceGroupOptions : Instantiate GetResourceUsageResourceGroupOptions

func (*UsageReportsV4) NewGetResourceUsageResourceGroupPager added in v0.31.1

func (usageReports *UsageReportsV4) NewGetResourceUsageResourceGroupPager(options *GetResourceUsageResourceGroupOptions) (pager *GetResourceUsageResourceGroupPager, err error)

NewGetResourceUsageResourceGroupPager returns a new GetResourceUsageResourceGroupPager instance.

func (*UsageReportsV4) NewUpdateReportsSnapshotConfigOptions added in v0.50.0

func (*UsageReportsV4) NewUpdateReportsSnapshotConfigOptions(accountID string) *UpdateReportsSnapshotConfigOptions

NewUpdateReportsSnapshotConfigOptions : Instantiate UpdateReportsSnapshotConfigOptions

func (*UsageReportsV4) NewValidateReportsSnapshotConfigOptions added in v0.55.0

func (*UsageReportsV4) NewValidateReportsSnapshotConfigOptions(accountID string) *ValidateReportsSnapshotConfigOptions

NewValidateReportsSnapshotConfigOptions : Instantiate ValidateReportsSnapshotConfigOptions

func (*UsageReportsV4) SetDefaultHeaders

func (usageReports *UsageReportsV4) SetDefaultHeaders(headers http.Header)

SetDefaultHeaders sets HTTP headers to be sent in every request

func (*UsageReportsV4) SetEnableGzipCompression

func (usageReports *UsageReportsV4) SetEnableGzipCompression(enableGzip bool)

SetEnableGzipCompression sets the service's EnableGzipCompression field

func (*UsageReportsV4) SetServiceURL

func (usageReports *UsageReportsV4) SetServiceURL(url string) error

SetServiceURL sets the service URL

func (*UsageReportsV4) UpdateReportsSnapshotConfig added in v0.50.0

func (usageReports *UsageReportsV4) UpdateReportsSnapshotConfig(updateReportsSnapshotConfigOptions *UpdateReportsSnapshotConfigOptions) (result *SnapshotConfig, response *core.DetailedResponse, err error)

UpdateReportsSnapshotConfig : Update the snapshot configuration Updates the configuration of snapshot of the billing reports setup by the customer for the given Account Id.

func (*UsageReportsV4) UpdateReportsSnapshotConfigWithContext added in v0.50.0

func (usageReports *UsageReportsV4) UpdateReportsSnapshotConfigWithContext(ctx context.Context, updateReportsSnapshotConfigOptions *UpdateReportsSnapshotConfigOptions) (result *SnapshotConfig, response *core.DetailedResponse, err error)

UpdateReportsSnapshotConfigWithContext is an alternate form of the UpdateReportsSnapshotConfig method which supports a Context parameter

func (*UsageReportsV4) ValidateReportsSnapshotConfig added in v0.55.0

func (usageReports *UsageReportsV4) ValidateReportsSnapshotConfig(validateReportsSnapshotConfigOptions *ValidateReportsSnapshotConfigOptions) (result *SnapshotConfigValidateResponse, response *core.DetailedResponse, err error)

ValidateReportsSnapshotConfig : Verify billing to COS authorization Verify billing service to COS bucket authorization for the given account_id. If COS bucket information is not provided, COS bucket information is retrieved from the configuration file.

func (*UsageReportsV4) ValidateReportsSnapshotConfigWithContext added in v0.55.0

func (usageReports *UsageReportsV4) ValidateReportsSnapshotConfigWithContext(ctx context.Context, validateReportsSnapshotConfigOptions *ValidateReportsSnapshotConfigOptions) (result *SnapshotConfigValidateResponse, response *core.DetailedResponse, err error)

ValidateReportsSnapshotConfigWithContext is an alternate form of the ValidateReportsSnapshotConfig method which supports a Context parameter

type UsageReportsV4Options

type UsageReportsV4Options struct {
	ServiceName   string
	URL           string
	Authenticator core.Authenticator
}

UsageReportsV4Options : Service options

type ValidateReportsSnapshotConfigOptions added in v0.55.0

type ValidateReportsSnapshotConfigOptions struct {
	// Account ID for which billing report snapshot is configured.
	AccountID *string `json:"account_id" validate:"required"`

	// Frequency of taking the snapshot of the billing reports.
	Interval *string `json:"interval,omitempty"`

	// The name of the COS bucket to store the snapshot of the billing reports.
	CosBucket *string `json:"cos_bucket,omitempty"`

	// Region of the COS instance.
	CosLocation *string `json:"cos_location,omitempty"`

	// The billing reports root folder to store the billing reports snapshots. Defaults to "IBMCloud-Billing-Reports".
	CosReportsFolder *string `json:"cos_reports_folder,omitempty"`

	// The type of billing reports to take snapshot of. Possible values are [account_summary, enterprise_summary,
	// account_resource_instance_usage].
	ReportTypes []string `json:"report_types,omitempty"`

	// A new version of report is created or the existing report version is overwritten with every update. Defaults to
	// "new".
	Versioning *string `json:"versioning,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

ValidateReportsSnapshotConfigOptions : The ValidateReportsSnapshotConfig options.

func (*ValidateReportsSnapshotConfigOptions) SetAccountID added in v0.55.0

SetAccountID : Allow user to set AccountID

func (*ValidateReportsSnapshotConfigOptions) SetCosBucket added in v0.55.0

SetCosBucket : Allow user to set CosBucket

func (*ValidateReportsSnapshotConfigOptions) SetCosLocation added in v0.55.0

SetCosLocation : Allow user to set CosLocation

func (*ValidateReportsSnapshotConfigOptions) SetCosReportsFolder added in v0.55.0

func (_options *ValidateReportsSnapshotConfigOptions) SetCosReportsFolder(cosReportsFolder string) *ValidateReportsSnapshotConfigOptions

SetCosReportsFolder : Allow user to set CosReportsFolder

func (*ValidateReportsSnapshotConfigOptions) SetHeaders added in v0.55.0

SetHeaders : Allow user to set Headers

func (*ValidateReportsSnapshotConfigOptions) SetInterval added in v0.55.0

SetInterval : Allow user to set Interval

func (*ValidateReportsSnapshotConfigOptions) SetReportTypes added in v0.55.0

func (_options *ValidateReportsSnapshotConfigOptions) SetReportTypes(reportTypes []string) *ValidateReportsSnapshotConfigOptions

SetReportTypes : Allow user to set ReportTypes

func (*ValidateReportsSnapshotConfigOptions) SetVersioning added in v0.55.0

SetVersioning : Allow user to set Versioning

Jump to

Keyboard shortcuts

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