confluentcloud.getSchemaRegistryDek
Explore with Pulumi AI
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:
- Kek
Name string - The name of the KEK used to encrypt this DEK.
- Subject
Name string - The subject for this DEK.
- Algorithm string
Accepted values are:
AES128_GCM
,AES256_GCM
, andAES256_SIV
. Defaults toAES256_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.
Confluent Cloud. Inputs. Get Schema Registry Dek Credentials - Rest
Endpoint string - The REST endpoint of the Schema Registry cluster, for example,
https://psrc-00000.us-central1.gcp.confluent.cloud:443
). - Schema
Registry Pulumi.Cluster Confluent Cloud. Inputs. Get Schema Registry Dek Schema Registry Cluster - Version int
- The version of this DEK. Defaults to
1
.
- Kek
Name string - The name of the KEK used to encrypt this DEK.
- Subject
Name string - The subject for this DEK.
- Algorithm string
Accepted values are:
AES128_GCM
,AES256_GCM
, andAES256_SIV
. Defaults toAES256_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
Get
Schema Registry Dek Credentials - Rest
Endpoint string - The REST endpoint of the Schema Registry cluster, for example,
https://psrc-00000.us-central1.gcp.confluent.cloud:443
). - Schema
Registry GetCluster Schema Registry Dek Schema Registry Cluster - Version int
- The version of this DEK. Defaults to
1
.
- kek
Name String - The name of the KEK used to encrypt this DEK.
- subject
Name String - The subject for this DEK.
- algorithm String
Accepted values are:
AES128_GCM
,AES256_GCM
, andAES256_SIV
. Defaults toAES256_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
Get
Schema Registry Dek Credentials - rest
Endpoint String - The REST endpoint of the Schema Registry cluster, for example,
https://psrc-00000.us-central1.gcp.confluent.cloud:443
). - schema
Registry GetCluster Schema Registry Dek Schema Registry Cluster - version Integer
- The version of this DEK. Defaults to
1
.
- kek
Name string - The name of the KEK used to encrypt this DEK.
- subject
Name string - The subject for this DEK.
- algorithm string
Accepted values are:
AES128_GCM
,AES256_GCM
, andAES256_SIV
. Defaults toAES256_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
Get
Schema Registry Dek Credentials - rest
Endpoint string - The REST endpoint of the Schema Registry cluster, for example,
https://psrc-00000.us-central1.gcp.confluent.cloud:443
). - schema
Registry GetCluster Schema Registry Dek Schema Registry Cluster - 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
, andAES256_SIV
. Defaults toAES256_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
Get
Schema Registry Dek Credentials - rest_
endpoint str - The REST endpoint of the Schema Registry cluster, for example,
https://psrc-00000.us-central1.gcp.confluent.cloud:443
). - schema_
registry_ Getcluster Schema Registry Dek Schema Registry Cluster - version int
- The version of this DEK. Defaults to
1
.
- kek
Name String - The name of the KEK used to encrypt this DEK.
- subject
Name String - The subject for this DEK.
- algorithm String
Accepted values are:
AES128_GCM
,AES256_GCM
, andAES256_SIV
. Defaults toAES256_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
- rest
Endpoint String - The REST endpoint of the Schema Registry cluster, for example,
https://psrc-00000.us-central1.gcp.confluent.cloud:443
). - schema
Registry Property MapCluster - version Number
- The version of this DEK. Defaults to
1
.
getSchemaRegistryDek Result
The following output properties are available:
- Encrypted
Key stringMaterial - (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 string
- The provider-assigned unique ID for this managed resource.
- Kek
Name string - Key
Material string - (Optional String) The decrypted version of encrypted key material.
- Subject
Name string - Algorithm string
- Credentials
Pulumi.
Confluent Cloud. Outputs. Get Schema Registry Dek Credentials - Rest
Endpoint string - Schema
Registry Pulumi.Cluster Confluent Cloud. Outputs. Get Schema Registry Dek Schema Registry Cluster - Version int
- Encrypted
Key stringMaterial - (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 string
- The provider-assigned unique ID for this managed resource.
- Kek
Name string - Key
Material string - (Optional String) The decrypted version of encrypted key material.
- Subject
Name string - Algorithm string
- Credentials
Get
Schema Registry Dek Credentials - Rest
Endpoint string - Schema
Registry GetCluster Schema Registry Dek Schema Registry Cluster - Version int
- encrypted
Key StringMaterial - (Optional String) The encrypted key material for the DEK.
- hard
Delete 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.
- kek
Name String - key
Material String - (Optional String) The decrypted version of encrypted key material.
- subject
Name String - algorithm String
- credentials
Get
Schema Registry Dek Credentials - rest
Endpoint String - schema
Registry GetCluster Schema Registry Dek Schema Registry Cluster - version Integer
- encrypted
Key stringMaterial - (Optional String) The encrypted key material for the DEK.
- hard
Delete 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.
- kek
Name string - key
Material string - (Optional String) The decrypted version of encrypted key material.
- subject
Name string - algorithm string
- credentials
Get
Schema Registry Dek Credentials - rest
Endpoint string - schema
Registry GetCluster Schema Registry Dek Schema Registry Cluster - version number
- encrypted_
key_ strmaterial - (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
Get
Schema Registry Dek Credentials - rest_
endpoint str - schema_
registry_ Getcluster Schema Registry Dek Schema Registry Cluster - version int
- encrypted
Key StringMaterial - (Optional String) The encrypted key material for the DEK.
- hard
Delete 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.
- kek
Name String - key
Material String - (Optional String) The decrypted version of encrypted key material.
- subject
Name String - algorithm String
- credentials Property Map
- rest
Endpoint String - schema
Registry Property MapCluster - version Number
Supporting Types
GetSchemaRegistryDekCredentials
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.