1. Packages
  2. AWS
  3. API Docs
  4. opensearch
  5. getServerlessAccessPolicy
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.opensearch.getServerlessAccessPolicy

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Data source for managing an AWS OpenSearch Serverless Access Policy.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.opensearch.getServerlessAccessPolicy({
        name: exampleAwsOpensearchserverlessAccessPolicy.name,
        type: exampleAwsOpensearchserverlessAccessPolicy.type,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.opensearch.get_serverless_access_policy(name=example_aws_opensearchserverless_access_policy["name"],
        type=example_aws_opensearchserverless_access_policy["type"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opensearch"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := opensearch.LookupServerlessAccessPolicy(ctx, &opensearch.LookupServerlessAccessPolicyArgs{
    			Name: exampleAwsOpensearchserverlessAccessPolicy.Name,
    			Type: exampleAwsOpensearchserverlessAccessPolicy.Type,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Aws.OpenSearch.GetServerlessAccessPolicy.Invoke(new()
        {
            Name = exampleAwsOpensearchserverlessAccessPolicy.Name,
            Type = exampleAwsOpensearchserverlessAccessPolicy.Type,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.opensearch.OpensearchFunctions;
    import com.pulumi.aws.opensearch.inputs.GetServerlessAccessPolicyArgs;
    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 example = OpensearchFunctions.getServerlessAccessPolicy(GetServerlessAccessPolicyArgs.builder()
                .name(exampleAwsOpensearchserverlessAccessPolicy.name())
                .type(exampleAwsOpensearchserverlessAccessPolicy.type())
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: aws:opensearch:getServerlessAccessPolicy
          Arguments:
            name: ${exampleAwsOpensearchserverlessAccessPolicy.name}
            type: ${exampleAwsOpensearchserverlessAccessPolicy.type}
    

    Using getServerlessAccessPolicy

    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 getServerlessAccessPolicy(args: GetServerlessAccessPolicyArgs, opts?: InvokeOptions): Promise<GetServerlessAccessPolicyResult>
    function getServerlessAccessPolicyOutput(args: GetServerlessAccessPolicyOutputArgs, opts?: InvokeOptions): Output<GetServerlessAccessPolicyResult>
    def get_serverless_access_policy(name: Optional[str] = None,
                                     type: Optional[str] = None,
                                     opts: Optional[InvokeOptions] = None) -> GetServerlessAccessPolicyResult
    def get_serverless_access_policy_output(name: Optional[pulumi.Input[str]] = None,
                                     type: Optional[pulumi.Input[str]] = None,
                                     opts: Optional[InvokeOptions] = None) -> Output[GetServerlessAccessPolicyResult]
    func LookupServerlessAccessPolicy(ctx *Context, args *LookupServerlessAccessPolicyArgs, opts ...InvokeOption) (*LookupServerlessAccessPolicyResult, error)
    func LookupServerlessAccessPolicyOutput(ctx *Context, args *LookupServerlessAccessPolicyOutputArgs, opts ...InvokeOption) LookupServerlessAccessPolicyResultOutput

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

    public static class GetServerlessAccessPolicy 
    {
        public static Task<GetServerlessAccessPolicyResult> InvokeAsync(GetServerlessAccessPolicyArgs args, InvokeOptions? opts = null)
        public static Output<GetServerlessAccessPolicyResult> Invoke(GetServerlessAccessPolicyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetServerlessAccessPolicyResult> getServerlessAccessPolicy(GetServerlessAccessPolicyArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:opensearch/getServerlessAccessPolicy:getServerlessAccessPolicy
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    Name of the policy.
    Type string
    Type of access policy. Must be data.
    Name string
    Name of the policy.
    Type string
    Type of access policy. Must be data.
    name String
    Name of the policy.
    type String
    Type of access policy. Must be data.
    name string
    Name of the policy.
    type string
    Type of access policy. Must be data.
    name str
    Name of the policy.
    type str
    Type of access policy. Must be data.
    name String
    Name of the policy.
    type String
    Type of access policy. Must be data.

    getServerlessAccessPolicy Result

    The following output properties are available:

    Description string
    Description of the policy. Typically used to store information about the permissions defined in the policy.
    Id string
    Name string
    Policy string
    JSON policy document to use as the content for the new policy.
    PolicyVersion string
    Version of the policy.
    Type string
    Description string
    Description of the policy. Typically used to store information about the permissions defined in the policy.
    Id string
    Name string
    Policy string
    JSON policy document to use as the content for the new policy.
    PolicyVersion string
    Version of the policy.
    Type string
    description String
    Description of the policy. Typically used to store information about the permissions defined in the policy.
    id String
    name String
    policy String
    JSON policy document to use as the content for the new policy.
    policyVersion String
    Version of the policy.
    type String
    description string
    Description of the policy. Typically used to store information about the permissions defined in the policy.
    id string
    name string
    policy string
    JSON policy document to use as the content for the new policy.
    policyVersion string
    Version of the policy.
    type string
    description str
    Description of the policy. Typically used to store information about the permissions defined in the policy.
    id str
    name str
    policy str
    JSON policy document to use as the content for the new policy.
    policy_version str
    Version of the policy.
    type str
    description String
    Description of the policy. Typically used to store information about the permissions defined in the policy.
    id String
    name String
    policy String
    JSON policy document to use as the content for the new policy.
    policyVersion String
    Version of the policy.
    type String

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi