1. Packages
  2. Packages
  3. Confluent Provider
  4. API Docs
  5. ApiKey
Viewing docs for Confluent v0.1.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
confluentcloud logo
Viewing docs for Confluent v0.1.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    Import

    You can import a Kafka API Key by using the Environment ID and Kafka API Key ID in the format <Environment ID>/<Kafka API Key ID>, for example$ export CONFLUENT_CLOUD_API_KEY="<cloud_api_key>" $ export CONFLUENT_CLOUD_API_SECRET="<cloud_api_secret>" $ export API_KEY_SECRET="<api_key_secret>" # Option #1Kafka API Key

     $ pulumi import confluentcloud:index/apiKey:ApiKey example_kafka_api_key "env-abc123/UTT6WDRXX7FHD2GV"
    

    You can import a Cloud API Key by using Cloud API Key ID, for example$ export CONFLUENT_CLOUD_API_KEY="<cloud_api_key>" $ export CONFLUENT_CLOUD_API_SECRET="<cloud_api_secret>" $ export API_KEY_SECRET="<api_key_secret>" # Option #2Cloud API Key

     $ pulumi import confluentcloud:index/apiKey:ApiKey example_cloud_api_key "4UEXOMMWIBE5KZQG"
    

    !> Warning: Do not forget to delete terminal command history afterwards for security purposes.

    Create ApiKey Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ApiKey(name: string, args: ApiKeyArgs, opts?: CustomResourceOptions);
    @overload
    def ApiKey(resource_name: str,
               args: ApiKeyArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def ApiKey(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               owner: Optional[ApiKeyOwnerArgs] = None,
               description: Optional[str] = None,
               display_name: Optional[str] = None,
               managed_resource: Optional[ApiKeyManagedResourceArgs] = 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: confluentcloud:ApiKey
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    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.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var apiKeyResource = new ConfluentCloud.ApiKey("apiKeyResource", new()
    {
        Owner = new ConfluentCloud.Inputs.ApiKeyOwnerArgs
        {
            ApiVersion = "string",
            Id = "string",
            Kind = "string",
        },
        Description = "string",
        DisplayName = "string",
        ManagedResource = new ConfluentCloud.Inputs.ApiKeyManagedResourceArgs
        {
            ApiVersion = "string",
            Environment = new ConfluentCloud.Inputs.ApiKeyManagedResourceEnvironmentArgs
            {
                Id = "string",
            },
            Id = "string",
            Kind = "string",
        },
    });
    
    example, err := confluentcloud.NewApiKey(ctx, "apiKeyResource", &confluentcloud.ApiKeyArgs{
    	Owner: &confluentcloud.ApiKeyOwnerArgs{
    		ApiVersion: pulumi.String("string"),
    		Id:         pulumi.String("string"),
    		Kind:       pulumi.String("string"),
    	},
    	Description: pulumi.String("string"),
    	DisplayName: pulumi.String("string"),
    	ManagedResource: &confluentcloud.ApiKeyManagedResourceArgs{
    		ApiVersion: pulumi.String("string"),
    		Environment: &confluentcloud.ApiKeyManagedResourceEnvironmentArgs{
    			Id: pulumi.String("string"),
    		},
    		Id:   pulumi.String("string"),
    		Kind: pulumi.String("string"),
    	},
    })
    
    var apiKeyResource = new ApiKey("apiKeyResource", ApiKeyArgs.builder()
        .owner(ApiKeyOwnerArgs.builder()
            .apiVersion("string")
            .id("string")
            .kind("string")
            .build())
        .description("string")
        .displayName("string")
        .managedResource(ApiKeyManagedResourceArgs.builder()
            .apiVersion("string")
            .environment(ApiKeyManagedResourceEnvironmentArgs.builder()
                .id("string")
                .build())
            .id("string")
            .kind("string")
            .build())
        .build());
    
    api_key_resource = confluentcloud.ApiKey("apiKeyResource",
        owner={
            "api_version": "string",
            "id": "string",
            "kind": "string",
        },
        description="string",
        display_name="string",
        managed_resource={
            "api_version": "string",
            "environment": {
                "id": "string",
            },
            "id": "string",
            "kind": "string",
        })
    
    const apiKeyResource = new confluentcloud.ApiKey("apiKeyResource", {
        owner: {
            apiVersion: "string",
            id: "string",
            kind: "string",
        },
        description: "string",
        displayName: "string",
        managedResource: {
            apiVersion: "string",
            environment: {
                id: "string",
            },
            id: "string",
            kind: "string",
        },
    });
    
    type: confluentcloud:ApiKey
    properties:
        description: string
        displayName: string
        managedResource:
            apiVersion: string
            environment:
                id: string
            id: string
            kind: string
        owner:
            apiVersion: string
            id: string
            kind: string
    

    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

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The ApiKey resource accepts the following input properties:

    Owner Pulumi.ConfluentCloud.Inputs.ApiKeyOwner
    The owner to which the API Key belongs. The owner can be one of 'iam.v2.User', 'iam.v2.ServiceAccount'.
    Description string
    A free-form description of the API Account.
    DisplayName string
    A human-readable name for the API Key.
    ManagedResource Pulumi.ConfluentCloud.Inputs.ApiKeyManagedResource
    The resource associated with this object. The only resource that is supported is 'cmk.v2.KafkaCluster'.
    Owner ApiKeyOwnerArgs
    The owner to which the API Key belongs. The owner can be one of 'iam.v2.User', 'iam.v2.ServiceAccount'.
    Description string
    A free-form description of the API Account.
    DisplayName string
    A human-readable name for the API Key.
    ManagedResource ApiKeyManagedResourceArgs
    The resource associated with this object. The only resource that is supported is 'cmk.v2.KafkaCluster'.
    owner ApiKeyOwner
    The owner to which the API Key belongs. The owner can be one of 'iam.v2.User', 'iam.v2.ServiceAccount'.
    description String
    A free-form description of the API Account.
    displayName String
    A human-readable name for the API Key.
    managedResource ApiKeyManagedResource
    The resource associated with this object. The only resource that is supported is 'cmk.v2.KafkaCluster'.
    owner ApiKeyOwner
    The owner to which the API Key belongs. The owner can be one of 'iam.v2.User', 'iam.v2.ServiceAccount'.
    description string
    A free-form description of the API Account.
    displayName string
    A human-readable name for the API Key.
    managedResource ApiKeyManagedResource
    The resource associated with this object. The only resource that is supported is 'cmk.v2.KafkaCluster'.
    owner ApiKeyOwnerArgs
    The owner to which the API Key belongs. The owner can be one of 'iam.v2.User', 'iam.v2.ServiceAccount'.
    description str
    A free-form description of the API Account.
    display_name str
    A human-readable name for the API Key.
    managed_resource ApiKeyManagedResourceArgs
    The resource associated with this object. The only resource that is supported is 'cmk.v2.KafkaCluster'.
    owner Property Map
    The owner to which the API Key belongs. The owner can be one of 'iam.v2.User', 'iam.v2.ServiceAccount'.
    description String
    A free-form description of the API Account.
    displayName String
    A human-readable name for the API Key.
    managedResource Property Map
    The resource associated with this object. The only resource that is supported is 'cmk.v2.KafkaCluster'.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Secret string
    (Required String) The secret of the API Key.
    Id string
    The provider-assigned unique ID for this managed resource.
    Secret string
    (Required String) The secret of the API Key.
    id String
    The provider-assigned unique ID for this managed resource.
    secret String
    (Required String) The secret of the API Key.
    id string
    The provider-assigned unique ID for this managed resource.
    secret string
    (Required String) The secret of the API Key.
    id str
    The provider-assigned unique ID for this managed resource.
    secret str
    (Required String) The secret of the API Key.
    id String
    The provider-assigned unique ID for this managed resource.
    secret String
    (Required String) The secret of the API Key.

    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,
            description: Optional[str] = None,
            display_name: Optional[str] = None,
            managed_resource: Optional[ApiKeyManagedResourceArgs] = None,
            owner: Optional[ApiKeyOwnerArgs] = None,
            secret: Optional[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)
    resources:  _:    type: confluentcloud:ApiKey    get:      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.
    The following state arguments are supported:
    Description string
    A free-form description of the API Account.
    DisplayName string
    A human-readable name for the API Key.
    ManagedResource Pulumi.ConfluentCloud.Inputs.ApiKeyManagedResource
    The resource associated with this object. The only resource that is supported is 'cmk.v2.KafkaCluster'.
    Owner Pulumi.ConfluentCloud.Inputs.ApiKeyOwner
    The owner to which the API Key belongs. The owner can be one of 'iam.v2.User', 'iam.v2.ServiceAccount'.
    Secret string
    (Required String) The secret of the API Key.
    Description string
    A free-form description of the API Account.
    DisplayName string
    A human-readable name for the API Key.
    ManagedResource ApiKeyManagedResourceArgs
    The resource associated with this object. The only resource that is supported is 'cmk.v2.KafkaCluster'.
    Owner ApiKeyOwnerArgs
    The owner to which the API Key belongs. The owner can be one of 'iam.v2.User', 'iam.v2.ServiceAccount'.
    Secret string
    (Required String) The secret of the API Key.
    description String
    A free-form description of the API Account.
    displayName String
    A human-readable name for the API Key.
    managedResource ApiKeyManagedResource
    The resource associated with this object. The only resource that is supported is 'cmk.v2.KafkaCluster'.
    owner ApiKeyOwner
    The owner to which the API Key belongs. The owner can be one of 'iam.v2.User', 'iam.v2.ServiceAccount'.
    secret String
    (Required String) The secret of the API Key.
    description string
    A free-form description of the API Account.
    displayName string
    A human-readable name for the API Key.
    managedResource ApiKeyManagedResource
    The resource associated with this object. The only resource that is supported is 'cmk.v2.KafkaCluster'.
    owner ApiKeyOwner
    The owner to which the API Key belongs. The owner can be one of 'iam.v2.User', 'iam.v2.ServiceAccount'.
    secret string
    (Required String) The secret of the API Key.
    description str
    A free-form description of the API Account.
    display_name str
    A human-readable name for the API Key.
    managed_resource ApiKeyManagedResourceArgs
    The resource associated with this object. The only resource that is supported is 'cmk.v2.KafkaCluster'.
    owner ApiKeyOwnerArgs
    The owner to which the API Key belongs. The owner can be one of 'iam.v2.User', 'iam.v2.ServiceAccount'.
    secret str
    (Required String) The secret of the API Key.
    description String
    A free-form description of the API Account.
    displayName String
    A human-readable name for the API Key.
    managedResource Property Map
    The resource associated with this object. The only resource that is supported is 'cmk.v2.KafkaCluster'.
    owner Property Map
    The owner to which the API Key belongs. The owner can be one of 'iam.v2.User', 'iam.v2.ServiceAccount'.
    secret String
    (Required String) The secret of the API Key.

    Supporting Types

    ApiKeyManagedResource, ApiKeyManagedResourceArgs

    ApiVersion string
    The API group and version of the managed resource that the API Key associated with, for example, cmk/v2.
    Environment Pulumi.ConfluentCloud.Inputs.ApiKeyManagedResourceEnvironment
    Id string
    The ID of the Environment that the managed resource belongs to, for example, env-abc123.
    Kind string
    The kind of the managed resource that the API Key associated with, for example, Cluster.
    ApiVersion string
    The API group and version of the managed resource that the API Key associated with, for example, cmk/v2.
    Environment ApiKeyManagedResourceEnvironment
    Id string
    The ID of the Environment that the managed resource belongs to, for example, env-abc123.
    Kind string
    The kind of the managed resource that the API Key associated with, for example, Cluster.
    apiVersion String
    The API group and version of the managed resource that the API Key associated with, for example, cmk/v2.
    environment ApiKeyManagedResourceEnvironment
    id String
    The ID of the Environment that the managed resource belongs to, for example, env-abc123.
    kind String
    The kind of the managed resource that the API Key associated with, for example, Cluster.
    apiVersion string
    The API group and version of the managed resource that the API Key associated with, for example, cmk/v2.
    environment ApiKeyManagedResourceEnvironment
    id string
    The ID of the Environment that the managed resource belongs to, for example, env-abc123.
    kind string
    The kind of the managed resource that the API Key associated with, for example, Cluster.
    api_version str
    The API group and version of the managed resource that the API Key associated with, for example, cmk/v2.
    environment ApiKeyManagedResourceEnvironment
    id str
    The ID of the Environment that the managed resource belongs to, for example, env-abc123.
    kind str
    The kind of the managed resource that the API Key associated with, for example, Cluster.
    apiVersion String
    The API group and version of the managed resource that the API Key associated with, for example, cmk/v2.
    environment Property Map
    id String
    The ID of the Environment that the managed resource belongs to, for example, env-abc123.
    kind String
    The kind of the managed resource that the API Key associated with, for example, Cluster.

    ApiKeyManagedResourceEnvironment, ApiKeyManagedResourceEnvironmentArgs

    Id string
    The ID of the Environment that the managed resource belongs to, for example, env-abc123.
    Id string
    The ID of the Environment that the managed resource belongs to, for example, env-abc123.
    id String
    The ID of the Environment that the managed resource belongs to, for example, env-abc123.
    id string
    The ID of the Environment that the managed resource belongs to, for example, env-abc123.
    id str
    The ID of the Environment that the managed resource belongs to, for example, env-abc123.
    id String
    The ID of the Environment that the managed resource belongs to, for example, env-abc123.

    ApiKeyOwner, ApiKeyOwnerArgs

    ApiVersion string
    The API group and version of the managed resource that the API Key associated with, for example, cmk/v2.
    Id string
    The ID of the Environment that the managed resource belongs to, for example, env-abc123.
    Kind string
    The kind of the managed resource that the API Key associated with, for example, Cluster.
    ApiVersion string
    The API group and version of the managed resource that the API Key associated with, for example, cmk/v2.
    Id string
    The ID of the Environment that the managed resource belongs to, for example, env-abc123.
    Kind string
    The kind of the managed resource that the API Key associated with, for example, Cluster.
    apiVersion String
    The API group and version of the managed resource that the API Key associated with, for example, cmk/v2.
    id String
    The ID of the Environment that the managed resource belongs to, for example, env-abc123.
    kind String
    The kind of the managed resource that the API Key associated with, for example, Cluster.
    apiVersion string
    The API group and version of the managed resource that the API Key associated with, for example, cmk/v2.
    id string
    The ID of the Environment that the managed resource belongs to, for example, env-abc123.
    kind string
    The kind of the managed resource that the API Key associated with, for example, Cluster.
    api_version str
    The API group and version of the managed resource that the API Key associated with, for example, cmk/v2.
    id str
    The ID of the Environment that the managed resource belongs to, for example, env-abc123.
    kind str
    The kind of the managed resource that the API Key associated with, for example, Cluster.
    apiVersion String
    The API group and version of the managed resource that the API Key associated with, for example, cmk/v2.
    id String
    The ID of the Environment that the managed resource belongs to, for example, env-abc123.
    kind String
    The kind of the managed resource that the API Key associated with, for example, Cluster.

    Package Details

    Repository
    Confluent Cloud pulumi/pulumi-confluentcloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the confluent Terraform Provider.
    confluentcloud logo
    Viewing docs for Confluent v0.1.0 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.