import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * 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](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Tasks/list-metric.htm). * For information about metrics, see * [Metrics Overview](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#MetricsOverview). * For important limits information, see * [Limits on Monitoring](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#limits). * * Transactions Per Second (TPS) per-tenancy limit for this operation: 10. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as oci from "@pulumi/oci"; * * const testMetrics = oci.monitoring.getMetrics({ * compartmentId: compartmentId, * compartmentIdInSubtree: metricCompartmentIdInSubtree === "true", * dimensionFilters: metricDimensionFilters, * groupBies: metricGroupBy, * name: metricName, * namespace: metricNamespace, * resourceGroup: metricResourceGroup, * }); * ``` */ export declare function getMetrics(args: GetMetricsArgs, opts?: pulumi.InvokeOptions): Promise; /** * A collection of arguments for invoking getMetrics. */ export interface GetMetricsArgs { /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) 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: string; /** * 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. */ compartmentIdInSubtree?: boolean; /** * 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"}` */ dimensionFilters?: { [key: string]: string; }; filters?: inputs.Monitoring.GetMetricsFilter[]; /** * 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" ]` */ groupBies?: string[]; /** * The metric name to use when searching for metric definitions. Example: `CpuUtilization` */ name?: string; /** * The source service or application to use when searching for metric definitions. Example: `ociComputeagent` */ namespace?: 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` */ resourceGroup?: string; } /** * A collection of values returned by getMetrics. */ export interface GetMetricsResult { /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the resources monitored by the metric. */ readonly compartmentId: string; readonly compartmentIdInSubtree?: boolean; readonly dimensionFilters?: { [key: string]: string; }; readonly filters?: outputs.Monitoring.GetMetricsFilter[]; readonly groupBies?: string[]; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; /** * The list of metrics. */ readonly metrics: outputs.Monitoring.GetMetricsMetric[]; /** * The name of the metric. Example: `CpuUtilization` */ readonly name?: string; /** * The source service or application emitting the metric. Example: `ociComputeagent` */ readonly namespace?: 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` */ readonly resourceGroup?: string; } /** * 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](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Tasks/list-metric.htm). * For information about metrics, see * [Metrics Overview](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#MetricsOverview). * For important limits information, see * [Limits on Monitoring](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#limits). * * Transactions Per Second (TPS) per-tenancy limit for this operation: 10. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as oci from "@pulumi/oci"; * * const testMetrics = oci.monitoring.getMetrics({ * compartmentId: compartmentId, * compartmentIdInSubtree: metricCompartmentIdInSubtree === "true", * dimensionFilters: metricDimensionFilters, * groupBies: metricGroupBy, * name: metricName, * namespace: metricNamespace, * resourceGroup: metricResourceGroup, * }); * ``` */ export declare function getMetricsOutput(args: GetMetricsOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output; /** * A collection of arguments for invoking getMetrics. */ export interface GetMetricsOutputArgs { /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) 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: pulumi.Input; /** * 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. */ compartmentIdInSubtree?: pulumi.Input; /** * 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"}` */ dimensionFilters?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; filters?: pulumi.Input[] | undefined>; /** * 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" ]` */ groupBies?: pulumi.Input[] | undefined>; /** * The metric name to use when searching for metric definitions. Example: `CpuUtilization` */ name?: pulumi.Input; /** * The source service or application to use when searching for metric definitions. Example: `ociComputeagent` */ namespace?: pulumi.Input; /** * 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` */ resourceGroup?: pulumi.Input; } //# sourceMappingURL=getMetrics.d.ts.map