1. Packages
  2. Mongodbatlas Provider
  3. API Docs
  4. getApiKey
MongoDB Atlas v3.30.0 published on Friday, Mar 21, 2025 by Pulumi

mongodbatlas.getApiKey

Explore with Pulumi AI

MongoDB Atlas v3.30.0 published on Friday, Mar 21, 2025 by Pulumi

Example Usage

Using getApiKey

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 getApiKey(args: GetApiKeyArgs, opts?: InvokeOptions): Promise<GetApiKeyResult>
function getApiKeyOutput(args: GetApiKeyOutputArgs, opts?: InvokeOptions): Output<GetApiKeyResult>
Copy
def get_api_key(api_key_id: Optional[str] = None,
                org_id: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetApiKeyResult
def get_api_key_output(api_key_id: Optional[pulumi.Input[str]] = None,
                org_id: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetApiKeyResult]
Copy
func LookupApiKey(ctx *Context, args *LookupApiKeyArgs, opts ...InvokeOption) (*LookupApiKeyResult, error)
func LookupApiKeyOutput(ctx *Context, args *LookupApiKeyOutputArgs, opts ...InvokeOption) LookupApiKeyResultOutput
Copy

> Note: This function is named LookupApiKey in the Go SDK.

public static class GetApiKey 
{
    public static Task<GetApiKeyResult> InvokeAsync(GetApiKeyArgs args, InvokeOptions? opts = null)
    public static Output<GetApiKeyResult> Invoke(GetApiKeyInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetApiKeyResult> getApiKey(GetApiKeyArgs args, InvokeOptions options)
public static Output<GetApiKeyResult> getApiKey(GetApiKeyArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: mongodbatlas:index/getApiKey:getApiKey
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ApiKeyId This property is required. string
Unique identifier for the organization API key.
OrgId This property is required. string
Unique identifier for the organization.
ApiKeyId This property is required. string
Unique identifier for the organization API key.
OrgId This property is required. string
Unique identifier for the organization.
apiKeyId This property is required. String
Unique identifier for the organization API key.
orgId This property is required. String
Unique identifier for the organization.
apiKeyId This property is required. string
Unique identifier for the organization API key.
orgId This property is required. string
Unique identifier for the organization.
api_key_id This property is required. str
Unique identifier for the organization API key.
org_id This property is required. str
Unique identifier for the organization.
apiKeyId This property is required. String
Unique identifier for the organization API key.
orgId This property is required. String
Unique identifier for the organization.

getApiKey Result

The following output properties are available:

ApiKeyId string
Description string
Description of this Organization API key.
Id string
The provider-assigned unique ID for this managed resource.
OrgId string
PublicKey string
Public key for this Organization API key.
RoleNames List<string>
Name of the role. This resource returns all the roles the user has in Atlas. The following are valid roles:

  • ORG_OWNER
  • ORG_GROUP_CREATOR
  • ORG_BILLING_ADMIN
  • ORG_READ_ONLY
  • ORG_MEMBER
ApiKeyId string
Description string
Description of this Organization API key.
Id string
The provider-assigned unique ID for this managed resource.
OrgId string
PublicKey string
Public key for this Organization API key.
RoleNames []string
Name of the role. This resource returns all the roles the user has in Atlas. The following are valid roles:

  • ORG_OWNER
  • ORG_GROUP_CREATOR
  • ORG_BILLING_ADMIN
  • ORG_READ_ONLY
  • ORG_MEMBER
apiKeyId String
description String
Description of this Organization API key.
id String
The provider-assigned unique ID for this managed resource.
orgId String
publicKey String
Public key for this Organization API key.
roleNames List<String>
Name of the role. This resource returns all the roles the user has in Atlas. The following are valid roles:

  • ORG_OWNER
  • ORG_GROUP_CREATOR
  • ORG_BILLING_ADMIN
  • ORG_READ_ONLY
  • ORG_MEMBER
apiKeyId string
description string
Description of this Organization API key.
id string
The provider-assigned unique ID for this managed resource.
orgId string
publicKey string
Public key for this Organization API key.
roleNames string[]
Name of the role. This resource returns all the roles the user has in Atlas. The following are valid roles:

  • ORG_OWNER
  • ORG_GROUP_CREATOR
  • ORG_BILLING_ADMIN
  • ORG_READ_ONLY
  • ORG_MEMBER
api_key_id str
description str
Description of this Organization API key.
id str
The provider-assigned unique ID for this managed resource.
org_id str
public_key str
Public key for this Organization API key.
role_names Sequence[str]
Name of the role. This resource returns all the roles the user has in Atlas. The following are valid roles:

  • ORG_OWNER
  • ORG_GROUP_CREATOR
  • ORG_BILLING_ADMIN
  • ORG_READ_ONLY
  • ORG_MEMBER
apiKeyId String
description String
Description of this Organization API key.
id String
The provider-assigned unique ID for this managed resource.
orgId String
publicKey String
Public key for this Organization API key.
roleNames List<String>
Name of the role. This resource returns all the roles the user has in Atlas. The following are valid roles:

  • ORG_OWNER
  • ORG_GROUP_CREATOR
  • ORG_BILLING_ADMIN
  • ORG_READ_ONLY
  • ORG_MEMBER

Package Details

Repository
MongoDB Atlas pulumi/pulumi-mongodbatlas
License
Apache-2.0
Notes
This Pulumi package is based on the mongodbatlas Terraform Provider.
MongoDB Atlas v3.30.0 published on Friday, Mar 21, 2025 by Pulumi