1. Packages
  2. Confluent Provider
  3. API Docs
  4. getSchemaRegistryDek
Confluent v2.10.0 published on Wednesday, Nov 20, 2024 by Pulumi

confluentcloud.getSchemaRegistryDek

Explore with Pulumi AI

confluentcloud logo
Confluent v2.10.0 published on Wednesday, Nov 20, 2024 by Pulumi

    General Availability

    confluentcloud.SchemaRegistryDek describes a Schema Registry Data Encryption Key (DEK) data source.

    Example Usage

    Option #1: Manage multiple Schema Registry clusters in the same Pulumi Stack

    import * as pulumi from "@pulumi/pulumi";
    import * as confluentcloud from "@pulumi/confluentcloud";
    
    const myKey = confluentcloud.getSchemaRegistryDek({
        schemaRegistryCluster: {
            id: essentials.id,
        },
        restEndpoint: essentials.restEndpoint,
        credentials: {
            key: "<Schema Registry API Key for data.confluent_schema_registry_cluster.essentials>",
            secret: "<Schema Registry API Secret for data.confluent_schema_registry_cluster.essentials>",
        },
        kekName: "my_kek",
        subjectName: "my_subject",
    });
    
    import pulumi
    import pulumi_confluentcloud as confluentcloud
    
    my_key = confluentcloud.get_schema_registry_dek(schema_registry_cluster={
            "id": essentials["id"],
        },
        rest_endpoint=essentials["restEndpoint"],
        credentials={
            "key": "<Schema Registry API Key for data.confluent_schema_registry_cluster.essentials>",
            "secret": "<Schema Registry API Secret for data.confluent_schema_registry_cluster.essentials>",
        },
        kek_name="my_kek",
        subject_name="my_subject")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-confluentcloud/sdk/v2/go/confluentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := confluentcloud.LookupSchemaRegistryDek(ctx, &confluentcloud.LookupSchemaRegistryDekArgs{
    			SchemaRegistryCluster: confluentcloud.GetSchemaRegistryDekSchemaRegistryCluster{
    				Id: essentials.Id,
    			},
    			RestEndpoint: pulumi.StringRef(essentials.RestEndpoint),
    			Credentials: confluentcloud.GetSchemaRegistryDekCredentials{
    				Key:    "<Schema Registry API Key for data.confluent_schema_registry_cluster.essentials>",
    				Secret: "<Schema Registry API Secret for data.confluent_schema_registry_cluster.essentials>",
    			},
    			KekName:     "my_kek",
    			SubjectName: "my_subject",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using ConfluentCloud = Pulumi.ConfluentCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var myKey = ConfluentCloud.GetSchemaRegistryDek.Invoke(new()
        {
            SchemaRegistryCluster = new ConfluentCloud.Inputs.GetSchemaRegistryDekSchemaRegistryClusterInputArgs
            {
                Id = essentials.Id,
            },
            RestEndpoint = essentials.RestEndpoint,
            Credentials = new ConfluentCloud.Inputs.GetSchemaRegistryDekCredentialsInputArgs
            {
                Key = "<Schema Registry API Key for data.confluent_schema_registry_cluster.essentials>",
                Secret = "<Schema Registry API Secret for data.confluent_schema_registry_cluster.essentials>",
            },
            KekName = "my_kek",
            SubjectName = "my_subject",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.confluentcloud.ConfluentcloudFunctions;
    import com.pulumi.confluentcloud.inputs.GetSchemaRegistryDekArgs;
    import com.pulumi.confluentcloud.inputs.GetSchemaRegistryDekSchemaRegistryClusterArgs;
    import com.pulumi.confluentcloud.inputs.GetSchemaRegistryDekCredentialsArgs;
    import java.util.List;
    import java.util.ArrayList;
    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 myKey = ConfluentcloudFunctions.getSchemaRegistryDek(GetSchemaRegistryDekArgs.builder()
                .schemaRegistryCluster(GetSchemaRegistryDekSchemaRegistryClusterArgs.builder()
                    .id(essentials.id())
                    .build())
                .restEndpoint(essentials.restEndpoint())
                .credentials(GetSchemaRegistryDekCredentialsArgs.builder()
                    .key("<Schema Registry API Key for data.confluent_schema_registry_cluster.essentials>")
                    .secret("<Schema Registry API Secret for data.confluent_schema_registry_cluster.essentials>")
                    .build())
                .kekName("my_kek")
                .subjectName("my_subject")
                .build());
    
        }
    }
    
    variables:
      myKey:
        fn::invoke:
          Function: confluentcloud:getSchemaRegistryDek
          Arguments:
            schemaRegistryCluster:
              id: ${essentials.id}
            restEndpoint: ${essentials.restEndpoint}
            credentials:
              key: <Schema Registry API Key for data.confluent_schema_registry_cluster.essentials>
              secret: <Schema Registry API Secret for data.confluent_schema_registry_cluster.essentials>
            kekName: my_kek
            subjectName: my_subject
    

    Option #2: Manage a single Schema Registry cluster in the same Pulumi Stack

    import * as pulumi from "@pulumi/pulumi";
    import * as confluentcloud from "@pulumi/confluentcloud";
    
    const myKey = confluentcloud.getSchemaRegistryDek({
        kekName: "my_kek",
        subjectName: "my_subject",
    });
    
    import pulumi
    import pulumi_confluentcloud as confluentcloud
    
    my_key = confluentcloud.get_schema_registry_dek(kek_name="my_kek",
        subject_name="my_subject")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-confluentcloud/sdk/v2/go/confluentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := confluentcloud.LookupSchemaRegistryDek(ctx, &confluentcloud.LookupSchemaRegistryDekArgs{
    			KekName:     "my_kek",
    			SubjectName: "my_subject",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using ConfluentCloud = Pulumi.ConfluentCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var myKey = ConfluentCloud.GetSchemaRegistryDek.Invoke(new()
        {
            KekName = "my_kek",
            SubjectName = "my_subject",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.confluentcloud.ConfluentcloudFunctions;
    import com.pulumi.confluentcloud.inputs.GetSchemaRegistryDekArgs;
    import java.util.List;
    import java.util.ArrayList;
    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 myKey = ConfluentcloudFunctions.getSchemaRegistryDek(GetSchemaRegistryDekArgs.builder()
                .kekName("my_kek")
                .subjectName("my_subject")
                .build());
    
        }
    }
    
    variables:
      myKey:
        fn::invoke:
          Function: confluentcloud:getSchemaRegistryDek
          Arguments:
            kekName: my_kek
            subjectName: my_subject
    

    Using getSchemaRegistryDek

    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 getSchemaRegistryDek(args: GetSchemaRegistryDekArgs, opts?: InvokeOptions): Promise<GetSchemaRegistryDekResult>
    function getSchemaRegistryDekOutput(args: GetSchemaRegistryDekOutputArgs, opts?: InvokeOptions): Output<GetSchemaRegistryDekResult>
    def get_schema_registry_dek(algorithm: Optional[str] = None,
                                credentials: Optional[GetSchemaRegistryDekCredentials] = None,
                                kek_name: Optional[str] = None,
                                rest_endpoint: Optional[str] = None,
                                schema_registry_cluster: Optional[GetSchemaRegistryDekSchemaRegistryCluster] = None,
                                subject_name: Optional[str] = None,
                                version: Optional[int] = None,
                                opts: Optional[InvokeOptions] = None) -> GetSchemaRegistryDekResult
    def get_schema_registry_dek_output(algorithm: Optional[pulumi.Input[str]] = None,
                                credentials: Optional[pulumi.Input[GetSchemaRegistryDekCredentialsArgs]] = None,
                                kek_name: Optional[pulumi.Input[str]] = None,
                                rest_endpoint: Optional[pulumi.Input[str]] = None,
                                schema_registry_cluster: Optional[pulumi.Input[GetSchemaRegistryDekSchemaRegistryClusterArgs]] = None,
                                subject_name: Optional[pulumi.Input[str]] = None,
                                version: Optional[pulumi.Input[int]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetSchemaRegistryDekResult]
    func LookupSchemaRegistryDek(ctx *Context, args *LookupSchemaRegistryDekArgs, opts ...InvokeOption) (*LookupSchemaRegistryDekResult, error)
    func LookupSchemaRegistryDekOutput(ctx *Context, args *LookupSchemaRegistryDekOutputArgs, opts ...InvokeOption) LookupSchemaRegistryDekResultOutput

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

    public static class GetSchemaRegistryDek 
    {
        public static Task<GetSchemaRegistryDekResult> InvokeAsync(GetSchemaRegistryDekArgs args, InvokeOptions? opts = null)
        public static Output<GetSchemaRegistryDekResult> Invoke(GetSchemaRegistryDekInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSchemaRegistryDekResult> getSchemaRegistryDek(GetSchemaRegistryDekArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: confluentcloud:index/getSchemaRegistryDek:getSchemaRegistryDek
      arguments:
        # arguments dictionary

    The following arguments are supported:

    KekName string
    The name of the KEK used to encrypt this DEK.
    SubjectName string
    The subject for this DEK.
    Algorithm string

    Accepted values are: AES128_GCM, AES256_GCM, and AES256_SIV. Defaults to AES256_GCM.

    Note: A Schema Registry API key consists of a key and a secret. Schema Registry API keys are required to interact with Schema Registry clusters in Confluent Cloud. Each Schema Registry API key is valid for one specific Schema Registry cluster.

    Credentials Pulumi.ConfluentCloud.Inputs.GetSchemaRegistryDekCredentials
    RestEndpoint string
    The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
    SchemaRegistryCluster Pulumi.ConfluentCloud.Inputs.GetSchemaRegistryDekSchemaRegistryCluster
    Version int
    The version of this DEK. Defaults to 1.
    KekName string
    The name of the KEK used to encrypt this DEK.
    SubjectName string
    The subject for this DEK.
    Algorithm string

    Accepted values are: AES128_GCM, AES256_GCM, and AES256_SIV. Defaults to AES256_GCM.

    Note: A Schema Registry API key consists of a key and a secret. Schema Registry API keys are required to interact with Schema Registry clusters in Confluent Cloud. Each Schema Registry API key is valid for one specific Schema Registry cluster.

    Credentials GetSchemaRegistryDekCredentials
    RestEndpoint string
    The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
    SchemaRegistryCluster GetSchemaRegistryDekSchemaRegistryCluster
    Version int
    The version of this DEK. Defaults to 1.
    kekName String
    The name of the KEK used to encrypt this DEK.
    subjectName String
    The subject for this DEK.
    algorithm String

    Accepted values are: AES128_GCM, AES256_GCM, and AES256_SIV. Defaults to AES256_GCM.

    Note: A Schema Registry API key consists of a key and a secret. Schema Registry API keys are required to interact with Schema Registry clusters in Confluent Cloud. Each Schema Registry API key is valid for one specific Schema Registry cluster.

    credentials GetSchemaRegistryDekCredentials
    restEndpoint String
    The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
    schemaRegistryCluster GetSchemaRegistryDekSchemaRegistryCluster
    version Integer
    The version of this DEK. Defaults to 1.
    kekName string
    The name of the KEK used to encrypt this DEK.
    subjectName string
    The subject for this DEK.
    algorithm string

    Accepted values are: AES128_GCM, AES256_GCM, and AES256_SIV. Defaults to AES256_GCM.

    Note: A Schema Registry API key consists of a key and a secret. Schema Registry API keys are required to interact with Schema Registry clusters in Confluent Cloud. Each Schema Registry API key is valid for one specific Schema Registry cluster.

    credentials GetSchemaRegistryDekCredentials
    restEndpoint string
    The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
    schemaRegistryCluster GetSchemaRegistryDekSchemaRegistryCluster
    version number
    The version of this DEK. Defaults to 1.
    kek_name str
    The name of the KEK used to encrypt this DEK.
    subject_name str
    The subject for this DEK.
    algorithm str

    Accepted values are: AES128_GCM, AES256_GCM, and AES256_SIV. Defaults to AES256_GCM.

    Note: A Schema Registry API key consists of a key and a secret. Schema Registry API keys are required to interact with Schema Registry clusters in Confluent Cloud. Each Schema Registry API key is valid for one specific Schema Registry cluster.

    credentials GetSchemaRegistryDekCredentials
    rest_endpoint str
    The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
    schema_registry_cluster GetSchemaRegistryDekSchemaRegistryCluster
    version int
    The version of this DEK. Defaults to 1.
    kekName String
    The name of the KEK used to encrypt this DEK.
    subjectName String
    The subject for this DEK.
    algorithm String

    Accepted values are: AES128_GCM, AES256_GCM, and AES256_SIV. Defaults to AES256_GCM.

    Note: A Schema Registry API key consists of a key and a secret. Schema Registry API keys are required to interact with Schema Registry clusters in Confluent Cloud. Each Schema Registry API key is valid for one specific Schema Registry cluster.

    credentials Property Map
    restEndpoint String
    The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
    schemaRegistryCluster Property Map
    version Number
    The version of this DEK. Defaults to 1.

    getSchemaRegistryDek Result

    The following output properties are available:

    EncryptedKeyMaterial string
    (Optional String) The encrypted key material for the DEK.
    HardDelete bool
    (Optional Boolean) An optional flag to control whether a dek should be soft or hard deleted.
    Id string
    The provider-assigned unique ID for this managed resource.
    KekName string
    KeyMaterial string
    (Optional String) The decrypted version of encrypted key material.
    SubjectName string
    Algorithm string
    Credentials Pulumi.ConfluentCloud.Outputs.GetSchemaRegistryDekCredentials
    RestEndpoint string
    SchemaRegistryCluster Pulumi.ConfluentCloud.Outputs.GetSchemaRegistryDekSchemaRegistryCluster
    Version int
    EncryptedKeyMaterial string
    (Optional String) The encrypted key material for the DEK.
    HardDelete bool
    (Optional Boolean) An optional flag to control whether a dek should be soft or hard deleted.
    Id string
    The provider-assigned unique ID for this managed resource.
    KekName string
    KeyMaterial string
    (Optional String) The decrypted version of encrypted key material.
    SubjectName string
    Algorithm string
    Credentials GetSchemaRegistryDekCredentials
    RestEndpoint string
    SchemaRegistryCluster GetSchemaRegistryDekSchemaRegistryCluster
    Version int
    encryptedKeyMaterial String
    (Optional String) The encrypted key material for the DEK.
    hardDelete Boolean
    (Optional Boolean) An optional flag to control whether a dek should be soft or hard deleted.
    id String
    The provider-assigned unique ID for this managed resource.
    kekName String
    keyMaterial String
    (Optional String) The decrypted version of encrypted key material.
    subjectName String
    algorithm String
    credentials GetSchemaRegistryDekCredentials
    restEndpoint String
    schemaRegistryCluster GetSchemaRegistryDekSchemaRegistryCluster
    version Integer
    encryptedKeyMaterial string
    (Optional String) The encrypted key material for the DEK.
    hardDelete boolean
    (Optional Boolean) An optional flag to control whether a dek should be soft or hard deleted.
    id string
    The provider-assigned unique ID for this managed resource.
    kekName string
    keyMaterial string
    (Optional String) The decrypted version of encrypted key material.
    subjectName string
    algorithm string
    credentials GetSchemaRegistryDekCredentials
    restEndpoint string
    schemaRegistryCluster GetSchemaRegistryDekSchemaRegistryCluster
    version number
    encrypted_key_material str
    (Optional String) The encrypted key material for the DEK.
    hard_delete bool
    (Optional Boolean) An optional flag to control whether a dek should be soft or hard deleted.
    id str
    The provider-assigned unique ID for this managed resource.
    kek_name str
    key_material str
    (Optional String) The decrypted version of encrypted key material.
    subject_name str
    algorithm str
    credentials GetSchemaRegistryDekCredentials
    rest_endpoint str
    schema_registry_cluster GetSchemaRegistryDekSchemaRegistryCluster
    version int
    encryptedKeyMaterial String
    (Optional String) The encrypted key material for the DEK.
    hardDelete Boolean
    (Optional Boolean) An optional flag to control whether a dek should be soft or hard deleted.
    id String
    The provider-assigned unique ID for this managed resource.
    kekName String
    keyMaterial String
    (Optional String) The decrypted version of encrypted key material.
    subjectName String
    algorithm String
    credentials Property Map
    restEndpoint String
    schemaRegistryCluster Property Map
    version Number

    Supporting Types

    GetSchemaRegistryDekCredentials

    Key string
    The Schema Registry API Key.
    Secret string
    The Schema Registry API Secret.
    Key string
    The Schema Registry API Key.
    Secret string
    The Schema Registry API Secret.
    key String
    The Schema Registry API Key.
    secret String
    The Schema Registry API Secret.
    key string
    The Schema Registry API Key.
    secret string
    The Schema Registry API Secret.
    key str
    The Schema Registry API Key.
    secret str
    The Schema Registry API Secret.
    key String
    The Schema Registry API Key.
    secret String
    The Schema Registry API Secret.

    GetSchemaRegistryDekSchemaRegistryCluster

    Id string
    The ID of the Schema Registry cluster, for example, lsrc-abc123.
    Id string
    The ID of the Schema Registry cluster, for example, lsrc-abc123.
    id String
    The ID of the Schema Registry cluster, for example, lsrc-abc123.
    id string
    The ID of the Schema Registry cluster, for example, lsrc-abc123.
    id str
    The ID of the Schema Registry cluster, for example, lsrc-abc123.
    id String
    The ID of the Schema Registry cluster, for example, lsrc-abc123.

    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
    Confluent v2.10.0 published on Wednesday, Nov 20, 2024 by Pulumi