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

aiven.getOpenSearchAclRule

Explore with Pulumi AI

Aiven v6.37.0 published on Thursday, Apr 10, 2025 by Pulumi

The OpenSearch ACL Rule data source provides information about an existing Aiven OpenSearch ACL Rule.

Example Usage

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

const osAclRule = aiven.getOpenSearchAclRule({
    project: osAclsConfig.project,
    serviceName: osAclsConfig.serviceName,
    username: "<USERNAME>",
    index: "<INDEX>",
});
Copy
import pulumi
import pulumi_aiven as aiven

os_acl_rule = aiven.get_open_search_acl_rule(project=os_acls_config["project"],
    service_name=os_acls_config["serviceName"],
    username="<USERNAME>",
    index="<INDEX>")
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.LookupOpenSearchAclRule(ctx, &aiven.LookupOpenSearchAclRuleArgs{
			Project:     osAclsConfig.Project,
			ServiceName: osAclsConfig.ServiceName,
			Username:    "<USERNAME>",
			Index:       "<INDEX>",
		}, nil)
		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 osAclRule = Aiven.GetOpenSearchAclRule.Invoke(new()
    {
        Project = osAclsConfig.Project,
        ServiceName = osAclsConfig.ServiceName,
        Username = "<USERNAME>",
        Index = "<INDEX>",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aiven.AivenFunctions;
import com.pulumi.aiven.inputs.GetOpenSearchAclRuleArgs;
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 osAclRule = AivenFunctions.getOpenSearchAclRule(GetOpenSearchAclRuleArgs.builder()
            .project(osAclsConfig.project())
            .serviceName(osAclsConfig.serviceName())
            .username("<USERNAME>")
            .index("<INDEX>")
            .build());

    }
}
Copy
variables:
  osAclRule:
    fn::invoke:
      function: aiven:getOpenSearchAclRule
      arguments:
        project: ${osAclsConfig.project}
        serviceName: ${osAclsConfig.serviceName}
        username: <USERNAME>
        index: <INDEX>
Copy

Using getOpenSearchAclRule

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 getOpenSearchAclRule(args: GetOpenSearchAclRuleArgs, opts?: InvokeOptions): Promise<GetOpenSearchAclRuleResult>
function getOpenSearchAclRuleOutput(args: GetOpenSearchAclRuleOutputArgs, opts?: InvokeOptions): Output<GetOpenSearchAclRuleResult>
Copy
def get_open_search_acl_rule(index: Optional[str] = None,
                             permission: Optional[str] = None,
                             project: Optional[str] = None,
                             service_name: Optional[str] = None,
                             username: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetOpenSearchAclRuleResult
def get_open_search_acl_rule_output(index: Optional[pulumi.Input[str]] = None,
                             permission: Optional[pulumi.Input[str]] = None,
                             project: Optional[pulumi.Input[str]] = None,
                             service_name: Optional[pulumi.Input[str]] = None,
                             username: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetOpenSearchAclRuleResult]
Copy
func LookupOpenSearchAclRule(ctx *Context, args *LookupOpenSearchAclRuleArgs, opts ...InvokeOption) (*LookupOpenSearchAclRuleResult, error)
func LookupOpenSearchAclRuleOutput(ctx *Context, args *LookupOpenSearchAclRuleOutputArgs, opts ...InvokeOption) LookupOpenSearchAclRuleResultOutput
Copy

> Note: This function is named LookupOpenSearchAclRule in the Go SDK.

public static class GetOpenSearchAclRule 
{
    public static Task<GetOpenSearchAclRuleResult> InvokeAsync(GetOpenSearchAclRuleArgs args, InvokeOptions? opts = null)
    public static Output<GetOpenSearchAclRuleResult> Invoke(GetOpenSearchAclRuleInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetOpenSearchAclRuleResult> getOpenSearchAclRule(GetOpenSearchAclRuleArgs args, InvokeOptions options)
public static Output<GetOpenSearchAclRuleResult> getOpenSearchAclRule(GetOpenSearchAclRuleArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: aiven:index/getOpenSearchAclRule:getOpenSearchAclRule
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Index This property is required. string
The index pattern for this ACL entry. Maximum length: 249. Changing this property forces recreation of the resource.
Permission This property is required. string
The permissions for this ACL entry. The possible values are admin, deny, read, readwrite and write.
Project This property is required. 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.
ServiceName This property is required. 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. string
The username for the ACL entry. Maximum length: 40. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
Index This property is required. string
The index pattern for this ACL entry. Maximum length: 249. Changing this property forces recreation of the resource.
Permission This property is required. string
The permissions for this ACL entry. The possible values are admin, deny, read, readwrite and write.
Project This property is required. 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.
ServiceName This property is required. 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. string
The username for the ACL entry. Maximum length: 40. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
index This property is required. String
The index pattern for this ACL entry. Maximum length: 249. Changing this property forces recreation of the resource.
permission This property is required. String
The permissions for this ACL entry. The possible values are admin, deny, read, readwrite and write.
project This property is required. 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.
serviceName This property is required. 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. String
The username for the ACL entry. Maximum length: 40. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
index This property is required. string
The index pattern for this ACL entry. Maximum length: 249. Changing this property forces recreation of the resource.
permission This property is required. string
The permissions for this ACL entry. The possible values are admin, deny, read, readwrite and write.
project This property is required. 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.
serviceName This property is required. 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. string
The username for the ACL entry. Maximum length: 40. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
index This property is required. str
The index pattern for this ACL entry. Maximum length: 249. Changing this property forces recreation of the resource.
permission This property is required. str
The permissions for this ACL entry. The possible values are admin, deny, read, readwrite and write.
project This property is required. 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.
service_name This property is required. 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. str
The username for the ACL entry. Maximum length: 40. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
index This property is required. String
The index pattern for this ACL entry. Maximum length: 249. Changing this property forces recreation of the resource.
permission This property is required. String
The permissions for this ACL entry. The possible values are admin, deny, read, readwrite and write.
project This property is required. 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.
serviceName This property is required. 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. String
The username for the ACL entry. Maximum length: 40. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.

getOpenSearchAclRule Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Index string
The index pattern for this ACL entry. Maximum length: 249. Changing this property forces recreation of the resource.
Permission string
The permissions for this ACL entry. The possible values are admin, deny, read, readwrite and write.
Project 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.
ServiceName 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 string
The username for the ACL entry. Maximum length: 40. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
Id string
The provider-assigned unique ID for this managed resource.
Index string
The index pattern for this ACL entry. Maximum length: 249. Changing this property forces recreation of the resource.
Permission string
The permissions for this ACL entry. The possible values are admin, deny, read, readwrite and write.
Project 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.
ServiceName 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 string
The username for the ACL entry. Maximum length: 40. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
id String
The provider-assigned unique ID for this managed resource.
index String
The index pattern for this ACL entry. Maximum length: 249. Changing this property forces recreation of the resource.
permission String
The permissions for this ACL entry. The possible values are admin, deny, read, readwrite and write.
project 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.
serviceName 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 String
The username for the ACL entry. Maximum length: 40. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
id string
The provider-assigned unique ID for this managed resource.
index string
The index pattern for this ACL entry. Maximum length: 249. Changing this property forces recreation of the resource.
permission string
The permissions for this ACL entry. The possible values are admin, deny, read, readwrite and write.
project 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.
serviceName 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 string
The username for the ACL entry. Maximum length: 40. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
id str
The provider-assigned unique ID for this managed resource.
index str
The index pattern for this ACL entry. Maximum length: 249. Changing this property forces recreation of the resource.
permission str
The permissions for this ACL entry. The possible values are admin, deny, read, readwrite and write.
project 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.
service_name 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 str
The username for the ACL entry. Maximum length: 40. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
id String
The provider-assigned unique ID for this managed resource.
index String
The index pattern for this ACL entry. Maximum length: 249. Changing this property forces recreation of the resource.
permission String
The permissions for this ACL entry. The possible values are admin, deny, read, readwrite and write.
project 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.
serviceName 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 String
The username for the ACL entry. Maximum length: 40. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.

Package Details

Repository
Aiven pulumi/pulumi-aiven
License
Apache-2.0
Notes
This Pulumi package is based on the aiven Terraform Provider.
Aiven v6.37.0 published on Thursday, Apr 10, 2025 by Pulumi