import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * A Managed Service for Apache Kafka ACL. Apache Kafka is a trademark owned by the Apache Software Foundation. * * ## Example Usage * * ### Managedkafka Acl Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const project = gcp.organizations.getProject({}); * const cluster = new gcp.managedkafka.Cluster("cluster", { * clusterId: "my-cluster", * location: "us-central1", * capacityConfig: { * vcpuCount: "3", * memoryBytes: "3221225472", * }, * gcpConfig: { * accessConfig: { * networkConfigs: [{ * subnet: project.then(project => `projects/${project.number}/regions/us-central1/subnetworks/default`), * }], * }, * }, * }); * const example = new gcp.managedkafka.Acl("example", { * aclId: "topic/mytopic", * cluster: cluster.clusterId, * location: "us-central1", * aclEntries: [ * { * principal: "User:admin@my-project.iam.gserviceaccount.com", * permissionType: "ALLOW", * operation: "ALL", * host: "*", * }, * { * principal: "User:producer-client@my-project.iam.gserviceaccount.com", * permissionType: "ALLOW", * operation: "WRITE", * host: "*", * }, * ], * }); * ``` * * ## Import * * Acl can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/clusters/{{cluster}}/acls/{{acl_id}}` * * When using the `pulumi import` command, Acl can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:managedkafka/acl:Acl default projects/{{project}}/locations/{{location}}/clusters/{{cluster}}/acls/{{acl_id}} * ``` */ export declare class Acl extends pulumi.CustomResource { /** * Get an existing Acl resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: AclState, opts?: pulumi.CustomResourceOptions): Acl; /** * Returns true if the given object is an instance of Acl. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Acl; /** * The acl entries that apply to the resource pattern. The maximum number of allowed entries is 100. * Structure is documented below. */ readonly aclEntries: pulumi.Output; /** * The ID to use for the acl, which will become the final component of the acl's name. The structure of `aclId` defines the Resource Pattern (resource_type, resource_name, pattern_type) of the acl. `aclId` is structured like one of the following: * For acls on the cluster: `cluster` * For acls on a single resource within the cluster: `topic/{resource_name}` `consumerGroup/{resource_name}` `transactionalId/{resource_name}` * For acls on all resources that match a prefix: `topicPrefixed/{resource_name}` `consumerGroupPrefixed/{resource_name}` `transactionalIdPrefixed/{resource_name}` * For acls on all resources of a given type (i.e. the wildcard literal '*''): `allTopics` (represents `topic/*`) `allConsumerGroups` (represents `consumerGroup/*`) `allTransactionalIds` (represents `transactionalId/*`). */ readonly aclId: pulumi.Output; /** * The cluster name. */ readonly cluster: pulumi.Output; /** * `etag` is used for concurrency control. An `etag` is returned in the * response to `GetAcl` and `CreateAcl`. Callers are required to put that etag * in the request to `UpdateAcl` to ensure that their change will be applied * to the same version of the acl that exists in the Kafka Cluster. * A terminal 'T' character in the etag indicates that the AclEntries were * truncated due to repeated field limits. */ readonly etag: pulumi.Output; /** * ID of the location of the Kafka resource. See https://cloud.google.com/managed-kafka/docs/locations for a list of supported locations. */ readonly location: pulumi.Output; /** * The name of the acl. The `ACL_ID` segment is used when connecting directly to the cluster. Must be in the format `projects/PROJECT_ID/locations/LOCATION/clusters/CLUSTER_ID/acls/ACL_ID`. */ readonly name: pulumi.Output; /** * The acl pattern type derived from the name. One of: LITERAL, PREFIXED. */ readonly patternType: pulumi.Output; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ readonly project: pulumi.Output; /** * The acl resource name derived from the name. For cluster resource_type, this is always "kafka-cluster". Can be the wildcard literal "*". */ readonly resourceName: pulumi.Output; /** * The acl resource type derived from the name. One of: CLUSTER, TOPIC, GROUP, TRANSACTIONAL_ID. */ readonly resourceType: pulumi.Output; /** * Create a Acl resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: AclArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Acl resources. */ export interface AclState { /** * The acl entries that apply to the resource pattern. The maximum number of allowed entries is 100. * Structure is documented below. */ aclEntries?: pulumi.Input[]>; /** * The ID to use for the acl, which will become the final component of the acl's name. The structure of `aclId` defines the Resource Pattern (resource_type, resource_name, pattern_type) of the acl. `aclId` is structured like one of the following: * For acls on the cluster: `cluster` * For acls on a single resource within the cluster: `topic/{resource_name}` `consumerGroup/{resource_name}` `transactionalId/{resource_name}` * For acls on all resources that match a prefix: `topicPrefixed/{resource_name}` `consumerGroupPrefixed/{resource_name}` `transactionalIdPrefixed/{resource_name}` * For acls on all resources of a given type (i.e. the wildcard literal '*''): `allTopics` (represents `topic/*`) `allConsumerGroups` (represents `consumerGroup/*`) `allTransactionalIds` (represents `transactionalId/*`). */ aclId?: pulumi.Input; /** * The cluster name. */ cluster?: pulumi.Input; /** * `etag` is used for concurrency control. An `etag` is returned in the * response to `GetAcl` and `CreateAcl`. Callers are required to put that etag * in the request to `UpdateAcl` to ensure that their change will be applied * to the same version of the acl that exists in the Kafka Cluster. * A terminal 'T' character in the etag indicates that the AclEntries were * truncated due to repeated field limits. */ etag?: pulumi.Input; /** * ID of the location of the Kafka resource. See https://cloud.google.com/managed-kafka/docs/locations for a list of supported locations. */ location?: pulumi.Input; /** * The name of the acl. The `ACL_ID` segment is used when connecting directly to the cluster. Must be in the format `projects/PROJECT_ID/locations/LOCATION/clusters/CLUSTER_ID/acls/ACL_ID`. */ name?: pulumi.Input; /** * The acl pattern type derived from the name. One of: LITERAL, PREFIXED. */ patternType?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * The acl resource name derived from the name. For cluster resource_type, this is always "kafka-cluster". Can be the wildcard literal "*". */ resourceName?: pulumi.Input; /** * The acl resource type derived from the name. One of: CLUSTER, TOPIC, GROUP, TRANSACTIONAL_ID. */ resourceType?: pulumi.Input; } /** * The set of arguments for constructing a Acl resource. */ export interface AclArgs { /** * The acl entries that apply to the resource pattern. The maximum number of allowed entries is 100. * Structure is documented below. */ aclEntries: pulumi.Input[]>; /** * The ID to use for the acl, which will become the final component of the acl's name. The structure of `aclId` defines the Resource Pattern (resource_type, resource_name, pattern_type) of the acl. `aclId` is structured like one of the following: * For acls on the cluster: `cluster` * For acls on a single resource within the cluster: `topic/{resource_name}` `consumerGroup/{resource_name}` `transactionalId/{resource_name}` * For acls on all resources that match a prefix: `topicPrefixed/{resource_name}` `consumerGroupPrefixed/{resource_name}` `transactionalIdPrefixed/{resource_name}` * For acls on all resources of a given type (i.e. the wildcard literal '*''): `allTopics` (represents `topic/*`) `allConsumerGroups` (represents `consumerGroup/*`) `allTransactionalIds` (represents `transactionalId/*`). */ aclId: pulumi.Input; /** * The cluster name. */ cluster: pulumi.Input; /** * ID of the location of the Kafka resource. See https://cloud.google.com/managed-kafka/docs/locations for a list of supported locations. */ location: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; }