Class UsageMetering


  • public class UsageMetering
    extends com.ibm.cloud.sdk.core.service.BaseService
    IBM Cloud Usage Metering is a platform service that enables service providers to submit metrics collected for resource instances provisioned by IBM Cloud users. IBM and third-party service providers that are delivering an integrated billing service in IBM Cloud are required to submit usage for all active service instances every hour. This is important because inability to report usage can lead to loss of revenue collection for IBM, in turn causing loss of revenue share for the service providers. API Version: 4.0.8
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String DEFAULT_SERVICE_NAME
      Default service name used when configuring the `UsageMetering` client.
      static java.lang.String DEFAULT_SERVICE_URL
      Default service endpoint URL.
      • Fields inherited from class com.ibm.cloud.sdk.core.service.BaseService

        PROPNAME_DISABLE_SSL, PROPNAME_ENABLE_GZIP, PROPNAME_ENABLE_RETRIES, PROPNAME_MAX_RETRIES, PROPNAME_RETRY_INTERVAL, PROPNAME_URL
    • Constructor Summary

      Constructors 
      Constructor Description
      UsageMetering​(java.lang.String serviceName, com.ibm.cloud.sdk.core.security.Authenticator authenticator)
      Constructs an instance of the `UsageMetering` client.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static UsageMetering newInstance()
      Class method which constructs an instance of the `UsageMetering` client.
      static UsageMetering newInstance​(java.lang.String serviceName)
      Class method which constructs an instance of the `UsageMetering` client.
      com.ibm.cloud.sdk.core.http.ServiceCall<ResponseAccepted> reportResourceUsage​(ReportResourceUsageOptions reportResourceUsageOptions)
      Report Resource Controller resource usage.
      • 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
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • DEFAULT_SERVICE_NAME

        public static final java.lang.String DEFAULT_SERVICE_NAME
        Default service name used when configuring the `UsageMetering` 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

      • UsageMetering

        public UsageMetering​(java.lang.String serviceName,
                             com.ibm.cloud.sdk.core.security.Authenticator authenticator)
        Constructs an instance of the `UsageMetering` 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 instance
        authenticator - the Authenticator instance to be configured for this client
    • Method Detail

      • newInstance

        public static UsageMetering newInstance()
        Class method which constructs an instance of the `UsageMetering` client. The default service name is used to configure the client instance.
        Returns:
        an instance of the `UsageMetering` client using external configuration
      • newInstance

        public static UsageMetering newInstance​(java.lang.String serviceName)
        Class method which constructs an instance of the `UsageMetering` 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 `UsageMetering` client using external configuration
      • reportResourceUsage

        public com.ibm.cloud.sdk.core.http.ServiceCall<ResponseAccepted> reportResourceUsage​(ReportResourceUsageOptions reportResourceUsageOptions)
        Report Resource Controller resource usage. The Resource Controller is responsible for controlling and tracking the lifecycle of resources in an IBM Cloud account. Resources can mean anything from an instance of a service, or entities associated with an account. Report usage for these resource instances that were provisioned through the resource controller.
        Parameters:
        reportResourceUsageOptions - the ReportResourceUsageOptions containing the options for the call
        Returns:
        a ServiceCall with a result of type ResponseAccepted