usageapi

package
v39.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: Apache-2.0, UPL-1.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {

	// The configuration key.
	Key *string `mandatory:"true" json:"key"`

	// The configuration value.
	Values []string `mandatory:"false" json:"values"`
}

Configuration A configuration.

func (Configuration) String

func (m Configuration) String() string

type ConfigurationAggregation

type ConfigurationAggregation struct {

	// The list of available configurations.
	Items []Configuration `mandatory:"true" json:"items"`
}

ConfigurationAggregation The available configurations.

func (ConfigurationAggregation) String

func (m ConfigurationAggregation) String() string

type CostAnalysisUi

type CostAnalysisUi struct {

	// the type of graph mode.
	Graph CostAnalysisUiGraphEnum `mandatory:"false" json:"graph,omitempty"`

	// is cumulative graph.
	IsCumulativeGraph *bool `mandatory:"false" json:"isCumulativeGraph"`
}

CostAnalysisUi The common fields for Cost Analysis UI rendering.

func (CostAnalysisUi) String

func (m CostAnalysisUi) String() string

type CostAnalysisUiGraphEnum

type CostAnalysisUiGraphEnum string

CostAnalysisUiGraphEnum Enum with underlying type: string

const (
	CostAnalysisUiGraphBars         CostAnalysisUiGraphEnum = "BARS"
	CostAnalysisUiGraphLines        CostAnalysisUiGraphEnum = "LINES"
	CostAnalysisUiGraphStackedLines CostAnalysisUiGraphEnum = "STACKED_LINES"
)

Set of constants representing the allowable values for CostAnalysisUiGraphEnum

func GetCostAnalysisUiGraphEnumValues

func GetCostAnalysisUiGraphEnumValues() []CostAnalysisUiGraphEnum

GetCostAnalysisUiGraphEnumValues Enumerates the set of values for CostAnalysisUiGraphEnum

type CreateCustomTableDetails

type CreateCustomTableDetails struct {

	// The compartment OCID.
	CompartmentId *string `mandatory:"true" json:"compartmentId"`

	// The user OCID.
	UserId *string `mandatory:"true" json:"userId"`

	SavedCustomTable *SavedCustomTable `mandatory:"true" json:"savedCustomTable"`
}

CreateCustomTableDetails New custom table detail.

func (CreateCustomTableDetails) String

func (m CreateCustomTableDetails) String() string

type CreateQueryDetails

type CreateQueryDetails struct {

	// The compartment OCID.
	CompartmentId *string `mandatory:"true" json:"compartmentId"`

	QueryDefinition *QueryDefinition `mandatory:"true" json:"queryDefinition"`
}

CreateQueryDetails New query detail with savedRequestSummarizedUsagesDetails, savedCostAnalysisUI and displayName.

func (CreateQueryDetails) String

func (m CreateQueryDetails) String() string

type CreateQueryRequest

type CreateQueryRequest struct {

	// New query details. It is up to 10 saved query.
	CreateQueryDetails `contributesTo:"body"`

	// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
	// particular request, please provide the request ID.
	OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`

	// A token that uniquely identifies a request so it can be retried in case of a timeout or
	// server error, without risk of executing that same action again. Retry tokens expire after 24
	// hours, but can be invalidated before then due to conflicting operations. For example, if a resource
	// has been deleted and purged from the system, then a retry of the original creation request
	// might be rejected.
	OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"`

	// Metadata about the request. This information will not be transmitted to the service, but
	// represents information that the SDK will consume to drive retry behavior.
	RequestMetadata common.RequestMetadata
}

CreateQueryRequest wrapper for the CreateQuery operation

See also

Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/usageapi/CreateQuery.go.html to see an example of how to use CreateQueryRequest.

func (CreateQueryRequest) HTTPRequest

func (request CreateQueryRequest) HTTPRequest(method, path string) (http.Request, error)

HTTPRequest implements the OCIRequest interface

func (CreateQueryRequest) RetryPolicy

func (request CreateQueryRequest) RetryPolicy() *common.RetryPolicy

RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.

func (CreateQueryRequest) String

func (request CreateQueryRequest) String() string

type CreateQueryResponse

type CreateQueryResponse struct {

	// The underlying http response
	RawResponse *http.Response

	// The Query instance
	Query `presentIn:"body"`

	// Unique Oracle-assigned identifier for the request. If you need to contact
	// Oracle about a particular request, please provide the request ID.
	OpcRequestId *string `presentIn:"header" name:"opc-request-id"`

	// For optimistic concurrency control. See `if-match`.
	Etag *string `presentIn:"header" name:"etag"`
}

CreateQueryResponse wrapper for the CreateQuery operation

func (CreateQueryResponse) HTTPResponse

func (response CreateQueryResponse) HTTPResponse() *http.Response

HTTPResponse implements the OCIResponse interface

func (CreateQueryResponse) String

func (response CreateQueryResponse) String() string

type CreateScheduleReportDetails

type CreateScheduleReportDetails struct {

	// The compartment OCID.
	CompartmentId *string `mandatory:"true" json:"compartmentId"`

	// The query OCID.
	QueryId *string `mandatory:"true" json:"queryId"`

	SavedScheduleReport *SavedScheduleReport `mandatory:"false" json:"savedScheduleReport"`
}

CreateScheduleReportDetails New custom table detail.

func (CreateScheduleReportDetails) String

type CustomTable

type CustomTable struct {

	// The ocid of custom table.
	Id *string `mandatory:"true" json:"id"`

	// The user ocid of custom table.
	UserId *string `mandatory:"false" json:"userId"`

	// The compartment ocid of custom table.
	CompartmentId *string `mandatory:"false" json:"compartmentId"`

	SavedCustomTable *SavedCustomTable `mandatory:"false" json:"savedCustomTable"`
}

CustomTable saved custom table.

func (CustomTable) String

func (m CustomTable) String() string

type CustomTableCollection

type CustomTableCollection struct {

	// Custom tables list.
	Items []CustomTableSummary `mandatory:"true" json:"items"`
}

CustomTableCollection A custom table list.

func (CustomTableCollection) String

func (m CustomTableCollection) String() string

type CustomTableSummary

type CustomTableSummary struct {

	// The custom table OCID.
	Id *string `mandatory:"true" json:"id"`

	SavedCustomTable *SavedCustomTable `mandatory:"true" json:"savedCustomTable"`
}

CustomTableSummary Custom table in list request.

func (CustomTableSummary) String

func (m CustomTableSummary) String() string

type DeleteQueryRequest

type DeleteQueryRequest struct {

	// The query unique OCID.
	QueryId *string `mandatory:"true" contributesTo:"path" name:"queryId"`

	// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
	// particular request, please provide the request ID.
	OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`

	// For optimistic concurrency control. In the PUT or DELETE call
	// for a resource, set the `if-match` parameter to the value of the
	// etag from a previous GET or POST response for that resource.
	// The resource will be updated or deleted, only if the etag you
	// provide matches the resource's current etag value.
	IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"`

	// Metadata about the request. This information will not be transmitted to the service, but
	// represents information that the SDK will consume to drive retry behavior.
	RequestMetadata common.RequestMetadata
}

DeleteQueryRequest wrapper for the DeleteQuery operation

See also

Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/usageapi/DeleteQuery.go.html to see an example of how to use DeleteQueryRequest.

func (DeleteQueryRequest) HTTPRequest

func (request DeleteQueryRequest) HTTPRequest(method, path string) (http.Request, error)

HTTPRequest implements the OCIRequest interface

func (DeleteQueryRequest) RetryPolicy

func (request DeleteQueryRequest) RetryPolicy() *common.RetryPolicy

RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.

func (DeleteQueryRequest) String

func (request DeleteQueryRequest) String() string

type DeleteQueryResponse

type DeleteQueryResponse struct {

	// The underlying http response
	RawResponse *http.Response

	// Unique Oracle-assigned identifier for the request. If you need to contact
	// Oracle about a particular request, please provide the request ID.
	OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
}

DeleteQueryResponse wrapper for the DeleteQuery operation

func (DeleteQueryResponse) HTTPResponse

func (response DeleteQueryResponse) HTTPResponse() *http.Response

HTTPResponse implements the OCIResponse interface

func (DeleteQueryResponse) String

func (response DeleteQueryResponse) String() string

type Dimension

type Dimension struct {

	// The dimension key.
	Key *string `mandatory:"true" json:"key"`

	// The dimension value.
	Value *string `mandatory:"true" json:"value"`
}

Dimension The dimension used for filtering. Availabe dimensions are: "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName". For example: `[{value: "COMPUTE", key: "service"}]`

func (Dimension) String

func (m Dimension) String() string

type Filter

type Filter struct {

	// The filter operator. Example: 'AND', 'OR', 'NOT'.
	Operator FilterOperatorEnum `mandatory:"false" json:"operator,omitempty"`

	// The dimensions to filter on.
	Dimensions []Dimension `mandatory:"false" json:"dimensions"`

	// The tags to filter on.
	Tags []Tag `mandatory:"false" json:"tags"`

	// The nested filter object.
	Filters []Filter `mandatory:"false" json:"filters"`
}

Filter The filter object for query usage.

func (Filter) String

func (m Filter) String() string

type FilterOperatorEnum

type FilterOperatorEnum string

FilterOperatorEnum Enum with underlying type: string

const (
	FilterOperatorAnd FilterOperatorEnum = "AND"
	FilterOperatorNot FilterOperatorEnum = "NOT"
	FilterOperatorOr  FilterOperatorEnum = "OR"
)

Set of constants representing the allowable values for FilterOperatorEnum

func GetFilterOperatorEnumValues

func GetFilterOperatorEnumValues() []FilterOperatorEnum

GetFilterOperatorEnumValues Enumerates the set of values for FilterOperatorEnum

type Forecast

type Forecast struct {

	// forecast end time.
	TimeForecastEnded *common.SDKTime `mandatory:"true" json:"timeForecastEnded"`

	// BASIC uses ETS to project future usage/cost based on history data. The basis for projections will be a rolling set of equivalent historical days for which projection is being made.
	ForecastType ForecastForecastTypeEnum `mandatory:"false" json:"forecastType,omitempty"`

	// forecast start time. Will default to UTC-1 if not specified
	TimeForecastStarted *common.SDKTime `mandatory:"false" json:"timeForecastStarted"`
}

Forecast Forecast configuration of usage/cost.

func (Forecast) String

func (m Forecast) String() string

type ForecastForecastTypeEnum

type ForecastForecastTypeEnum string

ForecastForecastTypeEnum Enum with underlying type: string

const (
	ForecastForecastTypeBasic ForecastForecastTypeEnum = "BASIC"
)

Set of constants representing the allowable values for ForecastForecastTypeEnum

func GetForecastForecastTypeEnumValues

func GetForecastForecastTypeEnumValues() []ForecastForecastTypeEnum

GetForecastForecastTypeEnumValues Enumerates the set of values for ForecastForecastTypeEnum

type GetQueryRequest

type GetQueryRequest struct {

	// The query unique OCID.
	QueryId *string `mandatory:"true" contributesTo:"path" name:"queryId"`

	// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
	// particular request, please provide the request ID.
	OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`

	// Metadata about the request. This information will not be transmitted to the service, but
	// represents information that the SDK will consume to drive retry behavior.
	RequestMetadata common.RequestMetadata
}

GetQueryRequest wrapper for the GetQuery operation

See also

Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/usageapi/GetQuery.go.html to see an example of how to use GetQueryRequest.

func (GetQueryRequest) HTTPRequest

func (request GetQueryRequest) HTTPRequest(method, path string) (http.Request, error)

HTTPRequest implements the OCIRequest interface

func (GetQueryRequest) RetryPolicy

func (request GetQueryRequest) RetryPolicy() *common.RetryPolicy

RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.

func (GetQueryRequest) String

func (request GetQueryRequest) String() string

type GetQueryResponse

type GetQueryResponse struct {

	// The underlying http response
	RawResponse *http.Response

	// The Query instance
	Query `presentIn:"body"`

	// Unique Oracle-assigned identifier for the request. If you need to contact
	// Oracle about a particular request, please provide the request ID.
	OpcRequestId *string `presentIn:"header" name:"opc-request-id"`

	// For optimistic concurrency control. See `if-match`.
	Etag *string `presentIn:"header" name:"etag"`
}

GetQueryResponse wrapper for the GetQuery operation

func (GetQueryResponse) HTTPResponse

func (response GetQueryResponse) HTTPResponse() *http.Response

HTTPResponse implements the OCIResponse interface

func (GetQueryResponse) String

func (response GetQueryResponse) String() string

type ListQueriesRequest

type ListQueriesRequest struct {

	// The compartment ID in which to list resources.
	CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"`

	// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
	// particular request, please provide the request ID.
	OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`

	// The maximumimum number of items to return.
	Limit *int `mandatory:"false" contributesTo:"query" name:"limit"`

	// The page token representing the page at which to start retrieving results.
	// This is usually retrieved from a previous list call.
	Page *string `mandatory:"false" contributesTo:"query" name:"page"`

	// The field to sort by. If not specified, the default is displayName.
	SortBy ListQueriesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"`

	// The sort order to use, whether 'asc' or 'desc'.
	SortOrder ListQueriesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"`

	// Metadata about the request. This information will not be transmitted to the service, but
	// represents information that the SDK will consume to drive retry behavior.
	RequestMetadata common.RequestMetadata
}

ListQueriesRequest wrapper for the ListQueries operation

See also

Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/usageapi/ListQueries.go.html to see an example of how to use ListQueriesRequest.

func (ListQueriesRequest) HTTPRequest

func (request ListQueriesRequest) HTTPRequest(method, path string) (http.Request, error)

HTTPRequest implements the OCIRequest interface

func (ListQueriesRequest) RetryPolicy

func (request ListQueriesRequest) RetryPolicy() *common.RetryPolicy

RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.

func (ListQueriesRequest) String

func (request ListQueriesRequest) String() string

type ListQueriesResponse

type ListQueriesResponse struct {

	// The underlying http response
	RawResponse *http.Response

	// A list of QueryCollection instances
	QueryCollection `presentIn:"body"`

	// Unique Oracle-assigned identifier for the request. If you need to contact
	// Oracle about a particular request, please provide the request ID.
	OpcRequestId *string `presentIn:"header" name:"opc-request-id"`

	// For pagination of a list of Queries. If this header appears in the response, then this
	// is a partial list of Queries. Include this value as the `page` parameter in a subsequent
	// GET request, to get the next batch of Queries.
	OpcNextPage *string `presentIn:"header" name:"opc-next-page"`
}

ListQueriesResponse wrapper for the ListQueries operation

func (ListQueriesResponse) HTTPResponse

func (response ListQueriesResponse) HTTPResponse() *http.Response

HTTPResponse implements the OCIResponse interface

func (ListQueriesResponse) String

func (response ListQueriesResponse) String() string

type ListQueriesSortByEnum

type ListQueriesSortByEnum string

ListQueriesSortByEnum Enum with underlying type: string

const (
	ListQueriesSortByDisplayname ListQueriesSortByEnum = "displayName"
)

Set of constants representing the allowable values for ListQueriesSortByEnum

func GetListQueriesSortByEnumValues

func GetListQueriesSortByEnumValues() []ListQueriesSortByEnum

GetListQueriesSortByEnumValues Enumerates the set of values for ListQueriesSortByEnum

type ListQueriesSortOrderEnum

type ListQueriesSortOrderEnum string

ListQueriesSortOrderEnum Enum with underlying type: string

const (
	ListQueriesSortOrderAsc  ListQueriesSortOrderEnum = "ASC"
	ListQueriesSortOrderDesc ListQueriesSortOrderEnum = "DESC"
)

Set of constants representing the allowable values for ListQueriesSortOrderEnum

func GetListQueriesSortOrderEnumValues

func GetListQueriesSortOrderEnumValues() []ListQueriesSortOrderEnum

GetListQueriesSortOrderEnumValues Enumerates the set of values for ListQueriesSortOrderEnum

type Query

type Query struct {

	// The query OCID.
	Id *string `mandatory:"true" json:"id"`

	// The compartment OCID.
	CompartmentId *string `mandatory:"true" json:"compartmentId"`

	QueryDefinition *QueryDefinition `mandatory:"true" json:"queryDefinition"`
}

Query The query to filter and aggregate.

func (Query) String

func (m Query) String() string

type QueryCollection

type QueryCollection struct {

	// Query list.
	Items []QuerySummary `mandatory:"true" json:"items"`
}

QueryCollection A query list.

func (QueryCollection) String

func (m QueryCollection) String() string

type QueryDefinition

type QueryDefinition struct {

	// The query display name. Avoid entering confidential information.
	DisplayName *string `mandatory:"true" json:"displayName"`

	ReportQuery *ReportQuery `mandatory:"true" json:"reportQuery"`

	CostAnalysisUI *CostAnalysisUi `mandatory:"true" json:"costAnalysisUI"`

	// the version of saved query.
	Version *float32 `mandatory:"true" json:"version"`
}

QueryDefinition The common fields for queries.

func (QueryDefinition) String

func (m QueryDefinition) String() string

type QuerySummary

type QuerySummary struct {

	// The query OCID.
	Id *string `mandatory:"true" json:"id"`

	QueryDefinition *QueryDefinition `mandatory:"true" json:"queryDefinition"`
}

QuerySummary Query summery in list request.

func (QuerySummary) String

func (m QuerySummary) String() string

type ReportQuery

type ReportQuery struct {

	// Tenant ID
	TenantId *string `mandatory:"true" json:"tenantId"`

	// The usage granularity.
	// HOURLY - Hourly data aggregation.
	// DAILY - Daily data aggregation.
	// MONTHLY - Monthly data aggregation.
	// TOTAL - Not yet supported.
	Granularity ReportQueryGranularityEnum `mandatory:"true" json:"granularity"`

	// The usage start time.
	TimeUsageStarted *common.SDKTime `mandatory:"false" json:"timeUsageStarted"`

	// The usage end time.
	TimeUsageEnded *common.SDKTime `mandatory:"false" json:"timeUsageEnded"`

	// is aggregated by time. true isAggregateByTime will add up all usage/cost over query time period
	IsAggregateByTime *bool `mandatory:"false" json:"isAggregateByTime"`

	Forecast *Forecast `mandatory:"false" json:"forecast"`

	// The query usage type. COST by default if it is missing
	// Usage - Query the usage data.
	// Cost - Query the cost/billing data.
	QueryType ReportQueryQueryTypeEnum `mandatory:"false" json:"queryType,omitempty"`

	// Aggregate the result by.
	// example:
	//   `["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit",
	//     "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd",
	//     "resourceId", "tenantId", "tenantName"]`
	GroupBy []string `mandatory:"false" json:"groupBy"`

	// GroupBy a specific tagKey. Provide the tagNamespace and tagKey in the tag object. Only supports one tag in the list.
	// For example:
	//   `[{"namespace":"oracle", "key":"createdBy"]`
	GroupByTag []Tag `mandatory:"false" json:"groupByTag"`

	// The compartment depth level.
	CompartmentDepth *float32 `mandatory:"false" json:"compartmentDepth"`

	Filter *Filter `mandatory:"false" json:"filter"`

	// the date range for ui, eg LAST_THREE_MONTHS. It is conflict with timeUsageStarted and timeUsageEnded
	DateRangeName ReportQueryDateRangeNameEnum `mandatory:"false" json:"dateRangeName,omitempty"`
}

ReportQuery the request of generated cost analysis report.

func (ReportQuery) String

func (m ReportQuery) String() string

type ReportQueryDateRangeNameEnum

type ReportQueryDateRangeNameEnum string

ReportQueryDateRangeNameEnum Enum with underlying type: string

const (
	ReportQueryDateRangeNameLastSevenDays   ReportQueryDateRangeNameEnum = "LAST_SEVEN_DAYS"
	ReportQueryDateRangeNameLastTenDays     ReportQueryDateRangeNameEnum = "LAST_TEN_DAYS"
	ReportQueryDateRangeNameMtd             ReportQueryDateRangeNameEnum = "MTD"
	ReportQueryDateRangeNameLastTwoMonths   ReportQueryDateRangeNameEnum = "LAST_TWO_MONTHS"
	ReportQueryDateRangeNameLastThreeMonths ReportQueryDateRangeNameEnum = "LAST_THREE_MONTHS"
	ReportQueryDateRangeNameAll             ReportQueryDateRangeNameEnum = "ALL"
	ReportQueryDateRangeNameLastSixMonths   ReportQueryDateRangeNameEnum = "LAST_SIX_MONTHS"
	ReportQueryDateRangeNameLastOneYear     ReportQueryDateRangeNameEnum = "LAST_ONE_YEAR"
	ReportQueryDateRangeNameYtd             ReportQueryDateRangeNameEnum = "YTD"
	ReportQueryDateRangeNameCustom          ReportQueryDateRangeNameEnum = "CUSTOM"
)

Set of constants representing the allowable values for ReportQueryDateRangeNameEnum

func GetReportQueryDateRangeNameEnumValues

func GetReportQueryDateRangeNameEnumValues() []ReportQueryDateRangeNameEnum

GetReportQueryDateRangeNameEnumValues Enumerates the set of values for ReportQueryDateRangeNameEnum

type ReportQueryGranularityEnum

type ReportQueryGranularityEnum string

ReportQueryGranularityEnum Enum with underlying type: string

const (
	ReportQueryGranularityHourly  ReportQueryGranularityEnum = "HOURLY"
	ReportQueryGranularityDaily   ReportQueryGranularityEnum = "DAILY"
	ReportQueryGranularityMonthly ReportQueryGranularityEnum = "MONTHLY"
	ReportQueryGranularityTotal   ReportQueryGranularityEnum = "TOTAL"
)

Set of constants representing the allowable values for ReportQueryGranularityEnum

func GetReportQueryGranularityEnumValues

func GetReportQueryGranularityEnumValues() []ReportQueryGranularityEnum

GetReportQueryGranularityEnumValues Enumerates the set of values for ReportQueryGranularityEnum

type ReportQueryQueryTypeEnum

type ReportQueryQueryTypeEnum string

ReportQueryQueryTypeEnum Enum with underlying type: string

const (
	ReportQueryQueryTypeUsage ReportQueryQueryTypeEnum = "USAGE"
	ReportQueryQueryTypeCost  ReportQueryQueryTypeEnum = "COST"
)

Set of constants representing the allowable values for ReportQueryQueryTypeEnum

func GetReportQueryQueryTypeEnumValues

func GetReportQueryQueryTypeEnumValues() []ReportQueryQueryTypeEnum

GetReportQueryQueryTypeEnumValues Enumerates the set of values for ReportQueryQueryTypeEnum

type RequestSummarizedConfigurationsRequest

type RequestSummarizedConfigurationsRequest struct {

	// tenant id
	TenantId *string `mandatory:"true" contributesTo:"query" name:"tenantId"`

	// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
	// particular request, please provide the request ID.
	OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`

	// Metadata about the request. This information will not be transmitted to the service, but
	// represents information that the SDK will consume to drive retry behavior.
	RequestMetadata common.RequestMetadata
}

RequestSummarizedConfigurationsRequest wrapper for the RequestSummarizedConfigurations operation

See also

Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/usageapi/RequestSummarizedConfigurations.go.html to see an example of how to use RequestSummarizedConfigurationsRequest.

func (RequestSummarizedConfigurationsRequest) HTTPRequest

func (request RequestSummarizedConfigurationsRequest) HTTPRequest(method, path string) (http.Request, error)

HTTPRequest implements the OCIRequest interface

func (RequestSummarizedConfigurationsRequest) RetryPolicy

RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.

func (RequestSummarizedConfigurationsRequest) String

type RequestSummarizedConfigurationsResponse

type RequestSummarizedConfigurationsResponse struct {

	// The underlying http response
	RawResponse *http.Response

	// The ConfigurationAggregation instance
	ConfigurationAggregation `presentIn:"body"`

	// Unique Oracle-assigned identifier for the request. If you need to contact
	// Oracle about a particular request, please provide the request ID.
	OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
}

RequestSummarizedConfigurationsResponse wrapper for the RequestSummarizedConfigurations operation

func (RequestSummarizedConfigurationsResponse) HTTPResponse

func (response RequestSummarizedConfigurationsResponse) HTTPResponse() *http.Response

HTTPResponse implements the OCIResponse interface

func (RequestSummarizedConfigurationsResponse) String

type RequestSummarizedUsagesDetails

type RequestSummarizedUsagesDetails struct {

	// Tenant ID.
	TenantId *string `mandatory:"true" json:"tenantId"`

	// The usage start time.
	TimeUsageStarted *common.SDKTime `mandatory:"true" json:"timeUsageStarted"`

	// The usage end time.
	TimeUsageEnded *common.SDKTime `mandatory:"true" json:"timeUsageEnded"`

	// The usage granularity.
	// HOURLY - Hourly data aggregation.
	// DAILY - Daily data aggregation.
	// MONTHLY - Monthly data aggregation.
	// TOTAL - Not yet supported.
	Granularity RequestSummarizedUsagesDetailsGranularityEnum `mandatory:"true" json:"granularity"`

	// is aggregated by time. true isAggregateByTime will add up all usage/cost over query time period
	IsAggregateByTime *bool `mandatory:"false" json:"isAggregateByTime"`

	Forecast *Forecast `mandatory:"false" json:"forecast"`

	// The query usage type. COST by default if it is missing
	// Usage - Query the usage data.
	// Cost - Query the cost/billing data.
	QueryType RequestSummarizedUsagesDetailsQueryTypeEnum `mandatory:"false" json:"queryType,omitempty"`

	// Aggregate the result by.
	// example:
	//   `["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit",
	//     "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd",
	//     "resourceId", "tenantId", "tenantName"]`
	GroupBy []string `mandatory:"false" json:"groupBy"`

	// GroupBy a specific tagKey. Provide tagNamespace and tagKey in tag object. Only support one tag in the list
	// example:
	//   `[{"namespace":"oracle", "key":"createdBy"]`
	GroupByTag []Tag `mandatory:"false" json:"groupByTag"`

	// The compartment depth level.
	CompartmentDepth *float32 `mandatory:"false" json:"compartmentDepth"`

	Filter *Filter `mandatory:"false" json:"filter"`
}

RequestSummarizedUsagesDetails Details for the '/usage' query.

func (RequestSummarizedUsagesDetails) String

type RequestSummarizedUsagesDetailsGranularityEnum

type RequestSummarizedUsagesDetailsGranularityEnum string

RequestSummarizedUsagesDetailsGranularityEnum Enum with underlying type: string

const (
	RequestSummarizedUsagesDetailsGranularityHourly  RequestSummarizedUsagesDetailsGranularityEnum = "HOURLY"
	RequestSummarizedUsagesDetailsGranularityDaily   RequestSummarizedUsagesDetailsGranularityEnum = "DAILY"
	RequestSummarizedUsagesDetailsGranularityMonthly RequestSummarizedUsagesDetailsGranularityEnum = "MONTHLY"
	RequestSummarizedUsagesDetailsGranularityTotal   RequestSummarizedUsagesDetailsGranularityEnum = "TOTAL"
)

Set of constants representing the allowable values for RequestSummarizedUsagesDetailsGranularityEnum

func GetRequestSummarizedUsagesDetailsGranularityEnumValues

func GetRequestSummarizedUsagesDetailsGranularityEnumValues() []RequestSummarizedUsagesDetailsGranularityEnum

GetRequestSummarizedUsagesDetailsGranularityEnumValues Enumerates the set of values for RequestSummarizedUsagesDetailsGranularityEnum

type RequestSummarizedUsagesDetailsQueryTypeEnum

type RequestSummarizedUsagesDetailsQueryTypeEnum string

RequestSummarizedUsagesDetailsQueryTypeEnum Enum with underlying type: string

const (
	RequestSummarizedUsagesDetailsQueryTypeUsage RequestSummarizedUsagesDetailsQueryTypeEnum = "USAGE"
	RequestSummarizedUsagesDetailsQueryTypeCost  RequestSummarizedUsagesDetailsQueryTypeEnum = "COST"
)

Set of constants representing the allowable values for RequestSummarizedUsagesDetailsQueryTypeEnum

func GetRequestSummarizedUsagesDetailsQueryTypeEnumValues

func GetRequestSummarizedUsagesDetailsQueryTypeEnumValues() []RequestSummarizedUsagesDetailsQueryTypeEnum

GetRequestSummarizedUsagesDetailsQueryTypeEnumValues Enumerates the set of values for RequestSummarizedUsagesDetailsQueryTypeEnum

type RequestSummarizedUsagesRequest

type RequestSummarizedUsagesRequest struct {

	// getUsageRequest contains query inforamtion.
	RequestSummarizedUsagesDetails `contributesTo:"body"`

	// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
	// particular request, please provide the request ID.
	OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`

	// The page token representing the page at which to start retrieving results.
	// This is usually retrieved from a previous list call.
	Page *string `mandatory:"false" contributesTo:"query" name:"page"`

	// The maximumimum number of items to return.
	Limit *int `mandatory:"false" contributesTo:"query" name:"limit"`

	// Metadata about the request. This information will not be transmitted to the service, but
	// represents information that the SDK will consume to drive retry behavior.
	RequestMetadata common.RequestMetadata
}

RequestSummarizedUsagesRequest wrapper for the RequestSummarizedUsages operation

See also

Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/usageapi/RequestSummarizedUsages.go.html to see an example of how to use RequestSummarizedUsagesRequest.

func (RequestSummarizedUsagesRequest) HTTPRequest

func (request RequestSummarizedUsagesRequest) HTTPRequest(method, path string) (http.Request, error)

HTTPRequest implements the OCIRequest interface

func (RequestSummarizedUsagesRequest) RetryPolicy

func (request RequestSummarizedUsagesRequest) RetryPolicy() *common.RetryPolicy

RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.

func (RequestSummarizedUsagesRequest) String

func (request RequestSummarizedUsagesRequest) String() string

type RequestSummarizedUsagesResponse

type RequestSummarizedUsagesResponse struct {

	// The underlying http response
	RawResponse *http.Response

	// A list of UsageAggregation instances
	UsageAggregation `presentIn:"body"`

	// Unique Oracle-assigned identifier for the request. If you need to contact
	// Oracle about a particular request, please provide the request ID.
	OpcRequestId *string `presentIn:"header" name:"opc-request-id"`

	// For pagination of a list of items. When paging through a list, if this header appears in the response,
	// then a partial list might have been returned. Include this value as the `page` parameter for the
	// subsequent GET request to get the next batch of items.
	OpcNextPage *string `presentIn:"header" name:"opc-next-page"`
}

RequestSummarizedUsagesResponse wrapper for the RequestSummarizedUsages operation

func (RequestSummarizedUsagesResponse) HTTPResponse

func (response RequestSummarizedUsagesResponse) HTTPResponse() *http.Response

HTTPResponse implements the OCIResponse interface

func (RequestSummarizedUsagesResponse) String

func (response RequestSummarizedUsagesResponse) String() string

type SavedCustomTable

type SavedCustomTable struct {

	// the name of custom table.
	DisplayName *string `mandatory:"true" json:"displayName"`

	// row groupBy key list.
	// example:
	//   `["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit",
	//     "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd",
	//     "resourceId", "tenantId", "tenantName"]`
	RowGroupBy []string `mandatory:"false" json:"rowGroupBy"`

	// column groupBy key list.
	// example:
	//   `["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit",
	//     "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd",
	//     "resourceId", "tenantId", "tenantName"]`
	ColumnGroupBy []string `mandatory:"false" json:"columnGroupBy"`

	// GroupBy a specific tagKey. Provide tagNamespace and tagKey in tag object. Only support one tag in the list
	// example:
	//   `[{"namespace":"oracle", "key":"createdBy"]`
	GroupByTag []Tag `mandatory:"false" json:"groupByTag"`

	// The compartment depth level.
	CompartmentDepth *float32 `mandatory:"false" json:"compartmentDepth"`

	// the version of custom table.
	Version *float32 `mandatory:"false" json:"version"`
}

SavedCustomTable The custom table for Cost Analysis UI rendering.

func (SavedCustomTable) String

func (m SavedCustomTable) String() string

type SavedScheduleReport

type SavedScheduleReport struct {

	// the name of notification
	DisplayName *string `mandatory:"true" json:"displayName"`

	// notification type, eg EMAIL.
	NotificationType SavedScheduleReportNotificationTypeEnum `mandatory:"false" json:"notificationType,omitempty"`

	// notification destination.
	NotificationTarget *string `mandatory:"false" json:"notificationTarget"`
}

SavedScheduleReport notification to customer.

func (SavedScheduleReport) String

func (m SavedScheduleReport) String() string

type SavedScheduleReportNotificationTypeEnum

type SavedScheduleReportNotificationTypeEnum string

SavedScheduleReportNotificationTypeEnum Enum with underlying type: string

const (
	SavedScheduleReportNotificationTypeEmail SavedScheduleReportNotificationTypeEnum = "EMAIL"
)

Set of constants representing the allowable values for SavedScheduleReportNotificationTypeEnum

func GetSavedScheduleReportNotificationTypeEnumValues

func GetSavedScheduleReportNotificationTypeEnumValues() []SavedScheduleReportNotificationTypeEnum

GetSavedScheduleReportNotificationTypeEnumValues Enumerates the set of values for SavedScheduleReportNotificationTypeEnum

type ScheduleReport

type ScheduleReport struct {

	// The ocid of schedule report.
	Id *string `mandatory:"true" json:"id"`

	// The query OCID.
	QueryId *string `mandatory:"false" json:"queryId"`

	// The compartment ocid of schedule report.
	CompartmentId *string `mandatory:"false" json:"compartmentId"`

	SavedScheduleReport *SavedScheduleReport `mandatory:"false" json:"savedScheduleReport"`
}

ScheduleReport schedule report.

func (ScheduleReport) String

func (m ScheduleReport) String() string

type ScheduleReportCollection

type ScheduleReportCollection struct {

	// schedule report list.
	Items []ScheduleReportSummary `mandatory:"true" json:"items"`
}

ScheduleReportCollection A schedule report list.

func (ScheduleReportCollection) String

func (m ScheduleReportCollection) String() string

type ScheduleReportSummary

type ScheduleReportSummary struct {

	// The Schedule report OCID.
	Id *string `mandatory:"true" json:"id"`

	SavedScheduleReport *SavedScheduleReport `mandatory:"false" json:"savedScheduleReport"`
}

ScheduleReportSummary Schedule report in list request.

func (ScheduleReportSummary) String

func (m ScheduleReportSummary) String() string

type Tag

type Tag struct {

	// The tag namespace.
	Namespace *string `mandatory:"false" json:"namespace"`

	// The tag key.
	Key *string `mandatory:"false" json:"key"`

	// The tag value.
	Value *string `mandatory:"false" json:"value"`
}

Tag The tag used for filtering.

func (Tag) String

func (m Tag) String() string

type UpdateCustomTableDetails

type UpdateCustomTableDetails struct {
	SavedCustomTable *SavedCustomTable `mandatory:"true" json:"savedCustomTable"`
}

UpdateCustomTableDetails Details for updating custom table.

func (UpdateCustomTableDetails) String

func (m UpdateCustomTableDetails) String() string

type UpdateQueryDetails

type UpdateQueryDetails struct {
	QueryDefinition *QueryDefinition `mandatory:"true" json:"queryDefinition"`
}

UpdateQueryDetails Details for the query to update reportQuery, costAnalysisUI and displayName.

func (UpdateQueryDetails) String

func (m UpdateQueryDetails) String() string

type UpdateQueryRequest

type UpdateQueryRequest struct {

	// The information to be updated.
	UpdateQueryDetails `contributesTo:"body"`

	// The query unique OCID.
	QueryId *string `mandatory:"true" contributesTo:"path" name:"queryId"`

	// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
	// particular request, please provide the request ID.
	OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`

	// For optimistic concurrency control. In the PUT or DELETE call
	// for a resource, set the `if-match` parameter to the value of the
	// etag from a previous GET or POST response for that resource.
	// The resource will be updated or deleted, only if the etag you
	// provide matches the resource's current etag value.
	IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"`

	// Metadata about the request. This information will not be transmitted to the service, but
	// represents information that the SDK will consume to drive retry behavior.
	RequestMetadata common.RequestMetadata
}

UpdateQueryRequest wrapper for the UpdateQuery operation

See also

Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/usageapi/UpdateQuery.go.html to see an example of how to use UpdateQueryRequest.

func (UpdateQueryRequest) HTTPRequest

func (request UpdateQueryRequest) HTTPRequest(method, path string) (http.Request, error)

HTTPRequest implements the OCIRequest interface

func (UpdateQueryRequest) RetryPolicy

func (request UpdateQueryRequest) RetryPolicy() *common.RetryPolicy

RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.

func (UpdateQueryRequest) String

func (request UpdateQueryRequest) String() string

type UpdateQueryResponse

type UpdateQueryResponse struct {

	// The underlying http response
	RawResponse *http.Response

	// The Query instance
	Query `presentIn:"body"`

	// Unique Oracle-assigned identifier for the request. If you need to contact
	// Oracle about a particular request, please provide the request ID.
	OpcRequestId *string `presentIn:"header" name:"opc-request-id"`

	// For optimistic concurrency control. See `if-match`.
	Etag *string `presentIn:"header" name:"etag"`
}

UpdateQueryResponse wrapper for the UpdateQuery operation

func (UpdateQueryResponse) HTTPResponse

func (response UpdateQueryResponse) HTTPResponse() *http.Response

HTTPResponse implements the OCIResponse interface

func (UpdateQueryResponse) String

func (response UpdateQueryResponse) String() string

type UpdateScheduleReportDetails

type UpdateScheduleReportDetails struct {
	SavedScheduleReport *SavedScheduleReport `mandatory:"true" json:"savedScheduleReport"`
}

UpdateScheduleReportDetails Details for updating schedule report.

func (UpdateScheduleReportDetails) String

type UsageAggregation

type UsageAggregation struct {

	// A list of usage items.
	Items []UsageSummary `mandatory:"true" json:"items"`

	// Aggregate the result by.
	GroupBy []string `mandatory:"false" json:"groupBy"`
}

UsageAggregation The account (tenant) usage.

func (UsageAggregation) String

func (m UsageAggregation) String() string

type UsageSummary

type UsageSummary struct {

	// The usage start time.
	TimeUsageStarted *common.SDKTime `mandatory:"true" json:"timeUsageStarted"`

	// The usage end time.
	TimeUsageEnded *common.SDKTime `mandatory:"true" json:"timeUsageEnded"`

	// The tenancy OCID.
	TenantId *string `mandatory:"false" json:"tenantId"`

	// The tenancy name.
	TenantName *string `mandatory:"false" json:"tenantName"`

	// The compartment OCID.
	CompartmentId *string `mandatory:"false" json:"compartmentId"`

	// The compartment path, starting from root.
	CompartmentPath *string `mandatory:"false" json:"compartmentPath"`

	// The compartment name.
	CompartmentName *string `mandatory:"false" json:"compartmentName"`

	// The service name that is incurring the cost.
	Service *string `mandatory:"false" json:"service"`

	// The resource name that is incurring the cost.
	ResourceName *string `mandatory:"false" json:"resourceName"`

	// The resource OCID that is incurring the cost.
	ResourceId *string `mandatory:"false" json:"resourceId"`

	// The region of the usage.
	Region *string `mandatory:"false" json:"region"`

	// The availability domain of the usage.
	Ad *string `mandatory:"false" json:"ad"`

	// The resource size being metered.
	Weight *float32 `mandatory:"false" json:"weight"`

	// The resource shape.
	Shape *string `mandatory:"false" json:"shape"`

	// The SKU part number.
	SkuPartNumber *string `mandatory:"false" json:"skuPartNumber"`

	// The SKU friendly name.
	SkuName *string `mandatory:"false" json:"skuName"`

	// The usage unit.
	Unit *string `mandatory:"false" json:"unit"`

	// The discretionary discount applied to the SKU.
	Discount *float32 `mandatory:"false" json:"discount"`

	// The SKU list rate (not discount).
	ListRate *float32 `mandatory:"false" json:"listRate"`

	// Platform for the cost.
	Platform *string `mandatory:"false" json:"platform"`

	// The computed cost.
	ComputedAmount *float32 `mandatory:"false" json:"computedAmount"`

	// The usage number.
	ComputedQuantity *float32 `mandatory:"false" json:"computedQuantity"`

	// The SPM OverageFlag.
	OveragesFlag *string `mandatory:"false" json:"overagesFlag"`

	// The price per unit.
	UnitPrice *float32 `mandatory:"false" json:"unitPrice"`

	// The price currency.
	Currency *string `mandatory:"false" json:"currency"`

	// The subscription ID.
	SubscriptionId *string `mandatory:"false" json:"subscriptionId"`

	// The overage usage.
	Overage *string `mandatory:"false" json:"overage"`

	// is forecasted data
	IsForecast *bool `mandatory:"false" json:"isForecast"`

	// For grouping, a tag definition. For filtering, a definition and key.
	Tags []Tag `mandatory:"false" json:"tags"`
}

UsageSummary The usage store result.

func (UsageSummary) String

func (m UsageSummary) String() string

type UsageapiClient

type UsageapiClient struct {
	common.BaseClient
	// contains filtered or unexported fields
}

UsageapiClient a client for Usageapi

func NewUsageapiClientWithConfigurationProvider

func NewUsageapiClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client UsageapiClient, err error)

NewUsageapiClientWithConfigurationProvider Creates a new default Usageapi client with the given configuration provider. the configuration provider will be used for the default signer as well as reading the region

func NewUsageapiClientWithOboToken

func NewUsageapiClientWithOboToken(configProvider common.ConfigurationProvider, oboToken string) (client UsageapiClient, err error)

NewUsageapiClientWithOboToken Creates a new default Usageapi client with the given configuration provider. The obotoken will be added to default headers and signed; the configuration provider will be used for the signer

as well as reading the region

func (*UsageapiClient) ConfigurationProvider

func (client *UsageapiClient) ConfigurationProvider() *common.ConfigurationProvider

ConfigurationProvider the ConfigurationProvider used in this client, or null if none set

func (UsageapiClient) CreateQuery

func (client UsageapiClient) CreateQuery(ctx context.Context, request CreateQueryRequest) (response CreateQueryResponse, err error)

CreateQuery Returns the created query.

See also

Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/usageapi/CreateQuery.go.html to see an example of how to use CreateQuery API.

func (UsageapiClient) DeleteQuery

func (client UsageapiClient) DeleteQuery(ctx context.Context, request DeleteQueryRequest) (response DeleteQueryResponse, err error)

DeleteQuery Delete a saved query by the OCID.

See also

Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/usageapi/DeleteQuery.go.html to see an example of how to use DeleteQuery API.

func (UsageapiClient) GetQuery

func (client UsageapiClient) GetQuery(ctx context.Context, request GetQueryRequest) (response GetQueryResponse, err error)

GetQuery Returns the saved query.

See also

Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/usageapi/GetQuery.go.html to see an example of how to use GetQuery API.

func (UsageapiClient) ListQueries

func (client UsageapiClient) ListQueries(ctx context.Context, request ListQueriesRequest) (response ListQueriesResponse, err error)

ListQueries Returns the saved query list.

See also

Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/usageapi/ListQueries.go.html to see an example of how to use ListQueries API.

func (UsageapiClient) RequestSummarizedConfigurations

func (client UsageapiClient) RequestSummarizedConfigurations(ctx context.Context, request RequestSummarizedConfigurationsRequest) (response RequestSummarizedConfigurationsResponse, err error)

RequestSummarizedConfigurations Returns the configurations list for the UI drop-down list.

See also

Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/usageapi/RequestSummarizedConfigurations.go.html to see an example of how to use RequestSummarizedConfigurations API.

func (UsageapiClient) RequestSummarizedUsages

func (client UsageapiClient) RequestSummarizedUsages(ctx context.Context, request RequestSummarizedUsagesRequest) (response RequestSummarizedUsagesResponse, err error)

RequestSummarizedUsages Returns usage for the given account.

See also

Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/usageapi/RequestSummarizedUsages.go.html to see an example of how to use RequestSummarizedUsages API.

func (*UsageapiClient) SetRegion

func (client *UsageapiClient) SetRegion(region string)

SetRegion overrides the region of this client.

func (UsageapiClient) UpdateQuery

func (client UsageapiClient) UpdateQuery(ctx context.Context, request UpdateQueryRequest) (response UpdateQueryResponse, err error)

UpdateQuery Update a saved query by the OCID.

See also

Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/usageapi/UpdateQuery.go.html to see an example of how to use UpdateQuery API.

Jump to

Keyboard shortcuts

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