1. Packages
  2. AWS
  3. API Docs
  4. rekognition
  5. Collection
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

aws.rekognition.Collection

Explore with Pulumi AI

aws logo
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

    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",
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.rekognition.Collection("example",
        collection_id="my-collection",
        tags={
            "example": "1",
        })
    
    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
    	})
    }
    
    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" },
            },
        });
    
    });
    
    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());
    
        }
    }
    
    resources:
      example:
        type: aws:rekognition:Collection
        properties:
          collectionId: my-collection
          tags:
            example: 1
    

    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 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.

    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",
        },
    });
    
    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"),
    	},
    })
    
    var collectionResource = new Collection("collectionResource", CollectionArgs.builder()
        .collectionId("string")
        .tags(Map.of("string", "string"))
        .timeouts(CollectionTimeoutsArgs.builder()
            .create("string")
            .build())
        .build());
    
    collection_resource = aws.rekognition.Collection("collectionResource",
        collection_id="string",
        tags={
            "string": "string",
        },
        timeouts={
            "create": "string",
        })
    
    const collectionResource = new aws.rekognition.Collection("collectionResource", {
        collectionId: "string",
        tags: {
            string: "string",
        },
        timeouts: {
            create: "string",
        },
    });
    
    type: aws:rekognition:Collection
    properties:
        collectionId: string
        tags:
            string: string
        timeouts:
            create: string
    

    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:

    CollectionId 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 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 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 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 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 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)
    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:
    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
    

    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.
    aws logo
    AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi