1. Packages
  2. AWS Classic
  3. API Docs
  4. opensearch
  5. getServerlessSecurityPolicy

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.33.1 published on Thursday, May 2, 2024 by Pulumi

aws.opensearch.getServerlessSecurityPolicy

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.33.1 published on Thursday, May 2, 2024 by Pulumi

    Use this data source to get information about an AWS OpenSearch Serverless Security Policy.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.opensearch.getServerlessSecurityPolicy({
        name: "example-security-policy",
        type: "encryption",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.opensearch.get_serverless_security_policy(name="example-security-policy",
        type="encryption")
    
    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.LookupServerlessSecurityPolicy(ctx, &opensearch.LookupServerlessSecurityPolicyArgs{
    			Name: "example-security-policy",
    			Type: "encryption",
    		}, 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.GetServerlessSecurityPolicy.Invoke(new()
        {
            Name = "example-security-policy",
            Type = "encryption",
        });
    
    });
    
    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.GetServerlessSecurityPolicyArgs;
    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.getServerlessSecurityPolicy(GetServerlessSecurityPolicyArgs.builder()
                .name("example-security-policy")
                .type("encryption")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: aws:opensearch:getServerlessSecurityPolicy
          Arguments:
            name: example-security-policy
            type: encryption
    

    Using getServerlessSecurityPolicy

    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 getServerlessSecurityPolicy(args: GetServerlessSecurityPolicyArgs, opts?: InvokeOptions): Promise<GetServerlessSecurityPolicyResult>
    function getServerlessSecurityPolicyOutput(args: GetServerlessSecurityPolicyOutputArgs, opts?: InvokeOptions): Output<GetServerlessSecurityPolicyResult>
    def get_serverless_security_policy(name: Optional[str] = None,
                                       type: Optional[str] = None,
                                       opts: Optional[InvokeOptions] = None) -> GetServerlessSecurityPolicyResult
    def get_serverless_security_policy_output(name: Optional[pulumi.Input[str]] = None,
                                       type: Optional[pulumi.Input[str]] = None,
                                       opts: Optional[InvokeOptions] = None) -> Output[GetServerlessSecurityPolicyResult]
    func LookupServerlessSecurityPolicy(ctx *Context, args *LookupServerlessSecurityPolicyArgs, opts ...InvokeOption) (*LookupServerlessSecurityPolicyResult, error)
    func LookupServerlessSecurityPolicyOutput(ctx *Context, args *LookupServerlessSecurityPolicyOutputArgs, opts ...InvokeOption) LookupServerlessSecurityPolicyResultOutput

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

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

    The following arguments are supported:

    Name string
    Name of the policy
    Type string
    Type of security policy. One of encryption or network.
    Name string
    Name of the policy
    Type string
    Type of security policy. One of encryption or network.
    name String
    Name of the policy
    type String
    Type of security policy. One of encryption or network.
    name string
    Name of the policy
    type string
    Type of security policy. One of encryption or network.
    name str
    Name of the policy
    type str
    Type of security policy. One of encryption or network.
    name String
    Name of the policy
    type String
    Type of security policy. One of encryption or network.

    getServerlessSecurityPolicy Result

    The following output properties are available:

    CreatedDate string
    The date the security policy was created.
    Description string
    Description of the security policy.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastModifiedDate string
    The date the security policy was last modified.
    Name string
    Policy string
    The JSON policy document without any whitespaces.
    PolicyVersion string
    Version of the policy.
    Type string
    CreatedDate string
    The date the security policy was created.
    Description string
    Description of the security policy.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastModifiedDate string
    The date the security policy was last modified.
    Name string
    Policy string
    The JSON policy document without any whitespaces.
    PolicyVersion string
    Version of the policy.
    Type string
    createdDate String
    The date the security policy was created.
    description String
    Description of the security policy.
    id String
    The provider-assigned unique ID for this managed resource.
    lastModifiedDate String
    The date the security policy was last modified.
    name String
    policy String
    The JSON policy document without any whitespaces.
    policyVersion String
    Version of the policy.
    type String
    createdDate string
    The date the security policy was created.
    description string
    Description of the security policy.
    id string
    The provider-assigned unique ID for this managed resource.
    lastModifiedDate string
    The date the security policy was last modified.
    name string
    policy string
    The JSON policy document without any whitespaces.
    policyVersion string
    Version of the policy.
    type string
    created_date str
    The date the security policy was created.
    description str
    Description of the security policy.
    id str
    The provider-assigned unique ID for this managed resource.
    last_modified_date str
    The date the security policy was last modified.
    name str
    policy str
    The JSON policy document without any whitespaces.
    policy_version str
    Version of the policy.
    type str
    createdDate String
    The date the security policy was created.
    description String
    Description of the security policy.
    id String
    The provider-assigned unique ID for this managed resource.
    lastModifiedDate String
    The date the security policy was last modified.
    name String
    policy String
    The JSON policy document without any whitespaces.
    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

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.33.1 published on Thursday, May 2, 2024 by Pulumi