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

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

AWS Classic v6.2.1 published on Friday, Sep 22, 2023 by Pulumi

aws.opensearch.DomainSamlOptions

Explore with Pulumi AI

aws logo

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

AWS Classic v6.2.1 published on Friday, Sep 22, 2023 by Pulumi

    Manages SAML authentication options for an AWS OpenSearch Domain.

    Example Usage

    Basic Usage

    using System.Collections.Generic;
    using System.IO;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleDomain = new Aws.OpenSearch.Domain("exampleDomain", new()
        {
            EngineVersion = "OpenSearch_1.1",
            ClusterConfig = new Aws.OpenSearch.Inputs.DomainClusterConfigArgs
            {
                InstanceType = "r4.large.search",
            },
            SnapshotOptions = new Aws.OpenSearch.Inputs.DomainSnapshotOptionsArgs
            {
                AutomatedSnapshotStartHour = 23,
            },
            Tags = 
            {
                { "Domain", "TestDomain" },
            },
        });
    
        var exampleDomainSamlOptions = new Aws.OpenSearch.DomainSamlOptions("exampleDomainSamlOptions", new()
        {
            DomainName = exampleDomain.DomainName,
            SamlOptions = new Aws.OpenSearch.Inputs.DomainSamlOptionsSamlOptionsArgs
            {
                Enabled = true,
                Idp = new Aws.OpenSearch.Inputs.DomainSamlOptionsSamlOptionsIdpArgs
                {
                    EntityId = "https://example.com",
                    MetadataContent = File.ReadAllText("./saml-metadata.xml"),
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"os"
    
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opensearch"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func readFileOrPanic(path string) pulumi.StringPtrInput {
    	data, err := os.ReadFile(path)
    	if err != nil {
    		panic(err.Error())
    	}
    	return pulumi.String(string(data))
    }
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleDomain, err := opensearch.NewDomain(ctx, "exampleDomain", &opensearch.DomainArgs{
    			EngineVersion: pulumi.String("OpenSearch_1.1"),
    			ClusterConfig: &opensearch.DomainClusterConfigArgs{
    				InstanceType: pulumi.String("r4.large.search"),
    			},
    			SnapshotOptions: &opensearch.DomainSnapshotOptionsArgs{
    				AutomatedSnapshotStartHour: pulumi.Int(23),
    			},
    			Tags: pulumi.StringMap{
    				"Domain": pulumi.String("TestDomain"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = opensearch.NewDomainSamlOptions(ctx, "exampleDomainSamlOptions", &opensearch.DomainSamlOptionsArgs{
    			DomainName: exampleDomain.DomainName,
    			SamlOptions: &opensearch.DomainSamlOptionsSamlOptionsArgs{
    				Enabled: pulumi.Bool(true),
    				Idp: &opensearch.DomainSamlOptionsSamlOptionsIdpArgs{
    					EntityId:        pulumi.String("https://example.com"),
    					MetadataContent: readFileOrPanic("./saml-metadata.xml"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.opensearch.Domain;
    import com.pulumi.aws.opensearch.DomainArgs;
    import com.pulumi.aws.opensearch.inputs.DomainClusterConfigArgs;
    import com.pulumi.aws.opensearch.inputs.DomainSnapshotOptionsArgs;
    import com.pulumi.aws.opensearch.DomainSamlOptions;
    import com.pulumi.aws.opensearch.DomainSamlOptionsArgs;
    import com.pulumi.aws.opensearch.inputs.DomainSamlOptionsSamlOptionsArgs;
    import com.pulumi.aws.opensearch.inputs.DomainSamlOptionsSamlOptionsIdpArgs;
    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) {
            var exampleDomain = new Domain("exampleDomain", DomainArgs.builder()        
                .engineVersion("OpenSearch_1.1")
                .clusterConfig(DomainClusterConfigArgs.builder()
                    .instanceType("r4.large.search")
                    .build())
                .snapshotOptions(DomainSnapshotOptionsArgs.builder()
                    .automatedSnapshotStartHour(23)
                    .build())
                .tags(Map.of("Domain", "TestDomain"))
                .build());
    
            var exampleDomainSamlOptions = new DomainSamlOptions("exampleDomainSamlOptions", DomainSamlOptionsArgs.builder()        
                .domainName(exampleDomain.domainName())
                .samlOptions(DomainSamlOptionsSamlOptionsArgs.builder()
                    .enabled(true)
                    .idp(DomainSamlOptionsSamlOptionsIdpArgs.builder()
                        .entityId("https://example.com")
                        .metadataContent(Files.readString(Paths.get("./saml-metadata.xml")))
                        .build())
                    .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_aws as aws
    
    example_domain = aws.opensearch.Domain("exampleDomain",
        engine_version="OpenSearch_1.1",
        cluster_config=aws.opensearch.DomainClusterConfigArgs(
            instance_type="r4.large.search",
        ),
        snapshot_options=aws.opensearch.DomainSnapshotOptionsArgs(
            automated_snapshot_start_hour=23,
        ),
        tags={
            "Domain": "TestDomain",
        })
    example_domain_saml_options = aws.opensearch.DomainSamlOptions("exampleDomainSamlOptions",
        domain_name=example_domain.domain_name,
        saml_options=aws.opensearch.DomainSamlOptionsSamlOptionsArgs(
            enabled=True,
            idp=aws.opensearch.DomainSamlOptionsSamlOptionsIdpArgs(
                entity_id="https://example.com",
                metadata_content=(lambda path: open(path).read())("./saml-metadata.xml"),
            ),
        ))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    import * as fs from "fs";
    
    const exampleDomain = new aws.opensearch.Domain("exampleDomain", {
        engineVersion: "OpenSearch_1.1",
        clusterConfig: {
            instanceType: "r4.large.search",
        },
        snapshotOptions: {
            automatedSnapshotStartHour: 23,
        },
        tags: {
            Domain: "TestDomain",
        },
    });
    const exampleDomainSamlOptions = new aws.opensearch.DomainSamlOptions("exampleDomainSamlOptions", {
        domainName: exampleDomain.domainName,
        samlOptions: {
            enabled: true,
            idp: {
                entityId: "https://example.com",
                metadataContent: fs.readFileSync("./saml-metadata.xml"),
            },
        },
    });
    
    resources:
      exampleDomain:
        type: aws:opensearch:Domain
        properties:
          engineVersion: OpenSearch_1.1
          clusterConfig:
            instanceType: r4.large.search
          snapshotOptions:
            automatedSnapshotStartHour: 23
          tags:
            Domain: TestDomain
      exampleDomainSamlOptions:
        type: aws:opensearch:DomainSamlOptions
        properties:
          domainName: ${exampleDomain.domainName}
          samlOptions:
            enabled: true
            idp:
              entityId: https://example.com
              metadataContent:
                fn::readFile: ./saml-metadata.xml
    

    Create DomainSamlOptions Resource

    new DomainSamlOptions(name: string, args: DomainSamlOptionsArgs, opts?: CustomResourceOptions);
    @overload
    def DomainSamlOptions(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          domain_name: Optional[str] = None,
                          saml_options: Optional[DomainSamlOptionsSamlOptionsArgs] = None)
    @overload
    def DomainSamlOptions(resource_name: str,
                          args: DomainSamlOptionsArgs,
                          opts: Optional[ResourceOptions] = None)
    func NewDomainSamlOptions(ctx *Context, name string, args DomainSamlOptionsArgs, opts ...ResourceOption) (*DomainSamlOptions, error)
    public DomainSamlOptions(string name, DomainSamlOptionsArgs args, CustomResourceOptions? opts = null)
    public DomainSamlOptions(String name, DomainSamlOptionsArgs args)
    public DomainSamlOptions(String name, DomainSamlOptionsArgs args, CustomResourceOptions options)
    
    type: aws:opensearch:DomainSamlOptions
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args DomainSamlOptionsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args DomainSamlOptionsArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args DomainSamlOptionsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DomainSamlOptionsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DomainSamlOptionsArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    DomainSamlOptions Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The DomainSamlOptions resource accepts the following input properties:

    DomainName string

    Name of the domain.

    The following arguments are optional:

    SamlOptions DomainSamlOptionsSamlOptions

    SAML authentication options for an AWS OpenSearch Domain.

    DomainName string

    Name of the domain.

    The following arguments are optional:

    SamlOptions DomainSamlOptionsSamlOptionsArgs

    SAML authentication options for an AWS OpenSearch Domain.

    domainName String

    Name of the domain.

    The following arguments are optional:

    samlOptions DomainSamlOptionsSamlOptions

    SAML authentication options for an AWS OpenSearch Domain.

    domainName string

    Name of the domain.

    The following arguments are optional:

    samlOptions DomainSamlOptionsSamlOptions

    SAML authentication options for an AWS OpenSearch Domain.

    domain_name str

    Name of the domain.

    The following arguments are optional:

    saml_options DomainSamlOptionsSamlOptionsArgs

    SAML authentication options for an AWS OpenSearch Domain.

    domainName String

    Name of the domain.

    The following arguments are optional:

    samlOptions Property Map

    SAML authentication options for an AWS OpenSearch Domain.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DomainSamlOptions resource produces the following output properties:

    Id string

    The provider-assigned unique ID for this managed resource.

    Id string

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    id string

    The provider-assigned unique ID for this managed resource.

    id str

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    Look up Existing DomainSamlOptions Resource

    Get an existing DomainSamlOptions resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: DomainSamlOptionsState, opts?: CustomResourceOptions): DomainSamlOptions
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            domain_name: Optional[str] = None,
            saml_options: Optional[DomainSamlOptionsSamlOptionsArgs] = None) -> DomainSamlOptions
    func GetDomainSamlOptions(ctx *Context, name string, id IDInput, state *DomainSamlOptionsState, opts ...ResourceOption) (*DomainSamlOptions, error)
    public static DomainSamlOptions Get(string name, Input<string> id, DomainSamlOptionsState? state, CustomResourceOptions? opts = null)
    public static DomainSamlOptions get(String name, Output<String> id, DomainSamlOptionsState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    DomainName string

    Name of the domain.

    The following arguments are optional:

    SamlOptions DomainSamlOptionsSamlOptions

    SAML authentication options for an AWS OpenSearch Domain.

    DomainName string

    Name of the domain.

    The following arguments are optional:

    SamlOptions DomainSamlOptionsSamlOptionsArgs

    SAML authentication options for an AWS OpenSearch Domain.

    domainName String

    Name of the domain.

    The following arguments are optional:

    samlOptions DomainSamlOptionsSamlOptions

    SAML authentication options for an AWS OpenSearch Domain.

    domainName string

    Name of the domain.

    The following arguments are optional:

    samlOptions DomainSamlOptionsSamlOptions

    SAML authentication options for an AWS OpenSearch Domain.

    domain_name str

    Name of the domain.

    The following arguments are optional:

    saml_options DomainSamlOptionsSamlOptionsArgs

    SAML authentication options for an AWS OpenSearch Domain.

    domainName String

    Name of the domain.

    The following arguments are optional:

    samlOptions Property Map

    SAML authentication options for an AWS OpenSearch Domain.

    Supporting Types

    DomainSamlOptionsSamlOptions, DomainSamlOptionsSamlOptionsArgs

    Enabled bool

    Whether SAML authentication is enabled.

    Idp DomainSamlOptionsSamlOptionsIdp

    Information from your identity provider.

    MasterBackendRole string

    This backend role from the SAML IdP receives full permissions to the cluster, equivalent to a new master user.

    MasterUserName string

    This username from the SAML IdP receives full permissions to the cluster, equivalent to a new master user.

    RolesKey string

    Element of the SAML assertion to use for backend roles. Default is roles.

    SessionTimeoutMinutes int

    Duration of a session in minutes after a user logs in. Default is 60. Maximum value is 1,440.

    SubjectKey string

    Element of the SAML assertion to use for username. Default is NameID.

    Enabled bool

    Whether SAML authentication is enabled.

    Idp DomainSamlOptionsSamlOptionsIdp

    Information from your identity provider.

    MasterBackendRole string

    This backend role from the SAML IdP receives full permissions to the cluster, equivalent to a new master user.

    MasterUserName string

    This username from the SAML IdP receives full permissions to the cluster, equivalent to a new master user.

    RolesKey string

    Element of the SAML assertion to use for backend roles. Default is roles.

    SessionTimeoutMinutes int

    Duration of a session in minutes after a user logs in. Default is 60. Maximum value is 1,440.

    SubjectKey string

    Element of the SAML assertion to use for username. Default is NameID.

    enabled Boolean

    Whether SAML authentication is enabled.

    idp DomainSamlOptionsSamlOptionsIdp

    Information from your identity provider.

    masterBackendRole String

    This backend role from the SAML IdP receives full permissions to the cluster, equivalent to a new master user.

    masterUserName String

    This username from the SAML IdP receives full permissions to the cluster, equivalent to a new master user.

    rolesKey String

    Element of the SAML assertion to use for backend roles. Default is roles.

    sessionTimeoutMinutes Integer

    Duration of a session in minutes after a user logs in. Default is 60. Maximum value is 1,440.

    subjectKey String

    Element of the SAML assertion to use for username. Default is NameID.

    enabled boolean

    Whether SAML authentication is enabled.

    idp DomainSamlOptionsSamlOptionsIdp

    Information from your identity provider.

    masterBackendRole string

    This backend role from the SAML IdP receives full permissions to the cluster, equivalent to a new master user.

    masterUserName string

    This username from the SAML IdP receives full permissions to the cluster, equivalent to a new master user.

    rolesKey string

    Element of the SAML assertion to use for backend roles. Default is roles.

    sessionTimeoutMinutes number

    Duration of a session in minutes after a user logs in. Default is 60. Maximum value is 1,440.

    subjectKey string

    Element of the SAML assertion to use for username. Default is NameID.

    enabled bool

    Whether SAML authentication is enabled.

    idp DomainSamlOptionsSamlOptionsIdp

    Information from your identity provider.

    master_backend_role str

    This backend role from the SAML IdP receives full permissions to the cluster, equivalent to a new master user.

    master_user_name str

    This username from the SAML IdP receives full permissions to the cluster, equivalent to a new master user.

    roles_key str

    Element of the SAML assertion to use for backend roles. Default is roles.

    session_timeout_minutes int

    Duration of a session in minutes after a user logs in. Default is 60. Maximum value is 1,440.

    subject_key str

    Element of the SAML assertion to use for username. Default is NameID.

    enabled Boolean

    Whether SAML authentication is enabled.

    idp Property Map

    Information from your identity provider.

    masterBackendRole String

    This backend role from the SAML IdP receives full permissions to the cluster, equivalent to a new master user.

    masterUserName String

    This username from the SAML IdP receives full permissions to the cluster, equivalent to a new master user.

    rolesKey String

    Element of the SAML assertion to use for backend roles. Default is roles.

    sessionTimeoutMinutes Number

    Duration of a session in minutes after a user logs in. Default is 60. Maximum value is 1,440.

    subjectKey String

    Element of the SAML assertion to use for username. Default is NameID.

    DomainSamlOptionsSamlOptionsIdp, DomainSamlOptionsSamlOptionsIdpArgs

    EntityId string

    Unique Entity ID of the application in SAML Identity Provider.

    MetadataContent string

    Metadata of the SAML application in xml format.

    EntityId string

    Unique Entity ID of the application in SAML Identity Provider.

    MetadataContent string

    Metadata of the SAML application in xml format.

    entityId String

    Unique Entity ID of the application in SAML Identity Provider.

    metadataContent String

    Metadata of the SAML application in xml format.

    entityId string

    Unique Entity ID of the application in SAML Identity Provider.

    metadataContent string

    Metadata of the SAML application in xml format.

    entity_id str

    Unique Entity ID of the application in SAML Identity Provider.

    metadata_content str

    Metadata of the SAML application in xml format.

    entityId String

    Unique Entity ID of the application in SAML Identity Provider.

    metadataContent String

    Metadata of the SAML application in xml format.

    Import

    Using pulumi import, import OpenSearch domains using the domain_name. For example:

     $ pulumi import aws:opensearch/domainSamlOptions:DomainSamlOptions example domain_name
    

    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.2.1 published on Friday, Sep 22, 2023 by Pulumi