1. Packages
  2. Aiven Provider
  3. API Docs
  4. KafkaSchemaRegistryAcl
Aiven v6.37.0 published on Thursday, Apr 10, 2025 by Pulumi

aiven.KafkaSchemaRegistryAcl

Explore with Pulumi AI

The Resource Kafka Schema Registry ACL resource allows the creation and management of Schema Registry ACLs for an Aiven Kafka service.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aiven from "@pulumi/aiven";

const foo = new aiven.KafkaSchemaRegistryAcl("foo", {
    project: kafka_schemas_project1.project,
    serviceName: kafka_service1.serviceName,
    resource: "Subject:topic-1",
    username: "group-user-*",
    permission: "schema_registry_read",
});
Copy
import pulumi
import pulumi_aiven as aiven

foo = aiven.KafkaSchemaRegistryAcl("foo",
    project=kafka_schemas_project1["project"],
    service_name=kafka_service1["serviceName"],
    resource="Subject:topic-1",
    username="group-user-*",
    permission="schema_registry_read")
Copy
package main

import (
	"github.com/pulumi/pulumi-aiven/sdk/v6/go/aiven"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := aiven.NewKafkaSchemaRegistryAcl(ctx, "foo", &aiven.KafkaSchemaRegistryAclArgs{
			Project:     pulumi.Any(kafka_schemas_project1.Project),
			ServiceName: pulumi.Any(kafka_service1.ServiceName),
			Resource:    pulumi.String("Subject:topic-1"),
			Username:    pulumi.String("group-user-*"),
			Permission:  pulumi.String("schema_registry_read"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aiven = Pulumi.Aiven;

return await Deployment.RunAsync(() => 
{
    var foo = new Aiven.KafkaSchemaRegistryAcl("foo", new()
    {
        Project = kafka_schemas_project1.Project,
        ServiceName = kafka_service1.ServiceName,
        Resource = "Subject:topic-1",
        Username = "group-user-*",
        Permission = "schema_registry_read",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aiven.KafkaSchemaRegistryAcl;
import com.pulumi.aiven.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) {
        var foo = new KafkaSchemaRegistryAcl("foo", KafkaSchemaRegistryAclArgs.builder()
            .project(kafka_schemas_project1.project())
            .serviceName(kafka_service1.serviceName())
            .resource("Subject:topic-1")
            .username("group-user-*")
            .permission("schema_registry_read")
            .build());

    }
}
Copy
resources:
  foo:
    type: aiven:KafkaSchemaRegistryAcl
    properties:
      project: ${["kafka-schemas-project1"].project}
      serviceName: ${["kafka-service1"].serviceName}
      resource: Subject:topic-1
      username: group-user-*
      permission: schema_registry_read
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,
                           permission: Optional[str] = None,
                           project: 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: aiven: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 Aiven.KafkaSchemaRegistryAcl("kafkaSchemaRegistryAclResource", new()
{
    Permission = "string",
    Project = "string",
    Resource = "string",
    ServiceName = "string",
    Username = "string",
});
Copy
example, err := aiven.NewKafkaSchemaRegistryAcl(ctx, "kafkaSchemaRegistryAclResource", &aiven.KafkaSchemaRegistryAclArgs{
	Permission:  pulumi.String("string"),
	Project:     pulumi.String("string"),
	Resource:    pulumi.String("string"),
	ServiceName: pulumi.String("string"),
	Username:    pulumi.String("string"),
})
Copy
var kafkaSchemaRegistryAclResource = new KafkaSchemaRegistryAcl("kafkaSchemaRegistryAclResource", KafkaSchemaRegistryAclArgs.builder()
    .permission("string")
    .project("string")
    .resource("string")
    .serviceName("string")
    .username("string")
    .build());
Copy
kafka_schema_registry_acl_resource = aiven.KafkaSchemaRegistryAcl("kafkaSchemaRegistryAclResource",
    permission="string",
    project="string",
    resource="string",
    service_name="string",
    username="string")
Copy
const kafkaSchemaRegistryAclResource = new aiven.KafkaSchemaRegistryAcl("kafkaSchemaRegistryAclResource", {
    permission: "string",
    project: "string",
    resource: "string",
    serviceName: "string",
    username: "string",
});
Copy
type: aiven:KafkaSchemaRegistryAcl
properties:
    permission: string
    project: 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:

Permission
This property is required.
Changes to this property will trigger replacement.
string
Kafka Schema Registry permission to grant. The possible values are schema_registry_read and schema_registry_write. Changing this property forces recreation of the resource.
Project
This property is required.
Changes to this property will trigger replacement.
string
The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
Resource
This property is required.
Changes to this property will trigger replacement.
string
Resource name pattern for the Schema Registry ACL entry. Changing this property forces recreation of the resource.
ServiceName
This property is required.
Changes to this property will trigger replacement.
string
The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
Username
This property is required.
Changes to this property will trigger replacement.
string
Username pattern for the ACL entry. Changing this property forces recreation of the resource.
Permission
This property is required.
Changes to this property will trigger replacement.
string
Kafka Schema Registry permission to grant. The possible values are schema_registry_read and schema_registry_write. Changing this property forces recreation of the resource.
Project
This property is required.
Changes to this property will trigger replacement.
string
The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
Resource
This property is required.
Changes to this property will trigger replacement.
string
Resource name pattern for the Schema Registry ACL entry. Changing this property forces recreation of the resource.
ServiceName
This property is required.
Changes to this property will trigger replacement.
string
The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
Username
This property is required.
Changes to this property will trigger replacement.
string
Username pattern for the ACL entry. Changing this property forces recreation of the resource.
permission
This property is required.
Changes to this property will trigger replacement.
String
Kafka Schema Registry permission to grant. The possible values are schema_registry_read and schema_registry_write. Changing this property forces recreation of the resource.
project
This property is required.
Changes to this property will trigger replacement.
String
The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
resource
This property is required.
Changes to this property will trigger replacement.
String
Resource name pattern for the Schema Registry ACL entry. Changing this property forces recreation of the resource.
serviceName
This property is required.
Changes to this property will trigger replacement.
String
The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
username
This property is required.
Changes to this property will trigger replacement.
String
Username pattern for the ACL entry. Changing this property forces recreation of the resource.
permission
This property is required.
Changes to this property will trigger replacement.
string
Kafka Schema Registry permission to grant. The possible values are schema_registry_read and schema_registry_write. Changing this property forces recreation of the resource.
project
This property is required.
Changes to this property will trigger replacement.
string
The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
resource
This property is required.
Changes to this property will trigger replacement.
string
Resource name pattern for the Schema Registry ACL entry. Changing this property forces recreation of the resource.
serviceName
This property is required.
Changes to this property will trigger replacement.
string
The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
username
This property is required.
Changes to this property will trigger replacement.
string
Username pattern for the ACL entry. Changing this property forces recreation of the resource.
permission
This property is required.
Changes to this property will trigger replacement.
str
Kafka Schema Registry permission to grant. The possible values are schema_registry_read and schema_registry_write. Changing this property forces recreation of the resource.
project
This property is required.
Changes to this property will trigger replacement.
str
The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
resource
This property is required.
Changes to this property will trigger replacement.
str
Resource name pattern for the Schema Registry ACL entry. Changing this property forces recreation of the resource.
service_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
username
This property is required.
Changes to this property will trigger replacement.
str
Username pattern for the ACL entry. Changing this property forces recreation of the resource.
permission
This property is required.
Changes to this property will trigger replacement.
String
Kafka Schema Registry permission to grant. The possible values are schema_registry_read and schema_registry_write. Changing this property forces recreation of the resource.
project
This property is required.
Changes to this property will trigger replacement.
String
The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
resource
This property is required.
Changes to this property will trigger replacement.
String
Resource name pattern for the Schema Registry ACL entry. Changing this property forces recreation of the resource.
serviceName
This property is required.
Changes to this property will trigger replacement.
String
The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
username
This property is required.
Changes to this property will trigger replacement.
String
Username pattern for the ACL entry. Changing this property forces recreation of the resource.

Outputs

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

AclId string
Kafka Schema Registry ACL ID
Id string
The provider-assigned unique ID for this managed resource.
AclId string
Kafka Schema Registry ACL ID
Id string
The provider-assigned unique ID for this managed resource.
aclId String
Kafka Schema Registry ACL ID
id String
The provider-assigned unique ID for this managed resource.
aclId string
Kafka Schema Registry ACL ID
id string
The provider-assigned unique ID for this managed resource.
acl_id str
Kafka Schema Registry ACL ID
id str
The provider-assigned unique ID for this managed resource.
aclId String
Kafka Schema Registry ACL ID
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,
        acl_id: Optional[str] = None,
        permission: Optional[str] = None,
        project: 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: aiven: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:
AclId string
Kafka Schema Registry ACL ID
Permission Changes to this property will trigger replacement. string
Kafka Schema Registry permission to grant. The possible values are schema_registry_read and schema_registry_write. Changing this property forces recreation of the resource.
Project Changes to this property will trigger replacement. string
The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
Resource Changes to this property will trigger replacement. string
Resource name pattern for the Schema Registry ACL entry. Changing this property forces recreation of the resource.
ServiceName Changes to this property will trigger replacement. string
The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
Username Changes to this property will trigger replacement. string
Username pattern for the ACL entry. Changing this property forces recreation of the resource.
AclId string
Kafka Schema Registry ACL ID
Permission Changes to this property will trigger replacement. string
Kafka Schema Registry permission to grant. The possible values are schema_registry_read and schema_registry_write. Changing this property forces recreation of the resource.
Project Changes to this property will trigger replacement. string
The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
Resource Changes to this property will trigger replacement. string
Resource name pattern for the Schema Registry ACL entry. Changing this property forces recreation of the resource.
ServiceName Changes to this property will trigger replacement. string
The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
Username Changes to this property will trigger replacement. string
Username pattern for the ACL entry. Changing this property forces recreation of the resource.
aclId String
Kafka Schema Registry ACL ID
permission Changes to this property will trigger replacement. String
Kafka Schema Registry permission to grant. The possible values are schema_registry_read and schema_registry_write. Changing this property forces recreation of the resource.
project Changes to this property will trigger replacement. String
The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
resource Changes to this property will trigger replacement. String
Resource name pattern for the Schema Registry ACL entry. Changing this property forces recreation of the resource.
serviceName Changes to this property will trigger replacement. String
The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
username Changes to this property will trigger replacement. String
Username pattern for the ACL entry. Changing this property forces recreation of the resource.
aclId string
Kafka Schema Registry ACL ID
permission Changes to this property will trigger replacement. string
Kafka Schema Registry permission to grant. The possible values are schema_registry_read and schema_registry_write. Changing this property forces recreation of the resource.
project Changes to this property will trigger replacement. string
The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
resource Changes to this property will trigger replacement. string
Resource name pattern for the Schema Registry ACL entry. Changing this property forces recreation of the resource.
serviceName Changes to this property will trigger replacement. string
The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
username Changes to this property will trigger replacement. string
Username pattern for the ACL entry. Changing this property forces recreation of the resource.
acl_id str
Kafka Schema Registry ACL ID
permission Changes to this property will trigger replacement. str
Kafka Schema Registry permission to grant. The possible values are schema_registry_read and schema_registry_write. Changing this property forces recreation of the resource.
project Changes to this property will trigger replacement. str
The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
resource Changes to this property will trigger replacement. str
Resource name pattern for the Schema Registry ACL entry. Changing this property forces recreation of the resource.
service_name Changes to this property will trigger replacement. str
The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
username Changes to this property will trigger replacement. str
Username pattern for the ACL entry. Changing this property forces recreation of the resource.
aclId String
Kafka Schema Registry ACL ID
permission Changes to this property will trigger replacement. String
Kafka Schema Registry permission to grant. The possible values are schema_registry_read and schema_registry_write. Changing this property forces recreation of the resource.
project Changes to this property will trigger replacement. String
The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
resource Changes to this property will trigger replacement. String
Resource name pattern for the Schema Registry ACL entry. Changing this property forces recreation of the resource.
serviceName Changes to this property will trigger replacement. String
The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
username Changes to this property will trigger replacement. String
Username pattern for the ACL entry. Changing this property forces recreation of the resource.

Import

$ pulumi import aiven:index/kafkaSchemaRegistryAcl:KafkaSchemaRegistryAcl foo PROJECT/SERVICE_NAME/ACL_ID
Copy

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

Package Details

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