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[_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]
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:
- Compartment
Id 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
- 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 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<Get
Metrics Filter> - Group
Bies 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, thendimensionFilters
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
- Resource
Group 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 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
- 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 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
[]Get
Metrics Filter - Group
Bies []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, thendimensionFilters
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
- Resource
Group 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 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
- compartment
Id 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.
- dimension
Filters 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<Get
Metrics Filter> - group
Bies 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, thendimensionFilters
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
- resource
Group 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 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
- compartment
Id 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.
- dimension
Filters {[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
Get
Metrics Filter[] - group
Bies 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, thendimensionFilters
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
- resource
Group 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[monitoring.
Get Metrics 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
groupBy
is used, thendimensionFilters
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
- compartment
Id 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
- compartment
Id 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.
- dimension
Filters 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>
- group
Bies 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, thendimensionFilters
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
- resource
Group 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:
- Compartment
Id 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<Get
Metrics Metric> - The list of metrics.
- Compartment
Id boolIn Subtree - Dimension
Filters Dictionary<string, string> - Filters
List<Get
Metrics Filter> - Group
Bies List<string> - Name string
- The name of the metric. Example:
CpuUtilization
- Namespace string
- The source service or application emitting the metric. Example:
oci_computeagent
- Resource
Group 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 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
[]Get
Metrics Metric - The list of metrics.
- Compartment
Id boolIn Subtree - Dimension
Filters map[string]string - Filters
[]Get
Metrics Filter - Group
Bies []string - Name string
- The name of the metric. Example:
CpuUtilization
- Namespace string
- The source service or application emitting the metric. Example:
oci_computeagent
- Resource
Group 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 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<Get
Metrics Metric> - The list of metrics.
- compartment
Id BooleanIn Subtree - dimension
Filters Map<String,String> - filters
List<Get
Metrics Filter> - group
Bies List<String> - name String
- The name of the metric. Example:
CpuUtilization
- namespace String
- The source service or application emitting the metric. Example:
oci_computeagent
- resource
Group 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 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
Get
Metrics Metric[] - The list of metrics.
- compartment
Id booleanIn Subtree - dimension
Filters {[key: string]: string} - filters
Get
Metrics Filter[] - group
Bies string[] - name string
- The name of the metric. Example:
CpuUtilization
- namespace string
- The source service or application emitting the metric. Example:
oci_computeagent
- resource
Group 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.
Get Metrics Metric] - The list of metrics.
- compartment_
id_ boolin_ subtree - dimension_
filters Mapping[str, str] - filters
Sequence[monitoring.
Get Metrics 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
- compartment
Id 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.
- compartment
Id BooleanIn Subtree - dimension
Filters Map<String> - filters List<Property Map>
- group
Bies List<String> - name String
- The name of the metric. Example:
CpuUtilization
- namespace String
- The source service or application emitting the metric. Example:
oci_computeagent
- resource
Group 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
- Compartment
Id 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
- 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 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"}
- Group
Bies 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, thendimensionFilters
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
- Resource
Group 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 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
- 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 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"}
- Group
Bies []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, thendimensionFilters
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
- Resource
Group 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 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
- compartment
Id 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.
- dimension
Filters 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"}
- group
Bies 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, thendimensionFilters
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
- resource
Group 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 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
- compartment
Id 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.
- dimension
Filters {[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"}
- group
Bies 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, thendimensionFilters
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
- resource
Group 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
groupBy
is used, thendimensionFilters
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
- compartment
Id 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
- compartment
Id 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.
- dimension
Filters 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"}
- group
Bies 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, thendimensionFilters
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
- resource
Group 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.