published on Tuesday, Oct 27, 2026 by Pulumi
published on Tuesday, Oct 27, 2026 by Pulumi
mongodbatlas.MetricIntegration provides a resource for managing OpenTelemetry metric integrations at the project level. This resource allows you to push Atlas metrics to any OTLP-compatible endpoint such as Datadog, New Relic, or Dynatrace.
To use this resource, the requesting Service Account or API Key must have the Organization Owner or Project Owner role.
Note: After importing this resource, the
headersattribute will show a diff on the first plan because the Atlas API redacts header values in GET responses. Runpulumi uponce to reconcile the state.
Example Usage
The following example points at Datadog using a custom OTLP endpoint (providerType = "CUSTOM"). To export metrics to a different provider, update the endpoint and authentication headers to that provider’s values; for the named providers (DATADOG, DYNATRACE, or NEW_RELIC), set providerType accordingly.
import * as pulumi from "@pulumi/pulumi";
import * as datadog from "@pulumi/datadog";
import * as mongodbatlas from "@pulumi/mongodbatlas";
const atlasMetrics = new datadog.index.ApiKey("atlas_metrics", {name: "mongodb-atlas-metrics"});
const exampleMetricIntegration = new mongodbatlas.MetricIntegration("example", {
projectId: project.id,
integrationType: "OTEL",
providerType: "CUSTOM",
authType: "HEADER",
aggregationTemporality: "DELTA",
endpoint: datadogEndpoint,
metricSelections: ["ATLAS_STREAM_PROCESSING"],
headers: [{
name: "dd-api-key",
value: atlasMetrics.key,
}],
});
const example = mongodbatlas.getMetricIntegrationOutput({
projectId: exampleMetricIntegration.projectId,
metricIntegrationId: exampleMetricIntegration.metricIntegrationId,
});
export const metricIntegrationType = example.integrationType;
const exampleGetMetricIntegrations = mongodbatlas.getMetricIntegrationsOutput({
projectId: exampleMetricIntegration.projectId,
});
export const metricIntegrationIds = exampleGetMetricIntegrations.apply(exampleGetMetricIntegrations => .map(r => (r.metricIntegrationId)));
import pulumi
import pulumi_datadog as datadog
import pulumi_mongodbatlas as mongodbatlas
atlas_metrics = datadog.ApiKey("atlas_metrics", name=mongodb-atlas-metrics)
example_metric_integration = mongodbatlas.MetricIntegration("example",
project_id=project["id"],
integration_type="OTEL",
provider_type="CUSTOM",
auth_type="HEADER",
aggregation_temporality="DELTA",
endpoint=datadog_endpoint,
metric_selections=["ATLAS_STREAM_PROCESSING"],
headers=[{
"name": "dd-api-key",
"value": atlas_metrics["key"],
}])
example = mongodbatlas.get_metric_integration_output(project_id=example_metric_integration.project_id,
metric_integration_id=example_metric_integration.metric_integration_id)
pulumi.export("metricIntegrationType", example.integration_type)
example_get_metric_integrations = mongodbatlas.get_metric_integrations_output(project_id=example_metric_integration.project_id)
pulumi.export("metricIntegrationIds", example_get_metric_integrations.apply(lambda example_get_metric_integrations: [r.metric_integration_id for r in example_get_metric_integrations.results]))
Example coming soon!
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Datadog = Pulumi.Datadog;
using Mongodbatlas = Pulumi.Mongodbatlas;
return await Deployment.RunAsync(() =>
{
var atlasMetrics = new Datadog.ApiKey("atlas_metrics", new()
{
Name = "mongodb-atlas-metrics",
});
var exampleMetricIntegration = new Mongodbatlas.MetricIntegration("example", new()
{
ProjectId = project.Id,
IntegrationType = "OTEL",
ProviderType = "CUSTOM",
AuthType = "HEADER",
AggregationTemporality = "DELTA",
Endpoint = datadogEndpoint,
MetricSelections = new[]
{
"ATLAS_STREAM_PROCESSING",
},
Headers = new[]
{
new Mongodbatlas.Inputs.MetricIntegrationHeaderArgs
{
Name = "dd-api-key",
Value = atlasMetrics.Key,
},
},
});
var example = Mongodbatlas.GetMetricIntegration.Invoke(new()
{
ProjectId = exampleMetricIntegration.ProjectId,
MetricIntegrationId = exampleMetricIntegration.MetricIntegrationId,
});
var exampleGetMetricIntegrations = Mongodbatlas.GetMetricIntegrations.Invoke(new()
{
ProjectId = exampleMetricIntegration.ProjectId,
});
return new Dictionary<string, object?>
{
["metricIntegrationType"] = example.Apply(getMetricIntegrationResult => getMetricIntegrationResult.IntegrationType),
["metricIntegrationIds"] = .Select(r =>
{
return r.MetricIntegrationId;
}).ToList(),
};
});
Example coming soon!
Example coming soon!
terraform {
required_providers {
mongodbatlas = {
source = "pulumi/mongodbatlas"
}
}
}
data "mongodbatlas_metric_integration" "example" {
project_id = mongodbatlas_metric_integration.example.project_id
metric_integration_id = mongodbatlas_metric_integration.example.metric_integration_id
}
data "mongodbatlas_metric_integrations" "exampleGetMetricIntegrations" {
project_id = mongodbatlas_metric_integration.example.project_id
}
resource "datadog_api_key" "atlas_metrics" {
lifecycle {
create_before_destroy = true
}
name = "mongodb-atlas-metrics"
}
resource "mongodbatlas_metric_integration" "example" {
lifecycle {
create_before_destroy = true
}
project_id = project.id
integration_type = "OTEL"
provider_type = "CUSTOM"
auth_type = "HEADER"
aggregation_temporality = "DELTA"
endpoint = datadogEndpoint
metric_selection = ["ATLAS_STREAM_PROCESSING"]
headers = [{
name = "dd-api-key"
value = datadog_api_key.atlas_metrics.key
}]
}
output "metricIntegrationType" {
value = data.mongodbatlas_metric_integration.example.integration_type
}
output "metricIntegrationIds" {
value = [for r in data.mongodbatlas_metric_integrations.exampleGetMetricIntegrations.results : r.metricIntegrationId]
}
Further Examples
- Header-based — export Atlas metrics using header-based authentication.
- OAuth 2.0 — export Atlas metrics using OAuth 2.0 authentication.
Create MetricIntegration Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new MetricIntegration(name: string, args: MetricIntegrationArgs, opts?: CustomResourceOptions);@overload
def MetricIntegration(resource_name: str,
args: MetricIntegrationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def MetricIntegration(resource_name: str,
opts: Optional[ResourceOptions] = None,
aggregation_temporality: Optional[str] = None,
auth_type: Optional[str] = None,
endpoint: Optional[str] = None,
integration_type: Optional[str] = None,
metric_selections: Optional[Sequence[str]] = None,
project_id: Optional[str] = None,
provider_type: Optional[str] = None,
headers: Optional[Sequence[MetricIntegrationHeaderArgs]] = None,
oauth: Optional[MetricIntegrationOauthArgs] = None)func NewMetricIntegration(ctx *Context, name string, args MetricIntegrationArgs, opts ...ResourceOption) (*MetricIntegration, error)public MetricIntegration(string name, MetricIntegrationArgs args, CustomResourceOptions? opts = null)
public MetricIntegration(String name, MetricIntegrationArgs args)
public MetricIntegration(String name, MetricIntegrationArgs args, CustomResourceOptions options)
type: mongodbatlas:MetricIntegration
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "mongodbatlas_metric_integration" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args MetricIntegrationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args MetricIntegrationArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args MetricIntegrationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MetricIntegrationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MetricIntegrationArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var metricIntegrationResource = new Mongodbatlas.MetricIntegration("metricIntegrationResource", new()
{
AggregationTemporality = "string",
AuthType = "string",
Endpoint = "string",
IntegrationType = "string",
MetricSelections = new[]
{
"string",
},
ProjectId = "string",
ProviderType = "string",
Headers = new[]
{
new Mongodbatlas.Inputs.MetricIntegrationHeaderArgs
{
Name = "string",
Value = "string",
},
},
Oauth = new Mongodbatlas.Inputs.MetricIntegrationOauthArgs
{
ClientAuthMethod = "string",
ClientId = "string",
TokenEndpoint = "string",
ClientSecret = "string",
Scopes = new[]
{
"string",
},
SigningKeyInfo = new Mongodbatlas.Inputs.MetricIntegrationOauthSigningKeyInfoArgs
{
Algorithm = "string",
CreatedAt = "string",
JwksUri = "string",
Kid = "string",
},
TokenRequestParams =
{
{ "string", "string" },
},
},
});
example, err := mongodbatlas.NewMetricIntegration(ctx, "metricIntegrationResource", &mongodbatlas.MetricIntegrationArgs{
AggregationTemporality: pulumi.String("string"),
AuthType: pulumi.String("string"),
Endpoint: pulumi.String("string"),
IntegrationType: pulumi.String("string"),
MetricSelections: pulumi.StringArray{
pulumi.String("string"),
},
ProjectId: pulumi.String("string"),
ProviderType: pulumi.String("string"),
Headers: mongodbatlas.MetricIntegrationHeaderArray{
&mongodbatlas.MetricIntegrationHeaderArgs{
Name: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
Oauth: &mongodbatlas.MetricIntegrationOauthArgs{
ClientAuthMethod: pulumi.String("string"),
ClientId: pulumi.String("string"),
TokenEndpoint: pulumi.String("string"),
ClientSecret: pulumi.String("string"),
Scopes: pulumi.StringArray{
pulumi.String("string"),
},
SigningKeyInfo: &mongodbatlas.MetricIntegrationOauthSigningKeyInfoArgs{
Algorithm: pulumi.String("string"),
CreatedAt: pulumi.String("string"),
JwksUri: pulumi.String("string"),
Kid: pulumi.String("string"),
},
TokenRequestParams: pulumi.StringMap{
"string": pulumi.String("string"),
},
},
})
resource "mongodbatlas_metric_integration" "metricIntegrationResource" {
lifecycle {
create_before_destroy = true
}
aggregation_temporality = "string"
auth_type = "string"
endpoint = "string"
integration_type = "string"
metric_selections = ["string"]
project_id = "string"
provider_type = "string"
headers {
name = "string"
value = "string"
}
oauth = {
client_auth_method = "string"
client_id = "string"
token_endpoint = "string"
client_secret = "string"
scopes = ["string"]
signing_key_info = {
algorithm = "string"
created_at = "string"
jwks_uri = "string"
kid = "string"
}
token_request_params = {
"string" = "string"
}
}
}
var metricIntegrationResource = new MetricIntegration("metricIntegrationResource", MetricIntegrationArgs.builder()
.aggregationTemporality("string")
.authType("string")
.endpoint("string")
.integrationType("string")
.metricSelections("string")
.projectId("string")
.providerType("string")
.headers(MetricIntegrationHeaderArgs.builder()
.name("string")
.value("string")
.build())
.oauth(MetricIntegrationOauthArgs.builder()
.clientAuthMethod("string")
.clientId("string")
.tokenEndpoint("string")
.clientSecret("string")
.scopes("string")
.signingKeyInfo(MetricIntegrationOauthSigningKeyInfoArgs.builder()
.algorithm("string")
.createdAt("string")
.jwksUri("string")
.kid("string")
.build())
.tokenRequestParams(Map.of("string", "string"))
.build())
.build());
metric_integration_resource = mongodbatlas.MetricIntegration("metricIntegrationResource",
aggregation_temporality="string",
auth_type="string",
endpoint="string",
integration_type="string",
metric_selections=["string"],
project_id="string",
provider_type="string",
headers=[{
"name": "string",
"value": "string",
}],
oauth={
"client_auth_method": "string",
"client_id": "string",
"token_endpoint": "string",
"client_secret": "string",
"scopes": ["string"],
"signing_key_info": {
"algorithm": "string",
"created_at": "string",
"jwks_uri": "string",
"kid": "string",
},
"token_request_params": {
"string": "string",
},
})
const metricIntegrationResource = new mongodbatlas.MetricIntegration("metricIntegrationResource", {
aggregationTemporality: "string",
authType: "string",
endpoint: "string",
integrationType: "string",
metricSelections: ["string"],
projectId: "string",
providerType: "string",
headers: [{
name: "string",
value: "string",
}],
oauth: {
clientAuthMethod: "string",
clientId: "string",
tokenEndpoint: "string",
clientSecret: "string",
scopes: ["string"],
signingKeyInfo: {
algorithm: "string",
createdAt: "string",
jwksUri: "string",
kid: "string",
},
tokenRequestParams: {
string: "string",
},
},
});
type: mongodbatlas:MetricIntegration
properties:
aggregationTemporality: string
authType: string
endpoint: string
headers:
- name: string
value: string
integrationType: string
metricSelections:
- string
oauth:
clientAuthMethod: string
clientId: string
clientSecret: string
scopes:
- string
signingKeyInfo:
algorithm: string
createdAt: string
jwksUri: string
kid: string
tokenEndpoint: string
tokenRequestParams:
string: string
projectId: string
providerType: string
MetricIntegration Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The MetricIntegration resource accepts the following input properties:
- Aggregation
Temporality string - The temporality to send to the metric integration.
- Auth
Type string - Authentication method the integration uses when exporting metrics to the endpoint.
HEADERauthenticates with the static HTTP headers provided in theheadersfield, which must be set when this value is used.OAUTH2acquires a bearer token from an OAuth 2.0 token endpoint using theoauthfield. - Endpoint string
- OpenTelemetry collector endpoint URL. Must use HTTPS.
- Integration
Type string - Type of metric integration. Identifies which protocol will be used for the integration. This value cannot be modified after the integration is created.
- Metric
Selections List<string> - Array of metric categories to export. Determines which types of metrics are sent to the integration.
- Project
Id string - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - Provider
Type string - The provider type for the metric integration. Identifies the third-party service provider.
- Headers
List<Metric
Integration Header> - Required for auth_type: HEADER. HTTP headers for authentication and configuration. Total size limit 2KB.
- Oauth
Metric
Integration Oauth - OAuth 2.0 client credentials configuration. Required when authType is
OAUTH2. Secrets are never returned.
- Aggregation
Temporality string - The temporality to send to the metric integration.
- Auth
Type string - Authentication method the integration uses when exporting metrics to the endpoint.
HEADERauthenticates with the static HTTP headers provided in theheadersfield, which must be set when this value is used.OAUTH2acquires a bearer token from an OAuth 2.0 token endpoint using theoauthfield. - Endpoint string
- OpenTelemetry collector endpoint URL. Must use HTTPS.
- Integration
Type string - Type of metric integration. Identifies which protocol will be used for the integration. This value cannot be modified after the integration is created.
- Metric
Selections []string - Array of metric categories to export. Determines which types of metrics are sent to the integration.
- Project
Id string - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - Provider
Type string - The provider type for the metric integration. Identifies the third-party service provider.
- Headers
[]Metric
Integration Header Args - Required for auth_type: HEADER. HTTP headers for authentication and configuration. Total size limit 2KB.
- Oauth
Metric
Integration Oauth Args - OAuth 2.0 client credentials configuration. Required when authType is
OAUTH2. Secrets are never returned.
- aggregation_
temporality string - The temporality to send to the metric integration.
- auth_
type string - Authentication method the integration uses when exporting metrics to the endpoint.
HEADERauthenticates with the static HTTP headers provided in theheadersfield, which must be set when this value is used.OAUTH2acquires a bearer token from an OAuth 2.0 token endpoint using theoauthfield. - endpoint string
- OpenTelemetry collector endpoint URL. Must use HTTPS.
- integration_
type string - Type of metric integration. Identifies which protocol will be used for the integration. This value cannot be modified after the integration is created.
- metric_
selections list(string) - Array of metric categories to export. Determines which types of metrics are sent to the integration.
- project_
id string - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - provider_
type string - The provider type for the metric integration. Identifies the third-party service provider.
- headers list(object)
- Required for auth_type: HEADER. HTTP headers for authentication and configuration. Total size limit 2KB.
- oauth object
- OAuth 2.0 client credentials configuration. Required when authType is
OAUTH2. Secrets are never returned.
- aggregation
Temporality String - The temporality to send to the metric integration.
- auth
Type String - Authentication method the integration uses when exporting metrics to the endpoint.
HEADERauthenticates with the static HTTP headers provided in theheadersfield, which must be set when this value is used.OAUTH2acquires a bearer token from an OAuth 2.0 token endpoint using theoauthfield. - endpoint String
- OpenTelemetry collector endpoint URL. Must use HTTPS.
- integration
Type String - Type of metric integration. Identifies which protocol will be used for the integration. This value cannot be modified after the integration is created.
- metric
Selections List<String> - Array of metric categories to export. Determines which types of metrics are sent to the integration.
- project
Id String - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - provider
Type String - The provider type for the metric integration. Identifies the third-party service provider.
- headers
List<Metric
Integration Header> - Required for auth_type: HEADER. HTTP headers for authentication and configuration. Total size limit 2KB.
- oauth
Metric
Integration Oauth - OAuth 2.0 client credentials configuration. Required when authType is
OAUTH2. Secrets are never returned.
- aggregation
Temporality string - The temporality to send to the metric integration.
- auth
Type string - Authentication method the integration uses when exporting metrics to the endpoint.
HEADERauthenticates with the static HTTP headers provided in theheadersfield, which must be set when this value is used.OAUTH2acquires a bearer token from an OAuth 2.0 token endpoint using theoauthfield. - endpoint string
- OpenTelemetry collector endpoint URL. Must use HTTPS.
- integration
Type string - Type of metric integration. Identifies which protocol will be used for the integration. This value cannot be modified after the integration is created.
- metric
Selections string[] - Array of metric categories to export. Determines which types of metrics are sent to the integration.
- project
Id string - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - provider
Type string - The provider type for the metric integration. Identifies the third-party service provider.
- headers
Metric
Integration Header[] - Required for auth_type: HEADER. HTTP headers for authentication and configuration. Total size limit 2KB.
- oauth
Metric
Integration Oauth - OAuth 2.0 client credentials configuration. Required when authType is
OAUTH2. Secrets are never returned.
- aggregation_
temporality str - The temporality to send to the metric integration.
- auth_
type str - Authentication method the integration uses when exporting metrics to the endpoint.
HEADERauthenticates with the static HTTP headers provided in theheadersfield, which must be set when this value is used.OAUTH2acquires a bearer token from an OAuth 2.0 token endpoint using theoauthfield. - endpoint str
- OpenTelemetry collector endpoint URL. Must use HTTPS.
- integration_
type str - Type of metric integration. Identifies which protocol will be used for the integration. This value cannot be modified after the integration is created.
- metric_
selections Sequence[str] - Array of metric categories to export. Determines which types of metrics are sent to the integration.
- project_
id str - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - provider_
type str - The provider type for the metric integration. Identifies the third-party service provider.
- headers
Sequence[Metric
Integration Header Args] - Required for auth_type: HEADER. HTTP headers for authentication and configuration. Total size limit 2KB.
- oauth
Metric
Integration Oauth Args - OAuth 2.0 client credentials configuration. Required when authType is
OAUTH2. Secrets are never returned.
- aggregation
Temporality String - The temporality to send to the metric integration.
- auth
Type String - Authentication method the integration uses when exporting metrics to the endpoint.
HEADERauthenticates with the static HTTP headers provided in theheadersfield, which must be set when this value is used.OAUTH2acquires a bearer token from an OAuth 2.0 token endpoint using theoauthfield. - endpoint String
- OpenTelemetry collector endpoint URL. Must use HTTPS.
- integration
Type String - Type of metric integration. Identifies which protocol will be used for the integration. This value cannot be modified after the integration is created.
- metric
Selections List<String> - Array of metric categories to export. Determines which types of metrics are sent to the integration.
- project
Id String - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - provider
Type String - The provider type for the metric integration. Identifies the third-party service provider.
- headers List<Property Map>
- Required for auth_type: HEADER. HTTP headers for authentication and configuration. Total size limit 2KB.
- oauth Property Map
- OAuth 2.0 client credentials configuration. Required when authType is
OAUTH2. Secrets are never returned.
Outputs
All input properties are implicitly available as output properties. Additionally, the MetricIntegration resource produces the following output properties:
- Headers
Redacteds List<MetricIntegration Headers Redacted> - HTTP headers for authentication and configuration. Values are redacted and never returned in plaintext.
- Id string
- The provider-assigned unique ID for this managed resource.
- Metric
Integration stringId - Unique identifier of the metric integration configuration.
- Headers
Redacteds []MetricIntegration Headers Redacted - HTTP headers for authentication and configuration. Values are redacted and never returned in plaintext.
- Id string
- The provider-assigned unique ID for this managed resource.
- Metric
Integration stringId - Unique identifier of the metric integration configuration.
- headers_
redacteds list(object) - HTTP headers for authentication and configuration. Values are redacted and never returned in plaintext.
- id string
- The provider-assigned unique ID for this managed resource.
- metric_
integration_ stringid - Unique identifier of the metric integration configuration.
- headers
Redacteds List<MetricIntegration Headers Redacted> - HTTP headers for authentication and configuration. Values are redacted and never returned in plaintext.
- id String
- The provider-assigned unique ID for this managed resource.
- metric
Integration StringId - Unique identifier of the metric integration configuration.
- headers
Redacteds MetricIntegration Headers Redacted[] - HTTP headers for authentication and configuration. Values are redacted and never returned in plaintext.
- id string
- The provider-assigned unique ID for this managed resource.
- metric
Integration stringId - Unique identifier of the metric integration configuration.
- headers_
redacteds Sequence[MetricIntegration Headers Redacted] - HTTP headers for authentication and configuration. Values are redacted and never returned in plaintext.
- id str
- The provider-assigned unique ID for this managed resource.
- metric_
integration_ strid - Unique identifier of the metric integration configuration.
- headers
Redacteds List<Property Map> - HTTP headers for authentication and configuration. Values are redacted and never returned in plaintext.
- id String
- The provider-assigned unique ID for this managed resource.
- metric
Integration StringId - Unique identifier of the metric integration configuration.
Look up Existing MetricIntegration Resource
Get an existing MetricIntegration resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: MetricIntegrationState, opts?: CustomResourceOptions): MetricIntegration@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
aggregation_temporality: Optional[str] = None,
auth_type: Optional[str] = None,
endpoint: Optional[str] = None,
headers: Optional[Sequence[MetricIntegrationHeaderArgs]] = None,
headers_redacteds: Optional[Sequence[MetricIntegrationHeadersRedactedArgs]] = None,
integration_type: Optional[str] = None,
metric_integration_id: Optional[str] = None,
metric_selections: Optional[Sequence[str]] = None,
oauth: Optional[MetricIntegrationOauthArgs] = None,
project_id: Optional[str] = None,
provider_type: Optional[str] = None) -> MetricIntegrationfunc GetMetricIntegration(ctx *Context, name string, id IDInput, state *MetricIntegrationState, opts ...ResourceOption) (*MetricIntegration, error)public static MetricIntegration Get(string name, Input<string> id, MetricIntegrationState? state, CustomResourceOptions? opts = null)public static MetricIntegration get(String name, Output<String> id, MetricIntegrationState state, CustomResourceOptions options)resources: _: type: mongodbatlas:MetricIntegration get: id: ${id}import {
to = mongodbatlas_metric_integration.example
id = "${id}"
}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Aggregation
Temporality string - The temporality to send to the metric integration.
- Auth
Type string - Authentication method the integration uses when exporting metrics to the endpoint.
HEADERauthenticates with the static HTTP headers provided in theheadersfield, which must be set when this value is used.OAUTH2acquires a bearer token from an OAuth 2.0 token endpoint using theoauthfield. - Endpoint string
- OpenTelemetry collector endpoint URL. Must use HTTPS.
- Headers
List<Metric
Integration Header> - Required for auth_type: HEADER. HTTP headers for authentication and configuration. Total size limit 2KB.
- Headers
Redacteds List<MetricIntegration Headers Redacted> - HTTP headers for authentication and configuration. Values are redacted and never returned in plaintext.
- Integration
Type string - Type of metric integration. Identifies which protocol will be used for the integration. This value cannot be modified after the integration is created.
- Metric
Integration stringId - Unique identifier of the metric integration configuration.
- Metric
Selections List<string> - Array of metric categories to export. Determines which types of metrics are sent to the integration.
- Oauth
Metric
Integration Oauth - OAuth 2.0 client credentials configuration. Required when authType is
OAUTH2. Secrets are never returned. - Project
Id string - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - Provider
Type string - The provider type for the metric integration. Identifies the third-party service provider.
- Aggregation
Temporality string - The temporality to send to the metric integration.
- Auth
Type string - Authentication method the integration uses when exporting metrics to the endpoint.
HEADERauthenticates with the static HTTP headers provided in theheadersfield, which must be set when this value is used.OAUTH2acquires a bearer token from an OAuth 2.0 token endpoint using theoauthfield. - Endpoint string
- OpenTelemetry collector endpoint URL. Must use HTTPS.
- Headers
[]Metric
Integration Header Args - Required for auth_type: HEADER. HTTP headers for authentication and configuration. Total size limit 2KB.
- Headers
Redacteds []MetricIntegration Headers Redacted Args - HTTP headers for authentication and configuration. Values are redacted and never returned in plaintext.
- Integration
Type string - Type of metric integration. Identifies which protocol will be used for the integration. This value cannot be modified after the integration is created.
- Metric
Integration stringId - Unique identifier of the metric integration configuration.
- Metric
Selections []string - Array of metric categories to export. Determines which types of metrics are sent to the integration.
- Oauth
Metric
Integration Oauth Args - OAuth 2.0 client credentials configuration. Required when authType is
OAUTH2. Secrets are never returned. - Project
Id string - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - Provider
Type string - The provider type for the metric integration. Identifies the third-party service provider.
- aggregation_
temporality string - The temporality to send to the metric integration.
- auth_
type string - Authentication method the integration uses when exporting metrics to the endpoint.
HEADERauthenticates with the static HTTP headers provided in theheadersfield, which must be set when this value is used.OAUTH2acquires a bearer token from an OAuth 2.0 token endpoint using theoauthfield. - endpoint string
- OpenTelemetry collector endpoint URL. Must use HTTPS.
- headers list(object)
- Required for auth_type: HEADER. HTTP headers for authentication and configuration. Total size limit 2KB.
- headers_
redacteds list(object) - HTTP headers for authentication and configuration. Values are redacted and never returned in plaintext.
- integration_
type string - Type of metric integration. Identifies which protocol will be used for the integration. This value cannot be modified after the integration is created.
- metric_
integration_ stringid - Unique identifier of the metric integration configuration.
- metric_
selections list(string) - Array of metric categories to export. Determines which types of metrics are sent to the integration.
- oauth object
- OAuth 2.0 client credentials configuration. Required when authType is
OAUTH2. Secrets are never returned. - project_
id string - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - provider_
type string - The provider type for the metric integration. Identifies the third-party service provider.
- aggregation
Temporality String - The temporality to send to the metric integration.
- auth
Type String - Authentication method the integration uses when exporting metrics to the endpoint.
HEADERauthenticates with the static HTTP headers provided in theheadersfield, which must be set when this value is used.OAUTH2acquires a bearer token from an OAuth 2.0 token endpoint using theoauthfield. - endpoint String
- OpenTelemetry collector endpoint URL. Must use HTTPS.
- headers
List<Metric
Integration Header> - Required for auth_type: HEADER. HTTP headers for authentication and configuration. Total size limit 2KB.
- headers
Redacteds List<MetricIntegration Headers Redacted> - HTTP headers for authentication and configuration. Values are redacted and never returned in plaintext.
- integration
Type String - Type of metric integration. Identifies which protocol will be used for the integration. This value cannot be modified after the integration is created.
- metric
Integration StringId - Unique identifier of the metric integration configuration.
- metric
Selections List<String> - Array of metric categories to export. Determines which types of metrics are sent to the integration.
- oauth
Metric
Integration Oauth - OAuth 2.0 client credentials configuration. Required when authType is
OAUTH2. Secrets are never returned. - project
Id String - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - provider
Type String - The provider type for the metric integration. Identifies the third-party service provider.
- aggregation
Temporality string - The temporality to send to the metric integration.
- auth
Type string - Authentication method the integration uses when exporting metrics to the endpoint.
HEADERauthenticates with the static HTTP headers provided in theheadersfield, which must be set when this value is used.OAUTH2acquires a bearer token from an OAuth 2.0 token endpoint using theoauthfield. - endpoint string
- OpenTelemetry collector endpoint URL. Must use HTTPS.
- headers
Metric
Integration Header[] - Required for auth_type: HEADER. HTTP headers for authentication and configuration. Total size limit 2KB.
- headers
Redacteds MetricIntegration Headers Redacted[] - HTTP headers for authentication and configuration. Values are redacted and never returned in plaintext.
- integration
Type string - Type of metric integration. Identifies which protocol will be used for the integration. This value cannot be modified after the integration is created.
- metric
Integration stringId - Unique identifier of the metric integration configuration.
- metric
Selections string[] - Array of metric categories to export. Determines which types of metrics are sent to the integration.
- oauth
Metric
Integration Oauth - OAuth 2.0 client credentials configuration. Required when authType is
OAUTH2. Secrets are never returned. - project
Id string - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - provider
Type string - The provider type for the metric integration. Identifies the third-party service provider.
- aggregation_
temporality str - The temporality to send to the metric integration.
- auth_
type str - Authentication method the integration uses when exporting metrics to the endpoint.
HEADERauthenticates with the static HTTP headers provided in theheadersfield, which must be set when this value is used.OAUTH2acquires a bearer token from an OAuth 2.0 token endpoint using theoauthfield. - endpoint str
- OpenTelemetry collector endpoint URL. Must use HTTPS.
- headers
Sequence[Metric
Integration Header Args] - Required for auth_type: HEADER. HTTP headers for authentication and configuration. Total size limit 2KB.
- headers_
redacteds Sequence[MetricIntegration Headers Redacted Args] - HTTP headers for authentication and configuration. Values are redacted and never returned in plaintext.
- integration_
type str - Type of metric integration. Identifies which protocol will be used for the integration. This value cannot be modified after the integration is created.
- metric_
integration_ strid - Unique identifier of the metric integration configuration.
- metric_
selections Sequence[str] - Array of metric categories to export. Determines which types of metrics are sent to the integration.
- oauth
Metric
Integration Oauth Args - OAuth 2.0 client credentials configuration. Required when authType is
OAUTH2. Secrets are never returned. - project_
id str - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - provider_
type str - The provider type for the metric integration. Identifies the third-party service provider.
- aggregation
Temporality String - The temporality to send to the metric integration.
- auth
Type String - Authentication method the integration uses when exporting metrics to the endpoint.
HEADERauthenticates with the static HTTP headers provided in theheadersfield, which must be set when this value is used.OAUTH2acquires a bearer token from an OAuth 2.0 token endpoint using theoauthfield. - endpoint String
- OpenTelemetry collector endpoint URL. Must use HTTPS.
- headers List<Property Map>
- Required for auth_type: HEADER. HTTP headers for authentication and configuration. Total size limit 2KB.
- headers
Redacteds List<Property Map> - HTTP headers for authentication and configuration. Values are redacted and never returned in plaintext.
- integration
Type String - Type of metric integration. Identifies which protocol will be used for the integration. This value cannot be modified after the integration is created.
- metric
Integration StringId - Unique identifier of the metric integration configuration.
- metric
Selections List<String> - Array of metric categories to export. Determines which types of metrics are sent to the integration.
- oauth Property Map
- OAuth 2.0 client credentials configuration. Required when authType is
OAUTH2. Secrets are never returned. - project
Id String - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - provider
Type String - The provider type for the metric integration. Identifies the third-party service provider.
Supporting Types
MetricIntegrationHeader, MetricIntegrationHeaderArgs
MetricIntegrationHeadersRedacted, MetricIntegrationHeadersRedactedArgs
MetricIntegrationOauth, MetricIntegrationOauthArgs
- Client
Auth stringMethod - How the client authenticates to the token endpoint.
CLIENT_SECRETsends a shared secret.PRIVATE_KEY_JWTsigns a client assertion with an Atlas-generated, Atlas-managed key. Register the returned JWKS URL with your identity provider. - Client
Id string - OAuth 2.0 client identifier registered with the token endpoint.
- Token
Endpoint string - OAuth 2.0 token endpoint URL. Must use HTTPS.
- Client
Secret string - Shared client secret. Required when clientauthmethod is
CLIENT_SECRET, and rejected forPRIVATE_KEY_JWT. Encrypted at rest and never returned. - Scopes List<string>
- Optional OAuth 2.0 scopes requested on the token, sent as a space delimited
scopeparameter. Applies to both client authentication methods. - Signing
Key MetricInfo Integration Oauth Signing Key Info - Read-only metadata for the Atlas-managed signing key used by
PRIVATE_KEY_JWT. Present only for that method. Register the jwks*uri with your identity provider. Atlas rotates the underlying key without changing this URL. - Token
Request Dictionary<string, string>Params - Optional provider-specific parameters added to the token request, for example a resource indicator. Applies to both client authentication methods.
- Client
Auth stringMethod - How the client authenticates to the token endpoint.
CLIENT_SECRETsends a shared secret.PRIVATE_KEY_JWTsigns a client assertion with an Atlas-generated, Atlas-managed key. Register the returned JWKS URL with your identity provider. - Client
Id string - OAuth 2.0 client identifier registered with the token endpoint.
- Token
Endpoint string - OAuth 2.0 token endpoint URL. Must use HTTPS.
- Client
Secret string - Shared client secret. Required when clientauthmethod is
CLIENT_SECRET, and rejected forPRIVATE_KEY_JWT. Encrypted at rest and never returned. - Scopes []string
- Optional OAuth 2.0 scopes requested on the token, sent as a space delimited
scopeparameter. Applies to both client authentication methods. - Signing
Key MetricInfo Integration Oauth Signing Key Info - Read-only metadata for the Atlas-managed signing key used by
PRIVATE_KEY_JWT. Present only for that method. Register the jwks*uri with your identity provider. Atlas rotates the underlying key without changing this URL. - Token
Request map[string]stringParams - Optional provider-specific parameters added to the token request, for example a resource indicator. Applies to both client authentication methods.
- client_
auth_ stringmethod - How the client authenticates to the token endpoint.
CLIENT_SECRETsends a shared secret.PRIVATE_KEY_JWTsigns a client assertion with an Atlas-generated, Atlas-managed key. Register the returned JWKS URL with your identity provider. - client_
id string - OAuth 2.0 client identifier registered with the token endpoint.
- token_
endpoint string - OAuth 2.0 token endpoint URL. Must use HTTPS.
- client_
secret string - Shared client secret. Required when clientauthmethod is
CLIENT_SECRET, and rejected forPRIVATE_KEY_JWT. Encrypted at rest and never returned. - scopes list(string)
- Optional OAuth 2.0 scopes requested on the token, sent as a space delimited
scopeparameter. Applies to both client authentication methods. - signing_
key_ objectinfo - Read-only metadata for the Atlas-managed signing key used by
PRIVATE_KEY_JWT. Present only for that method. Register the jwks*uri with your identity provider. Atlas rotates the underlying key without changing this URL. - token_
request_ map(string)params - Optional provider-specific parameters added to the token request, for example a resource indicator. Applies to both client authentication methods.
- client
Auth StringMethod - How the client authenticates to the token endpoint.
CLIENT_SECRETsends a shared secret.PRIVATE_KEY_JWTsigns a client assertion with an Atlas-generated, Atlas-managed key. Register the returned JWKS URL with your identity provider. - client
Id String - OAuth 2.0 client identifier registered with the token endpoint.
- token
Endpoint String - OAuth 2.0 token endpoint URL. Must use HTTPS.
- client
Secret String - Shared client secret. Required when clientauthmethod is
CLIENT_SECRET, and rejected forPRIVATE_KEY_JWT. Encrypted at rest and never returned. - scopes List<String>
- Optional OAuth 2.0 scopes requested on the token, sent as a space delimited
scopeparameter. Applies to both client authentication methods. - signing
Key MetricInfo Integration Oauth Signing Key Info - Read-only metadata for the Atlas-managed signing key used by
PRIVATE_KEY_JWT. Present only for that method. Register the jwks*uri with your identity provider. Atlas rotates the underlying key without changing this URL. - token
Request Map<String,String>Params - Optional provider-specific parameters added to the token request, for example a resource indicator. Applies to both client authentication methods.
- client
Auth stringMethod - How the client authenticates to the token endpoint.
CLIENT_SECRETsends a shared secret.PRIVATE_KEY_JWTsigns a client assertion with an Atlas-generated, Atlas-managed key. Register the returned JWKS URL with your identity provider. - client
Id string - OAuth 2.0 client identifier registered with the token endpoint.
- token
Endpoint string - OAuth 2.0 token endpoint URL. Must use HTTPS.
- client
Secret string - Shared client secret. Required when clientauthmethod is
CLIENT_SECRET, and rejected forPRIVATE_KEY_JWT. Encrypted at rest and never returned. - scopes string[]
- Optional OAuth 2.0 scopes requested on the token, sent as a space delimited
scopeparameter. Applies to both client authentication methods. - signing
Key MetricInfo Integration Oauth Signing Key Info - Read-only metadata for the Atlas-managed signing key used by
PRIVATE_KEY_JWT. Present only for that method. Register the jwks*uri with your identity provider. Atlas rotates the underlying key without changing this URL. - token
Request {[key: string]: string}Params - Optional provider-specific parameters added to the token request, for example a resource indicator. Applies to both client authentication methods.
- client_
auth_ strmethod - How the client authenticates to the token endpoint.
CLIENT_SECRETsends a shared secret.PRIVATE_KEY_JWTsigns a client assertion with an Atlas-generated, Atlas-managed key. Register the returned JWKS URL with your identity provider. - client_
id str - OAuth 2.0 client identifier registered with the token endpoint.
- token_
endpoint str - OAuth 2.0 token endpoint URL. Must use HTTPS.
- client_
secret str - Shared client secret. Required when clientauthmethod is
CLIENT_SECRET, and rejected forPRIVATE_KEY_JWT. Encrypted at rest and never returned. - scopes Sequence[str]
- Optional OAuth 2.0 scopes requested on the token, sent as a space delimited
scopeparameter. Applies to both client authentication methods. - signing_
key_ Metricinfo Integration Oauth Signing Key Info - Read-only metadata for the Atlas-managed signing key used by
PRIVATE_KEY_JWT. Present only for that method. Register the jwks*uri with your identity provider. Atlas rotates the underlying key without changing this URL. - token_
request_ Mapping[str, str]params - Optional provider-specific parameters added to the token request, for example a resource indicator. Applies to both client authentication methods.
- client
Auth StringMethod - How the client authenticates to the token endpoint.
CLIENT_SECRETsends a shared secret.PRIVATE_KEY_JWTsigns a client assertion with an Atlas-generated, Atlas-managed key. Register the returned JWKS URL with your identity provider. - client
Id String - OAuth 2.0 client identifier registered with the token endpoint.
- token
Endpoint String - OAuth 2.0 token endpoint URL. Must use HTTPS.
- client
Secret String - Shared client secret. Required when clientauthmethod is
CLIENT_SECRET, and rejected forPRIVATE_KEY_JWT. Encrypted at rest and never returned. - scopes List<String>
- Optional OAuth 2.0 scopes requested on the token, sent as a space delimited
scopeparameter. Applies to both client authentication methods. - signing
Key Property MapInfo - Read-only metadata for the Atlas-managed signing key used by
PRIVATE_KEY_JWT. Present only for that method. Register the jwks*uri with your identity provider. Atlas rotates the underlying key without changing this URL. - token
Request Map<String>Params - Optional provider-specific parameters added to the token request, for example a resource indicator. Applies to both client authentication methods.
MetricIntegrationOauthSigningKeyInfo, MetricIntegrationOauthSigningKeyInfoArgs
- Algorithm string
- Signing algorithm of the Atlas-managed key.
- Created
At string - When the currently active signing key was created. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- Jwks
Uri string - Public JWKS URL serving this integration's signing keys. Fixed for the lifetime of the integration.
- Kid string
- Key ID stamped on client assertions, the
SHA-1thumbprint of the key certificate in uppercase hexadecimal. Changes when Atlas rotates the key.
- Algorithm string
- Signing algorithm of the Atlas-managed key.
- Created
At string - When the currently active signing key was created. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- Jwks
Uri string - Public JWKS URL serving this integration's signing keys. Fixed for the lifetime of the integration.
- Kid string
- Key ID stamped on client assertions, the
SHA-1thumbprint of the key certificate in uppercase hexadecimal. Changes when Atlas rotates the key.
- algorithm string
- Signing algorithm of the Atlas-managed key.
- created_
at string - When the currently active signing key was created. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- jwks_
uri string - Public JWKS URL serving this integration's signing keys. Fixed for the lifetime of the integration.
- kid string
- Key ID stamped on client assertions, the
SHA-1thumbprint of the key certificate in uppercase hexadecimal. Changes when Atlas rotates the key.
- algorithm String
- Signing algorithm of the Atlas-managed key.
- created
At String - When the currently active signing key was created. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- jwks
Uri String - Public JWKS URL serving this integration's signing keys. Fixed for the lifetime of the integration.
- kid String
- Key ID stamped on client assertions, the
SHA-1thumbprint of the key certificate in uppercase hexadecimal. Changes when Atlas rotates the key.
- algorithm string
- Signing algorithm of the Atlas-managed key.
- created
At string - When the currently active signing key was created. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- jwks
Uri string - Public JWKS URL serving this integration's signing keys. Fixed for the lifetime of the integration.
- kid string
- Key ID stamped on client assertions, the
SHA-1thumbprint of the key certificate in uppercase hexadecimal. Changes when Atlas rotates the key.
- algorithm str
- Signing algorithm of the Atlas-managed key.
- created_
at str - When the currently active signing key was created. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- jwks_
uri str - Public JWKS URL serving this integration's signing keys. Fixed for the lifetime of the integration.
- kid str
- Key ID stamped on client assertions, the
SHA-1thumbprint of the key certificate in uppercase hexadecimal. Changes when Atlas rotates the key.
- algorithm String
- Signing algorithm of the Atlas-managed key.
- created
At String - When the currently active signing key was created. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
- jwks
Uri String - Public JWKS URL serving this integration's signing keys. Fixed for the lifetime of the integration.
- kid String
- Key ID stamped on client assertions, the
SHA-1thumbprint of the key certificate in uppercase hexadecimal. Changes when Atlas rotates the key.
Import
Metric integration resource can be imported using the project ID and metric integration ID, separated by a slash, for example:
$ pulumi import mongodbatlas:index/metricIntegration:MetricIntegration example 650972848269185c55f40ca1/6789abcd1234ef5678901234
For more information see: MongoDB Atlas - OTel Integration Documentation.
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- MongoDB Atlas pulumi/pulumi-mongodbatlas
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
mongodbatlasTerraform Provider.
published on Tuesday, Oct 27, 2026 by Pulumi