Package com.oracle.bmc.monitoring.model
Class Metric.Builder
- java.lang.Object
-
- com.oracle.bmc.monitoring.model.Metric.Builder
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Metric
build()
Metric.Builder
compartmentId(String compartmentId)
The OCID of the compartment containing the resources monitored by the metric.Metric.Builder
copy(Metric model)
Metric.Builder
dimensions(Map<String,String> dimensions)
Qualifiers provided in a metric definition.Metric.Builder
name(String name)
The name of the metric.Metric.Builder
namespace(String namespace)
The source service or application emitting the metric.Metric.Builder
resourceGroup(String resourceGroup)
Resource group provided with the posted metric.
-
-
-
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()
-
copy
public Metric.Builder copy(Metric model)
-
-