1. Packages
  2. OVH
  3. API Docs
  4. CloudProjectDatabase
  5. KafkaSchemaRegistryAcl
OVHCloud v2.1.1 published on Thursday, Apr 10, 2025 by OVHcloud

ovh.CloudProjectDatabase.KafkaSchemaRegistryAcl

Explore with Pulumi AI

Creates a schema registry ACL for a Kafka cluster associated with a public cloud project.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@ovhcloud/pulumi-ovh";
import * as ovh from "@pulumi/ovh";

const kafka = ovh.CloudProjectDatabase.getDatabase({
    serviceName: "XXX",
    engine: "kafka",
    id: "ZZZ",
});
const schemaRegistryAcl = new ovh.cloudprojectdatabase.KafkaSchemaRegistryAcl("schemaRegistryAcl", {
    serviceName: kafka.then(kafka => kafka.serviceName),
    clusterId: kafka.then(kafka => kafka.id),
    permission: "schema_registry_read",
    resource: "Subject:myResource",
    username: "johndoe",
});
Copy
import pulumi
import pulumi_ovh as ovh

kafka = ovh.CloudProjectDatabase.get_database(service_name="XXX",
    engine="kafka",
    id="ZZZ")
schema_registry_acl = ovh.cloud_project_database.KafkaSchemaRegistryAcl("schemaRegistryAcl",
    service_name=kafka.service_name,
    cluster_id=kafka.id,
    permission="schema_registry_read",
    resource="Subject:myResource",
    username="johndoe")
Copy
package main

import (
	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh/cloudprojectdatabase"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		kafka, err := cloudprojectdatabase.GetDatabase(ctx, &cloudprojectdatabase.GetDatabaseArgs{
			ServiceName: "XXX",
			Engine:      "kafka",
			Id:          "ZZZ",
		}, nil)
		if err != nil {
			return err
		}
		_, err = cloudprojectdatabase.NewKafkaSchemaRegistryAcl(ctx, "schemaRegistryAcl", &cloudprojectdatabase.KafkaSchemaRegistryAclArgs{
			ServiceName: pulumi.String(kafka.ServiceName),
			ClusterId:   pulumi.String(kafka.Id),
			Permission:  pulumi.String("schema_registry_read"),
			Resource:    pulumi.String("Subject:myResource"),
			Username:    pulumi.String("johndoe"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ovh = Pulumi.Ovh;

return await Deployment.RunAsync(() => 
{
    var kafka = Ovh.CloudProjectDatabase.GetDatabase.Invoke(new()
    {
        ServiceName = "XXX",
        Engine = "kafka",
        Id = "ZZZ",
    });

    var schemaRegistryAcl = new Ovh.CloudProjectDatabase.KafkaSchemaRegistryAcl("schemaRegistryAcl", new()
    {
        ServiceName = kafka.Apply(getDatabaseResult => getDatabaseResult.ServiceName),
        ClusterId = kafka.Apply(getDatabaseResult => getDatabaseResult.Id),
        Permission = "schema_registry_read",
        Resource = "Subject:myResource",
        Username = "johndoe",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.CloudProjectDatabase.CloudProjectDatabaseFunctions;
import com.pulumi.ovh.CloudProjectDatabase.inputs.GetDatabaseArgs;
import com.ovhcloud.pulumi.ovh.CloudProjectDatabase.KafkaSchemaRegistryAcl;
import com.ovhcloud.pulumi.ovh.CloudProjectDatabase.KafkaSchemaRegistryAclArgs;
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 kafka = CloudProjectDatabaseFunctions.getDatabase(GetDatabaseArgs.builder()
            .serviceName("XXX")
            .engine("kafka")
            .id("ZZZ")
            .build());

        var schemaRegistryAcl = new KafkaSchemaRegistryAcl("schemaRegistryAcl", KafkaSchemaRegistryAclArgs.builder()
            .serviceName(kafka.serviceName())
            .clusterId(kafka.id())
            .permission("schema_registry_read")
            .resource("Subject:myResource")
            .username("johndoe")
            .build());

    }
}
Copy
resources:
  schemaRegistryAcl:
    type: ovh:CloudProjectDatabase:KafkaSchemaRegistryAcl
    properties:
      serviceName: ${kafka.serviceName}
      clusterId: ${kafka.id}
      permission: schema_registry_read
      resource: Subject:myResource
      username: johndoe
variables:
  kafka:
    fn::invoke:
      function: ovh:CloudProjectDatabase:getDatabase
      arguments:
        serviceName: XXX
        engine: kafka
        id: ZZZ
Copy

Create KafkaSchemaRegistryAcl Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new KafkaSchemaRegistryAcl(name: string, args: KafkaSchemaRegistryAclArgs, opts?: CustomResourceOptions);
@overload
def KafkaSchemaRegistryAcl(resource_name: str,
                           args: KafkaSchemaRegistryAclArgs,
                           opts: Optional[ResourceOptions] = None)

@overload
def KafkaSchemaRegistryAcl(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           cluster_id: Optional[str] = None,
                           permission: Optional[str] = None,
                           resource: Optional[str] = None,
                           service_name: Optional[str] = None,
                           username: Optional[str] = None)
func NewKafkaSchemaRegistryAcl(ctx *Context, name string, args KafkaSchemaRegistryAclArgs, opts ...ResourceOption) (*KafkaSchemaRegistryAcl, error)
public KafkaSchemaRegistryAcl(string name, KafkaSchemaRegistryAclArgs args, CustomResourceOptions? opts = null)
public KafkaSchemaRegistryAcl(String name, KafkaSchemaRegistryAclArgs args)
public KafkaSchemaRegistryAcl(String name, KafkaSchemaRegistryAclArgs args, CustomResourceOptions options)
type: ovh:CloudProjectDatabase:KafkaSchemaRegistryAcl
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. KafkaSchemaRegistryAclArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. KafkaSchemaRegistryAclArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. KafkaSchemaRegistryAclArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. KafkaSchemaRegistryAclArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. KafkaSchemaRegistryAclArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var kafkaSchemaRegistryAclResource = new Ovh.CloudProjectDatabase.KafkaSchemaRegistryAcl("kafkaSchemaRegistryAclResource", new()
{
    ClusterId = "string",
    Permission = "string",
    Resource = "string",
    ServiceName = "string",
    Username = "string",
});
Copy
example, err := CloudProjectDatabase.NewKafkaSchemaRegistryAcl(ctx, "kafkaSchemaRegistryAclResource", &CloudProjectDatabase.KafkaSchemaRegistryAclArgs{
	ClusterId:   pulumi.String("string"),
	Permission:  pulumi.String("string"),
	Resource:    pulumi.String("string"),
	ServiceName: pulumi.String("string"),
	Username:    pulumi.String("string"),
})
Copy
var kafkaSchemaRegistryAclResource = new KafkaSchemaRegistryAcl("kafkaSchemaRegistryAclResource", KafkaSchemaRegistryAclArgs.builder()
    .clusterId("string")
    .permission("string")
    .resource("string")
    .serviceName("string")
    .username("string")
    .build());
Copy
kafka_schema_registry_acl_resource = ovh.cloud_project_database.KafkaSchemaRegistryAcl("kafkaSchemaRegistryAclResource",
    cluster_id="string",
    permission="string",
    resource="string",
    service_name="string",
    username="string")
Copy
const kafkaSchemaRegistryAclResource = new ovh.cloudprojectdatabase.KafkaSchemaRegistryAcl("kafkaSchemaRegistryAclResource", {
    clusterId: "string",
    permission: "string",
    resource: "string",
    serviceName: "string",
    username: "string",
});
Copy
type: ovh:CloudProjectDatabase:KafkaSchemaRegistryAcl
properties:
    clusterId: string
    permission: string
    resource: string
    serviceName: string
    username: string
Copy

KafkaSchemaRegistryAcl Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The KafkaSchemaRegistryAcl resource accepts the following input properties:

ClusterId
This property is required.
Changes to this property will trigger replacement.
string
Cluster ID.
Permission
This property is required.
Changes to this property will trigger replacement.
string
Permission to give to this username on this resource. Available permissions:
Resource
This property is required.
Changes to this property will trigger replacement.
string
Resource affected by this schema registry ACL.
ServiceName
This property is required.
Changes to this property will trigger replacement.
string
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
Username
This property is required.
Changes to this property will trigger replacement.
string
Username affected by this schema registry ACL.
ClusterId
This property is required.
Changes to this property will trigger replacement.
string
Cluster ID.
Permission
This property is required.
Changes to this property will trigger replacement.
string
Permission to give to this username on this resource. Available permissions:
Resource
This property is required.
Changes to this property will trigger replacement.
string
Resource affected by this schema registry ACL.
ServiceName
This property is required.
Changes to this property will trigger replacement.
string
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
Username
This property is required.
Changes to this property will trigger replacement.
string
Username affected by this schema registry ACL.
clusterId
This property is required.
Changes to this property will trigger replacement.
String
Cluster ID.
permission
This property is required.
Changes to this property will trigger replacement.
String
Permission to give to this username on this resource. Available permissions:
resource
This property is required.
Changes to this property will trigger replacement.
String
Resource affected by this schema registry ACL.
serviceName
This property is required.
Changes to this property will trigger replacement.
String
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
username
This property is required.
Changes to this property will trigger replacement.
String
Username affected by this schema registry ACL.
clusterId
This property is required.
Changes to this property will trigger replacement.
string
Cluster ID.
permission
This property is required.
Changes to this property will trigger replacement.
string
Permission to give to this username on this resource. Available permissions:
resource
This property is required.
Changes to this property will trigger replacement.
string
Resource affected by this schema registry ACL.
serviceName
This property is required.
Changes to this property will trigger replacement.
string
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
username
This property is required.
Changes to this property will trigger replacement.
string
Username affected by this schema registry ACL.
cluster_id
This property is required.
Changes to this property will trigger replacement.
str
Cluster ID.
permission
This property is required.
Changes to this property will trigger replacement.
str
Permission to give to this username on this resource. Available permissions:
resource
This property is required.
Changes to this property will trigger replacement.
str
Resource affected by this schema registry ACL.
service_name
This property is required.
Changes to this property will trigger replacement.
str
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
username
This property is required.
Changes to this property will trigger replacement.
str
Username affected by this schema registry ACL.
clusterId
This property is required.
Changes to this property will trigger replacement.
String
Cluster ID.
permission
This property is required.
Changes to this property will trigger replacement.
String
Permission to give to this username on this resource. Available permissions:
resource
This property is required.
Changes to this property will trigger replacement.
String
Resource affected by this schema registry ACL.
serviceName
This property is required.
Changes to this property will trigger replacement.
String
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
username
This property is required.
Changes to this property will trigger replacement.
String
Username affected by this schema registry ACL.

Outputs

All input properties are implicitly available as output properties. Additionally, the KafkaSchemaRegistryAcl resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing KafkaSchemaRegistryAcl Resource

Get an existing KafkaSchemaRegistryAcl resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: KafkaSchemaRegistryAclState, opts?: CustomResourceOptions): KafkaSchemaRegistryAcl
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        cluster_id: Optional[str] = None,
        permission: Optional[str] = None,
        resource: Optional[str] = None,
        service_name: Optional[str] = None,
        username: Optional[str] = None) -> KafkaSchemaRegistryAcl
func GetKafkaSchemaRegistryAcl(ctx *Context, name string, id IDInput, state *KafkaSchemaRegistryAclState, opts ...ResourceOption) (*KafkaSchemaRegistryAcl, error)
public static KafkaSchemaRegistryAcl Get(string name, Input<string> id, KafkaSchemaRegistryAclState? state, CustomResourceOptions? opts = null)
public static KafkaSchemaRegistryAcl get(String name, Output<String> id, KafkaSchemaRegistryAclState state, CustomResourceOptions options)
resources:  _:    type: ovh:CloudProjectDatabase:KafkaSchemaRegistryAcl    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
ClusterId Changes to this property will trigger replacement. string
Cluster ID.
Permission Changes to this property will trigger replacement. string
Permission to give to this username on this resource. Available permissions:
Resource Changes to this property will trigger replacement. string
Resource affected by this schema registry ACL.
ServiceName Changes to this property will trigger replacement. string
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
Username Changes to this property will trigger replacement. string
Username affected by this schema registry ACL.
ClusterId Changes to this property will trigger replacement. string
Cluster ID.
Permission Changes to this property will trigger replacement. string
Permission to give to this username on this resource. Available permissions:
Resource Changes to this property will trigger replacement. string
Resource affected by this schema registry ACL.
ServiceName Changes to this property will trigger replacement. string
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
Username Changes to this property will trigger replacement. string
Username affected by this schema registry ACL.
clusterId Changes to this property will trigger replacement. String
Cluster ID.
permission Changes to this property will trigger replacement. String
Permission to give to this username on this resource. Available permissions:
resource Changes to this property will trigger replacement. String
Resource affected by this schema registry ACL.
serviceName Changes to this property will trigger replacement. String
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
username Changes to this property will trigger replacement. String
Username affected by this schema registry ACL.
clusterId Changes to this property will trigger replacement. string
Cluster ID.
permission Changes to this property will trigger replacement. string
Permission to give to this username on this resource. Available permissions:
resource Changes to this property will trigger replacement. string
Resource affected by this schema registry ACL.
serviceName Changes to this property will trigger replacement. string
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
username Changes to this property will trigger replacement. string
Username affected by this schema registry ACL.
cluster_id Changes to this property will trigger replacement. str
Cluster ID.
permission Changes to this property will trigger replacement. str
Permission to give to this username on this resource. Available permissions:
resource Changes to this property will trigger replacement. str
Resource affected by this schema registry ACL.
service_name Changes to this property will trigger replacement. str
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
username Changes to this property will trigger replacement. str
Username affected by this schema registry ACL.
clusterId Changes to this property will trigger replacement. String
Cluster ID.
permission Changes to this property will trigger replacement. String
Permission to give to this username on this resource. Available permissions:
resource Changes to this property will trigger replacement. String
Resource affected by this schema registry ACL.
serviceName Changes to this property will trigger replacement. String
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
username Changes to this property will trigger replacement. String
Username affected by this schema registry ACL.

Import

OVHcloud Managed Kafka clusters schema registry ACLs can be imported using the service_name, cluster_id and id of the schema registry ACL, separated by “/” E.g.,

bash

$ pulumi import ovh:CloudProjectDatabase/kafkaSchemaRegistryAcl:KafkaSchemaRegistryAcl my_schemaRegistryAcl service_name/cluster_id/id
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
ovh ovh/pulumi-ovh
License
Apache-2.0
Notes
This Pulumi package is based on the ovh Terraform Provider.