mongodbatlas logo
MongoDB Atlas v3.7.1, Mar 10 23

mongodbatlas.ApiKey

Import

API Keys must be imported using org ID, API Key ID e.g.

 $ pulumi import mongodbatlas:index/apiKey:ApiKey test 5d09d6a59ccf6445652a444a-6576974933969669

See MongoDB Atlas API - API Key - Documentation for more information.

Create ApiKey Resource

new ApiKey(name: string, args: ApiKeyArgs, opts?: CustomResourceOptions);
@overload
def ApiKey(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           description: Optional[str] = None,
           org_id: Optional[str] = None,
           role_names: Optional[Sequence[str]] = None)
@overload
def ApiKey(resource_name: str,
           args: ApiKeyArgs,
           opts: Optional[ResourceOptions] = None)
func NewApiKey(ctx *Context, name string, args ApiKeyArgs, opts ...ResourceOption) (*ApiKey, error)
public ApiKey(string name, ApiKeyArgs args, CustomResourceOptions? opts = null)
public ApiKey(String name, ApiKeyArgs args)
public ApiKey(String name, ApiKeyArgs args, CustomResourceOptions options)
type: mongodbatlas:ApiKey
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args ApiKeyArgs
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 ApiKeyArgs
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 ApiKeyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ApiKeyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args ApiKeyArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

ApiKey Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The ApiKey resource accepts the following input properties:

Description string

Description of this Organization API key.

OrgId string

Unique identifier for the organization whose API keys you want to retrieve. Use the /orgs endpoint to retrieve all organizations to which the authenticated user has access.

RoleNames List<string>

Name of the role. This resource returns all the roles the user has in Atlas. The following are valid roles:

Description string

Description of this Organization API key.

OrgId string

Unique identifier for the organization whose API keys you want to retrieve. Use the /orgs endpoint to retrieve all organizations to which the authenticated user has access.

RoleNames []string

Name of the role. This resource returns all the roles the user has in Atlas. The following are valid roles:

description String

Description of this Organization API key.

orgId String

Unique identifier for the organization whose API keys you want to retrieve. Use the /orgs endpoint to retrieve all organizations to which the authenticated user has access.

roleNames List<String>

Name of the role. This resource returns all the roles the user has in Atlas. The following are valid roles:

description string

Description of this Organization API key.

orgId string

Unique identifier for the organization whose API keys you want to retrieve. Use the /orgs endpoint to retrieve all organizations to which the authenticated user has access.

roleNames string[]

Name of the role. This resource returns all the roles the user has in Atlas. The following are valid roles:

description str

Description of this Organization API key.

org_id str

Unique identifier for the organization whose API keys you want to retrieve. Use the /orgs endpoint to retrieve all organizations to which the authenticated user has access.

role_names Sequence[str]

Name of the role. This resource returns all the roles the user has in Atlas. The following are valid roles:

description String

Description of this Organization API key.

orgId String

Unique identifier for the organization whose API keys you want to retrieve. Use the /orgs endpoint to retrieve all organizations to which the authenticated user has access.

roleNames List<String>

Name of the role. This resource returns all the roles the user has in Atlas. The following are valid roles:

Outputs

All input properties are implicitly available as output properties. Additionally, the ApiKey resource produces the following output properties:

ApiKeyId string

The unique identifier of the Programmatic API key you want to associate with the Project. The Programmatic API key and Project must share the same parent organization. Note: this is not the publicKey of the Programmatic API key but the id of the key. See Programmatic API Keys for more.

Id string

The provider-assigned unique ID for this managed resource.

PrivateKey string
PublicKey string
ApiKeyId string

The unique identifier of the Programmatic API key you want to associate with the Project. The Programmatic API key and Project must share the same parent organization. Note: this is not the publicKey of the Programmatic API key but the id of the key. See Programmatic API Keys for more.

Id string

The provider-assigned unique ID for this managed resource.

PrivateKey string
PublicKey string
apiKeyId String

The unique identifier of the Programmatic API key you want to associate with the Project. The Programmatic API key and Project must share the same parent organization. Note: this is not the publicKey of the Programmatic API key but the id of the key. See Programmatic API Keys for more.

id String

The provider-assigned unique ID for this managed resource.

privateKey String
publicKey String
apiKeyId string

The unique identifier of the Programmatic API key you want to associate with the Project. The Programmatic API key and Project must share the same parent organization. Note: this is not the publicKey of the Programmatic API key but the id of the key. See Programmatic API Keys for more.

id string

The provider-assigned unique ID for this managed resource.

privateKey string
publicKey string
api_key_id str

The unique identifier of the Programmatic API key you want to associate with the Project. The Programmatic API key and Project must share the same parent organization. Note: this is not the publicKey of the Programmatic API key but the id of the key. See Programmatic API Keys for more.

id str

The provider-assigned unique ID for this managed resource.

private_key str
public_key str
apiKeyId String

The unique identifier of the Programmatic API key you want to associate with the Project. The Programmatic API key and Project must share the same parent organization. Note: this is not the publicKey of the Programmatic API key but the id of the key. See Programmatic API Keys for more.

id String

The provider-assigned unique ID for this managed resource.

privateKey String
publicKey String

Look up Existing ApiKey Resource

Get an existing ApiKey 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?: ApiKeyState, opts?: CustomResourceOptions): ApiKey
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        api_key_id: Optional[str] = None,
        description: Optional[str] = None,
        org_id: Optional[str] = None,
        private_key: Optional[str] = None,
        public_key: Optional[str] = None,
        role_names: Optional[Sequence[str]] = None) -> ApiKey
func GetApiKey(ctx *Context, name string, id IDInput, state *ApiKeyState, opts ...ResourceOption) (*ApiKey, error)
public static ApiKey Get(string name, Input<string> id, ApiKeyState? state, CustomResourceOptions? opts = null)
public static ApiKey get(String name, Output<String> id, ApiKeyState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
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.
The following state arguments are supported:
ApiKeyId string

The unique identifier of the Programmatic API key you want to associate with the Project. The Programmatic API key and Project must share the same parent organization. Note: this is not the publicKey of the Programmatic API key but the id of the key. See Programmatic API Keys for more.

Description string

Description of this Organization API key.

OrgId string

Unique identifier for the organization whose API keys you want to retrieve. Use the /orgs endpoint to retrieve all organizations to which the authenticated user has access.

PrivateKey string
PublicKey string
RoleNames List<string>

Name of the role. This resource returns all the roles the user has in Atlas. The following are valid roles:

ApiKeyId string

The unique identifier of the Programmatic API key you want to associate with the Project. The Programmatic API key and Project must share the same parent organization. Note: this is not the publicKey of the Programmatic API key but the id of the key. See Programmatic API Keys for more.

Description string

Description of this Organization API key.

OrgId string

Unique identifier for the organization whose API keys you want to retrieve. Use the /orgs endpoint to retrieve all organizations to which the authenticated user has access.

PrivateKey string
PublicKey string
RoleNames []string

Name of the role. This resource returns all the roles the user has in Atlas. The following are valid roles:

apiKeyId String

The unique identifier of the Programmatic API key you want to associate with the Project. The Programmatic API key and Project must share the same parent organization. Note: this is not the publicKey of the Programmatic API key but the id of the key. See Programmatic API Keys for more.

description String

Description of this Organization API key.

orgId String

Unique identifier for the organization whose API keys you want to retrieve. Use the /orgs endpoint to retrieve all organizations to which the authenticated user has access.

privateKey String
publicKey String
roleNames List<String>

Name of the role. This resource returns all the roles the user has in Atlas. The following are valid roles:

apiKeyId string

The unique identifier of the Programmatic API key you want to associate with the Project. The Programmatic API key and Project must share the same parent organization. Note: this is not the publicKey of the Programmatic API key but the id of the key. See Programmatic API Keys for more.

description string

Description of this Organization API key.

orgId string

Unique identifier for the organization whose API keys you want to retrieve. Use the /orgs endpoint to retrieve all organizations to which the authenticated user has access.

privateKey string
publicKey string
roleNames string[]

Name of the role. This resource returns all the roles the user has in Atlas. The following are valid roles:

api_key_id str

The unique identifier of the Programmatic API key you want to associate with the Project. The Programmatic API key and Project must share the same parent organization. Note: this is not the publicKey of the Programmatic API key but the id of the key. See Programmatic API Keys for more.

description str

Description of this Organization API key.

org_id str

Unique identifier for the organization whose API keys you want to retrieve. Use the /orgs endpoint to retrieve all organizations to which the authenticated user has access.

private_key str
public_key str
role_names Sequence[str]

Name of the role. This resource returns all the roles the user has in Atlas. The following are valid roles:

apiKeyId String

The unique identifier of the Programmatic API key you want to associate with the Project. The Programmatic API key and Project must share the same parent organization. Note: this is not the publicKey of the Programmatic API key but the id of the key. See Programmatic API Keys for more.

description String

Description of this Organization API key.

orgId String

Unique identifier for the organization whose API keys you want to retrieve. Use the /orgs endpoint to retrieve all organizations to which the authenticated user has access.

privateKey String
publicKey String
roleNames List<String>

Name of the role. This resource returns all the roles the user has in Atlas. The following are valid roles:

Package Details

Repository
MongoDB Atlas pulumi/pulumi-mongodbatlas
License
Apache-2.0
Notes

This Pulumi package is based on the mongodbatlas Terraform Provider.