import * as pulumi from "@pulumi/pulumi"; /** * Create an access control list (ACL) rule for indexes in an Aiven for OpenSearch® service. ACLs apply only to indexes and don't control access to other OpenSearch APIs such as OpenSearch Dashboards. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aiven from "@pulumi/aiven"; * * const osUser1 = new aiven.OpensearchUser("os_user_1", { * project: exampleProject.project, * serviceName: exampleOpensearch.serviceName, * username: "documentation-user-1", * }); * const osUser2 = new aiven.OpensearchUser("os_user_2", { * project: exampleProject.project, * serviceName: exampleOpensearch.serviceName, * username: "documentation-user-2", * }); * const osAclsConfig = new aiven.OpenSearchAclConfig("os_acls_config", { * project: exampleProject.project, * serviceName: exampleOpensearch.serviceName, * enabled: true, * extendedAcl: false, * }); * const aclRules = [ * { * username: osUser1.username, * index: "index2", * permission: "readwrite", * }, * { * username: osUser1.username, * index: "index3", * permission: "read", * }, * { * username: osUser1.username, * index: "index5", * permission: "deny", * }, * { * username: osUser2.username, * index: "index3", * permission: "write", * }, * { * username: osUser2.username, * index: "index7", * permission: "readwrite", * }, * ]; * const osAclRule: {[key: string]: aiven.OpenSearchAclRule} = {}; * pulumi.all(aclRules.map((v, k) => [k, v] as const).reduce((__obj, [i, v]) => ({ ...__obj, [String(i)]: v }), {})).apply(rangeBody => { * for (const range of Object.entries(rangeBody).sort().map(([k, v]) => ({key: k, value: v}))) { * osAclRule[range.key] = new aiven.OpenSearchAclRule(`os_acl_rule-${range.key}`, { * project: exampleProject.project, * serviceName: exampleOpensearch.serviceName, * username: range.value.username, * index: range.value.index, * permission: range.value.permission, * }); * } * }); * ``` * * ## Import * * ```sh * $ pulumi import aiven:index/openSearchAclRule:OpenSearchAclRule os_acl_rule PROJECT/SERVICE_NAME/USERNAME/INDEX * ``` */ export declare class OpenSearchAclRule extends pulumi.CustomResource { /** * Get an existing OpenSearchAclRule 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?: OpenSearchAclRuleState, opts?: pulumi.CustomResourceOptions): OpenSearchAclRule; /** * Returns true if the given object is an instance of OpenSearchAclRule. 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 OpenSearchAclRule; /** * The index pattern for this ACL rule. Maximum length: `249`. Changing this property forces recreation of the resource. */ readonly index: pulumi.Output; /** * The permissions for this ACL rule. The possible values are `admin`, `deny`, `read`, `readwrite` and `write`. */ readonly permission: pulumi.Output; /** * 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. */ readonly project: pulumi.Output; /** * 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. */ readonly serviceName: pulumi.Output; /** * The username for the OpenSearch user this ACL rule applies to. Maximum length: `40`. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource. */ readonly username: pulumi.Output; /** * Create a OpenSearchAclRule 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: OpenSearchAclRuleArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering OpenSearchAclRule resources. */ export interface OpenSearchAclRuleState { /** * The index pattern for this ACL rule. Maximum length: `249`. Changing this property forces recreation of the resource. */ index?: pulumi.Input; /** * The permissions for this ACL rule. The possible values are `admin`, `deny`, `read`, `readwrite` and `write`. */ permission?: pulumi.Input; /** * 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. */ project?: pulumi.Input; /** * 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. */ serviceName?: pulumi.Input; /** * The username for the OpenSearch user this ACL rule applies to. Maximum length: `40`. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource. */ username?: pulumi.Input; } /** * The set of arguments for constructing a OpenSearchAclRule resource. */ export interface OpenSearchAclRuleArgs { /** * The index pattern for this ACL rule. Maximum length: `249`. Changing this property forces recreation of the resource. */ index: pulumi.Input; /** * The permissions for this ACL rule. The possible values are `admin`, `deny`, `read`, `readwrite` and `write`. */ permission: pulumi.Input; /** * 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. */ project: pulumi.Input; /** * 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. */ serviceName: pulumi.Input; /** * The username for the OpenSearch user this ACL rule applies to. Maximum length: `40`. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource. */ username: pulumi.Input; } //# sourceMappingURL=openSearchAclRule.d.ts.map