AWS v7.10.0 published on Friday, Oct 24, 2025 by Pulumi
aws.opensearch.getServerlessSecurityPolicy
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/v7/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,
region: Optional[str] = None,
type: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetServerlessSecurityPolicyResult
def get_serverless_security_policy_output(name: Optional[pulumi.Input[str]] = None,
region: 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)
public static Output<GetServerlessSecurityPolicyResult> getServerlessSecurityPolicy(GetServerlessSecurityPolicyArgs args, InvokeOptions options)
fn::invoke:
function: aws:opensearch/getServerlessSecurityPolicy:getServerlessSecurityPolicy
arguments:
# arguments dictionaryThe following arguments are supported:
getServerlessSecurityPolicy Result
The following output properties are available:
- Created
Date 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.
- Last
Modified stringDate - The date the security policy was last modified.
- Name string
- Policy string
- The JSON policy document without any whitespaces.
- Policy
Version string - Version of the policy.
- Region string
- Type string
- Created
Date 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.
- Last
Modified stringDate - The date the security policy was last modified.
- Name string
- Policy string
- The JSON policy document without any whitespaces.
- Policy
Version string - Version of the policy.
- Region string
- Type string
- created
Date 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.
- last
Modified StringDate - The date the security policy was last modified.
- name String
- policy String
- The JSON policy document without any whitespaces.
- policy
Version String - Version of the policy.
- region String
- type String
- created
Date 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.
- last
Modified stringDate - The date the security policy was last modified.
- name string
- policy string
- The JSON policy document without any whitespaces.
- policy
Version string - Version of the policy.
- region string
- 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_ strdate - 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.
- region str
- type str
- created
Date 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.
- last
Modified StringDate - The date the security policy was last modified.
- name String
- policy String
- The JSON policy document without any whitespaces.
- policy
Version String - Version of the policy.
- region String
- type String
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.
