1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Monitoring
  5. getMetrics
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

oci.Monitoring.getMetrics

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 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,
    });
    
    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/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, Any]] = 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, Any]]] = 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]
    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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:Monitoring/getMetrics:getMetrics
      arguments:
        # arguments dictionary

    The 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
    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, object>
    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<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 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]interface{}
    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 []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 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,Object>
    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<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 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]: any}
    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 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 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, Any]
    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[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 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<Any>
    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 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, object>
    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]interface{}
    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,Object>
    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]: any}
    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, Any]
    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<Any>
    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 string
    The metric name to use when searching for metric definitions. Example: CpuUtilization
    Values List<string>
    Regex bool
    Name string
    The metric name to use when searching for metric definitions. Example: CpuUtilization
    Values []string
    Regex bool
    name String
    The metric name to use when searching for metric definitions. Example: CpuUtilization
    values List<String>
    regex Boolean
    name string
    The metric name to use when searching for metric definitions. Example: CpuUtilization
    values string[]
    regex boolean
    name str
    The metric name to use when searching for metric definitions. Example: CpuUtilization
    values Sequence[str]
    regex bool
    name String
    The metric name to use when searching for metric definitions. Example: CpuUtilization
    values List<String>
    regex Boolean

    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
    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, object>
    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, object>
    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 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 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]interface{}
    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]interface{}
    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 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 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,Object>
    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,Object>
    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 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 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]: any}
    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]: any}
    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 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 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, Any]
    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, Any]
    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 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 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<Any>
    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<Any>
    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 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

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi