aws-native logo
AWS Native v0.64.0, Jun 2 23

aws-native.opensearchserverless.Collection

Explore with Pulumi AI

Amazon OpenSearchServerless collection resource

Example Usage

Example

using System.Collections.Generic;
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 = new[]
        {
            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 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 = new[]
        {
            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

new Collection(name: string, args?: CollectionArgs, opts?: CustomResourceOptions);
@overload
def Collection(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               description: Optional[str] = None,
               name: Optional[str] = None,
               tags: Optional[Sequence[CollectionTagArgs]] = None,
               type: Optional[CollectionType] = None)
@overload
def Collection(resource_name: str,
               args: Optional[CollectionArgs] = None,
               opts: Optional[ResourceOptions] = 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.

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

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

Tags List<Pulumi.AwsNative.OpenSearchServerless.Inputs.CollectionTagArgs>

List of tags to be added to the resource

Type Pulumi.AwsNative.OpenSearchServerless.CollectionType
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

Tags []CollectionTagArgs

List of tags to be added to the resource

Type CollectionType
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

tags List<CollectionTagArgs>

List of tags to be added to the resource

type CollectionType
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

tags CollectionTagArgs[]

List of tags to be added to the resource

type CollectionType
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

tags Sequence[CollectionTagArgs]

List of tags to be added to the resource

type CollectionType
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

tags List<Property Map>

List of tags to be added to the resource

type "SEARCH" | "TIMESERIES"

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.

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.

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.

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.

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.

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.

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

CollectionTag

Key string

The key in the key-value pair

Value string

The value in the key-value pair

Key string

The key in the key-value pair

Value string

The value in the key-value pair

key String

The key in the key-value pair

value String

The value in the key-value pair

key string

The key in the key-value pair

value string

The value in the key-value pair

key str

The key in the key-value pair

value str

The value in the key-value pair

key String

The key in the key-value pair

value String

The value in the key-value pair

CollectionType

Search
SEARCH
Timeseries
TIMESERIES
CollectionTypeSearch
SEARCH
CollectionTypeTimeseries
TIMESERIES
Search
SEARCH
Timeseries
TIMESERIES
Search
SEARCH
Timeseries
TIMESERIES
SEARCH
SEARCH
TIMESERIES
TIMESERIES
"SEARCH"
SEARCH
"TIMESERIES"
TIMESERIES

Package Details

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