1. Packages
  2. AWS Cloud Control
  3. API Docs
  4. opensearchserverless
  5. Collection

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.9.0 published on Monday, Nov 18, 2024 by Pulumi

aws-native.opensearchserverless.Collection

Explore with Pulumi AI

aws-native logo

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.9.0 published on Monday, Nov 18, 2024 by Pulumi

    Amazon OpenSearchServerless collection resource

    Example Usage

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var encryptionPolicy = new AwsNative.OpenSearchServerless.SecurityPolicy("encryptionPolicy", new()
        {
            Name = "test-encryption-policy",
            Type = AwsNative.OpenSearchServerless.SecurityPolicyType.Encryption,
            Description = "Encryption policy for test collection",
            Policy = "{\"Rules\":[{\"ResourceType\":\"collection\",\"Resource\":[\"collection/test-collection\"]}],\"AWSOwnedKey\":true}",
        });
    
        var testCollection = new AwsNative.OpenSearchServerless.Collection("testCollection", new()
        {
            Name = "test-collection",
            Type = AwsNative.OpenSearchServerless.CollectionType.Search,
            Description = "Search collection",
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                encryptionPolicy,
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/opensearchserverless"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		encryptionPolicy, err := opensearchserverless.NewSecurityPolicy(ctx, "encryptionPolicy", &opensearchserverless.SecurityPolicyArgs{
    			Name:        pulumi.String("test-encryption-policy"),
    			Type:        opensearchserverless.SecurityPolicyTypeEncryption,
    			Description: pulumi.String("Encryption policy for test collection"),
    			Policy:      pulumi.String("{\"Rules\":[{\"ResourceType\":\"collection\",\"Resource\":[\"collection/test-collection\"]}],\"AWSOwnedKey\":true}"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = opensearchserverless.NewCollection(ctx, "testCollection", &opensearchserverless.CollectionArgs{
    			Name:        pulumi.String("test-collection"),
    			Type:        opensearchserverless.CollectionTypeSearch,
    			Description: pulumi.String("Search collection"),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			encryptionPolicy,
    		}))
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    encryption_policy = aws_native.opensearchserverless.SecurityPolicy("encryptionPolicy",
        name="test-encryption-policy",
        type=aws_native.opensearchserverless.SecurityPolicyType.ENCRYPTION,
        description="Encryption policy for test collection",
        policy="{\"Rules\":[{\"ResourceType\":\"collection\",\"Resource\":[\"collection/test-collection\"]}],\"AWSOwnedKey\":true}")
    test_collection = aws_native.opensearchserverless.Collection("testCollection",
        name="test-collection",
        type=aws_native.opensearchserverless.CollectionType.SEARCH,
        description="Search collection",
        opts = pulumi.ResourceOptions(depends_on=[encryption_policy]))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const encryptionPolicy = new aws_native.opensearchserverless.SecurityPolicy("encryptionPolicy", {
        name: "test-encryption-policy",
        type: aws_native.opensearchserverless.SecurityPolicyType.Encryption,
        description: "Encryption policy for test collection",
        policy: "{\"Rules\":[{\"ResourceType\":\"collection\",\"Resource\":[\"collection/test-collection\"]}],\"AWSOwnedKey\":true}",
    });
    const testCollection = new aws_native.opensearchserverless.Collection("testCollection", {
        name: "test-collection",
        type: aws_native.opensearchserverless.CollectionType.Search,
        description: "Search collection",
    }, {
        dependsOn: [encryptionPolicy],
    });
    

    Coming soon!

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var encryptionPolicy = new AwsNative.OpenSearchServerless.SecurityPolicy("encryptionPolicy", new()
        {
            Name = "test-encryption-policy",
            Type = AwsNative.OpenSearchServerless.SecurityPolicyType.Encryption,
            Description = "Encryption policy for test collection",
            Policy = "{\"Rules\":[{\"ResourceType\":\"collection\",\"Resource\":[\"collection/test-collection\"]}],\"AWSOwnedKey\":true}",
        });
    
        var testCollection = new AwsNative.OpenSearchServerless.Collection("testCollection", new()
        {
            Name = "test-collection",
            Type = AwsNative.OpenSearchServerless.CollectionType.Search,
            Description = "Search collection",
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                encryptionPolicy,
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/opensearchserverless"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		encryptionPolicy, err := opensearchserverless.NewSecurityPolicy(ctx, "encryptionPolicy", &opensearchserverless.SecurityPolicyArgs{
    			Name:        pulumi.String("test-encryption-policy"),
    			Type:        opensearchserverless.SecurityPolicyTypeEncryption,
    			Description: pulumi.String("Encryption policy for test collection"),
    			Policy:      pulumi.String("{\"Rules\":[{\"ResourceType\":\"collection\",\"Resource\":[\"collection/test-collection\"]}],\"AWSOwnedKey\":true}"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = opensearchserverless.NewCollection(ctx, "testCollection", &opensearchserverless.CollectionArgs{
    			Name:        pulumi.String("test-collection"),
    			Type:        opensearchserverless.CollectionTypeSearch,
    			Description: pulumi.String("Search collection"),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			encryptionPolicy,
    		}))
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    encryption_policy = aws_native.opensearchserverless.SecurityPolicy("encryptionPolicy",
        name="test-encryption-policy",
        type=aws_native.opensearchserverless.SecurityPolicyType.ENCRYPTION,
        description="Encryption policy for test collection",
        policy="{\"Rules\":[{\"ResourceType\":\"collection\",\"Resource\":[\"collection/test-collection\"]}],\"AWSOwnedKey\":true}")
    test_collection = aws_native.opensearchserverless.Collection("testCollection",
        name="test-collection",
        type=aws_native.opensearchserverless.CollectionType.SEARCH,
        description="Search collection",
        opts = pulumi.ResourceOptions(depends_on=[encryption_policy]))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const encryptionPolicy = new aws_native.opensearchserverless.SecurityPolicy("encryptionPolicy", {
        name: "test-encryption-policy",
        type: aws_native.opensearchserverless.SecurityPolicyType.Encryption,
        description: "Encryption policy for test collection",
        policy: "{\"Rules\":[{\"ResourceType\":\"collection\",\"Resource\":[\"collection/test-collection\"]}],\"AWSOwnedKey\":true}",
    });
    const testCollection = new aws_native.opensearchserverless.Collection("testCollection", {
        name: "test-collection",
        type: aws_native.opensearchserverless.CollectionType.Search,
        description: "Search collection",
    }, {
        dependsOn: [encryptionPolicy],
    });
    

    Coming soon!

    Create Collection Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Collection(name: string, args?: CollectionArgs, opts?: CustomResourceOptions);
    @overload
    def Collection(resource_name: str,
                   args: Optional[CollectionArgs] = None,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def Collection(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   description: Optional[str] = None,
                   name: Optional[str] = None,
                   standby_replicas: Optional[CollectionStandbyReplicas] = None,
                   tags: Optional[Sequence[_root_inputs.CreateOnlyTagArgs]] = None,
                   type: Optional[CollectionType] = None)
    func NewCollection(ctx *Context, name string, args *CollectionArgs, opts ...ResourceOption) (*Collection, error)
    public Collection(string name, CollectionArgs? args = null, CustomResourceOptions? opts = null)
    public Collection(String name, CollectionArgs args)
    public Collection(String name, CollectionArgs args, CustomResourceOptions options)
    
    type: aws-native:opensearchserverless:Collection
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args CollectionArgs
    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 CollectionArgs
    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 CollectionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CollectionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CollectionArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Collection Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Collection resource accepts the following input properties:

    Description string
    The description of the collection
    Name string

    The name of the collection.

    The name must meet the following criteria: Unique to your account and AWS Region Starts with a lowercase letter Contains only lowercase letters a-z, the numbers 0-9 and the hyphen (-) Contains between 3 and 32 characters

    StandbyReplicas Pulumi.AwsNative.OpenSearchServerless.CollectionStandbyReplicas
    Indicates whether to use standby replicas for the collection. You can't update this property after the collection is already created. If you attempt to modify this property, the collection continues to use the original value.
    Tags List<Pulumi.AwsNative.Inputs.CreateOnlyTag>
    List of tags to be added to the resource
    Type Pulumi.AwsNative.OpenSearchServerless.CollectionType
    The type of collection. Possible values are SEARCH , TIMESERIES , and VECTORSEARCH . For more information, see Choosing a collection type .
    Description string
    The description of the collection
    Name string

    The name of the collection.

    The name must meet the following criteria: Unique to your account and AWS Region Starts with a lowercase letter Contains only lowercase letters a-z, the numbers 0-9 and the hyphen (-) Contains between 3 and 32 characters

    StandbyReplicas CollectionStandbyReplicas
    Indicates whether to use standby replicas for the collection. You can't update this property after the collection is already created. If you attempt to modify this property, the collection continues to use the original value.
    Tags CreateOnlyTagArgs
    List of tags to be added to the resource
    Type CollectionType
    The type of collection. Possible values are SEARCH , TIMESERIES , and VECTORSEARCH . For more information, see Choosing a collection type .
    description String
    The description of the collection
    name String

    The name of the collection.

    The name must meet the following criteria: Unique to your account and AWS Region Starts with a lowercase letter Contains only lowercase letters a-z, the numbers 0-9 and the hyphen (-) Contains between 3 and 32 characters

    standbyReplicas CollectionStandbyReplicas
    Indicates whether to use standby replicas for the collection. You can't update this property after the collection is already created. If you attempt to modify this property, the collection continues to use the original value.
    tags List<CreateOnlyTag>
    List of tags to be added to the resource
    type CollectionType
    The type of collection. Possible values are SEARCH , TIMESERIES , and VECTORSEARCH . For more information, see Choosing a collection type .
    description string
    The description of the collection
    name string

    The name of the collection.

    The name must meet the following criteria: Unique to your account and AWS Region Starts with a lowercase letter Contains only lowercase letters a-z, the numbers 0-9 and the hyphen (-) Contains between 3 and 32 characters

    standbyReplicas CollectionStandbyReplicas
    Indicates whether to use standby replicas for the collection. You can't update this property after the collection is already created. If you attempt to modify this property, the collection continues to use the original value.
    tags CreateOnlyTag[]
    List of tags to be added to the resource
    type CollectionType
    The type of collection. Possible values are SEARCH , TIMESERIES , and VECTORSEARCH . For more information, see Choosing a collection type .
    description str
    The description of the collection
    name str

    The name of the collection.

    The name must meet the following criteria: Unique to your account and AWS Region Starts with a lowercase letter Contains only lowercase letters a-z, the numbers 0-9 and the hyphen (-) Contains between 3 and 32 characters

    standby_replicas CollectionStandbyReplicas
    Indicates whether to use standby replicas for the collection. You can't update this property after the collection is already created. If you attempt to modify this property, the collection continues to use the original value.
    tags Sequence[CreateOnlyTagArgs]
    List of tags to be added to the resource
    type CollectionType
    The type of collection. Possible values are SEARCH , TIMESERIES , and VECTORSEARCH . For more information, see Choosing a collection type .
    description String
    The description of the collection
    name String

    The name of the collection.

    The name must meet the following criteria: Unique to your account and AWS Region Starts with a lowercase letter Contains only lowercase letters a-z, the numbers 0-9 and the hyphen (-) Contains between 3 and 32 characters

    standbyReplicas "ENABLED" | "DISABLED"
    Indicates whether to use standby replicas for the collection. You can't update this property after the collection is already created. If you attempt to modify this property, the collection continues to use the original value.
    tags List<Property Map>
    List of tags to be added to the resource
    type "SEARCH" | "TIMESERIES" | "VECTORSEARCH"
    The type of collection. Possible values are SEARCH , TIMESERIES , and VECTORSEARCH . For more information, see Choosing a collection type .

    Outputs

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

    Arn string
    The Amazon Resource Name (ARN) of the collection.
    AwsId string
    The identifier of the collection
    CollectionEndpoint string
    The endpoint for the collection.
    DashboardEndpoint string
    The OpenSearch Dashboards endpoint for the collection.
    Id string
    The provider-assigned unique ID for this managed resource.
    Arn string
    The Amazon Resource Name (ARN) of the collection.
    AwsId string
    The identifier of the collection
    CollectionEndpoint string
    The endpoint for the collection.
    DashboardEndpoint string
    The OpenSearch Dashboards endpoint for the collection.
    Id string
    The provider-assigned unique ID for this managed resource.
    arn String
    The Amazon Resource Name (ARN) of the collection.
    awsId String
    The identifier of the collection
    collectionEndpoint String
    The endpoint for the collection.
    dashboardEndpoint String
    The OpenSearch Dashboards endpoint for the collection.
    id String
    The provider-assigned unique ID for this managed resource.
    arn string
    The Amazon Resource Name (ARN) of the collection.
    awsId string
    The identifier of the collection
    collectionEndpoint string
    The endpoint for the collection.
    dashboardEndpoint string
    The OpenSearch Dashboards endpoint for the collection.
    id string
    The provider-assigned unique ID for this managed resource.
    arn str
    The Amazon Resource Name (ARN) of the collection.
    aws_id str
    The identifier of the collection
    collection_endpoint str
    The endpoint for the collection.
    dashboard_endpoint str
    The OpenSearch Dashboards endpoint for the collection.
    id str
    The provider-assigned unique ID for this managed resource.
    arn String
    The Amazon Resource Name (ARN) of the collection.
    awsId String
    The identifier of the collection
    collectionEndpoint String
    The endpoint for the collection.
    dashboardEndpoint String
    The OpenSearch Dashboards endpoint for the collection.
    id String
    The provider-assigned unique ID for this managed resource.

    Supporting Types

    CollectionStandbyReplicas, CollectionStandbyReplicasArgs

    Enabled
    ENABLED
    Disabled
    DISABLED
    CollectionStandbyReplicasEnabled
    ENABLED
    CollectionStandbyReplicasDisabled
    DISABLED
    Enabled
    ENABLED
    Disabled
    DISABLED
    Enabled
    ENABLED
    Disabled
    DISABLED
    ENABLED
    ENABLED
    DISABLED
    DISABLED
    "ENABLED"
    ENABLED
    "DISABLED"
    DISABLED

    CollectionType, CollectionTypeArgs

    Search
    SEARCH
    Timeseries
    TIMESERIES
    Vectorsearch
    VECTORSEARCH
    CollectionTypeSearch
    SEARCH
    CollectionTypeTimeseries
    TIMESERIES
    CollectionTypeVectorsearch
    VECTORSEARCH
    Search
    SEARCH
    Timeseries
    TIMESERIES
    Vectorsearch
    VECTORSEARCH
    Search
    SEARCH
    Timeseries
    TIMESERIES
    Vectorsearch
    VECTORSEARCH
    SEARCH
    SEARCH
    TIMESERIES
    TIMESERIES
    VECTORSEARCH
    VECTORSEARCH
    "SEARCH"
    SEARCH
    "TIMESERIES"
    TIMESERIES
    "VECTORSEARCH"
    VECTORSEARCH

    CreateOnlyTag, CreateOnlyTagArgs

    Key string
    The key name of the tag
    Value string
    The value of the tag
    Key string
    The key name of the tag
    Value string
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag
    key string
    The key name of the tag
    value string
    The value of the tag
    key str
    The key name of the tag
    value str
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo

    We recommend new projects start with resources from the AWS provider.

    AWS Cloud Control v1.9.0 published on Monday, Nov 18, 2024 by Pulumi