Viewing docs for MongoDB Atlas v4.15.0
published on Friday, Aug 28, 2026 by Pulumi
published on Friday, Aug 28, 2026 by Pulumi
Viewing docs for MongoDB Atlas v4.15.0
published on Friday, Aug 28, 2026 by Pulumi
published on Friday, Aug 28, 2026 by Pulumi
mongodbatlas.getAiModelOrgApiKey describes an AI Model API Key at the organization level.
NOTE: AI Model API Keys are always associated with a specific project. This organization-level data source allows you to retrieve an API key from any project within the organization by specifying the
apiKeyId.
Example Usage
S
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";
const _this = mongodbatlas.getAiModelOrgApiKey({
orgId: orgId,
apiKeyId: apiKeyId,
});
import pulumi
import pulumi_mongodbatlas as mongodbatlas
this = mongodbatlas.get_ai_model_org_api_key(org_id=org_id,
api_key_id=api_key_id)
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 {
_, err := mongodbatlas.GetAiModelOrgApiKey(ctx, &mongodbatlas.GetAiModelOrgApiKeyArgs{
OrgId: orgId,
ApiKeyId: apiKeyId,
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;
return await Deployment.RunAsync(() =>
{
var @this = Mongodbatlas.GetAiModelOrgApiKey.Invoke(new()
{
OrgId = orgId,
ApiKeyId = apiKeyId,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.mongodbatlas.MongodbatlasFunctions;
import com.pulumi.mongodbatlas.inputs.GetAiModelOrgApiKeyArgs;
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) {
final var this = MongodbatlasFunctions.getAiModelOrgApiKey(GetAiModelOrgApiKeyArgs.builder()
.orgId(orgId)
.apiKeyId(apiKeyId)
.build());
}
}
variables:
this:
fn::invoke:
function: mongodbatlas:getAiModelOrgApiKey
arguments:
orgId: ${orgId}
apiKeyId: ${apiKeyId}
pulumi {
required_providers {
mongodbatlas = {
source = "pulumi/mongodbatlas"
}
}
}
data "mongodbatlas_getaimodelorgapikey" "this" {
org_id = orgId
api_key_id = apiKeyId
}
Using getAiModelOrgApiKey
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getAiModelOrgApiKey(args: GetAiModelOrgApiKeyArgs, opts?: InvokeOptions): Promise<GetAiModelOrgApiKeyResult>
function getAiModelOrgApiKeyOutput(args: GetAiModelOrgApiKeyOutputArgs, opts?: InvokeOutputOptions): Output<GetAiModelOrgApiKeyResult>def get_ai_model_org_api_key(api_key_id: Optional[str] = None,
org_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAiModelOrgApiKeyResult
def get_ai_model_org_api_key_output(api_key_id: pulumi.Input[Optional[str]] = None,
org_id: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOutputOptions] = None) -> Output[GetAiModelOrgApiKeyResult]func GetAiModelOrgApiKey(ctx *Context, args *GetAiModelOrgApiKeyArgs, opts ...InvokeOption) (*GetAiModelOrgApiKeyResult, error)
func GetAiModelOrgApiKeyOutput(ctx *Context, args *GetAiModelOrgApiKeyOutputArgs, opts ...InvokeOption) GetAiModelOrgApiKeyResultOutput> Note: This function is named GetAiModelOrgApiKey in the Go SDK.
public static class GetAiModelOrgApiKey
{
public static Task<GetAiModelOrgApiKeyResult> InvokeAsync(GetAiModelOrgApiKeyArgs args, InvokeOptions? opts = null)
public static Output<GetAiModelOrgApiKeyResult> Invoke(GetAiModelOrgApiKeyInvokeArgs args, InvokeOptions? opts = null)
public static Output<GetAiModelOrgApiKeyResult> Invoke(GetAiModelOrgApiKeyInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<GetAiModelOrgApiKeyResult> getAiModelOrgApiKey(GetAiModelOrgApiKeyArgs args, InvokeOptions options)
public static Output<GetAiModelOrgApiKeyResult> getAiModelOrgApiKey(GetAiModelOrgApiKeyArgs args, InvokeOptions options)
public static Output<GetAiModelOrgApiKeyResult> getAiModelOrgApiKey(GetAiModelOrgApiKeyArgs args, InvokeOutputOptions options)
fn::invoke:
function: mongodbatlas:index/getAiModelOrgApiKey:getAiModelOrgApiKey
arguments:
# arguments dictionarydata "mongodbatlas_get_ai_model_org_api_key" "name" {
# arguments
}The following arguments are supported:
- api_
key_ stringid - The id of the API key to be retrieved.
- org_
id string - Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
- api_
key_ strid - The id of the API key to be retrieved.
- org_
id str - Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
getAiModelOrgApiKey Result
The following output properties are available:
- Api
Key stringId - The id of the API key to be retrieved.
- Cloud string
- Cloud provider scope for this API key. Use "ANY" for cloud-agnostic scope.
- 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. Use "ANY" for geography-agnostic scope.
- 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
- Arbitrary string identifier assigned to this API key for convenient identification.
- Org
Id string - Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
- Project
Id string - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - Status string
- A string describing the current status of the API key.
- Api
Key stringId - The id of the API key to be retrieved.
- Cloud string
- Cloud provider scope for this API key. Use "ANY" for cloud-agnostic scope.
- 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. Use "ANY" for geography-agnostic scope.
- 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
- Arbitrary string identifier assigned to this API key for convenient identification.
- Org
Id string - Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
- Project
Id string - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - Status string
- A string describing the current status of the API key.
- api_
key_ stringid - The id of the API key to be retrieved.
- cloud string
- Cloud provider scope for this API key. Use "ANY" for cloud-agnostic scope.
- 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. Use "ANY" for geography-agnostic scope.
- 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
- Arbitrary string identifier assigned to this API key for convenient identification.
- org_
id string - Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
- project_
id string - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - status string
- A string describing the current status of the API key.
- api
Key StringId - The id of the API key to be retrieved.
- cloud String
- Cloud provider scope for this API key. Use "ANY" for cloud-agnostic scope.
- 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. Use "ANY" for geography-agnostic scope.
- 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
- Arbitrary string identifier assigned to this API key for convenient identification.
- org
Id String - Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
- project
Id String - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - status String
- A string describing the current status of the API key.
- api
Key stringId - The id of the API key to be retrieved.
- cloud string
- Cloud provider scope for this API key. Use "ANY" for cloud-agnostic scope.
- 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. Use "ANY" for geography-agnostic scope.
- 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
- Arbitrary string identifier assigned to this API key for convenient identification.
- org
Id string - Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
- project
Id string - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - status string
- A string describing the current status of the API key.
- api_
key_ strid - The id of the API key to be retrieved.
- cloud str
- Cloud provider scope for this API key. Use "ANY" for cloud-agnostic scope.
- 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. Use "ANY" for geography-agnostic scope.
- 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
- Arbitrary string identifier assigned to this API key for convenient identification.
- org_
id str - Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
- project_
id str - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - status str
- A string describing the current status of the API key.
- api
Key StringId - The id of the API key to be retrieved.
- cloud String
- Cloud provider scope for this API key. Use "ANY" for cloud-agnostic scope.
- 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. Use "ANY" for geography-agnostic scope.
- 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
- Arbitrary string identifier assigned to this API key for convenient identification.
- org
Id String - Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
- project
Id String - Unique 24-hexadecimal digit string that identifies your project, also known as
groupIdin the official documentation. - status String
- A string describing the current status of the API key.
Package Details
- Repository
- MongoDB Atlas pulumi/pulumi-mongodbatlas
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
mongodbatlasTerraform Provider.
Viewing docs for MongoDB Atlas v4.15.0
published on Friday, Aug 28, 2026 by Pulumi
published on Friday, Aug 28, 2026 by Pulumi