Class Metric.Builder

  • Enclosing class:
    Metric

    public static class Metric.Builder
    extends Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • name

        public Metric.Builder name​(String name)
        The name of the metric.

        Example: CpuUtilization

        Parameters:
        name - the value to set
        Returns:
        this builder
      • namespace

        public Metric.Builder namespace​(String namespace)
        The source service or application emitting the metric.

        Example: oci_computeagent

        Parameters:
        namespace - the value to set
        Returns:
        this builder
      • resourceGroup

        public Metric.Builder resourceGroup​(String resourceGroup)
        Resource group provided with the posted metric.

        A resource group is a custom string that you can match when retrieving custom metrics. Only one resource group can be applied per metric. A valid resourceGroup value starts with an alphabetical character and includes only alphanumeric characters, periods (.), underscores (_), hyphens (-), and dollar signs ($).

        Example: frontend-fleet

        Parameters:
        resourceGroup - the value to set
        Returns:
        this builder
      • compartmentId

        public Metric.Builder compartmentId​(String compartmentId)
        The OCID of the compartment containing the resources monitored by the metric.
        Parameters:
        compartmentId - the value to set
        Returns:
        this builder
      • dimensions

        public Metric.Builder dimensions​(Map<String,​String> dimensions)
        Qualifiers provided in a metric definition.

        Available dimensions vary by metric namespace. Each dimension takes the form of a key-value pair.

        Example: {"resourceId": "ocid1.instance.region1.phx.exampleuniqueID"}

        Parameters:
        dimensions - the value to set
        Returns:
        this builder
      • build

        public Metric build()