confluentcloud.getSchemaRegistryClusterMode
Explore with Pulumi AI
confluentcloud.SchemaRegistryClusterMode
describes a Mode 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 example = confluentcloud.getSchemaRegistryClusterMode({
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>",
},
});
export const mode = example.then(example => example.mode);
import pulumi
import pulumi_confluentcloud as confluentcloud
example = confluentcloud.get_schema_registry_cluster_mode(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>",
})
pulumi.export("mode", example.mode)
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 {
example, err := confluentcloud.LookupSchemaRegistryClusterMode(ctx, &confluentcloud.LookupSchemaRegistryClusterModeArgs{
SchemaRegistryCluster: confluentcloud.GetSchemaRegistryClusterModeSchemaRegistryCluster{
Id: essentials.Id,
},
RestEndpoint: pulumi.StringRef(essentials.RestEndpoint),
Credentials: confluentcloud.GetSchemaRegistryClusterModeCredentials{
Key: "<Schema Registry API Key for data.confluent_schema_registry_cluster.essentials>",
Secret: "<Schema Registry API Secret for data.confluent_schema_registry_cluster.essentials>",
},
}, nil)
if err != nil {
return err
}
ctx.Export("mode", example.Mode)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using ConfluentCloud = Pulumi.ConfluentCloud;
return await Deployment.RunAsync(() =>
{
var example = ConfluentCloud.GetSchemaRegistryClusterMode.Invoke(new()
{
SchemaRegistryCluster = new ConfluentCloud.Inputs.GetSchemaRegistryClusterModeSchemaRegistryClusterInputArgs
{
Id = essentials.Id,
},
RestEndpoint = essentials.RestEndpoint,
Credentials = new ConfluentCloud.Inputs.GetSchemaRegistryClusterModeCredentialsInputArgs
{
Key = "<Schema Registry API Key for data.confluent_schema_registry_cluster.essentials>",
Secret = "<Schema Registry API Secret for data.confluent_schema_registry_cluster.essentials>",
},
});
return new Dictionary<string, object?>
{
["mode"] = example.Apply(getSchemaRegistryClusterModeResult => getSchemaRegistryClusterModeResult.Mode),
};
});
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.GetSchemaRegistryClusterModeArgs;
import com.pulumi.confluentcloud.inputs.GetSchemaRegistryClusterModeSchemaRegistryClusterArgs;
import com.pulumi.confluentcloud.inputs.GetSchemaRegistryClusterModeCredentialsArgs;
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 example = ConfluentcloudFunctions.getSchemaRegistryClusterMode(GetSchemaRegistryClusterModeArgs.builder()
.schemaRegistryCluster(GetSchemaRegistryClusterModeSchemaRegistryClusterArgs.builder()
.id(essentials.id())
.build())
.restEndpoint(essentials.restEndpoint())
.credentials(GetSchemaRegistryClusterModeCredentialsArgs.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())
.build());
ctx.export("mode", example.applyValue(getSchemaRegistryClusterModeResult -> getSchemaRegistryClusterModeResult.mode()));
}
}
variables:
example:
fn::invoke:
Function: confluentcloud:getSchemaRegistryClusterMode
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>
outputs:
mode: ${example.mode}
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 example = confluentcloud.getSchemaRegistryClusterMode({});
export const mode = example.then(example => example.mode);
import pulumi
import pulumi_confluentcloud as confluentcloud
example = confluentcloud.get_schema_registry_cluster_mode()
pulumi.export("mode", example.mode)
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 {
example, err := confluentcloud.LookupSchemaRegistryClusterMode(ctx, &confluentcloud.LookupSchemaRegistryClusterModeArgs{}, nil)
if err != nil {
return err
}
ctx.Export("mode", example.Mode)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using ConfluentCloud = Pulumi.ConfluentCloud;
return await Deployment.RunAsync(() =>
{
var example = ConfluentCloud.GetSchemaRegistryClusterMode.Invoke();
return new Dictionary<string, object?>
{
["mode"] = example.Apply(getSchemaRegistryClusterModeResult => getSchemaRegistryClusterModeResult.Mode),
};
});
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.GetSchemaRegistryClusterModeArgs;
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 example = ConfluentcloudFunctions.getSchemaRegistryClusterMode();
ctx.export("mode", example.applyValue(getSchemaRegistryClusterModeResult -> getSchemaRegistryClusterModeResult.mode()));
}
}
variables:
example:
fn::invoke:
Function: confluentcloud:getSchemaRegistryClusterMode
Arguments: {}
outputs:
mode: ${example.mode}
Using getSchemaRegistryClusterMode
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 getSchemaRegistryClusterMode(args: GetSchemaRegistryClusterModeArgs, opts?: InvokeOptions): Promise<GetSchemaRegistryClusterModeResult>
function getSchemaRegistryClusterModeOutput(args: GetSchemaRegistryClusterModeOutputArgs, opts?: InvokeOptions): Output<GetSchemaRegistryClusterModeResult>
def get_schema_registry_cluster_mode(credentials: Optional[GetSchemaRegistryClusterModeCredentials] = None,
rest_endpoint: Optional[str] = None,
schema_registry_cluster: Optional[GetSchemaRegistryClusterModeSchemaRegistryCluster] = None,
opts: Optional[InvokeOptions] = None) -> GetSchemaRegistryClusterModeResult
def get_schema_registry_cluster_mode_output(credentials: Optional[pulumi.Input[GetSchemaRegistryClusterModeCredentialsArgs]] = None,
rest_endpoint: Optional[pulumi.Input[str]] = None,
schema_registry_cluster: Optional[pulumi.Input[GetSchemaRegistryClusterModeSchemaRegistryClusterArgs]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetSchemaRegistryClusterModeResult]
func LookupSchemaRegistryClusterMode(ctx *Context, args *LookupSchemaRegistryClusterModeArgs, opts ...InvokeOption) (*LookupSchemaRegistryClusterModeResult, error)
func LookupSchemaRegistryClusterModeOutput(ctx *Context, args *LookupSchemaRegistryClusterModeOutputArgs, opts ...InvokeOption) LookupSchemaRegistryClusterModeResultOutput
> Note: This function is named LookupSchemaRegistryClusterMode
in the Go SDK.
public static class GetSchemaRegistryClusterMode
{
public static Task<GetSchemaRegistryClusterModeResult> InvokeAsync(GetSchemaRegistryClusterModeArgs args, InvokeOptions? opts = null)
public static Output<GetSchemaRegistryClusterModeResult> Invoke(GetSchemaRegistryClusterModeInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetSchemaRegistryClusterModeResult> getSchemaRegistryClusterMode(GetSchemaRegistryClusterModeArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: confluentcloud:index/getSchemaRegistryClusterMode:getSchemaRegistryClusterMode
arguments:
# arguments dictionary
The following arguments are supported:
- Credentials
Pulumi.
Confluent Cloud. Inputs. Get Schema Registry Cluster Mode 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 Cluster Mode Schema Registry Cluster
- Credentials
Get
Schema Registry Cluster Mode 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 Cluster Mode Schema Registry Cluster
- credentials
Get
Schema Registry Cluster Mode 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 Cluster Mode Schema Registry Cluster
- credentials
Get
Schema Registry Cluster Mode 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 Cluster Mode Schema Registry Cluster
- credentials
Get
Schema Registry Cluster Mode 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 Cluster Mode 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
getSchemaRegistryClusterMode Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Mode string
- (Optional String) The global Schema Registry mode. Accepted values are:
READWRITE
,READONLY
,READONLY_OVERRIDE
, andIMPORT
. - Credentials
Pulumi.
Confluent Cloud. Outputs. Get Schema Registry Cluster Mode Credentials - Rest
Endpoint string - Schema
Registry Pulumi.Cluster Confluent Cloud. Outputs. Get Schema Registry Cluster Mode Schema Registry Cluster
- Id string
- The provider-assigned unique ID for this managed resource.
- Mode string
- (Optional String) The global Schema Registry mode. Accepted values are:
READWRITE
,READONLY
,READONLY_OVERRIDE
, andIMPORT
. - Credentials
Get
Schema Registry Cluster Mode Credentials - Rest
Endpoint string - Schema
Registry GetCluster Schema Registry Cluster Mode Schema Registry Cluster
- id String
- The provider-assigned unique ID for this managed resource.
- mode String
- (Optional String) The global Schema Registry mode. Accepted values are:
READWRITE
,READONLY
,READONLY_OVERRIDE
, andIMPORT
. - credentials
Get
Schema Registry Cluster Mode Credentials - rest
Endpoint String - schema
Registry GetCluster Schema Registry Cluster Mode Schema Registry Cluster
- id string
- The provider-assigned unique ID for this managed resource.
- mode string
- (Optional String) The global Schema Registry mode. Accepted values are:
READWRITE
,READONLY
,READONLY_OVERRIDE
, andIMPORT
. - credentials
Get
Schema Registry Cluster Mode Credentials - rest
Endpoint string - schema
Registry GetCluster Schema Registry Cluster Mode Schema Registry Cluster
- id str
- The provider-assigned unique ID for this managed resource.
- mode str
- (Optional String) The global Schema Registry mode. Accepted values are:
READWRITE
,READONLY
,READONLY_OVERRIDE
, andIMPORT
. - credentials
Get
Schema Registry Cluster Mode Credentials - rest_
endpoint str - schema_
registry_ Getcluster Schema Registry Cluster Mode Schema Registry Cluster
- id String
- The provider-assigned unique ID for this managed resource.
- mode String
- (Optional String) The global Schema Registry mode. Accepted values are:
READWRITE
,READONLY
,READONLY_OVERRIDE
, andIMPORT
. - credentials Property Map
- rest
Endpoint String - schema
Registry Property MapCluster
Supporting Types
GetSchemaRegistryClusterModeCredentials
- Key string
- The Schema Registry API Key.
- Secret string
The Schema Registry API Secret.
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.
- Key string
- The Schema Registry API Key.
- Secret string
The Schema Registry API Secret.
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.
- key String
- The Schema Registry API Key.
- secret String
The Schema Registry API Secret.
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.
- key string
- The Schema Registry API Key.
- secret string
The Schema Registry API Secret.
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.
- key str
- The Schema Registry API Key.
- secret str
The Schema Registry API Secret.
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.
- key String
- The Schema Registry API Key.
- secret String
The Schema Registry API Secret.
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.
GetSchemaRegistryClusterModeSchemaRegistryCluster
- 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.