1. Packages
  2. Confluent Provider
  3. API Docs
  4. getSchemaRegistryClusterMode
Confluent v2.23.0 published on Tuesday, Apr 1, 2025 by Pulumi

confluentcloud.getSchemaRegistryClusterMode

Explore with Pulumi AI

General Availability

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);
Copy
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)
Copy
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
	})
}
Copy
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),
    };
});
Copy
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()));
    }
}
Copy
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}
Copy

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);
Copy
import pulumi
import pulumi_confluentcloud as confluentcloud

example = confluentcloud.get_schema_registry_cluster_mode()
pulumi.export("mode", example.mode)
Copy
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
	})
}
Copy
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),
    };
});
Copy
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()));
    }
}
Copy
variables:
  example:
    fn::invoke:
      function: confluentcloud:getSchemaRegistryClusterMode
      arguments: {}
outputs:
  mode: ${example.mode}
Copy

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>
Copy
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]
Copy
func LookupSchemaRegistryClusterMode(ctx *Context, args *LookupSchemaRegistryClusterModeArgs, opts ...InvokeOption) (*LookupSchemaRegistryClusterModeResult, error)
func LookupSchemaRegistryClusterModeOutput(ctx *Context, args *LookupSchemaRegistryClusterModeOutputArgs, opts ...InvokeOption) LookupSchemaRegistryClusterModeResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetSchemaRegistryClusterModeResult> getSchemaRegistryClusterMode(GetSchemaRegistryClusterModeArgs args, InvokeOptions options)
public static Output<GetSchemaRegistryClusterModeResult> getSchemaRegistryClusterMode(GetSchemaRegistryClusterModeArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: confluentcloud:index/getSchemaRegistryClusterMode:getSchemaRegistryClusterMode
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Credentials Pulumi.ConfluentCloud.Inputs.GetSchemaRegistryClusterModeCredentials
RestEndpoint Changes to this property will trigger replacement. string
The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
SchemaRegistryCluster Pulumi.ConfluentCloud.Inputs.GetSchemaRegistryClusterModeSchemaRegistryCluster
Credentials GetSchemaRegistryClusterModeCredentials
RestEndpoint Changes to this property will trigger replacement. string
The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
SchemaRegistryCluster GetSchemaRegistryClusterModeSchemaRegistryCluster
credentials GetSchemaRegistryClusterModeCredentials
restEndpoint Changes to this property will trigger replacement. String
The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
schemaRegistryCluster GetSchemaRegistryClusterModeSchemaRegistryCluster
credentials GetSchemaRegistryClusterModeCredentials
restEndpoint Changes to this property will trigger replacement. string
The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
schemaRegistryCluster GetSchemaRegistryClusterModeSchemaRegistryCluster
credentials GetSchemaRegistryClusterModeCredentials
rest_endpoint Changes to this property will trigger replacement. str
The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
schema_registry_cluster GetSchemaRegistryClusterModeSchemaRegistryCluster
credentials Property Map
restEndpoint Changes to this property will trigger replacement. String
The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
schemaRegistryCluster Property Map

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, and IMPORT.
Credentials Pulumi.ConfluentCloud.Outputs.GetSchemaRegistryClusterModeCredentials
RestEndpoint string
SchemaRegistryCluster Pulumi.ConfluentCloud.Outputs.GetSchemaRegistryClusterModeSchemaRegistryCluster
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, and IMPORT.
Credentials GetSchemaRegistryClusterModeCredentials
RestEndpoint string
SchemaRegistryCluster GetSchemaRegistryClusterModeSchemaRegistryCluster
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, and IMPORT.
credentials GetSchemaRegistryClusterModeCredentials
restEndpoint String
schemaRegistryCluster GetSchemaRegistryClusterModeSchemaRegistryCluster
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, and IMPORT.
credentials GetSchemaRegistryClusterModeCredentials
restEndpoint string
schemaRegistryCluster GetSchemaRegistryClusterModeSchemaRegistryCluster
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, and IMPORT.
credentials GetSchemaRegistryClusterModeCredentials
rest_endpoint str
schema_registry_cluster GetSchemaRegistryClusterModeSchemaRegistryCluster
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, and IMPORT.
credentials Property Map
restEndpoint String
schemaRegistryCluster Property Map

Supporting Types

GetSchemaRegistryClusterModeCredentials

Key This property is required. string
The Schema Registry API Key.
Secret This property is required. 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 This property is required. string
The Schema Registry API Key.
Secret This property is required. 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 This property is required. String
The Schema Registry API Key.
secret This property is required. 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 This property is required. string
The Schema Registry API Key.
secret This property is required. 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 This property is required. str
The Schema Registry API Key.
secret This property is required. 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 This property is required. String
The Schema Registry API Key.
secret This property is required. 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 This property is required. string
The ID of the Schema Registry cluster, for example, lsrc-abc123.
Id This property is required. string
The ID of the Schema Registry cluster, for example, lsrc-abc123.
id This property is required. String
The ID of the Schema Registry cluster, for example, lsrc-abc123.
id This property is required. string
The ID of the Schema Registry cluster, for example, lsrc-abc123.
id This property is required. str
The ID of the Schema Registry cluster, for example, lsrc-abc123.
id This property is required. 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.