Class UsageReports
- java.lang.Object
-
- com.ibm.cloud.sdk.core.service.BaseService
-
- com.ibm.cloud.platform_services.usage_reports.v4.UsageReports
-
public class UsageReports extends com.ibm.cloud.sdk.core.service.BaseServiceUsage reports for IBM Cloud accounts. API Version: 4.0.6
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_SERVICE_NAMEDefault service name used when configuring the `UsageReports` client.static java.lang.StringDEFAULT_SERVICE_URLDefault service endpoint URL.
-
Constructor Summary
Constructors Constructor Description UsageReports(java.lang.String serviceName, com.ibm.cloud.sdk.core.security.Authenticator authenticator)Constructs an instance of the `UsageReports` client.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.ibm.cloud.sdk.core.http.ServiceCall<SnapshotConfig>createReportsSnapshotConfig(CreateReportsSnapshotConfigOptions createReportsSnapshotConfigOptions)Setup the snapshot configuration.com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void>deleteReportsSnapshotConfig(DeleteReportsSnapshotConfigOptions deleteReportsSnapshotConfigOptions)Delete the snapshot configuration.com.ibm.cloud.sdk.core.http.ServiceCall<AccountSummary>getAccountSummary(GetAccountSummaryOptions getAccountSummaryOptions)Get account summary.com.ibm.cloud.sdk.core.http.ServiceCall<AccountUsage>getAccountUsage(GetAccountUsageOptions getAccountUsageOptions)Get account usage.com.ibm.cloud.sdk.core.http.ServiceCall<OrgUsage>getOrgUsage(GetOrgUsageOptions getOrgUsageOptions)Get organization usage.com.ibm.cloud.sdk.core.http.ServiceCall<SnapshotList>getReportsSnapshot(GetReportsSnapshotOptions getReportsSnapshotOptions)Fetch the current or past snapshots.com.ibm.cloud.sdk.core.http.ServiceCall<SnapshotConfig>getReportsSnapshotConfig(GetReportsSnapshotConfigOptions getReportsSnapshotConfigOptions)Fetch the snapshot configuration.com.ibm.cloud.sdk.core.http.ServiceCall<ResourceGroupUsage>getResourceGroupUsage(GetResourceGroupUsageOptions getResourceGroupUsageOptions)Get resource group usage.com.ibm.cloud.sdk.core.http.ServiceCall<InstancesUsage>getResourceUsageAccount(GetResourceUsageAccountOptions getResourceUsageAccountOptions)Get resource instance usage in an account.com.ibm.cloud.sdk.core.http.ServiceCall<InstancesUsage>getResourceUsageOrg(GetResourceUsageOrgOptions getResourceUsageOrgOptions)Get resource instance usage in an organization.com.ibm.cloud.sdk.core.http.ServiceCall<InstancesUsage>getResourceUsageResourceGroup(GetResourceUsageResourceGroupOptions getResourceUsageResourceGroupOptions)Get resource instance usage in a resource group.static UsageReportsnewInstance()Class method which constructs an instance of the `UsageReports` client.static UsageReportsnewInstance(java.lang.String serviceName)Class method which constructs an instance of the `UsageReports` client.com.ibm.cloud.sdk.core.http.ServiceCall<SnapshotConfig>updateReportsSnapshotConfig(UpdateReportsSnapshotConfigOptions updateReportsSnapshotConfigOptions)Update the snapshot configuration.com.ibm.cloud.sdk.core.http.ServiceCall<SnapshotConfigValidateResponse>validateReportsSnapshotConfig(ValidateReportsSnapshotConfigOptions validateReportsSnapshotConfigOptions)Verify billing to COS authorization.-
Methods inherited from class com.ibm.cloud.sdk.core.service.BaseService
configureClient, configureService, constructServiceUrl, constructServiceURL, disableRetries, enableGzipCompression, enableRetries, getAuthenticator, getClient, getDefaultHeaders, getEndPoint, getName, getServiceUrl, isJsonMimeType, isJsonPatchMimeType, setClient, setDefaultHeaders, setEndPoint, setServiceUrl, toString
-
-
-
-
Field Detail
-
DEFAULT_SERVICE_NAME
public static final java.lang.String DEFAULT_SERVICE_NAME
Default service name used when configuring the `UsageReports` client.- See Also:
- Constant Field Values
-
DEFAULT_SERVICE_URL
public static final java.lang.String DEFAULT_SERVICE_URL
Default service endpoint URL.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
UsageReports
public UsageReports(java.lang.String serviceName, com.ibm.cloud.sdk.core.security.Authenticator authenticator)Constructs an instance of the `UsageReports` client. The specified service name and authenticator are used to configure the client instance.- Parameters:
serviceName- the service name to be used when configuring the client instanceauthenticator- theAuthenticatorinstance to be configured for this client
-
-
Method Detail
-
newInstance
public static UsageReports newInstance()
Class method which constructs an instance of the `UsageReports` client. The default service name is used to configure the client instance.- Returns:
- an instance of the `UsageReports` client using external configuration
-
newInstance
public static UsageReports newInstance(java.lang.String serviceName)
Class method which constructs an instance of the `UsageReports` client. The specified service name is used to configure the client instance.- Parameters:
serviceName- the service name to be used when configuring the client instance- Returns:
- an instance of the `UsageReports` client using external configuration
-
getAccountSummary
public com.ibm.cloud.sdk.core.http.ServiceCall<AccountSummary> getAccountSummary(GetAccountSummaryOptions getAccountSummaryOptions)
Get account summary. Returns the summary for the account for a given month. Account billing managers are authorized to access this report.- Parameters:
getAccountSummaryOptions- theGetAccountSummaryOptionscontaining the options for the call- Returns:
- a
ServiceCallwith a result of typeAccountSummary
-
getAccountUsage
public com.ibm.cloud.sdk.core.http.ServiceCall<AccountUsage> getAccountUsage(GetAccountUsageOptions getAccountUsageOptions)
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.- Parameters:
getAccountUsageOptions- theGetAccountUsageOptionscontaining the options for the call- Returns:
- a
ServiceCallwith a result of typeAccountUsage
-
getResourceGroupUsage
public com.ibm.cloud.sdk.core.http.ServiceCall<ResourceGroupUsage> getResourceGroupUsage(GetResourceGroupUsageOptions getResourceGroupUsageOptions)
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.- Parameters:
getResourceGroupUsageOptions- theGetResourceGroupUsageOptionscontaining the options for the call- Returns:
- a
ServiceCallwith a result of typeResourceGroupUsage
-
getResourceUsageAccount
public com.ibm.cloud.sdk.core.http.ServiceCall<InstancesUsage> getResourceUsageAccount(GetResourceUsageAccountOptions getResourceUsageAccountOptions)
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.- Parameters:
getResourceUsageAccountOptions- theGetResourceUsageAccountOptionscontaining the options for the call- Returns:
- a
ServiceCallwith a result of typeInstancesUsage
-
getResourceUsageResourceGroup
public com.ibm.cloud.sdk.core.http.ServiceCall<InstancesUsage> getResourceUsageResourceGroup(GetResourceUsageResourceGroupOptions getResourceUsageResourceGroupOptions)
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.- Parameters:
getResourceUsageResourceGroupOptions- theGetResourceUsageResourceGroupOptionscontaining the options for the call- Returns:
- a
ServiceCallwith a result of typeInstancesUsage
-
getResourceUsageOrg
public com.ibm.cloud.sdk.core.http.ServiceCall<InstancesUsage> getResourceUsageOrg(GetResourceUsageOrgOptions getResourceUsageOrgOptions)
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.- Parameters:
getResourceUsageOrgOptions- theGetResourceUsageOrgOptionscontaining the options for the call- Returns:
- a
ServiceCallwith a result of typeInstancesUsage
-
getOrgUsage
public com.ibm.cloud.sdk.core.http.ServiceCall<OrgUsage> getOrgUsage(GetOrgUsageOptions getOrgUsageOptions)
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.- Parameters:
getOrgUsageOptions- theGetOrgUsageOptionscontaining the options for the call- Returns:
- a
ServiceCallwith a result of typeOrgUsage
-
createReportsSnapshotConfig
public com.ibm.cloud.sdk.core.http.ServiceCall<SnapshotConfig> createReportsSnapshotConfig(CreateReportsSnapshotConfigOptions createReportsSnapshotConfigOptions)
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.- Parameters:
createReportsSnapshotConfigOptions- theCreateReportsSnapshotConfigOptionscontaining the options for the call- Returns:
- a
ServiceCallwith a result of typeSnapshotConfig
-
getReportsSnapshotConfig
public com.ibm.cloud.sdk.core.http.ServiceCall<SnapshotConfig> getReportsSnapshotConfig(GetReportsSnapshotConfigOptions getReportsSnapshotConfigOptions)
Fetch the snapshot configuration. Returns the configuration of snapshot of the billing reports setup by the customer for the given Account Id.- Parameters:
getReportsSnapshotConfigOptions- theGetReportsSnapshotConfigOptionscontaining the options for the call- Returns:
- a
ServiceCallwith a result of typeSnapshotConfig
-
updateReportsSnapshotConfig
public com.ibm.cloud.sdk.core.http.ServiceCall<SnapshotConfig> updateReportsSnapshotConfig(UpdateReportsSnapshotConfigOptions updateReportsSnapshotConfigOptions)
Update the snapshot configuration. Updates the configuration of snapshot of the billing reports setup by the customer for the given Account Id.- Parameters:
updateReportsSnapshotConfigOptions- theUpdateReportsSnapshotConfigOptionscontaining the options for the call- Returns:
- a
ServiceCallwith a result of typeSnapshotConfig
-
deleteReportsSnapshotConfig
public com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void> deleteReportsSnapshotConfig(DeleteReportsSnapshotConfigOptions deleteReportsSnapshotConfigOptions)
Delete the snapshot configuration. Delete the configuration of snapshot of the billing reports setup by the customer for the given Account Id.- Parameters:
deleteReportsSnapshotConfigOptions- theDeleteReportsSnapshotConfigOptionscontaining the options for the call- Returns:
- a
ServiceCallwith a void result
-
validateReportsSnapshotConfig
public com.ibm.cloud.sdk.core.http.ServiceCall<SnapshotConfigValidateResponse> validateReportsSnapshotConfig(ValidateReportsSnapshotConfigOptions validateReportsSnapshotConfigOptions)
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.- Parameters:
validateReportsSnapshotConfigOptions- theValidateReportsSnapshotConfigOptionscontaining the options for the call- Returns:
- a
ServiceCallwith a result of typeSnapshotConfigValidateResponse
-
getReportsSnapshot
public com.ibm.cloud.sdk.core.http.ServiceCall<SnapshotList> getReportsSnapshot(GetReportsSnapshotOptions getReportsSnapshotOptions)
Fetch the current or past snapshots. Returns the billing reports snapshots captured for the given Account Id in the specific time period.- Parameters:
getReportsSnapshotOptions- theGetReportsSnapshotOptionscontaining the options for the call- Returns:
- a
ServiceCallwith a result of typeSnapshotList
-
-