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",
},
});
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
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:
- Collection
Id string The name of the collection
The following arguments are optional:
- 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
Collection
Timeouts
- Collection
Id string The name of the collection
The following arguments are optional:
- 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
Collection
Timeouts Args
- collection
Id String The name of the collection
The following arguments are optional:
- 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
Collection
Timeouts
- collection
Id string The name of the collection
The following arguments are optional:
- {[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
Collection
Timeouts
- collection_
id str The name of the collection
The following arguments are optional:
- 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
Collection
Timeouts Args
- collection
Id String The name of the collection
The following arguments are optional:
- 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.
- Face
Model stringVersion - The Face Model Version that the collection was initialized with
- Id string
- The provider-assigned unique ID for this managed resource.
- Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- Arn string
- ARN of the Collection.
- Face
Model stringVersion - The Face Model Version that the collection was initialized with
- Id string
- The provider-assigned unique ID for this managed resource.
- map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- ARN of the Collection.
- face
Model StringVersion - The Face Model Version that the collection was initialized with
- id String
- The provider-assigned unique ID for this managed resource.
- Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn string
- ARN of the Collection.
- face
Model stringVersion - The Face Model Version that the collection was initialized with
- id string
- The provider-assigned unique ID for this managed resource.
- {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn str
- ARN of the Collection.
- face_
model_ strversion - The Face Model Version that the collection was initialized with
- id str
- The provider-assigned unique ID for this managed resource.
- Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- ARN of the Collection.
- face
Model StringVersion - The Face Model Version that the collection was initialized with
- id String
- The provider-assigned unique ID for this managed resource.
- Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
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.
- Arn string
- ARN of the Collection.
- Collection
Id string The name of the collection
The following arguments are optional:
- Face
Model stringVersion - The Face Model Version that the collection was initialized with
- 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. - Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Timeouts
Collection
Timeouts
- Arn string
- ARN of the Collection.
- Collection
Id string The name of the collection
The following arguments are optional:
- Face
Model stringVersion - The Face Model Version that the collection was initialized with
- 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. - map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Timeouts
Collection
Timeouts Args
- arn String
- ARN of the Collection.
- collection
Id String The name of the collection
The following arguments are optional:
- face
Model StringVersion - The Face Model Version that the collection was initialized with
- 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. - Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - timeouts
Collection
Timeouts
- arn string
- ARN of the Collection.
- collection
Id string The name of the collection
The following arguments are optional:
- face
Model stringVersion - The Face Model Version that the collection was initialized with
- {[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. - {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - timeouts
Collection
Timeouts
- arn str
- ARN of the Collection.
- collection_
id str The name of the collection
The following arguments are optional:
- face_
model_ strversion - The Face Model Version that the collection was initialized with
- 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. - Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - timeouts
Collection
Timeouts Args
- arn String
- ARN of the Collection.
- collection
Id String The name of the collection
The following arguments are optional:
- face
Model StringVersion - The Face Model Version that the collection was initialized with
- 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. - Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - 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.