published on Friday, Aug 28, 2026 by Pulumi
published on Friday, Aug 28, 2026 by Pulumi
mongodbatlas.AiModelApiKey provides an AI Model API Key resource. The resource lets you create, update, delete, and import an AI Model API Key for the specified Project. This API Key is used to authenticate requests to AI embedding and reranking services.
IMPORTANT WARNING: Managing AI Model API Keys with Terraform will expose sensitive secrets in Terraform’s state file. The
secretattribute contains the full API key and is persisted in Terraform state after creation. We recommend following Terraform’s best practices for sensitive data. Consider using remote state with encryption enabled.
Example Usage
S
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";
const thisAiModelApiKey = new mongodbatlas.AiModelApiKey("this", {
projectId: projectId,
name: "example-ai-model-key",
cloud: "ANY",
geography: "ANY",
});
const _this = mongodbatlas.getAiModelApiKeyOutput({
projectId: projectId,
apiKeyId: thisAiModelApiKey.apiKeyId,
});
const thisGetAiModelApiKeys = mongodbatlas.getAiModelApiKeys({
projectId: projectId,
});
export const aiModelApiKeyId = thisAiModelApiKey.apiKeyId;
export const aiModelApiKeySecret = thisAiModelApiKey.secret;
export const aiModelApiKeyName = _this.name;
export const aiModelApiKeyEndpoint = _this.endpoint;
export const aiModelApiKeysResults = thisGetAiModelApiKeys.then(thisGetAiModelApiKeys => thisGetAiModelApiKeys.results);
import pulumi
import pulumi_mongodbatlas as mongodbatlas
this_ai_model_api_key = mongodbatlas.AiModelApiKey("this",
project_id=project_id,
name="example-ai-model-key",
cloud="ANY",
geography="ANY")
this = mongodbatlas.get_ai_model_api_key_output(project_id=project_id,
api_key_id=this_ai_model_api_key.api_key_id)
this_get_ai_model_api_keys = mongodbatlas.get_ai_model_api_keys(project_id=project_id)
pulumi.export("aiModelApiKeyId", this_ai_model_api_key.api_key_id)
pulumi.export("aiModelApiKeySecret", this_ai_model_api_key.secret)
pulumi.export("aiModelApiKeyName", this.name)
pulumi.export("aiModelApiKeyEndpoint", this.endpoint)
pulumi.export("aiModelApiKeysResults", this_get_ai_model_api_keys.results)
package main
import (
"github.com/pulumi/pulumi-mongodbatlas/sdk/v4/go/mongodbatlas"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
thisAiModelApiKey, err := mongodbatlas.NewAiModelApiKey(ctx, "this", &mongodbatlas.AiModelApiKeyArgs{
ProjectId: pulumi.Any(projectId),
Name: pulumi.String("example-ai-model-key"),
Cloud: pulumi.String("ANY"),
Geography: pulumi.String("ANY"),
})
if err != nil {
return err
}
this := mongodbatlas.GetAiModelApiKeyOutput(ctx, mongodbatlas.GetAiModelApiKeyOutputArgs{
ProjectId: pulumi.Any(projectId),
ApiKeyId: thisAiModelApiKey.ApiKeyId,
}, nil)
thisGetAiModelApiKeys, err := mongodbatlas.GetAiModelApiKeys(ctx, &mongodbatlas.LookupAiModelApiKeysArgs{
ProjectId: projectId,
}, nil)
if err != nil {
return err
}
ctx.Export("aiModelApiKeyId", thisAiModelApiKey.ApiKeyId)
ctx.Export("aiModelApiKeySecret", thisAiModelApiKey.Secret)
ctx.Export("aiModelApiKeyName", this.Name())
ctx.Export("aiModelApiKeyEndpoint", this.Endpoint())
ctx.Export("aiModelApiKeysResults", thisGetAiModelApiKeys.Results)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;
return await Deployment.RunAsync(() =>
{
var thisAiModelApiKey = new Mongodbatlas.AiModelApiKey("this", new()
{
ProjectId = projectId,
Name = "example-ai-model-key",
Cloud = "ANY",
Geography = "ANY",
});
var @this = Mongodbatlas.GetAiModelApiKey.Invoke(new()
{
ProjectId = projectId,
ApiKeyId = thisAiModelApiKey.ApiKeyId,
});
var thisGetAiModelApiKeys = Mongodbatlas.GetAiModelApiKeys.Invoke(new()
{
ProjectId = projectId,
});
return new Dictionary<string, object?>
{
["aiModelApiKeyId"] = thisAiModelApiKey.ApiKeyId,
["aiModelApiKeySecret"] = thisAiModelApiKey.Secret,
["aiModelApiKeyName"] = @this.Apply(@this => @this.Apply(getAiModelApiKeyResult => getAiModelApiKeyResult.Name)),
["aiModelApiKeyEndpoint"] = @this.Apply(@this => @this.Apply(getAiModelApiKeyResult => getAiModelApiKeyResult.Endpoint)),
["aiModelApiKeysResults"] = thisGetAiModelApiKeys.Apply(getAiModelApiKeysResult => getAiModelApiKeysResult.Results),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.mongodbatlas.AiModelApiKey;
import com.pulumi.mongodbatlas.AiModelApiKeyArgs;
import com.pulumi.mongodbatlas.MongodbatlasFunctions;
import com.pulumi.mongodbatlas.inputs.GetAiModelApiKeyArgs;
import com.pulumi.mongodbatlas.inputs.GetAiModelApiKeysArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var thisAiModelApiKey = new AiModelApiKey("thisAiModelApiKey", AiModelApiKeyArgs.builder()
.projectId(projectId)
.name("example-ai-model-key")
.cloud("ANY")
.geography("ANY")
.build());
final var this = MongodbatlasFunctions.getAiModelApiKey(GetAiModelApiKeyArgs.builder()
.projectId(projectId)
.apiKeyId(thisAiModelApiKey.apiKeyId())
.build());
final var thisGetAiModelApiKeys = MongodbatlasFunctions.getAiModelApiKeys(GetAiModelApiKeysArgs.builder()
.projectId(projectId)
.build());
ctx.export("aiModelApiKeyId", thisAiModelApiKey.apiKeyId());
ctx.export("aiModelApiKeySecret", thisAiModelApiKey.secret());
ctx.export("aiModelApiKeyName", this_.applyValue(_this_ -> _this_.name()));
ctx.export("aiModelApiKeyEndpoint", this_.applyValue(_this_ -> _this_.endpoint()));
ctx.export("aiModelApiKeysResults", thisGetAiModelApiKeys.results());
}
}
resources:
thisAiModelApiKey:
type: mongodbatlas:AiModelApiKey
name: this
properties:
projectId: ${projectId}
name: example-ai-model-key
cloud: ANY
geography: ANY
variables:
this:
fn::invoke:
function: mongodbatlas:getAiModelApiKey
arguments:
projectId: ${projectId}
apiKeyId: ${thisAiModelApiKey.apiKeyId}
thisGetAiModelApiKeys:
fn::invoke:
function: mongodbatlas:getAiModelApiKeys
arguments:
projectId: ${projectId}
outputs:
aiModelApiKeyId: ${thisAiModelApiKey.apiKeyId}
aiModelApiKeySecret: ${thisAiModelApiKey.secret}
aiModelApiKeyName: ${this.name}
aiModelApiKeyEndpoint: ${this.endpoint}
aiModelApiKeysResults: ${thisGetAiModelApiKeys.results}
pulumi {
required_providers {
mongodbatlas = {
source = "pulumi/mongodbatlas"
}
}
}
data "mongodbatlas_getaimodelapikey" "this" {
project_id = projectId
api_key_id = mongodbatlas_aimodelapikey.this.api_key_id
}
data "mongodbatlas_getaimodelapikeys" "thisGetAiModelApiKeys" {
project_id = projectId
}
resource "mongodbatlas_aimodelapikey" "this" {
project_id = projectId
name = "example-ai-model-key"
cloud = "ANY"
geography = "ANY"
}
output "aiModelApiKeyId" {
value = mongodbatlas_aimodelapikey.this.api_key_id
}
output "aiModelApiKeySecret" {
value = mongodbatlas_aimodelapikey.this.secret
}
output "aiModelApiKeyName" {
value = data.mongodbatlas_getaimodelapikey.this.name
}
output "aiModelApiKeyEndpoint" {
value = data.mongodbatlas_getaimodelapikey.this.endpoint
}
output "aiModelApiKeysResults" {
value = data.mongodbatlas_getaimodelapikeys.thisGetAiModelApiKeys.results
}
Create AiModelApiKey Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AiModelApiKey(name: string, args: AiModelApiKeyArgs, opts?: CustomResourceOptions);@overload
def AiModelApiKey(resource_name: str,
args: AiModelApiKeyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AiModelApiKey(resource_name: str,
opts: Optional[ResourceOptions] = None,
cloud: Optional[str] = None,
geography: Optional[str] = None,
project_id: Optional[str] = None,
name: Optional[str] = None)func NewAiModelApiKey(ctx *Context, name string, args AiModelApiKeyArgs, opts ...ResourceOption) (*AiModelApiKey, error)public AiModelApiKey(string name, AiModelApiKeyArgs args, CustomResourceOptions? opts = null)
public AiModelApiKey(String name, AiModelApiKeyArgs args)
public AiModelApiKey(String name, AiModelApiKeyArgs args, CustomResourceOptions options)
type: mongodbatlas:AiModelApiKey
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "mongodbatlas_ai_model_api_key" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args AiModelApiKeyArgs
- 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 AiModelApiKeyArgs
- 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 AiModelApiKeyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AiModelApiKeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AiModelApiKeyArgs
- 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 aiModelApiKeyResource = new Mongodbatlas.AiModelApiKey("aiModelApiKeyResource", new()
{
Cloud = "string",
Geography = "string",
ProjectId = "string",
Name = "string",
});
example, err := mongodbatlas.NewAiModelApiKey(ctx, "aiModelApiKeyResource", &mongodbatlas.AiModelApiKeyArgs{
Cloud: pulumi.String("string"),
Geography: pulumi.String("string"),
ProjectId: pulumi.String("string"),
Name: pulumi.String("string"),
})
resource "mongodbatlas_ai_model_api_key" "aiModelApiKeyResource" {
lifecycle {
create_before_destroy = true
}
cloud = "string"
geography = "string"
project_id = "string"
name = "string"
}
var aiModelApiKeyResource = new AiModelApiKey("aiModelApiKeyResource", AiModelApiKeyArgs.builder()
.cloud("string")
.geography("string")
.projectId("string")
.name("string")
.build());
ai_model_api_key_resource = mongodbatlas.AiModelApiKey("aiModelApiKeyResource",
cloud="string",
geography="string",
project_id="string",
name="string")
const aiModelApiKeyResource = new mongodbatlas.AiModelApiKey("aiModelApiKeyResource", {
cloud: "string",
geography: "string",
projectId: "string",
name: "string",
});
type: mongodbatlas:AiModelApiKey
properties:
cloud: string
geography: string
name: string
projectId: string
AiModelApiKey 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 AiModelApiKey resource accepts the following input properties:
- Cloud string
- Cloud provider scope for this API key. Must be "ANY". Additional cloud values will be supported in future API versions.
- Geography string
- Geography scope for this API key. Must be "ANY". Additional geography values will be supported in future API versions.
- Project
Id string - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - Name string
- A name for the new API key that will be created.
- Cloud string
- Cloud provider scope for this API key. Must be "ANY". Additional cloud values will be supported in future API versions.
- Geography string
- Geography scope for this API key. Must be "ANY". Additional geography values will be supported in future API versions.
- Project
Id string - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - Name string
- A name for the new API key that will be created.
- cloud string
- Cloud provider scope for this API key. Must be "ANY". Additional cloud values will be supported in future API versions.
- geography string
- Geography scope for this API key. Must be "ANY". Additional geography values will be supported in future API versions.
- project_
id string - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - name string
- A name for the new API key that will be created.
- cloud String
- Cloud provider scope for this API key. Must be "ANY". Additional cloud values will be supported in future API versions.
- geography String
- Geography scope for this API key. Must be "ANY". Additional geography values will be supported in future API versions.
- project
Id String - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - name String
- A name for the new API key that will be created.
- cloud string
- Cloud provider scope for this API key. Must be "ANY". Additional cloud values will be supported in future API versions.
- geography string
- Geography scope for this API key. Must be "ANY". Additional geography values will be supported in future API versions.
- project
Id string - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - name string
- A name for the new API key that will be created.
- cloud str
- Cloud provider scope for this API key. Must be "ANY". Additional cloud values will be supported in future API versions.
- geography str
- Geography scope for this API key. Must be "ANY". Additional geography values will be supported in future API versions.
- project_
id str - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - name str
- A name for the new API key that will be created.
- cloud String
- Cloud provider scope for this API key. Must be "ANY". Additional cloud values will be supported in future API versions.
- geography String
- Geography scope for this API key. Must be "ANY". Additional geography values will be supported in future API versions.
- project
Id String - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - name String
- A name for the new API key that will be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the AiModelApiKey resource produces the following output properties:
- Api
Key stringId - Identifier used to reference this API key in admin API calls.
- Created
At string - UTC date when the API key was created. This parameter is formatted as an ISO 8601 timestamp.
- Created
By string - Name of the user that created this API key. If no user name is available, the user ID is returned.
- Endpoint string
- Server-computed endpoint hostname derived from
cloudandgeography. This field is read-only and must not be supplied in request bodies. - Id string
- The provider-assigned unique ID for this managed resource.
- Last
Used stringAt - UTC date when the API key was last used. This parameter is formatted as an ISO 8601 timestamp.
- Masked
Secret string - A partially obfuscated version of the API key secret returned when the API key was created.
- Secret string
- The full API key secret used for interacting with the embedding / reranking service. Note: this will only be fully populated in the response to a create API key request. Responses to get, list, and update requests will not include the secret.
- Status string
- A string describing the current status of the API key.
- Api
Key stringId - Identifier used to reference this API key in admin API calls.
- Created
At string - UTC date when the API key was created. This parameter is formatted as an ISO 8601 timestamp.
- Created
By string - Name of the user that created this API key. If no user name is available, the user ID is returned.
- Endpoint string
- Server-computed endpoint hostname derived from
cloudandgeography. This field is read-only and must not be supplied in request bodies. - Id string
- The provider-assigned unique ID for this managed resource.
- Last
Used stringAt - UTC date when the API key was last used. This parameter is formatted as an ISO 8601 timestamp.
- Masked
Secret string - A partially obfuscated version of the API key secret returned when the API key was created.
- Secret string
- The full API key secret used for interacting with the embedding / reranking service. Note: this will only be fully populated in the response to a create API key request. Responses to get, list, and update requests will not include the secret.
- Status string
- A string describing the current status of the API key.
- api_
key_ stringid - Identifier used to reference this API key in admin API calls.
- created_
at string - UTC date when the API key was created. This parameter is formatted as an ISO 8601 timestamp.
- created_
by string - Name of the user that created this API key. If no user name is available, the user ID is returned.
- endpoint string
- Server-computed endpoint hostname derived from
cloudandgeography. This field is read-only and must not be supplied in request bodies. - id string
- The provider-assigned unique ID for this managed resource.
- last_
used_ stringat - UTC date when the API key was last used. This parameter is formatted as an ISO 8601 timestamp.
- masked_
secret string - A partially obfuscated version of the API key secret returned when the API key was created.
- secret string
- The full API key secret used for interacting with the embedding / reranking service. Note: this will only be fully populated in the response to a create API key request. Responses to get, list, and update requests will not include the secret.
- status string
- A string describing the current status of the API key.
- api
Key StringId - Identifier used to reference this API key in admin API calls.
- created
At String - UTC date when the API key was created. This parameter is formatted as an ISO 8601 timestamp.
- created
By String - Name of the user that created this API key. If no user name is available, the user ID is returned.
- endpoint String
- Server-computed endpoint hostname derived from
cloudandgeography. This field is read-only and must not be supplied in request bodies. - id String
- The provider-assigned unique ID for this managed resource.
- last
Used StringAt - UTC date when the API key was last used. This parameter is formatted as an ISO 8601 timestamp.
- masked
Secret String - A partially obfuscated version of the API key secret returned when the API key was created.
- secret String
- The full API key secret used for interacting with the embedding / reranking service. Note: this will only be fully populated in the response to a create API key request. Responses to get, list, and update requests will not include the secret.
- status String
- A string describing the current status of the API key.
- api
Key stringId - Identifier used to reference this API key in admin API calls.
- created
At string - UTC date when the API key was created. This parameter is formatted as an ISO 8601 timestamp.
- created
By string - Name of the user that created this API key. If no user name is available, the user ID is returned.
- endpoint string
- Server-computed endpoint hostname derived from
cloudandgeography. This field is read-only and must not be supplied in request bodies. - id string
- The provider-assigned unique ID for this managed resource.
- last
Used stringAt - UTC date when the API key was last used. This parameter is formatted as an ISO 8601 timestamp.
- masked
Secret string - A partially obfuscated version of the API key secret returned when the API key was created.
- secret string
- The full API key secret used for interacting with the embedding / reranking service. Note: this will only be fully populated in the response to a create API key request. Responses to get, list, and update requests will not include the secret.
- status string
- A string describing the current status of the API key.
- api_
key_ strid - Identifier used to reference this API key in admin API calls.
- created_
at str - UTC date when the API key was created. This parameter is formatted as an ISO 8601 timestamp.
- created_
by str - Name of the user that created this API key. If no user name is available, the user ID is returned.
- endpoint str
- Server-computed endpoint hostname derived from
cloudandgeography. This field is read-only and must not be supplied in request bodies. - id str
- The provider-assigned unique ID for this managed resource.
- last_
used_ strat - UTC date when the API key was last used. This parameter is formatted as an ISO 8601 timestamp.
- masked_
secret str - A partially obfuscated version of the API key secret returned when the API key was created.
- secret str
- The full API key secret used for interacting with the embedding / reranking service. Note: this will only be fully populated in the response to a create API key request. Responses to get, list, and update requests will not include the secret.
- status str
- A string describing the current status of the API key.
- api
Key StringId - Identifier used to reference this API key in admin API calls.
- created
At String - UTC date when the API key was created. This parameter is formatted as an ISO 8601 timestamp.
- created
By String - Name of the user that created this API key. If no user name is available, the user ID is returned.
- endpoint String
- Server-computed endpoint hostname derived from
cloudandgeography. This field is read-only and must not be supplied in request bodies. - id String
- The provider-assigned unique ID for this managed resource.
- last
Used StringAt - UTC date when the API key was last used. This parameter is formatted as an ISO 8601 timestamp.
- masked
Secret String - A partially obfuscated version of the API key secret returned when the API key was created.
- secret String
- The full API key secret used for interacting with the embedding / reranking service. Note: this will only be fully populated in the response to a create API key request. Responses to get, list, and update requests will not include the secret.
- status String
- A string describing the current status of the API key.
Look up Existing AiModelApiKey Resource
Get an existing AiModelApiKey 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?: AiModelApiKeyState, opts?: CustomResourceOptions): AiModelApiKey@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
api_key_id: Optional[str] = None,
cloud: Optional[str] = None,
created_at: Optional[str] = None,
created_by: Optional[str] = None,
endpoint: Optional[str] = None,
geography: Optional[str] = None,
last_used_at: Optional[str] = None,
masked_secret: Optional[str] = None,
name: Optional[str] = None,
project_id: Optional[str] = None,
secret: Optional[str] = None,
status: Optional[str] = None) -> AiModelApiKeyfunc GetAiModelApiKey(ctx *Context, name string, id IDInput, state *AiModelApiKeyState, opts ...ResourceOption) (*AiModelApiKey, error)public static AiModelApiKey Get(string name, Input<string> id, AiModelApiKeyState? state, CustomResourceOptions? opts = null)public static AiModelApiKey get(String name, Output<String> id, AiModelApiKeyState state, CustomResourceOptions options)resources: _: type: mongodbatlas:AiModelApiKey get: id: ${id}import {
to = mongodbatlas_ai_model_api_key.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.
- Api
Key stringId - Identifier used to reference this API key in admin API calls.
- Cloud string
- Cloud provider scope for this API key. Must be "ANY". Additional cloud values will be supported in future API versions.
- Created
At string - UTC date when the API key was created. This parameter is formatted as an ISO 8601 timestamp.
- Created
By string - Name of the user that created this API key. If no user name is available, the user ID is returned.
- Endpoint string
- Server-computed endpoint hostname derived from
cloudandgeography. This field is read-only and must not be supplied in request bodies. - Geography string
- Geography scope for this API key. Must be "ANY". Additional geography values will be supported in future API versions.
- Last
Used stringAt - UTC date when the API key was last used. This parameter is formatted as an ISO 8601 timestamp.
- Masked
Secret string - A partially obfuscated version of the API key secret returned when the API key was created.
- Name string
- A name for the new API key that will be created.
- Project
Id string - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - Secret string
- The full API key secret used for interacting with the embedding / reranking service. Note: this will only be fully populated in the response to a create API key request. Responses to get, list, and update requests will not include the secret.
- Status string
- A string describing the current status of the API key.
- Api
Key stringId - Identifier used to reference this API key in admin API calls.
- Cloud string
- Cloud provider scope for this API key. Must be "ANY". Additional cloud values will be supported in future API versions.
- Created
At string - UTC date when the API key was created. This parameter is formatted as an ISO 8601 timestamp.
- Created
By string - Name of the user that created this API key. If no user name is available, the user ID is returned.
- Endpoint string
- Server-computed endpoint hostname derived from
cloudandgeography. This field is read-only and must not be supplied in request bodies. - Geography string
- Geography scope for this API key. Must be "ANY". Additional geography values will be supported in future API versions.
- Last
Used stringAt - UTC date when the API key was last used. This parameter is formatted as an ISO 8601 timestamp.
- Masked
Secret string - A partially obfuscated version of the API key secret returned when the API key was created.
- Name string
- A name for the new API key that will be created.
- Project
Id string - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - Secret string
- The full API key secret used for interacting with the embedding / reranking service. Note: this will only be fully populated in the response to a create API key request. Responses to get, list, and update requests will not include the secret.
- Status string
- A string describing the current status of the API key.
- api_
key_ stringid - Identifier used to reference this API key in admin API calls.
- cloud string
- Cloud provider scope for this API key. Must be "ANY". Additional cloud values will be supported in future API versions.
- created_
at string - UTC date when the API key was created. This parameter is formatted as an ISO 8601 timestamp.
- created_
by string - Name of the user that created this API key. If no user name is available, the user ID is returned.
- endpoint string
- Server-computed endpoint hostname derived from
cloudandgeography. This field is read-only and must not be supplied in request bodies. - geography string
- Geography scope for this API key. Must be "ANY". Additional geography values will be supported in future API versions.
- last_
used_ stringat - UTC date when the API key was last used. This parameter is formatted as an ISO 8601 timestamp.
- masked_
secret string - A partially obfuscated version of the API key secret returned when the API key was created.
- name string
- A name for the new API key that will be created.
- project_
id string - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - secret string
- The full API key secret used for interacting with the embedding / reranking service. Note: this will only be fully populated in the response to a create API key request. Responses to get, list, and update requests will not include the secret.
- status string
- A string describing the current status of the API key.
- api
Key StringId - Identifier used to reference this API key in admin API calls.
- cloud String
- Cloud provider scope for this API key. Must be "ANY". Additional cloud values will be supported in future API versions.
- created
At String - UTC date when the API key was created. This parameter is formatted as an ISO 8601 timestamp.
- created
By String - Name of the user that created this API key. If no user name is available, the user ID is returned.
- endpoint String
- Server-computed endpoint hostname derived from
cloudandgeography. This field is read-only and must not be supplied in request bodies. - geography String
- Geography scope for this API key. Must be "ANY". Additional geography values will be supported in future API versions.
- last
Used StringAt - UTC date when the API key was last used. This parameter is formatted as an ISO 8601 timestamp.
- masked
Secret String - A partially obfuscated version of the API key secret returned when the API key was created.
- name String
- A name for the new API key that will be created.
- project
Id String - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - secret String
- The full API key secret used for interacting with the embedding / reranking service. Note: this will only be fully populated in the response to a create API key request. Responses to get, list, and update requests will not include the secret.
- status String
- A string describing the current status of the API key.
- api
Key stringId - Identifier used to reference this API key in admin API calls.
- cloud string
- Cloud provider scope for this API key. Must be "ANY". Additional cloud values will be supported in future API versions.
- created
At string - UTC date when the API key was created. This parameter is formatted as an ISO 8601 timestamp.
- created
By string - Name of the user that created this API key. If no user name is available, the user ID is returned.
- endpoint string
- Server-computed endpoint hostname derived from
cloudandgeography. This field is read-only and must not be supplied in request bodies. - geography string
- Geography scope for this API key. Must be "ANY". Additional geography values will be supported in future API versions.
- last
Used stringAt - UTC date when the API key was last used. This parameter is formatted as an ISO 8601 timestamp.
- masked
Secret string - A partially obfuscated version of the API key secret returned when the API key was created.
- name string
- A name for the new API key that will be created.
- project
Id string - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - secret string
- The full API key secret used for interacting with the embedding / reranking service. Note: this will only be fully populated in the response to a create API key request. Responses to get, list, and update requests will not include the secret.
- status string
- A string describing the current status of the API key.
- api_
key_ strid - Identifier used to reference this API key in admin API calls.
- cloud str
- Cloud provider scope for this API key. Must be "ANY". Additional cloud values will be supported in future API versions.
- created_
at str - UTC date when the API key was created. This parameter is formatted as an ISO 8601 timestamp.
- created_
by str - Name of the user that created this API key. If no user name is available, the user ID is returned.
- endpoint str
- Server-computed endpoint hostname derived from
cloudandgeography. This field is read-only and must not be supplied in request bodies. - geography str
- Geography scope for this API key. Must be "ANY". Additional geography values will be supported in future API versions.
- last_
used_ strat - UTC date when the API key was last used. This parameter is formatted as an ISO 8601 timestamp.
- masked_
secret str - A partially obfuscated version of the API key secret returned when the API key was created.
- name str
- A name for the new API key that will be created.
- project_
id str - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - secret str
- The full API key secret used for interacting with the embedding / reranking service. Note: this will only be fully populated in the response to a create API key request. Responses to get, list, and update requests will not include the secret.
- status str
- A string describing the current status of the API key.
- api
Key StringId - Identifier used to reference this API key in admin API calls.
- cloud String
- Cloud provider scope for this API key. Must be "ANY". Additional cloud values will be supported in future API versions.
- created
At String - UTC date when the API key was created. This parameter is formatted as an ISO 8601 timestamp.
- created
By String - Name of the user that created this API key. If no user name is available, the user ID is returned.
- endpoint String
- Server-computed endpoint hostname derived from
cloudandgeography. This field is read-only and must not be supplied in request bodies. - geography String
- Geography scope for this API key. Must be "ANY". Additional geography values will be supported in future API versions.
- last
Used StringAt - UTC date when the API key was last used. This parameter is formatted as an ISO 8601 timestamp.
- masked
Secret String - A partially obfuscated version of the API key secret returned when the API key was created.
- name String
- A name for the new API key that will be created.
- project
Id String - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - secret String
- The full API key secret used for interacting with the embedding / reranking service. Note: this will only be fully populated in the response to a create API key request. Responses to get, list, and update requests will not include the secret.
- status String
- A string describing the current status of the API key.
Import
Import the AI Model API Key resource by using the Project ID and API Key ID in the format PROJECT_ID/API_KEY_ID, e.g.
$ pulumi import mongodbatlas:index/aiModelApiKey:AiModelApiKey example 1112222b3bf99403840e8934/6117ac2fe2a3d04ed27a987v
NOTE: When importing an existing AI Model API Key, the
secretattribute will be null because the secret is only returned by the API at creation time. If you need the secret value, you must create a new API key through Terraform.
For more information, see Manage AI Model API Keys.
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 Friday, Aug 28, 2026 by Pulumi