oci.Monitoring.getMetrics
Explore with Pulumi AI
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,
});
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)
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
	})
}
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,
    });
});
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());
    }
}
variables:
  testMetrics:
    fn::invoke:
      function: oci:Monitoring:getMetrics
      arguments:
        compartmentId: ${compartmentId}
        compartmentIdInSubtree: ${metricCompartmentIdInSubtree}
        dimensionFilters: ${metricDimensionFilters}
        groupBies: ${metricGroupBy}
        name: ${metricName}
        namespace: ${metricNamespace}
        resourceGroup: ${metricResourceGroup}
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>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[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[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]func GetMetrics(ctx *Context, args *GetMetricsArgs, opts ...InvokeOption) (*GetMetricsResult, error)
func GetMetricsOutput(ctx *Context, args *GetMetricsOutputArgs, opts ...InvokeOption) GetMetricsResultOutput> 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)
}public static CompletableFuture<GetMetricsResult> getMetrics(GetMetricsArgs args, InvokeOptions options)
public static Output<GetMetricsResult> getMetrics(GetMetricsArgs args, InvokeOptions options)
fn::invoke:
  function: oci:Monitoring/getMetrics:getMetrics
  arguments:
    # arguments dictionaryThe following arguments are supported:
- CompartmentId 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
- CompartmentId boolIn Subtree 
- 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
List<GetMetrics Filter> 
- 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 - groupByis used, then- dimensionFiltersis 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 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
- CompartmentId boolIn Subtree 
- 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
[]GetMetrics Filter 
- 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 - groupByis used, then- dimensionFiltersis 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 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
- compartmentId BooleanIn Subtree 
- 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
List<GetMetrics Filter> 
- 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 - groupByis used, then- dimensionFiltersis 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 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
- compartmentId booleanIn Subtree 
- 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
GetMetrics Filter[] 
- 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 - groupByis used, then- dimensionFiltersis 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 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_ boolin_ subtree 
- 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
Sequence[GetMetrics Filter] 
- 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 - groupByis used, then- dimensionFiltersis 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 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
- compartmentId BooleanIn Subtree 
- 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 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 - groupByis used, then- dimensionFiltersis 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<GetMetrics Metric> 
- The list of metrics.
- CompartmentId boolIn Subtree 
- DimensionFilters Dictionary<string, string>
- Filters
List<GetMetrics Filter> 
- 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
[]GetMetrics Metric 
- The list of metrics.
- CompartmentId boolIn Subtree 
- DimensionFilters map[string]string
- Filters
[]GetMetrics Filter 
- 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<GetMetrics Metric> 
- The list of metrics.
- compartmentId BooleanIn Subtree 
- dimensionFilters Map<String,String>
- filters
List<GetMetrics Filter> 
- 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
GetMetrics Metric[] 
- The list of metrics.
- compartmentId booleanIn Subtree 
- dimensionFilters {[key: string]: string}
- filters
GetMetrics Filter[] 
- 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[GetMetrics Metric] 
- The list of metrics.
- compartment_id_ boolin_ subtree 
- dimension_filters Mapping[str, str]
- filters
Sequence[GetMetrics Filter] 
- 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.
- compartmentId BooleanIn Subtree 
- 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  
GetMetricsMetric  
- CompartmentId 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
- CompartmentId boolIn Subtree 
- 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"}
- Dimensions 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 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 - groupByis used, then- dimensionFiltersis 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 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
- CompartmentId boolIn Subtree 
- 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"}
- Dimensions 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 []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 - groupByis used, then- dimensionFiltersis 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 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
- compartmentId BooleanIn Subtree 
- 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"}
- dimensions 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 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 - groupByis used, then- dimensionFiltersis 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 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
- compartmentId booleanIn Subtree 
- 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"}
- dimensions {[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 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 - groupByis used, then- dimensionFiltersis 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 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_ boolin_ subtree 
- 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"}
- dimensions 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 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 - groupByis used, then- dimensionFiltersis 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 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
- compartmentId BooleanIn Subtree 
- 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"}
- dimensions 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 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 - groupByis used, then- dimensionFiltersis 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
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.