1. Packages
  2. AWS
  3. API Docs
  4. rekognition
  5. Collection
AWS v6.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

aws.rekognition.Collection

Explore with Pulumi AI

Resource for managing an AWS Rekognition Collection.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.rekognition.Collection("example", {
    collectionId: "my-collection",
    tags: {
        example: "1",
    },
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.rekognition.Collection("example",
    collection_id="my-collection",
    tags={
        "example": "1",
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/rekognition"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := rekognition.NewCollection(ctx, "example", &rekognition.CollectionArgs{
			CollectionId: pulumi.String("my-collection"),
			Tags: pulumi.StringMap{
				"example": pulumi.String("1"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = new Aws.Rekognition.Collection("example", new()
    {
        CollectionId = "my-collection",
        Tags = 
        {
            { "example", "1" },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.rekognition.Collection;
import com.pulumi.aws.rekognition.CollectionArgs;
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 example = new Collection("example", CollectionArgs.builder()
            .collectionId("my-collection")
            .tags(Map.of("example", 1))
            .build());

    }
}
Copy
resources:
  example:
    type: aws:rekognition:Collection
    properties:
      collectionId: my-collection
      tags:
        example: 1
Copy

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: CollectionArgs,
               opts: Optional[ResourceOptions] = None)

@overload
def Collection(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               collection_id: Optional[str] = None,
               tags: Optional[Mapping[str, str]] = None,
               timeouts: Optional[CollectionTimeoutsArgs] = None)
func NewCollection(ctx *Context, name string, args CollectionArgs, opts ...ResourceOption) (*Collection, error)
public Collection(string name, CollectionArgs args, CustomResourceOptions? opts = null)
public Collection(String name, CollectionArgs args)
public Collection(String name, CollectionArgs args, CustomResourceOptions options)
type: aws:rekognition:Collection
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

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

Constructor example

The following reference example uses placeholder values for all input properties.

var collectionResource = new Aws.Rekognition.Collection("collectionResource", new()
{
    CollectionId = "string",
    Tags = 
    {
        { "string", "string" },
    },
    Timeouts = new Aws.Rekognition.Inputs.CollectionTimeoutsArgs
    {
        Create = "string",
    },
});
Copy
example, err := rekognition.NewCollection(ctx, "collectionResource", &rekognition.CollectionArgs{
	CollectionId: pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Timeouts: &rekognition.CollectionTimeoutsArgs{
		Create: pulumi.String("string"),
	},
})
Copy
var collectionResource = new Collection("collectionResource", CollectionArgs.builder()
    .collectionId("string")
    .tags(Map.of("string", "string"))
    .timeouts(CollectionTimeoutsArgs.builder()
        .create("string")
        .build())
    .build());
Copy
collection_resource = aws.rekognition.Collection("collectionResource",
    collection_id="string",
    tags={
        "string": "string",
    },
    timeouts={
        "create": "string",
    })
Copy
const collectionResource = new aws.rekognition.Collection("collectionResource", {
    collectionId: "string",
    tags: {
        string: "string",
    },
    timeouts: {
        create: "string",
    },
});
Copy
type: aws:rekognition:Collection
properties:
    collectionId: string
    tags:
        string: string
    timeouts:
        create: string
Copy

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:

CollectionId This property is required. string

The name of the collection

The following arguments are optional:

Tags Dictionary<string, string>
Map of tags assigned to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Timeouts CollectionTimeouts
CollectionId This property is required. string

The name of the collection

The following arguments are optional:

Tags map[string]string
Map of tags assigned to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Timeouts CollectionTimeoutsArgs
collectionId This property is required. String

The name of the collection

The following arguments are optional:

tags Map<String,String>
Map of tags assigned to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
timeouts CollectionTimeouts
collectionId This property is required. string

The name of the collection

The following arguments are optional:

tags {[key: string]: string}
Map of tags assigned to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
timeouts CollectionTimeouts
collection_id This property is required. str

The name of the collection

The following arguments are optional:

tags Mapping[str, str]
Map of tags assigned to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
timeouts CollectionTimeoutsArgs
collectionId This property is required. String

The name of the collection

The following arguments are optional:

tags Map<String>
Map of tags assigned to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
timeouts Property Map

Outputs

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

Arn string
ARN of the Collection.
FaceModelVersion string
The Face Model Version that the collection was initialized with
Id string
The provider-assigned unique ID for this managed resource.
TagsAll Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Arn string
ARN of the Collection.
FaceModelVersion string
The Face Model Version that the collection was initialized with
Id string
The provider-assigned unique ID for this managed resource.
TagsAll map[string]string
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn String
ARN of the Collection.
faceModelVersion String
The Face Model Version that the collection was initialized with
id String
The provider-assigned unique ID for this managed resource.
tagsAll Map<String,String>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn string
ARN of the Collection.
faceModelVersion string
The Face Model Version that the collection was initialized with
id string
The provider-assigned unique ID for this managed resource.
tagsAll {[key: string]: string}
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn str
ARN of the Collection.
face_model_version str
The Face Model Version that the collection was initialized with
id str
The provider-assigned unique ID for this managed resource.
tags_all Mapping[str, str]
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn String
ARN of the Collection.
faceModelVersion String
The Face Model Version that the collection was initialized with
id String
The provider-assigned unique ID for this managed resource.
tagsAll Map<String>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Look up Existing Collection Resource

Get an existing Collection 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?: CollectionState, opts?: CustomResourceOptions): Collection
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        arn: Optional[str] = None,
        collection_id: Optional[str] = None,
        face_model_version: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None,
        timeouts: Optional[CollectionTimeoutsArgs] = None) -> Collection
func GetCollection(ctx *Context, name string, id IDInput, state *CollectionState, opts ...ResourceOption) (*Collection, error)
public static Collection Get(string name, Input<string> id, CollectionState? state, CustomResourceOptions? opts = null)
public static Collection get(String name, Output<String> id, CollectionState state, CustomResourceOptions options)
resources:  _:    type: aws:rekognition:Collection    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Arn string
ARN of the Collection.
CollectionId string

The name of the collection

The following arguments are optional:

FaceModelVersion string
The Face Model Version that the collection was initialized with
Tags Dictionary<string, string>
Map of tags assigned to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
TagsAll Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Timeouts CollectionTimeouts
Arn string
ARN of the Collection.
CollectionId string

The name of the collection

The following arguments are optional:

FaceModelVersion string
The Face Model Version that the collection was initialized with
Tags map[string]string
Map of tags assigned to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
TagsAll map[string]string
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Timeouts CollectionTimeoutsArgs
arn String
ARN of the Collection.
collectionId String

The name of the collection

The following arguments are optional:

faceModelVersion String
The Face Model Version that the collection was initialized with
tags Map<String,String>
Map of tags assigned to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll Map<String,String>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

timeouts CollectionTimeouts
arn string
ARN of the Collection.
collectionId string

The name of the collection

The following arguments are optional:

faceModelVersion string
The Face Model Version that the collection was initialized with
tags {[key: string]: string}
Map of tags assigned to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll {[key: string]: string}
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

timeouts CollectionTimeouts
arn str
ARN of the Collection.
collection_id str

The name of the collection

The following arguments are optional:

face_model_version str
The Face Model Version that the collection was initialized with
tags Mapping[str, str]
Map of tags assigned to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tags_all Mapping[str, str]
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

timeouts CollectionTimeoutsArgs
arn String
ARN of the Collection.
collectionId String

The name of the collection

The following arguments are optional:

faceModelVersion String
The Face Model Version that the collection was initialized with
tags Map<String>
Map of tags assigned to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll Map<String>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

timeouts Property Map

Supporting Types

CollectionTimeouts
, CollectionTimeoutsArgs

Create string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Create string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create str
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).

Import

Using pulumi import, import Rekognition Collection using the example_id_arg. For example:

$ pulumi import aws:rekognition/collection:Collection example collection-id-12345678
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.