1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Monitoring
  5. getMetrics
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

oci.Monitoring.getMetrics

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

This data source provides the list of Metrics in Oracle Cloud Infrastructure Monitoring service.

Returns metric definitions that match the criteria specified in the request. Compartment OCID required. For more information, see Listing Metric Definitions. For information about metrics, see Metrics Overview. For important limits information, see Limits on Monitoring.

Transactions Per Second (TPS) per-tenancy limit for this operation: 10.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testMetrics = oci.Monitoring.getMetrics({
    compartmentId: compartmentId,
    compartmentIdInSubtree: metricCompartmentIdInSubtree,
    dimensionFilters: metricDimensionFilters,
    groupBies: metricGroupBy,
    name: metricName,
    namespace: metricNamespace,
    resourceGroup: metricResourceGroup,
});
Copy
import pulumi
import pulumi_oci as oci

test_metrics = oci.Monitoring.get_metrics(compartment_id=compartment_id,
    compartment_id_in_subtree=metric_compartment_id_in_subtree,
    dimension_filters=metric_dimension_filters,
    group_bies=metric_group_by,
    name=metric_name,
    namespace=metric_namespace,
    resource_group=metric_resource_group)
Copy
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/monitoring"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := monitoring.GetMetrics(ctx, &monitoring.GetMetricsArgs{
			CompartmentId:          compartmentId,
			CompartmentIdInSubtree: pulumi.BoolRef(metricCompartmentIdInSubtree),
			DimensionFilters:       metricDimensionFilters,
			GroupBies:              metricGroupBy,
			Name:                   pulumi.StringRef(metricName),
			Namespace:              pulumi.StringRef(metricNamespace),
			ResourceGroup:          pulumi.StringRef(metricResourceGroup),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testMetrics = Oci.Monitoring.GetMetrics.Invoke(new()
    {
        CompartmentId = compartmentId,
        CompartmentIdInSubtree = metricCompartmentIdInSubtree,
        DimensionFilters = metricDimensionFilters,
        GroupBies = metricGroupBy,
        Name = metricName,
        Namespace = metricNamespace,
        ResourceGroup = metricResourceGroup,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Monitoring.MonitoringFunctions;
import com.pulumi.oci.Monitoring.inputs.GetMetricsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var testMetrics = MonitoringFunctions.getMetrics(GetMetricsArgs.builder()
            .compartmentId(compartmentId)
            .compartmentIdInSubtree(metricCompartmentIdInSubtree)
            .dimensionFilters(metricDimensionFilters)
            .groupBies(metricGroupBy)
            .name(metricName)
            .namespace(metricNamespace)
            .resourceGroup(metricResourceGroup)
            .build());

    }
}
Copy
variables:
  testMetrics:
    fn::invoke:
      function: oci:Monitoring:getMetrics
      arguments:
        compartmentId: ${compartmentId}
        compartmentIdInSubtree: ${metricCompartmentIdInSubtree}
        dimensionFilters: ${metricDimensionFilters}
        groupBies: ${metricGroupBy}
        name: ${metricName}
        namespace: ${metricNamespace}
        resourceGroup: ${metricResourceGroup}
Copy

Using getMetrics

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getMetrics(args: GetMetricsArgs, opts?: InvokeOptions): Promise<GetMetricsResult>
function getMetricsOutput(args: GetMetricsOutputArgs, opts?: InvokeOptions): Output<GetMetricsResult>
Copy
def get_metrics(compartment_id: Optional[str] = None,
                compartment_id_in_subtree: Optional[bool] = None,
                dimension_filters: Optional[Mapping[str, str]] = None,
                filters: Optional[Sequence[_monitoring.GetMetricsFilter]] = None,
                group_bies: Optional[Sequence[str]] = None,
                name: Optional[str] = None,
                namespace: Optional[str] = None,
                resource_group: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetMetricsResult
def get_metrics_output(compartment_id: Optional[pulumi.Input[str]] = None,
                compartment_id_in_subtree: Optional[pulumi.Input[bool]] = None,
                dimension_filters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                filters: Optional[pulumi.Input[Sequence[pulumi.Input[_monitoring.GetMetricsFilterArgs]]]] = None,
                group_bies: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                name: Optional[pulumi.Input[str]] = None,
                namespace: Optional[pulumi.Input[str]] = None,
                resource_group: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetMetricsResult]
Copy
func GetMetrics(ctx *Context, args *GetMetricsArgs, opts ...InvokeOption) (*GetMetricsResult, error)
func GetMetricsOutput(ctx *Context, args *GetMetricsOutputArgs, opts ...InvokeOption) GetMetricsResultOutput
Copy

> Note: This function is named GetMetrics in the Go SDK.

public static class GetMetrics 
{
    public static Task<GetMetricsResult> InvokeAsync(GetMetricsArgs args, InvokeOptions? opts = null)
    public static Output<GetMetricsResult> Invoke(GetMetricsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetMetricsResult> getMetrics(GetMetricsArgs args, InvokeOptions options)
public static Output<GetMetricsResult> getMetrics(GetMetricsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:Monitoring/getMetrics:getMetrics
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

CompartmentId This property is required. string
The OCID of the compartment containing the resources monitored by the metric that you are searching for. Use tenancyId to search in the root compartment. Example: ocid1.compartment.oc1..exampleuniqueID
CompartmentIdInSubtree bool
When true, returns resources from all compartments and subcompartments. The parameter can only be set to true when compartmentId is the tenancy OCID (the tenancy is the root compartment). A true value requires the user to have tenancy-level permissions. If this requirement is not met, then the call is rejected. When false, returns resources from only the compartment specified in compartmentId. Default is false.
DimensionFilters Dictionary<string, string>
Qualifiers that you want to use when searching for metric definitions. Available dimensions vary by metric namespace. Each dimension takes the form of a key-value pair. Example: {"resourceId": "instance.region1.phx.exampleuniqueID"}
Filters Changes to this property will trigger replacement. List<GetMetricsFilter>
GroupBies List<string>

Group metrics by these fields in the response. For example, to list all metric namespaces available in a compartment, groupBy the "namespace" field. Supported fields: namespace, name, resourceGroup. If groupBy is used, then dimensionFilters is ignored.

Example - group by namespace: [ "namespace" ]

Name string
The metric name to use when searching for metric definitions. Example: CpuUtilization
Namespace string
The source service or application to use when searching for metric definitions. Example: oci_computeagent
ResourceGroup string
Resource group that you want to match. A null value returns only metric data that has no resource groups. The specified resource group must exist in the definition of the posted metric. 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
CompartmentId This property is required. string
The OCID of the compartment containing the resources monitored by the metric that you are searching for. Use tenancyId to search in the root compartment. Example: ocid1.compartment.oc1..exampleuniqueID
CompartmentIdInSubtree bool
When true, returns resources from all compartments and subcompartments. The parameter can only be set to true when compartmentId is the tenancy OCID (the tenancy is the root compartment). A true value requires the user to have tenancy-level permissions. If this requirement is not met, then the call is rejected. When false, returns resources from only the compartment specified in compartmentId. Default is false.
DimensionFilters map[string]string
Qualifiers that you want to use when searching for metric definitions. Available dimensions vary by metric namespace. Each dimension takes the form of a key-value pair. Example: {"resourceId": "instance.region1.phx.exampleuniqueID"}
Filters Changes to this property will trigger replacement. []GetMetricsFilter
GroupBies []string

Group metrics by these fields in the response. For example, to list all metric namespaces available in a compartment, groupBy the "namespace" field. Supported fields: namespace, name, resourceGroup. If groupBy is used, then dimensionFilters is ignored.

Example - group by namespace: [ "namespace" ]

Name string
The metric name to use when searching for metric definitions. Example: CpuUtilization
Namespace string
The source service or application to use when searching for metric definitions. Example: oci_computeagent
ResourceGroup string
Resource group that you want to match. A null value returns only metric data that has no resource groups. The specified resource group must exist in the definition of the posted metric. 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
compartmentId This property is required. String
The OCID of the compartment containing the resources monitored by the metric that you are searching for. Use tenancyId to search in the root compartment. Example: ocid1.compartment.oc1..exampleuniqueID
compartmentIdInSubtree Boolean
When true, returns resources from all compartments and subcompartments. The parameter can only be set to true when compartmentId is the tenancy OCID (the tenancy is the root compartment). A true value requires the user to have tenancy-level permissions. If this requirement is not met, then the call is rejected. When false, returns resources from only the compartment specified in compartmentId. Default is false.
dimensionFilters Map<String,String>
Qualifiers that you want to use when searching for metric definitions. Available dimensions vary by metric namespace. Each dimension takes the form of a key-value pair. Example: {"resourceId": "instance.region1.phx.exampleuniqueID"}
filters Changes to this property will trigger replacement. List<GetMetricsFilter>
groupBies List<String>

Group metrics by these fields in the response. For example, to list all metric namespaces available in a compartment, groupBy the "namespace" field. Supported fields: namespace, name, resourceGroup. If groupBy is used, then dimensionFilters is ignored.

Example - group by namespace: [ "namespace" ]

name String
The metric name to use when searching for metric definitions. Example: CpuUtilization
namespace String
The source service or application to use when searching for metric definitions. Example: oci_computeagent
resourceGroup String
Resource group that you want to match. A null value returns only metric data that has no resource groups. The specified resource group must exist in the definition of the posted metric. 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
compartmentId This property is required. string
The OCID of the compartment containing the resources monitored by the metric that you are searching for. Use tenancyId to search in the root compartment. Example: ocid1.compartment.oc1..exampleuniqueID
compartmentIdInSubtree boolean
When true, returns resources from all compartments and subcompartments. The parameter can only be set to true when compartmentId is the tenancy OCID (the tenancy is the root compartment). A true value requires the user to have tenancy-level permissions. If this requirement is not met, then the call is rejected. When false, returns resources from only the compartment specified in compartmentId. Default is false.
dimensionFilters {[key: string]: string}
Qualifiers that you want to use when searching for metric definitions. Available dimensions vary by metric namespace. Each dimension takes the form of a key-value pair. Example: {"resourceId": "instance.region1.phx.exampleuniqueID"}
filters Changes to this property will trigger replacement. GetMetricsFilter[]
groupBies string[]

Group metrics by these fields in the response. For example, to list all metric namespaces available in a compartment, groupBy the "namespace" field. Supported fields: namespace, name, resourceGroup. If groupBy is used, then dimensionFilters is ignored.

Example - group by namespace: [ "namespace" ]

name string
The metric name to use when searching for metric definitions. Example: CpuUtilization
namespace string
The source service or application to use when searching for metric definitions. Example: oci_computeagent
resourceGroup string
Resource group that you want to match. A null value returns only metric data that has no resource groups. The specified resource group must exist in the definition of the posted metric. 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
compartment_id This property is required. str
The OCID of the compartment containing the resources monitored by the metric that you are searching for. Use tenancyId to search in the root compartment. Example: ocid1.compartment.oc1..exampleuniqueID
compartment_id_in_subtree bool
When true, returns resources from all compartments and subcompartments. The parameter can only be set to true when compartmentId is the tenancy OCID (the tenancy is the root compartment). A true value requires the user to have tenancy-level permissions. If this requirement is not met, then the call is rejected. When false, returns resources from only the compartment specified in compartmentId. Default is false.
dimension_filters Mapping[str, str]
Qualifiers that you want to use when searching for metric definitions. Available dimensions vary by metric namespace. Each dimension takes the form of a key-value pair. Example: {"resourceId": "instance.region1.phx.exampleuniqueID"}
filters Changes to this property will trigger replacement. Sequence[monitoring.GetMetricsFilter]
group_bies Sequence[str]

Group metrics by these fields in the response. For example, to list all metric namespaces available in a compartment, groupBy the "namespace" field. Supported fields: namespace, name, resourceGroup. If groupBy is used, then dimensionFilters is ignored.

Example - group by namespace: [ "namespace" ]

name str
The metric name to use when searching for metric definitions. Example: CpuUtilization
namespace str
The source service or application to use when searching for metric definitions. Example: oci_computeagent
resource_group str
Resource group that you want to match. A null value returns only metric data that has no resource groups. The specified resource group must exist in the definition of the posted metric. 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
compartmentId This property is required. String
The OCID of the compartment containing the resources monitored by the metric that you are searching for. Use tenancyId to search in the root compartment. Example: ocid1.compartment.oc1..exampleuniqueID
compartmentIdInSubtree Boolean
When true, returns resources from all compartments and subcompartments. The parameter can only be set to true when compartmentId is the tenancy OCID (the tenancy is the root compartment). A true value requires the user to have tenancy-level permissions. If this requirement is not met, then the call is rejected. When false, returns resources from only the compartment specified in compartmentId. Default is false.
dimensionFilters Map<String>
Qualifiers that you want to use when searching for metric definitions. Available dimensions vary by metric namespace. Each dimension takes the form of a key-value pair. Example: {"resourceId": "instance.region1.phx.exampleuniqueID"}
filters Changes to this property will trigger replacement. List<Property Map>
groupBies List<String>

Group metrics by these fields in the response. For example, to list all metric namespaces available in a compartment, groupBy the "namespace" field. Supported fields: namespace, name, resourceGroup. If groupBy is used, then dimensionFilters is ignored.

Example - group by namespace: [ "namespace" ]

name String
The metric name to use when searching for metric definitions. Example: CpuUtilization
namespace String
The source service or application to use when searching for metric definitions. Example: oci_computeagent
resourceGroup String
Resource group that you want to match. A null value returns only metric data that has no resource groups. The specified resource group must exist in the definition of the posted metric. 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

getMetrics Result

The following output properties are available:

CompartmentId string
The OCID of the compartment containing the resources monitored by the metric.
Id string
The provider-assigned unique ID for this managed resource.
Metrics List<GetMetricsMetric>
The list of metrics.
CompartmentIdInSubtree bool
DimensionFilters Dictionary<string, string>
Filters List<GetMetricsFilter>
GroupBies List<string>
Name string
The name of the metric. Example: CpuUtilization
Namespace string
The source service or application emitting the metric. Example: oci_computeagent
ResourceGroup string
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
CompartmentId string
The OCID of the compartment containing the resources monitored by the metric.
Id string
The provider-assigned unique ID for this managed resource.
Metrics []GetMetricsMetric
The list of metrics.
CompartmentIdInSubtree bool
DimensionFilters map[string]string
Filters []GetMetricsFilter
GroupBies []string
Name string
The name of the metric. Example: CpuUtilization
Namespace string
The source service or application emitting the metric. Example: oci_computeagent
ResourceGroup string
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
compartmentId String
The OCID of the compartment containing the resources monitored by the metric.
id String
The provider-assigned unique ID for this managed resource.
metrics List<GetMetricsMetric>
The list of metrics.
compartmentIdInSubtree Boolean
dimensionFilters Map<String,String>
filters List<GetMetricsFilter>
groupBies List<String>
name String
The name of the metric. Example: CpuUtilization
namespace String
The source service or application emitting the metric. Example: oci_computeagent
resourceGroup String
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
compartmentId string
The OCID of the compartment containing the resources monitored by the metric.
id string
The provider-assigned unique ID for this managed resource.
metrics GetMetricsMetric[]
The list of metrics.
compartmentIdInSubtree boolean
dimensionFilters {[key: string]: string}
filters GetMetricsFilter[]
groupBies string[]
name string
The name of the metric. Example: CpuUtilization
namespace string
The source service or application emitting the metric. Example: oci_computeagent
resourceGroup string
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
compartment_id str
The OCID of the compartment containing the resources monitored by the metric.
id str
The provider-assigned unique ID for this managed resource.
metrics Sequence[monitoring.GetMetricsMetric]
The list of metrics.
compartment_id_in_subtree bool
dimension_filters Mapping[str, str]
filters Sequence[monitoring.GetMetricsFilter]
group_bies Sequence[str]
name str
The name of the metric. Example: CpuUtilization
namespace str
The source service or application emitting the metric. Example: oci_computeagent
resource_group str
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
compartmentId String
The OCID of the compartment containing the resources monitored by the metric.
id String
The provider-assigned unique ID for this managed resource.
metrics List<Property Map>
The list of metrics.
compartmentIdInSubtree Boolean
dimensionFilters Map<String>
filters List<Property Map>
groupBies List<String>
name String
The name of the metric. Example: CpuUtilization
namespace String
The source service or application emitting the metric. Example: oci_computeagent
resourceGroup String
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

Supporting Types

GetMetricsFilter

Name This property is required. string
The metric name to use when searching for metric definitions. Example: CpuUtilization
Values This property is required. List<string>
Regex bool
Name This property is required. string
The metric name to use when searching for metric definitions. Example: CpuUtilization
Values This property is required. []string
Regex bool
name This property is required. String
The metric name to use when searching for metric definitions. Example: CpuUtilization
values This property is required. List<String>
regex Boolean
name This property is required. string
The metric name to use when searching for metric definitions. Example: CpuUtilization
values This property is required. string[]
regex boolean
name This property is required. str
The metric name to use when searching for metric definitions. Example: CpuUtilization
values This property is required. Sequence[str]
regex bool
name This property is required. String
The metric name to use when searching for metric definitions. Example: CpuUtilization
values This property is required. List<String>
regex Boolean

GetMetricsMetric

CompartmentId This property is required. string
The OCID of the compartment containing the resources monitored by the metric that you are searching for. Use tenancyId to search in the root compartment. Example: ocid1.compartment.oc1..exampleuniqueID
CompartmentIdInSubtree This property is required. bool
When true, returns resources from all compartments and subcompartments. The parameter can only be set to true when compartmentId is the tenancy OCID (the tenancy is the root compartment). A true value requires the user to have tenancy-level permissions. If this requirement is not met, then the call is rejected. When false, returns resources from only the compartment specified in compartmentId. Default is false.
DimensionFilters This property is required. Dictionary<string, string>
Qualifiers that you want to use when searching for metric definitions. Available dimensions vary by metric namespace. Each dimension takes the form of a key-value pair. Example: {"resourceId": "instance.region1.phx.exampleuniqueID"}
Dimensions This property is required. Dictionary<string, string>
Qualifiers provided in a metric definition. Available dimensions vary by metric namespace. Each dimension takes the form of a key-value pair. Example: {"resourceId": "instance.region1.phx.exampleuniqueID"}
GroupBies This property is required. List<string>

Group metrics by these fields in the response. For example, to list all metric namespaces available in a compartment, groupBy the "namespace" field. Supported fields: namespace, name, resourceGroup. If groupBy is used, then dimensionFilters is ignored.

Example - group by namespace: [ "namespace" ]

Name This property is required. string
The metric name to use when searching for metric definitions. Example: CpuUtilization
Namespace This property is required. string
The source service or application to use when searching for metric definitions. Example: oci_computeagent
ResourceGroup This property is required. string
Resource group that you want to match. A null value returns only metric data that has no resource groups. The specified resource group must exist in the definition of the posted metric. 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
CompartmentId This property is required. string
The OCID of the compartment containing the resources monitored by the metric that you are searching for. Use tenancyId to search in the root compartment. Example: ocid1.compartment.oc1..exampleuniqueID
CompartmentIdInSubtree This property is required. bool
When true, returns resources from all compartments and subcompartments. The parameter can only be set to true when compartmentId is the tenancy OCID (the tenancy is the root compartment). A true value requires the user to have tenancy-level permissions. If this requirement is not met, then the call is rejected. When false, returns resources from only the compartment specified in compartmentId. Default is false.
DimensionFilters This property is required. map[string]string
Qualifiers that you want to use when searching for metric definitions. Available dimensions vary by metric namespace. Each dimension takes the form of a key-value pair. Example: {"resourceId": "instance.region1.phx.exampleuniqueID"}
Dimensions This property is required. map[string]string
Qualifiers provided in a metric definition. Available dimensions vary by metric namespace. Each dimension takes the form of a key-value pair. Example: {"resourceId": "instance.region1.phx.exampleuniqueID"}
GroupBies This property is required. []string

Group metrics by these fields in the response. For example, to list all metric namespaces available in a compartment, groupBy the "namespace" field. Supported fields: namespace, name, resourceGroup. If groupBy is used, then dimensionFilters is ignored.

Example - group by namespace: [ "namespace" ]

Name This property is required. string
The metric name to use when searching for metric definitions. Example: CpuUtilization
Namespace This property is required. string
The source service or application to use when searching for metric definitions. Example: oci_computeagent
ResourceGroup This property is required. string
Resource group that you want to match. A null value returns only metric data that has no resource groups. The specified resource group must exist in the definition of the posted metric. 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
compartmentId This property is required. String
The OCID of the compartment containing the resources monitored by the metric that you are searching for. Use tenancyId to search in the root compartment. Example: ocid1.compartment.oc1..exampleuniqueID
compartmentIdInSubtree This property is required. Boolean
When true, returns resources from all compartments and subcompartments. The parameter can only be set to true when compartmentId is the tenancy OCID (the tenancy is the root compartment). A true value requires the user to have tenancy-level permissions. If this requirement is not met, then the call is rejected. When false, returns resources from only the compartment specified in compartmentId. Default is false.
dimensionFilters This property is required. Map<String,String>
Qualifiers that you want to use when searching for metric definitions. Available dimensions vary by metric namespace. Each dimension takes the form of a key-value pair. Example: {"resourceId": "instance.region1.phx.exampleuniqueID"}
dimensions This property is required. Map<String,String>
Qualifiers provided in a metric definition. Available dimensions vary by metric namespace. Each dimension takes the form of a key-value pair. Example: {"resourceId": "instance.region1.phx.exampleuniqueID"}
groupBies This property is required. List<String>

Group metrics by these fields in the response. For example, to list all metric namespaces available in a compartment, groupBy the "namespace" field. Supported fields: namespace, name, resourceGroup. If groupBy is used, then dimensionFilters is ignored.

Example - group by namespace: [ "namespace" ]

name This property is required. String
The metric name to use when searching for metric definitions. Example: CpuUtilization
namespace This property is required. String
The source service or application to use when searching for metric definitions. Example: oci_computeagent
resourceGroup This property is required. String
Resource group that you want to match. A null value returns only metric data that has no resource groups. The specified resource group must exist in the definition of the posted metric. 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
compartmentId This property is required. string
The OCID of the compartment containing the resources monitored by the metric that you are searching for. Use tenancyId to search in the root compartment. Example: ocid1.compartment.oc1..exampleuniqueID
compartmentIdInSubtree This property is required. boolean
When true, returns resources from all compartments and subcompartments. The parameter can only be set to true when compartmentId is the tenancy OCID (the tenancy is the root compartment). A true value requires the user to have tenancy-level permissions. If this requirement is not met, then the call is rejected. When false, returns resources from only the compartment specified in compartmentId. Default is false.
dimensionFilters This property is required. {[key: string]: string}
Qualifiers that you want to use when searching for metric definitions. Available dimensions vary by metric namespace. Each dimension takes the form of a key-value pair. Example: {"resourceId": "instance.region1.phx.exampleuniqueID"}
dimensions This property is required. {[key: string]: string}
Qualifiers provided in a metric definition. Available dimensions vary by metric namespace. Each dimension takes the form of a key-value pair. Example: {"resourceId": "instance.region1.phx.exampleuniqueID"}
groupBies This property is required. string[]

Group metrics by these fields in the response. For example, to list all metric namespaces available in a compartment, groupBy the "namespace" field. Supported fields: namespace, name, resourceGroup. If groupBy is used, then dimensionFilters is ignored.

Example - group by namespace: [ "namespace" ]

name This property is required. string
The metric name to use when searching for metric definitions. Example: CpuUtilization
namespace This property is required. string
The source service or application to use when searching for metric definitions. Example: oci_computeagent
resourceGroup This property is required. string
Resource group that you want to match. A null value returns only metric data that has no resource groups. The specified resource group must exist in the definition of the posted metric. 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
compartment_id This property is required. str
The OCID of the compartment containing the resources monitored by the metric that you are searching for. Use tenancyId to search in the root compartment. Example: ocid1.compartment.oc1..exampleuniqueID
compartment_id_in_subtree This property is required. bool
When true, returns resources from all compartments and subcompartments. The parameter can only be set to true when compartmentId is the tenancy OCID (the tenancy is the root compartment). A true value requires the user to have tenancy-level permissions. If this requirement is not met, then the call is rejected. When false, returns resources from only the compartment specified in compartmentId. Default is false.
dimension_filters This property is required. Mapping[str, str]
Qualifiers that you want to use when searching for metric definitions. Available dimensions vary by metric namespace. Each dimension takes the form of a key-value pair. Example: {"resourceId": "instance.region1.phx.exampleuniqueID"}
dimensions This property is required. Mapping[str, str]
Qualifiers provided in a metric definition. Available dimensions vary by metric namespace. Each dimension takes the form of a key-value pair. Example: {"resourceId": "instance.region1.phx.exampleuniqueID"}
group_bies This property is required. Sequence[str]

Group metrics by these fields in the response. For example, to list all metric namespaces available in a compartment, groupBy the "namespace" field. Supported fields: namespace, name, resourceGroup. If groupBy is used, then dimensionFilters is ignored.

Example - group by namespace: [ "namespace" ]

name This property is required. str
The metric name to use when searching for metric definitions. Example: CpuUtilization
namespace This property is required. str
The source service or application to use when searching for metric definitions. Example: oci_computeagent
resource_group This property is required. str
Resource group that you want to match. A null value returns only metric data that has no resource groups. The specified resource group must exist in the definition of the posted metric. 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
compartmentId This property is required. String
The OCID of the compartment containing the resources monitored by the metric that you are searching for. Use tenancyId to search in the root compartment. Example: ocid1.compartment.oc1..exampleuniqueID
compartmentIdInSubtree This property is required. Boolean
When true, returns resources from all compartments and subcompartments. The parameter can only be set to true when compartmentId is the tenancy OCID (the tenancy is the root compartment). A true value requires the user to have tenancy-level permissions. If this requirement is not met, then the call is rejected. When false, returns resources from only the compartment specified in compartmentId. Default is false.
dimensionFilters This property is required. Map<String>
Qualifiers that you want to use when searching for metric definitions. Available dimensions vary by metric namespace. Each dimension takes the form of a key-value pair. Example: {"resourceId": "instance.region1.phx.exampleuniqueID"}
dimensions This property is required. Map<String>
Qualifiers provided in a metric definition. Available dimensions vary by metric namespace. Each dimension takes the form of a key-value pair. Example: {"resourceId": "instance.region1.phx.exampleuniqueID"}
groupBies This property is required. List<String>

Group metrics by these fields in the response. For example, to list all metric namespaces available in a compartment, groupBy the "namespace" field. Supported fields: namespace, name, resourceGroup. If groupBy is used, then dimensionFilters is ignored.

Example - group by namespace: [ "namespace" ]

name This property is required. String
The metric name to use when searching for metric definitions. Example: CpuUtilization
namespace This property is required. String
The source service or application to use when searching for metric definitions. Example: oci_computeagent
resourceGroup This property is required. String
Resource group that you want to match. A null value returns only metric data that has no resource groups. The specified resource group must exist in the definition of the posted metric. 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

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes
This Pulumi package is based on the oci Terraform Provider.
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi