Confluent v1.48.0 published on Friday, Jun 21, 2024 by Pulumi
confluentcloud.getSchemaRegistryCluster
Explore with Pulumi AI
confluentcloud.SchemaRegistryCluster describes a Schema Registry cluster data source.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as confluentcloud from "@pulumi/confluentcloud";
export = async () => {
    // Loads the only Schema Registry cluster in the target environment
    const exampleUsingEnvId = await confluentcloud.getSchemaRegistryCluster({
        environment: {
            id: "env-xyz456",
        },
    });
    const exampleUsingId = await confluentcloud.getSchemaRegistryCluster({
        id: "lsrc-abc123",
        environment: {
            id: "env-xyz456",
        },
    });
    const exampleUsingName = await confluentcloud.getSchemaRegistryCluster({
        displayName: "Stream Governance Package",
        environment: {
            id: "env-xyz456",
        },
    });
    return {
        exampleUsingEnvId: exampleUsingEnvId,
        exampleUsingId: exampleUsingId,
        exampleUsingName: exampleUsingName,
    };
}
import pulumi
import pulumi_confluentcloud as confluentcloud
# Loads the only Schema Registry cluster in the target environment
example_using_env_id = confluentcloud.get_schema_registry_cluster(environment=confluentcloud.GetSchemaRegistryClusterEnvironmentArgs(
    id="env-xyz456",
))
pulumi.export("exampleUsingEnvId", example_using_env_id)
example_using_id = confluentcloud.get_schema_registry_cluster(id="lsrc-abc123",
    environment=confluentcloud.GetSchemaRegistryClusterEnvironmentArgs(
        id="env-xyz456",
    ))
pulumi.export("exampleUsingId", example_using_id)
example_using_name = confluentcloud.get_schema_registry_cluster(display_name="Stream Governance Package",
    environment=confluentcloud.GetSchemaRegistryClusterEnvironmentArgs(
        id="env-xyz456",
    ))
pulumi.export("exampleUsingName", example_using_name)
package main
import (
	"github.com/pulumi/pulumi-confluentcloud/sdk/go/confluentcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Loads the only Schema Registry cluster in the target environment
		exampleUsingEnvId, err := confluentcloud.LookupSchemaRegistryCluster(ctx, &confluentcloud.LookupSchemaRegistryClusterArgs{
			Environment: confluentcloud.GetSchemaRegistryClusterEnvironment{
				Id: "env-xyz456",
			},
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("exampleUsingEnvId", exampleUsingEnvId)
		exampleUsingId, err := confluentcloud.LookupSchemaRegistryCluster(ctx, &confluentcloud.LookupSchemaRegistryClusterArgs{
			Id: pulumi.StringRef("lsrc-abc123"),
			Environment: confluentcloud.GetSchemaRegistryClusterEnvironment{
				Id: "env-xyz456",
			},
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("exampleUsingId", exampleUsingId)
		exampleUsingName, err := confluentcloud.LookupSchemaRegistryCluster(ctx, &confluentcloud.LookupSchemaRegistryClusterArgs{
			DisplayName: pulumi.StringRef("Stream Governance Package"),
			Environment: confluentcloud.GetSchemaRegistryClusterEnvironment{
				Id: "env-xyz456",
			},
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("exampleUsingName", exampleUsingName)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using ConfluentCloud = Pulumi.ConfluentCloud;
return await Deployment.RunAsync(() => 
{
    // Loads the only Schema Registry cluster in the target environment
    var exampleUsingEnvId = ConfluentCloud.GetSchemaRegistryCluster.Invoke(new()
    {
        Environment = new ConfluentCloud.Inputs.GetSchemaRegistryClusterEnvironmentInputArgs
        {
            Id = "env-xyz456",
        },
    });
    var exampleUsingId = ConfluentCloud.GetSchemaRegistryCluster.Invoke(new()
    {
        Id = "lsrc-abc123",
        Environment = new ConfluentCloud.Inputs.GetSchemaRegistryClusterEnvironmentInputArgs
        {
            Id = "env-xyz456",
        },
    });
    var exampleUsingName = ConfluentCloud.GetSchemaRegistryCluster.Invoke(new()
    {
        DisplayName = "Stream Governance Package",
        Environment = new ConfluentCloud.Inputs.GetSchemaRegistryClusterEnvironmentInputArgs
        {
            Id = "env-xyz456",
        },
    });
    return new Dictionary<string, object?>
    {
        ["exampleUsingEnvId"] = exampleUsingEnvId,
        ["exampleUsingId"] = exampleUsingId,
        ["exampleUsingName"] = exampleUsingName,
    };
});
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.GetSchemaRegistryClusterArgs;
import com.pulumi.confluentcloud.inputs.GetSchemaRegistryClusterEnvironmentArgs;
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) {
        // Loads the only Schema Registry cluster in the target environment
        final var exampleUsingEnvId = ConfluentcloudFunctions.getSchemaRegistryCluster(GetSchemaRegistryClusterArgs.builder()
            .environment(GetSchemaRegistryClusterEnvironmentArgs.builder()
                .id("env-xyz456")
                .build())
            .build());
        ctx.export("exampleUsingEnvId", exampleUsingEnvId.applyValue(getSchemaRegistryClusterResult -> getSchemaRegistryClusterResult));
        final var exampleUsingId = ConfluentcloudFunctions.getSchemaRegistryCluster(GetSchemaRegistryClusterArgs.builder()
            .id("lsrc-abc123")
            .environment(GetSchemaRegistryClusterEnvironmentArgs.builder()
                .id("env-xyz456")
                .build())
            .build());
        ctx.export("exampleUsingId", exampleUsingId.applyValue(getSchemaRegistryClusterResult -> getSchemaRegistryClusterResult));
        final var exampleUsingName = ConfluentcloudFunctions.getSchemaRegistryCluster(GetSchemaRegistryClusterArgs.builder()
            .displayName("Stream Governance Package")
            .environment(GetSchemaRegistryClusterEnvironmentArgs.builder()
                .id("env-xyz456")
                .build())
            .build());
        ctx.export("exampleUsingName", exampleUsingName.applyValue(getSchemaRegistryClusterResult -> getSchemaRegistryClusterResult));
    }
}
variables:
  # Loads the only Schema Registry cluster in the target environment
  exampleUsingEnvId:
    fn::invoke:
      Function: confluentcloud:getSchemaRegistryCluster
      Arguments:
        environment:
          id: env-xyz456
  exampleUsingId:
    fn::invoke:
      Function: confluentcloud:getSchemaRegistryCluster
      Arguments:
        id: lsrc-abc123
        environment:
          id: env-xyz456
  exampleUsingName:
    fn::invoke:
      Function: confluentcloud:getSchemaRegistryCluster
      Arguments:
        displayName: Stream Governance Package
        environment:
          id: env-xyz456
outputs:
  exampleUsingEnvId: ${exampleUsingEnvId}
  exampleUsingId: ${exampleUsingId}
  exampleUsingName: ${exampleUsingName}
Using getSchemaRegistryCluster
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 getSchemaRegistryCluster(args: GetSchemaRegistryClusterArgs, opts?: InvokeOptions): Promise<GetSchemaRegistryClusterResult>
function getSchemaRegistryClusterOutput(args: GetSchemaRegistryClusterOutputArgs, opts?: InvokeOptions): Output<GetSchemaRegistryClusterResult>def get_schema_registry_cluster(display_name: Optional[str] = None,
                                environment: Optional[GetSchemaRegistryClusterEnvironment] = None,
                                id: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetSchemaRegistryClusterResult
def get_schema_registry_cluster_output(display_name: Optional[pulumi.Input[str]] = None,
                                environment: Optional[pulumi.Input[GetSchemaRegistryClusterEnvironmentArgs]] = None,
                                id: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetSchemaRegistryClusterResult]func LookupSchemaRegistryCluster(ctx *Context, args *LookupSchemaRegistryClusterArgs, opts ...InvokeOption) (*LookupSchemaRegistryClusterResult, error)
func LookupSchemaRegistryClusterOutput(ctx *Context, args *LookupSchemaRegistryClusterOutputArgs, opts ...InvokeOption) LookupSchemaRegistryClusterResultOutput> Note: This function is named LookupSchemaRegistryCluster in the Go SDK.
public static class GetSchemaRegistryCluster 
{
    public static Task<GetSchemaRegistryClusterResult> InvokeAsync(GetSchemaRegistryClusterArgs args, InvokeOptions? opts = null)
    public static Output<GetSchemaRegistryClusterResult> Invoke(GetSchemaRegistryClusterInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetSchemaRegistryClusterResult> getSchemaRegistryCluster(GetSchemaRegistryClusterArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: confluentcloud:index/getSchemaRegistryCluster:getSchemaRegistryCluster
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Environment
Pulumi.
Confluent Cloud. Inputs. Get Schema Registry Cluster Environment  - Display
Name string - The name for the Schema Registry cluster.
 - Id string
 - The ID of the Schema Registry cluster (for example, 
lsrc-abc123). 
- Environment
Get
Schema Registry Cluster Environment  - Display
Name string - The name for the Schema Registry cluster.
 - Id string
 - The ID of the Schema Registry cluster (for example, 
lsrc-abc123). 
- environment
Get
Schema Registry Cluster Environment  - display
Name String - The name for the Schema Registry cluster.
 - id String
 - The ID of the Schema Registry cluster (for example, 
lsrc-abc123). 
- environment
Get
Schema Registry Cluster Environment  - display
Name string - The name for the Schema Registry cluster.
 - id string
 - The ID of the Schema Registry cluster (for example, 
lsrc-abc123). 
- environment
Get
Schema Registry Cluster Environment  - display_
name str - The name for the Schema Registry cluster.
 - id str
 - The ID of the Schema Registry cluster (for example, 
lsrc-abc123). 
- environment Property Map
 - display
Name String - The name for the Schema Registry cluster.
 - id String
 - The ID of the Schema Registry cluster (for example, 
lsrc-abc123). 
getSchemaRegistryCluster Result
The following output properties are available:
- Api
Version string - (Required String) An API Version of the schema version of the Schema Registry cluster, for example, 
stream-governance/v2. - Display
Name string - (Required String) The name of the Schema Registry cluster, for example, 
Stream Governance Package. - Environment
Pulumi.
Confluent Cloud. Outputs. Get Schema Registry Cluster Environment  - Id string
 - (Required String) The ID of the Schema Registry region that the Schema Registry cluster belongs to, for example, 
sgreg-1. See Schema Registry Regions. - Kind string
 - (Required String) A kind of the Schema Registry cluster, for example, 
Cluster. - Package string
 - (Required String) The type of the billing package. Accepted values are: 
ESSENTIALSandADVANCED. - Regions
List<Pulumi.
Confluent Cloud. Outputs. Get Schema Registry Cluster Region>  - (Required Configuration Block) supports the following:
 - Resource
Name string - (Required String) The Confluent Resource Name of the Schema Registry cluster, for example, 
crn://confluent.cloud/organization=1111aaaa-11aa-11aa-11aa-111111aaaaaa/environment=env-abc123/schema-registry=lsrc-abc123. - Rest
Endpoint string - (Required String) The HTTP endpoint of the Schema Registry cluster, for example, 
https://psrc-00000.us-west-2.aws.confluent.cloud. 
- Api
Version string - (Required String) An API Version of the schema version of the Schema Registry cluster, for example, 
stream-governance/v2. - Display
Name string - (Required String) The name of the Schema Registry cluster, for example, 
Stream Governance Package. - Environment
Get
Schema Registry Cluster Environment  - Id string
 - (Required String) The ID of the Schema Registry region that the Schema Registry cluster belongs to, for example, 
sgreg-1. See Schema Registry Regions. - Kind string
 - (Required String) A kind of the Schema Registry cluster, for example, 
Cluster. - Package string
 - (Required String) The type of the billing package. Accepted values are: 
ESSENTIALSandADVANCED. - Regions
[]Get
Schema Registry Cluster Region  - (Required Configuration Block) supports the following:
 - Resource
Name string - (Required String) The Confluent Resource Name of the Schema Registry cluster, for example, 
crn://confluent.cloud/organization=1111aaaa-11aa-11aa-11aa-111111aaaaaa/environment=env-abc123/schema-registry=lsrc-abc123. - Rest
Endpoint string - (Required String) The HTTP endpoint of the Schema Registry cluster, for example, 
https://psrc-00000.us-west-2.aws.confluent.cloud. 
- api
Version String - (Required String) An API Version of the schema version of the Schema Registry cluster, for example, 
stream-governance/v2. - display
Name String - (Required String) The name of the Schema Registry cluster, for example, 
Stream Governance Package. - environment
Get
Schema Registry Cluster Environment  - id String
 - (Required String) The ID of the Schema Registry region that the Schema Registry cluster belongs to, for example, 
sgreg-1. See Schema Registry Regions. - kind String
 - (Required String) A kind of the Schema Registry cluster, for example, 
Cluster. - package_ String
 - (Required String) The type of the billing package. Accepted values are: 
ESSENTIALSandADVANCED. - regions
List<Get
Schema Registry Cluster Region>  - (Required Configuration Block) supports the following:
 - resource
Name String - (Required String) The Confluent Resource Name of the Schema Registry cluster, for example, 
crn://confluent.cloud/organization=1111aaaa-11aa-11aa-11aa-111111aaaaaa/environment=env-abc123/schema-registry=lsrc-abc123. - rest
Endpoint String - (Required String) The HTTP endpoint of the Schema Registry cluster, for example, 
https://psrc-00000.us-west-2.aws.confluent.cloud. 
- api
Version string - (Required String) An API Version of the schema version of the Schema Registry cluster, for example, 
stream-governance/v2. - display
Name string - (Required String) The name of the Schema Registry cluster, for example, 
Stream Governance Package. - environment
Get
Schema Registry Cluster Environment  - id string
 - (Required String) The ID of the Schema Registry region that the Schema Registry cluster belongs to, for example, 
sgreg-1. See Schema Registry Regions. - kind string
 - (Required String) A kind of the Schema Registry cluster, for example, 
Cluster. - package string
 - (Required String) The type of the billing package. Accepted values are: 
ESSENTIALSandADVANCED. - regions
Get
Schema Registry Cluster Region[]  - (Required Configuration Block) supports the following:
 - resource
Name string - (Required String) The Confluent Resource Name of the Schema Registry cluster, for example, 
crn://confluent.cloud/organization=1111aaaa-11aa-11aa-11aa-111111aaaaaa/environment=env-abc123/schema-registry=lsrc-abc123. - rest
Endpoint string - (Required String) The HTTP endpoint of the Schema Registry cluster, for example, 
https://psrc-00000.us-west-2.aws.confluent.cloud. 
- api_
version str - (Required String) An API Version of the schema version of the Schema Registry cluster, for example, 
stream-governance/v2. - display_
name str - (Required String) The name of the Schema Registry cluster, for example, 
Stream Governance Package. - environment
Get
Schema Registry Cluster Environment  - id str
 - (Required String) The ID of the Schema Registry region that the Schema Registry cluster belongs to, for example, 
sgreg-1. See Schema Registry Regions. - kind str
 - (Required String) A kind of the Schema Registry cluster, for example, 
Cluster. - package str
 - (Required String) The type of the billing package. Accepted values are: 
ESSENTIALSandADVANCED. - regions
Sequence[Get
Schema Registry Cluster Region]  - (Required Configuration Block) supports the following:
 - resource_
name str - (Required String) The Confluent Resource Name of the Schema Registry cluster, for example, 
crn://confluent.cloud/organization=1111aaaa-11aa-11aa-11aa-111111aaaaaa/environment=env-abc123/schema-registry=lsrc-abc123. - rest_
endpoint str - (Required String) The HTTP endpoint of the Schema Registry cluster, for example, 
https://psrc-00000.us-west-2.aws.confluent.cloud. 
- api
Version String - (Required String) An API Version of the schema version of the Schema Registry cluster, for example, 
stream-governance/v2. - display
Name String - (Required String) The name of the Schema Registry cluster, for example, 
Stream Governance Package. - environment Property Map
 - id String
 - (Required String) The ID of the Schema Registry region that the Schema Registry cluster belongs to, for example, 
sgreg-1. See Schema Registry Regions. - kind String
 - (Required String) A kind of the Schema Registry cluster, for example, 
Cluster. - package String
 - (Required String) The type of the billing package. Accepted values are: 
ESSENTIALSandADVANCED. - regions List<Property Map>
 - (Required Configuration Block) supports the following:
 - resource
Name String - (Required String) The Confluent Resource Name of the Schema Registry cluster, for example, 
crn://confluent.cloud/organization=1111aaaa-11aa-11aa-11aa-111111aaaaaa/environment=env-abc123/schema-registry=lsrc-abc123. - rest
Endpoint String - (Required String) The HTTP endpoint of the Schema Registry cluster, for example, 
https://psrc-00000.us-west-2.aws.confluent.cloud. 
Supporting Types
GetSchemaRegistryClusterEnvironment    
- Id string
 - The ID of the Environment that the Schema Registry cluster belongs to, for example, 
env-xyz456. 
- Id string
 - The ID of the Environment that the Schema Registry cluster belongs to, for example, 
env-xyz456. 
- id String
 - The ID of the Environment that the Schema Registry cluster belongs to, for example, 
env-xyz456. 
- id string
 - The ID of the Environment that the Schema Registry cluster belongs to, for example, 
env-xyz456. 
- id str
 - The ID of the Environment that the Schema Registry cluster belongs to, for example, 
env-xyz456. 
- id String
 - The ID of the Environment that the Schema Registry cluster belongs to, for example, 
env-xyz456. 
GetSchemaRegistryClusterRegion    
- 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 
confluentTerraform Provider.