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.
- Org
Id 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.
- Role
Names 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.
- Org
Id 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.
- Role
Names []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.
- org
Id 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.
- role
Names 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.
- org
Id 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.
- role
Names 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.
- org
Id 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.
- role
Names 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:
- Api
Key stringId 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 theid
of the key. See Programmatic API Keys for more.- Id string
The provider-assigned unique ID for this managed resource.
- Private
Key string - Public
Key string
- Api
Key stringId 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 theid
of the key. See Programmatic API Keys for more.- Id string
The provider-assigned unique ID for this managed resource.
- Private
Key string - Public
Key string
- api
Key StringId 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 theid
of the key. See Programmatic API Keys for more.- id String
The provider-assigned unique ID for this managed resource.
- private
Key String - public
Key String
- api
Key stringId 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 theid
of the key. See Programmatic API Keys for more.- id string
The provider-assigned unique ID for this managed resource.
- private
Key string - public
Key string
- api_
key_ strid 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 theid
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
- api
Key StringId 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 theid
of the key. See Programmatic API Keys for more.- id String
The provider-assigned unique ID for this managed resource.
- private
Key String - public
Key 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.
- Api
Key stringId 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 theid
of the key. See Programmatic API Keys for more.- Description string
Description of this Organization API key.
- Org
Id 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.
- Private
Key string - Public
Key string - Role
Names List<string> Name of the role. This resource returns all the roles the user has in Atlas. The following are valid roles:
- Api
Key stringId 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 theid
of the key. See Programmatic API Keys for more.- Description string
Description of this Organization API key.
- Org
Id 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.
- Private
Key string - Public
Key string - Role
Names []string Name of the role. This resource returns all the roles the user has in Atlas. The following are valid roles:
- api
Key StringId 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 theid
of the key. See Programmatic API Keys for more.- description String
Description of this Organization API key.
- org
Id 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.
- private
Key String - public
Key String - role
Names List<String> Name of the role. This resource returns all the roles the user has in Atlas. The following are valid roles:
- api
Key stringId 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 theid
of the key. See Programmatic API Keys for more.- description string
Description of this Organization API key.
- org
Id 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.
- private
Key string - public
Key string - role
Names string[] Name of the role. This resource returns all the roles the user has in Atlas. The following are valid roles:
- api_
key_ strid 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 theid
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:
- api
Key StringId 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 theid
of the key. See Programmatic API Keys for more.- description String
Description of this Organization API key.
- org
Id 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.
- private
Key String - public
Key String - role
Names 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.