AWS Classic v5.41.0, May 15 23
AWS Classic v5.41.0, May 15 23
aws.comprehend.DocumentClassifier
Explore with Pulumi AI
Resource for managing an AWS Comprehend Document Classifier.
Example Usage
Basic Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var documents = new Aws.S3.BucketObjectv2("documents");
// ...
var example = new Aws.Comprehend.DocumentClassifier("example", new()
{
DataAccessRoleArn = aws_iam_role.Example.Arn,
LanguageCode = "en",
InputDataConfig = new Aws.Comprehend.Inputs.DocumentClassifierInputDataConfigArgs
{
S3Uri = documents.Id.Apply(id => $"s3://{aws_s3_bucket.Test.Bucket}/{id}"),
},
}, new CustomResourceOptions
{
DependsOn = new[]
{
aws_iam_role_policy.Example,
},
});
var entities = new Aws.S3.BucketObjectv2("entities");
// ...
});
package main
import (
"fmt"
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/comprehend"
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/s3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
documents, err := s3.NewBucketObjectv2(ctx, "documents", nil)
if err != nil {
return err
}
_, err = comprehend.NewDocumentClassifier(ctx, "example", &comprehend.DocumentClassifierArgs{
DataAccessRoleArn: pulumi.Any(aws_iam_role.Example.Arn),
LanguageCode: pulumi.String("en"),
InputDataConfig: &comprehend.DocumentClassifierInputDataConfigArgs{
S3Uri: documents.ID().ApplyT(func(id string) (string, error) {
return fmt.Sprintf("s3://%v/%v", aws_s3_bucket.Test.Bucket, id), nil
}).(pulumi.StringOutput),
},
}, pulumi.DependsOn([]pulumi.Resource{
aws_iam_role_policy.Example,
}))
if err != nil {
return err
}
_, err = s3.NewBucketObjectv2(ctx, "entities", nil)
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.s3.BucketObjectv2;
import com.pulumi.aws.comprehend.DocumentClassifier;
import com.pulumi.aws.comprehend.DocumentClassifierArgs;
import com.pulumi.aws.comprehend.inputs.DocumentClassifierInputDataConfigArgs;
import com.pulumi.resources.CustomResourceOptions;
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 documents = new BucketObjectv2("documents");
var example = new DocumentClassifier("example", DocumentClassifierArgs.builder()
.dataAccessRoleArn(aws_iam_role.example().arn())
.languageCode("en")
.inputDataConfig(DocumentClassifierInputDataConfigArgs.builder()
.s3Uri(documents.id().applyValue(id -> String.format("s3://%s/%s", aws_s3_bucket.test().bucket(),id)))
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(aws_iam_role_policy.example())
.build());
var entities = new BucketObjectv2("entities");
}
}
import pulumi
import pulumi_aws as aws
documents = aws.s3.BucketObjectv2("documents")
# ...
example = aws.comprehend.DocumentClassifier("example",
data_access_role_arn=aws_iam_role["example"]["arn"],
language_code="en",
input_data_config=aws.comprehend.DocumentClassifierInputDataConfigArgs(
s3_uri=documents.id.apply(lambda id: f"s3://{aws_s3_bucket['test']['bucket']}/{id}"),
),
opts=pulumi.ResourceOptions(depends_on=[aws_iam_role_policy["example"]]))
entities = aws.s3.BucketObjectv2("entities")
# ...
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const documents = new aws.s3.BucketObjectv2("documents", {});
// ...
const example = new aws.comprehend.DocumentClassifier("example", {
dataAccessRoleArn: aws_iam_role.example.arn,
languageCode: "en",
inputDataConfig: {
s3Uri: pulumi.interpolate`s3://${aws_s3_bucket.test.bucket}/${documents.id}`,
},
}, {
dependsOn: [aws_iam_role_policy.example],
});
const entities = new aws.s3.BucketObjectv2("entities", {});
// ...
resources:
example:
type: aws:comprehend:DocumentClassifier
properties:
dataAccessRoleArn: ${aws_iam_role.example.arn}
languageCode: en
inputDataConfig:
s3Uri: s3://${aws_s3_bucket.test.bucket}/${documents.id}
options:
dependson:
- ${aws_iam_role_policy.example}
documents:
type: aws:s3:BucketObjectv2
entities:
type: aws:s3:BucketObjectv2
Create DocumentClassifier Resource
new DocumentClassifier(name: string, args: DocumentClassifierArgs, opts?: CustomResourceOptions);
@overload
def DocumentClassifier(resource_name: str,
opts: Optional[ResourceOptions] = None,
data_access_role_arn: Optional[str] = None,
input_data_config: Optional[DocumentClassifierInputDataConfigArgs] = None,
language_code: Optional[str] = None,
mode: Optional[str] = None,
model_kms_key_id: Optional[str] = None,
name: Optional[str] = None,
output_data_config: Optional[DocumentClassifierOutputDataConfigArgs] = None,
tags: Optional[Mapping[str, str]] = None,
version_name: Optional[str] = None,
version_name_prefix: Optional[str] = None,
volume_kms_key_id: Optional[str] = None,
vpc_config: Optional[DocumentClassifierVpcConfigArgs] = None)
@overload
def DocumentClassifier(resource_name: str,
args: DocumentClassifierArgs,
opts: Optional[ResourceOptions] = None)
func NewDocumentClassifier(ctx *Context, name string, args DocumentClassifierArgs, opts ...ResourceOption) (*DocumentClassifier, error)
public DocumentClassifier(string name, DocumentClassifierArgs args, CustomResourceOptions? opts = null)
public DocumentClassifier(String name, DocumentClassifierArgs args)
public DocumentClassifier(String name, DocumentClassifierArgs args, CustomResourceOptions options)
type: aws:comprehend:DocumentClassifier
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DocumentClassifierArgs
- 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 DocumentClassifierArgs
- 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 DocumentClassifierArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DocumentClassifierArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DocumentClassifierArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
DocumentClassifier 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 DocumentClassifier resource accepts the following input properties:
- Data
Access stringRole Arn The ARN for an IAM Role which allows Comprehend to read the training and testing data.
- Input
Data DocumentConfig Classifier Input Data Config Args Configuration for the training and testing data. See the
input_data_config
Configuration Block section below.- Language
Code string Two-letter language code for the language. One of
en
,es
,fr
,it
,de
, orpt
.- Mode string
The document classification mode. One of
MULTI_CLASS
orMULTI_LABEL
.MULTI_CLASS
is also known as "Single Label" in the AWS Console.- Model
Kms stringKey Id KMS Key used to encrypt trained Document Classifiers. Can be a KMS Key ID or a KMS Key ARN.
- Name string
Name for the Document Classifier. Has a maximum length of 63 characters. Can contain upper- and lower-case letters, numbers, and hypen (
-
).- Output
Data DocumentConfig Classifier Output Data Config Args Configuration for the output results of training. See the
output_data_config
Configuration Block section below.- Dictionary<string, string>
A map of tags to assign 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.- Version
Name string Name for the version of the Document Classifier. Each version must have a unique name within the Document Classifier. If omitted, the provider will assign a random, unique version name. If explicitly set to
""
, no version name will be set. Has a maximum length of 63 characters. Can contain upper- and lower-case letters, numbers, and hypen (-
). Conflicts withversion_name_prefix
.- Version
Name stringPrefix Creates a unique version name beginning with the specified prefix. Has a maximum length of 37 characters. Can contain upper- and lower-case letters, numbers, and hypen (
-
). Conflicts withversion_name
.- Volume
Kms stringKey Id KMS Key used to encrypt storage volumes during job processing. Can be a KMS Key ID or a KMS Key ARN.
- Vpc
Config DocumentClassifier Vpc Config Args Configuration parameters for VPC to contain Document Classifier resources. See the
vpc_config
Configuration Block section below.
- Data
Access stringRole Arn The ARN for an IAM Role which allows Comprehend to read the training and testing data.
- Input
Data DocumentConfig Classifier Input Data Config Args Configuration for the training and testing data. See the
input_data_config
Configuration Block section below.- Language
Code string Two-letter language code for the language. One of
en
,es
,fr
,it
,de
, orpt
.- Mode string
The document classification mode. One of
MULTI_CLASS
orMULTI_LABEL
.MULTI_CLASS
is also known as "Single Label" in the AWS Console.- Model
Kms stringKey Id KMS Key used to encrypt trained Document Classifiers. Can be a KMS Key ID or a KMS Key ARN.
- Name string
Name for the Document Classifier. Has a maximum length of 63 characters. Can contain upper- and lower-case letters, numbers, and hypen (
-
).- Output
Data DocumentConfig Classifier Output Data Config Args Configuration for the output results of training. See the
output_data_config
Configuration Block section below.- map[string]string
A map of tags to assign 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.- Version
Name string Name for the version of the Document Classifier. Each version must have a unique name within the Document Classifier. If omitted, the provider will assign a random, unique version name. If explicitly set to
""
, no version name will be set. Has a maximum length of 63 characters. Can contain upper- and lower-case letters, numbers, and hypen (-
). Conflicts withversion_name_prefix
.- Version
Name stringPrefix Creates a unique version name beginning with the specified prefix. Has a maximum length of 37 characters. Can contain upper- and lower-case letters, numbers, and hypen (
-
). Conflicts withversion_name
.- Volume
Kms stringKey Id KMS Key used to encrypt storage volumes during job processing. Can be a KMS Key ID or a KMS Key ARN.
- Vpc
Config DocumentClassifier Vpc Config Args Configuration parameters for VPC to contain Document Classifier resources. See the
vpc_config
Configuration Block section below.
- data
Access StringRole Arn The ARN for an IAM Role which allows Comprehend to read the training and testing data.
- input
Data DocumentConfig Classifier Input Data Config Args Configuration for the training and testing data. See the
input_data_config
Configuration Block section below.- language
Code String Two-letter language code for the language. One of
en
,es
,fr
,it
,de
, orpt
.- mode String
The document classification mode. One of
MULTI_CLASS
orMULTI_LABEL
.MULTI_CLASS
is also known as "Single Label" in the AWS Console.- model
Kms StringKey Id KMS Key used to encrypt trained Document Classifiers. Can be a KMS Key ID or a KMS Key ARN.
- name String
Name for the Document Classifier. Has a maximum length of 63 characters. Can contain upper- and lower-case letters, numbers, and hypen (
-
).- output
Data DocumentConfig Classifier Output Data Config Args Configuration for the output results of training. See the
output_data_config
Configuration Block section below.- Map<String,String>
A map of tags to assign 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.- version
Name String Name for the version of the Document Classifier. Each version must have a unique name within the Document Classifier. If omitted, the provider will assign a random, unique version name. If explicitly set to
""
, no version name will be set. Has a maximum length of 63 characters. Can contain upper- and lower-case letters, numbers, and hypen (-
). Conflicts withversion_name_prefix
.- version
Name StringPrefix Creates a unique version name beginning with the specified prefix. Has a maximum length of 37 characters. Can contain upper- and lower-case letters, numbers, and hypen (
-
). Conflicts withversion_name
.- volume
Kms StringKey Id KMS Key used to encrypt storage volumes during job processing. Can be a KMS Key ID or a KMS Key ARN.
- vpc
Config DocumentClassifier Vpc Config Args Configuration parameters for VPC to contain Document Classifier resources. See the
vpc_config
Configuration Block section below.
- data
Access stringRole Arn The ARN for an IAM Role which allows Comprehend to read the training and testing data.
- input
Data DocumentConfig Classifier Input Data Config Args Configuration for the training and testing data. See the
input_data_config
Configuration Block section below.- language
Code string Two-letter language code for the language. One of
en
,es
,fr
,it
,de
, orpt
.- mode string
The document classification mode. One of
MULTI_CLASS
orMULTI_LABEL
.MULTI_CLASS
is also known as "Single Label" in the AWS Console.- model
Kms stringKey Id KMS Key used to encrypt trained Document Classifiers. Can be a KMS Key ID or a KMS Key ARN.
- name string
Name for the Document Classifier. Has a maximum length of 63 characters. Can contain upper- and lower-case letters, numbers, and hypen (
-
).- output
Data DocumentConfig Classifier Output Data Config Args Configuration for the output results of training. See the
output_data_config
Configuration Block section below.- {[key: string]: string}
A map of tags to assign 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.- version
Name string Name for the version of the Document Classifier. Each version must have a unique name within the Document Classifier. If omitted, the provider will assign a random, unique version name. If explicitly set to
""
, no version name will be set. Has a maximum length of 63 characters. Can contain upper- and lower-case letters, numbers, and hypen (-
). Conflicts withversion_name_prefix
.- version
Name stringPrefix Creates a unique version name beginning with the specified prefix. Has a maximum length of 37 characters. Can contain upper- and lower-case letters, numbers, and hypen (
-
). Conflicts withversion_name
.- volume
Kms stringKey Id KMS Key used to encrypt storage volumes during job processing. Can be a KMS Key ID or a KMS Key ARN.
- vpc
Config DocumentClassifier Vpc Config Args Configuration parameters for VPC to contain Document Classifier resources. See the
vpc_config
Configuration Block section below.
- data_
access_ strrole_ arn The ARN for an IAM Role which allows Comprehend to read the training and testing data.
- input_
data_ Documentconfig Classifier Input Data Config Args Configuration for the training and testing data. See the
input_data_config
Configuration Block section below.- language_
code str Two-letter language code for the language. One of
en
,es
,fr
,it
,de
, orpt
.- mode str
The document classification mode. One of
MULTI_CLASS
orMULTI_LABEL
.MULTI_CLASS
is also known as "Single Label" in the AWS Console.- model_
kms_ strkey_ id KMS Key used to encrypt trained Document Classifiers. Can be a KMS Key ID or a KMS Key ARN.
- name str
Name for the Document Classifier. Has a maximum length of 63 characters. Can contain upper- and lower-case letters, numbers, and hypen (
-
).- output_
data_ Documentconfig Classifier Output Data Config Args Configuration for the output results of training. See the
output_data_config
Configuration Block section below.- Mapping[str, str]
A map of tags to assign 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.- version_
name str Name for the version of the Document Classifier. Each version must have a unique name within the Document Classifier. If omitted, the provider will assign a random, unique version name. If explicitly set to
""
, no version name will be set. Has a maximum length of 63 characters. Can contain upper- and lower-case letters, numbers, and hypen (-
). Conflicts withversion_name_prefix
.- version_
name_ strprefix Creates a unique version name beginning with the specified prefix. Has a maximum length of 37 characters. Can contain upper- and lower-case letters, numbers, and hypen (
-
). Conflicts withversion_name
.- volume_
kms_ strkey_ id KMS Key used to encrypt storage volumes during job processing. Can be a KMS Key ID or a KMS Key ARN.
- vpc_
config DocumentClassifier Vpc Config Args Configuration parameters for VPC to contain Document Classifier resources. See the
vpc_config
Configuration Block section below.
- data
Access StringRole Arn The ARN for an IAM Role which allows Comprehend to read the training and testing data.
- input
Data Property MapConfig Configuration for the training and testing data. See the
input_data_config
Configuration Block section below.- language
Code String Two-letter language code for the language. One of
en
,es
,fr
,it
,de
, orpt
.- mode String
The document classification mode. One of
MULTI_CLASS
orMULTI_LABEL
.MULTI_CLASS
is also known as "Single Label" in the AWS Console.- model
Kms StringKey Id KMS Key used to encrypt trained Document Classifiers. Can be a KMS Key ID or a KMS Key ARN.
- name String
Name for the Document Classifier. Has a maximum length of 63 characters. Can contain upper- and lower-case letters, numbers, and hypen (
-
).- output
Data Property MapConfig Configuration for the output results of training. See the
output_data_config
Configuration Block section below.- Map<String>
A map of tags to assign 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.- version
Name String Name for the version of the Document Classifier. Each version must have a unique name within the Document Classifier. If omitted, the provider will assign a random, unique version name. If explicitly set to
""
, no version name will be set. Has a maximum length of 63 characters. Can contain upper- and lower-case letters, numbers, and hypen (-
). Conflicts withversion_name_prefix
.- version
Name StringPrefix Creates a unique version name beginning with the specified prefix. Has a maximum length of 37 characters. Can contain upper- and lower-case letters, numbers, and hypen (
-
). Conflicts withversion_name
.- volume
Kms StringKey Id KMS Key used to encrypt storage volumes during job processing. Can be a KMS Key ID or a KMS Key ARN.
- vpc
Config Property Map Configuration parameters for VPC to contain Document Classifier resources. See the
vpc_config
Configuration Block section below.
Outputs
All input properties are implicitly available as output properties. Additionally, the DocumentClassifier resource produces the following output properties:
Look up Existing DocumentClassifier Resource
Get an existing DocumentClassifier 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?: DocumentClassifierState, opts?: CustomResourceOptions): DocumentClassifier
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
arn: Optional[str] = None,
data_access_role_arn: Optional[str] = None,
input_data_config: Optional[DocumentClassifierInputDataConfigArgs] = None,
language_code: Optional[str] = None,
mode: Optional[str] = None,
model_kms_key_id: Optional[str] = None,
name: Optional[str] = None,
output_data_config: Optional[DocumentClassifierOutputDataConfigArgs] = None,
tags: Optional[Mapping[str, str]] = None,
tags_all: Optional[Mapping[str, str]] = None,
version_name: Optional[str] = None,
version_name_prefix: Optional[str] = None,
volume_kms_key_id: Optional[str] = None,
vpc_config: Optional[DocumentClassifierVpcConfigArgs] = None) -> DocumentClassifier
func GetDocumentClassifier(ctx *Context, name string, id IDInput, state *DocumentClassifierState, opts ...ResourceOption) (*DocumentClassifier, error)
public static DocumentClassifier Get(string name, Input<string> id, DocumentClassifierState? state, CustomResourceOptions? opts = null)
public static DocumentClassifier get(String name, Output<String> id, DocumentClassifierState 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 Document Classifier version.
- Data
Access stringRole Arn The ARN for an IAM Role which allows Comprehend to read the training and testing data.
- Input
Data DocumentConfig Classifier Input Data Config Args Configuration for the training and testing data. See the
input_data_config
Configuration Block section below.- Language
Code string Two-letter language code for the language. One of
en
,es
,fr
,it
,de
, orpt
.- Mode string
The document classification mode. One of
MULTI_CLASS
orMULTI_LABEL
.MULTI_CLASS
is also known as "Single Label" in the AWS Console.- Model
Kms stringKey Id KMS Key used to encrypt trained Document Classifiers. Can be a KMS Key ID or a KMS Key ARN.
- Name string
Name for the Document Classifier. Has a maximum length of 63 characters. Can contain upper- and lower-case letters, numbers, and hypen (
-
).- Output
Data DocumentConfig Classifier Output Data Config Args Configuration for the output results of training. See the
output_data_config
Configuration Block section below.- Dictionary<string, string>
A map of tags to assign 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.- Version
Name string Name for the version of the Document Classifier. Each version must have a unique name within the Document Classifier. If omitted, the provider will assign a random, unique version name. If explicitly set to
""
, no version name will be set. Has a maximum length of 63 characters. Can contain upper- and lower-case letters, numbers, and hypen (-
). Conflicts withversion_name_prefix
.- Version
Name stringPrefix Creates a unique version name beginning with the specified prefix. Has a maximum length of 37 characters. Can contain upper- and lower-case letters, numbers, and hypen (
-
). Conflicts withversion_name
.- Volume
Kms stringKey Id KMS Key used to encrypt storage volumes during job processing. Can be a KMS Key ID or a KMS Key ARN.
- Vpc
Config DocumentClassifier Vpc Config Args Configuration parameters for VPC to contain Document Classifier resources. See the
vpc_config
Configuration Block section below.
- Arn string
ARN of the Document Classifier version.
- Data
Access stringRole Arn The ARN for an IAM Role which allows Comprehend to read the training and testing data.
- Input
Data DocumentConfig Classifier Input Data Config Args Configuration for the training and testing data. See the
input_data_config
Configuration Block section below.- Language
Code string Two-letter language code for the language. One of
en
,es
,fr
,it
,de
, orpt
.- Mode string
The document classification mode. One of
MULTI_CLASS
orMULTI_LABEL
.MULTI_CLASS
is also known as "Single Label" in the AWS Console.- Model
Kms stringKey Id KMS Key used to encrypt trained Document Classifiers. Can be a KMS Key ID or a KMS Key ARN.
- Name string
Name for the Document Classifier. Has a maximum length of 63 characters. Can contain upper- and lower-case letters, numbers, and hypen (
-
).- Output
Data DocumentConfig Classifier Output Data Config Args Configuration for the output results of training. See the
output_data_config
Configuration Block section below.- map[string]string
A map of tags to assign 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.- Version
Name string Name for the version of the Document Classifier. Each version must have a unique name within the Document Classifier. If omitted, the provider will assign a random, unique version name. If explicitly set to
""
, no version name will be set. Has a maximum length of 63 characters. Can contain upper- and lower-case letters, numbers, and hypen (-
). Conflicts withversion_name_prefix
.- Version
Name stringPrefix Creates a unique version name beginning with the specified prefix. Has a maximum length of 37 characters. Can contain upper- and lower-case letters, numbers, and hypen (
-
). Conflicts withversion_name
.- Volume
Kms stringKey Id KMS Key used to encrypt storage volumes during job processing. Can be a KMS Key ID or a KMS Key ARN.
- Vpc
Config DocumentClassifier Vpc Config Args Configuration parameters for VPC to contain Document Classifier resources. See the
vpc_config
Configuration Block section below.
- arn String
ARN of the Document Classifier version.
- data
Access StringRole Arn The ARN for an IAM Role which allows Comprehend to read the training and testing data.
- input
Data DocumentConfig Classifier Input Data Config Args Configuration for the training and testing data. See the
input_data_config
Configuration Block section below.- language
Code String Two-letter language code for the language. One of
en
,es
,fr
,it
,de
, orpt
.- mode String
The document classification mode. One of
MULTI_CLASS
orMULTI_LABEL
.MULTI_CLASS
is also known as "Single Label" in the AWS Console.- model
Kms StringKey Id KMS Key used to encrypt trained Document Classifiers. Can be a KMS Key ID or a KMS Key ARN.
- name String
Name for the Document Classifier. Has a maximum length of 63 characters. Can contain upper- and lower-case letters, numbers, and hypen (
-
).- output
Data DocumentConfig Classifier Output Data Config Args Configuration for the output results of training. See the
output_data_config
Configuration Block section below.- Map<String,String>
A map of tags to assign 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.- version
Name String Name for the version of the Document Classifier. Each version must have a unique name within the Document Classifier. If omitted, the provider will assign a random, unique version name. If explicitly set to
""
, no version name will be set. Has a maximum length of 63 characters. Can contain upper- and lower-case letters, numbers, and hypen (-
). Conflicts withversion_name_prefix
.- version
Name StringPrefix Creates a unique version name beginning with the specified prefix. Has a maximum length of 37 characters. Can contain upper- and lower-case letters, numbers, and hypen (
-
). Conflicts withversion_name
.- volume
Kms StringKey Id KMS Key used to encrypt storage volumes during job processing. Can be a KMS Key ID or a KMS Key ARN.
- vpc
Config DocumentClassifier Vpc Config Args Configuration parameters for VPC to contain Document Classifier resources. See the
vpc_config
Configuration Block section below.
- arn string
ARN of the Document Classifier version.
- data
Access stringRole Arn The ARN for an IAM Role which allows Comprehend to read the training and testing data.
- input
Data DocumentConfig Classifier Input Data Config Args Configuration for the training and testing data. See the
input_data_config
Configuration Block section below.- language
Code string Two-letter language code for the language. One of
en
,es
,fr
,it
,de
, orpt
.- mode string
The document classification mode. One of
MULTI_CLASS
orMULTI_LABEL
.MULTI_CLASS
is also known as "Single Label" in the AWS Console.- model
Kms stringKey Id KMS Key used to encrypt trained Document Classifiers. Can be a KMS Key ID or a KMS Key ARN.
- name string
Name for the Document Classifier. Has a maximum length of 63 characters. Can contain upper- and lower-case letters, numbers, and hypen (
-
).- output
Data DocumentConfig Classifier Output Data Config Args Configuration for the output results of training. See the
output_data_config
Configuration Block section below.- {[key: string]: string}
A map of tags to assign 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.- version
Name string Name for the version of the Document Classifier. Each version must have a unique name within the Document Classifier. If omitted, the provider will assign a random, unique version name. If explicitly set to
""
, no version name will be set. Has a maximum length of 63 characters. Can contain upper- and lower-case letters, numbers, and hypen (-
). Conflicts withversion_name_prefix
.- version
Name stringPrefix Creates a unique version name beginning with the specified prefix. Has a maximum length of 37 characters. Can contain upper- and lower-case letters, numbers, and hypen (
-
). Conflicts withversion_name
.- volume
Kms stringKey Id KMS Key used to encrypt storage volumes during job processing. Can be a KMS Key ID or a KMS Key ARN.
- vpc
Config DocumentClassifier Vpc Config Args Configuration parameters for VPC to contain Document Classifier resources. See the
vpc_config
Configuration Block section below.
- arn str
ARN of the Document Classifier version.
- data_
access_ strrole_ arn The ARN for an IAM Role which allows Comprehend to read the training and testing data.
- input_
data_ Documentconfig Classifier Input Data Config Args Configuration for the training and testing data. See the
input_data_config
Configuration Block section below.- language_
code str Two-letter language code for the language. One of
en
,es
,fr
,it
,de
, orpt
.- mode str
The document classification mode. One of
MULTI_CLASS
orMULTI_LABEL
.MULTI_CLASS
is also known as "Single Label" in the AWS Console.- model_
kms_ strkey_ id KMS Key used to encrypt trained Document Classifiers. Can be a KMS Key ID or a KMS Key ARN.
- name str
Name for the Document Classifier. Has a maximum length of 63 characters. Can contain upper- and lower-case letters, numbers, and hypen (
-
).- output_
data_ Documentconfig Classifier Output Data Config Args Configuration for the output results of training. See the
output_data_config
Configuration Block section below.- Mapping[str, str]
A map of tags to assign 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.- version_
name str Name for the version of the Document Classifier. Each version must have a unique name within the Document Classifier. If omitted, the provider will assign a random, unique version name. If explicitly set to
""
, no version name will be set. Has a maximum length of 63 characters. Can contain upper- and lower-case letters, numbers, and hypen (-
). Conflicts withversion_name_prefix
.- version_
name_ strprefix Creates a unique version name beginning with the specified prefix. Has a maximum length of 37 characters. Can contain upper- and lower-case letters, numbers, and hypen (
-
). Conflicts withversion_name
.- volume_
kms_ strkey_ id KMS Key used to encrypt storage volumes during job processing. Can be a KMS Key ID or a KMS Key ARN.
- vpc_
config DocumentClassifier Vpc Config Args Configuration parameters for VPC to contain Document Classifier resources. See the
vpc_config
Configuration Block section below.
- arn String
ARN of the Document Classifier version.
- data
Access StringRole Arn The ARN for an IAM Role which allows Comprehend to read the training and testing data.
- input
Data Property MapConfig Configuration for the training and testing data. See the
input_data_config
Configuration Block section below.- language
Code String Two-letter language code for the language. One of
en
,es
,fr
,it
,de
, orpt
.- mode String
The document classification mode. One of
MULTI_CLASS
orMULTI_LABEL
.MULTI_CLASS
is also known as "Single Label" in the AWS Console.- model
Kms StringKey Id KMS Key used to encrypt trained Document Classifiers. Can be a KMS Key ID or a KMS Key ARN.
- name String
Name for the Document Classifier. Has a maximum length of 63 characters. Can contain upper- and lower-case letters, numbers, and hypen (
-
).- output
Data Property MapConfig Configuration for the output results of training. See the
output_data_config
Configuration Block section below.- Map<String>
A map of tags to assign 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.- version
Name String Name for the version of the Document Classifier. Each version must have a unique name within the Document Classifier. If omitted, the provider will assign a random, unique version name. If explicitly set to
""
, no version name will be set. Has a maximum length of 63 characters. Can contain upper- and lower-case letters, numbers, and hypen (-
). Conflicts withversion_name_prefix
.- version
Name StringPrefix Creates a unique version name beginning with the specified prefix. Has a maximum length of 37 characters. Can contain upper- and lower-case letters, numbers, and hypen (
-
). Conflicts withversion_name
.- volume
Kms StringKey Id KMS Key used to encrypt storage volumes during job processing. Can be a KMS Key ID or a KMS Key ARN.
- vpc
Config Property Map Configuration parameters for VPC to contain Document Classifier resources. See the
vpc_config
Configuration Block section below.
Supporting Types
DocumentClassifierInputDataConfig
- Augmented
Manifests List<DocumentClassifier Input Data Config Augmented Manifest> List of training datasets produced by Amazon SageMaker Ground Truth. Used if
data_format
isAUGMENTED_MANIFEST
. See theaugmented_manifests
Configuration Block section below.- Data
Format string The format for the training data. One of
COMPREHEND_CSV
orAUGMENTED_MANIFEST
.- Label
Delimiter string Delimiter between labels when training a multi-label classifier. Valid values are
|
,~
,!
,@
,#
,$
,%
,^
,*
,-
,_
,+
,=
,\
,:
,;
,>
,?
,/
,<space>
, and<tab>
. Default is|
.- S3Uri string
Location of training documents. Used if
data_format
isCOMPREHEND_CSV
.- Test
S3Uri string
- Augmented
Manifests []DocumentClassifier Input Data Config Augmented Manifest List of training datasets produced by Amazon SageMaker Ground Truth. Used if
data_format
isAUGMENTED_MANIFEST
. See theaugmented_manifests
Configuration Block section below.- Data
Format string The format for the training data. One of
COMPREHEND_CSV
orAUGMENTED_MANIFEST
.- Label
Delimiter string Delimiter between labels when training a multi-label classifier. Valid values are
|
,~
,!
,@
,#
,$
,%
,^
,*
,-
,_
,+
,=
,\
,:
,;
,>
,?
,/
,<space>
, and<tab>
. Default is|
.- S3Uri string
Location of training documents. Used if
data_format
isCOMPREHEND_CSV
.- Test
S3Uri string
- augmented
Manifests List<DocumentClassifier Input Data Config Augmented Manifest> List of training datasets produced by Amazon SageMaker Ground Truth. Used if
data_format
isAUGMENTED_MANIFEST
. See theaugmented_manifests
Configuration Block section below.- data
Format String The format for the training data. One of
COMPREHEND_CSV
orAUGMENTED_MANIFEST
.- label
Delimiter String Delimiter between labels when training a multi-label classifier. Valid values are
|
,~
,!
,@
,#
,$
,%
,^
,*
,-
,_
,+
,=
,\
,:
,;
,>
,?
,/
,<space>
, and<tab>
. Default is|
.- s3Uri String
Location of training documents. Used if
data_format
isCOMPREHEND_CSV
.- test
S3Uri String
- augmented
Manifests DocumentClassifier Input Data Config Augmented Manifest[] List of training datasets produced by Amazon SageMaker Ground Truth. Used if
data_format
isAUGMENTED_MANIFEST
. See theaugmented_manifests
Configuration Block section below.- data
Format string The format for the training data. One of
COMPREHEND_CSV
orAUGMENTED_MANIFEST
.- label
Delimiter string Delimiter between labels when training a multi-label classifier. Valid values are
|
,~
,!
,@
,#
,$
,%
,^
,*
,-
,_
,+
,=
,\
,:
,;
,>
,?
,/
,<space>
, and<tab>
. Default is|
.- s3Uri string
Location of training documents. Used if
data_format
isCOMPREHEND_CSV
.- test
S3Uri string
- augmented_
manifests Sequence[DocumentClassifier Input Data Config Augmented Manifest] List of training datasets produced by Amazon SageMaker Ground Truth. Used if
data_format
isAUGMENTED_MANIFEST
. See theaugmented_manifests
Configuration Block section below.- data_
format str The format for the training data. One of
COMPREHEND_CSV
orAUGMENTED_MANIFEST
.- label_
delimiter str Delimiter between labels when training a multi-label classifier. Valid values are
|
,~
,!
,@
,#
,$
,%
,^
,*
,-
,_
,+
,=
,\
,:
,;
,>
,?
,/
,<space>
, and<tab>
. Default is|
.- s3_
uri str Location of training documents. Used if
data_format
isCOMPREHEND_CSV
.- test_
s3_ struri
- augmented
Manifests List<Property Map> List of training datasets produced by Amazon SageMaker Ground Truth. Used if
data_format
isAUGMENTED_MANIFEST
. See theaugmented_manifests
Configuration Block section below.- data
Format String The format for the training data. One of
COMPREHEND_CSV
orAUGMENTED_MANIFEST
.- label
Delimiter String Delimiter between labels when training a multi-label classifier. Valid values are
|
,~
,!
,@
,#
,$
,%
,^
,*
,-
,_
,+
,=
,\
,:
,;
,>
,?
,/
,<space>
, and<tab>
. Default is|
.- s3Uri String
Location of training documents. Used if
data_format
isCOMPREHEND_CSV
.- test
S3Uri String
DocumentClassifierInputDataConfigAugmentedManifest
- Attribute
Names List<string> The JSON attribute that contains the annotations for the training documents.
- S3Uri string
Location of augmented manifest file.
- Annotation
Data stringS3Uri Location of annotation files.
- Document
Type string Type of augmented manifest. One of
PLAIN_TEXT_DOCUMENT
orSEMI_STRUCTURED_DOCUMENT
.- Source
Documents stringS3Uri Location of source PDF files.
- Split string
Purpose of data in augmented manifest. One of
TRAIN
orTEST
.
- Attribute
Names []string The JSON attribute that contains the annotations for the training documents.
- S3Uri string
Location of augmented manifest file.
- Annotation
Data stringS3Uri Location of annotation files.
- Document
Type string Type of augmented manifest. One of
PLAIN_TEXT_DOCUMENT
orSEMI_STRUCTURED_DOCUMENT
.- Source
Documents stringS3Uri Location of source PDF files.
- Split string
Purpose of data in augmented manifest. One of
TRAIN
orTEST
.
- attribute
Names List<String> The JSON attribute that contains the annotations for the training documents.
- s3Uri String
Location of augmented manifest file.
- annotation
Data StringS3Uri Location of annotation files.
- document
Type String Type of augmented manifest. One of
PLAIN_TEXT_DOCUMENT
orSEMI_STRUCTURED_DOCUMENT
.- source
Documents StringS3Uri Location of source PDF files.
- split String
Purpose of data in augmented manifest. One of
TRAIN
orTEST
.
- attribute
Names string[] The JSON attribute that contains the annotations for the training documents.
- s3Uri string
Location of augmented manifest file.
- annotation
Data stringS3Uri Location of annotation files.
- document
Type string Type of augmented manifest. One of
PLAIN_TEXT_DOCUMENT
orSEMI_STRUCTURED_DOCUMENT
.- source
Documents stringS3Uri Location of source PDF files.
- split string
Purpose of data in augmented manifest. One of
TRAIN
orTEST
.
- attribute_
names Sequence[str] The JSON attribute that contains the annotations for the training documents.
- s3_
uri str Location of augmented manifest file.
- annotation_
data_ strs3_ uri Location of annotation files.
- document_
type str Type of augmented manifest. One of
PLAIN_TEXT_DOCUMENT
orSEMI_STRUCTURED_DOCUMENT
.- source_
documents_ strs3_ uri Location of source PDF files.
- split str
Purpose of data in augmented manifest. One of
TRAIN
orTEST
.
- attribute
Names List<String> The JSON attribute that contains the annotations for the training documents.
- s3Uri String
Location of augmented manifest file.
- annotation
Data StringS3Uri Location of annotation files.
- document
Type String Type of augmented manifest. One of
PLAIN_TEXT_DOCUMENT
orSEMI_STRUCTURED_DOCUMENT
.- source
Documents StringS3Uri Location of source PDF files.
- split String
Purpose of data in augmented manifest. One of
TRAIN
orTEST
.
DocumentClassifierOutputDataConfig
- S3Uri string
Destination path for the output documents. The full path to the output file will be returned in
output_s3_uri
.- Kms
Key stringId KMS Key used to encrypt the output documents. Can be a KMS Key ID, a KMS Key ARN, a KMS Alias name, or a KMS Alias ARN.
- Output
S3Uri string Full path for the output documents.
- S3Uri string
Destination path for the output documents. The full path to the output file will be returned in
output_s3_uri
.- Kms
Key stringId KMS Key used to encrypt the output documents. Can be a KMS Key ID, a KMS Key ARN, a KMS Alias name, or a KMS Alias ARN.
- Output
S3Uri string Full path for the output documents.
- s3Uri String
Destination path for the output documents. The full path to the output file will be returned in
output_s3_uri
.- kms
Key StringId KMS Key used to encrypt the output documents. Can be a KMS Key ID, a KMS Key ARN, a KMS Alias name, or a KMS Alias ARN.
- output
S3Uri String Full path for the output documents.
- s3Uri string
Destination path for the output documents. The full path to the output file will be returned in
output_s3_uri
.- kms
Key stringId KMS Key used to encrypt the output documents. Can be a KMS Key ID, a KMS Key ARN, a KMS Alias name, or a KMS Alias ARN.
- output
S3Uri string Full path for the output documents.
- s3_
uri str Destination path for the output documents. The full path to the output file will be returned in
output_s3_uri
.- kms_
key_ strid KMS Key used to encrypt the output documents. Can be a KMS Key ID, a KMS Key ARN, a KMS Alias name, or a KMS Alias ARN.
- output_
s3_ struri Full path for the output documents.
- s3Uri String
Destination path for the output documents. The full path to the output file will be returned in
output_s3_uri
.- kms
Key StringId KMS Key used to encrypt the output documents. Can be a KMS Key ID, a KMS Key ARN, a KMS Alias name, or a KMS Alias ARN.
- output
S3Uri String Full path for the output documents.
DocumentClassifierVpcConfig
- Security
Group List<string>Ids List of security group IDs.
- Subnets List<string>
List of VPC subnets.
- Security
Group []stringIds List of security group IDs.
- Subnets []string
List of VPC subnets.
- security
Group List<String>Ids List of security group IDs.
- subnets List<String>
List of VPC subnets.
- security
Group string[]Ids List of security group IDs.
- subnets string[]
List of VPC subnets.
- security_
group_ Sequence[str]ids List of security group IDs.
- subnets Sequence[str]
List of VPC subnets.
- security
Group List<String>Ids List of security group IDs.
- subnets List<String>
List of VPC subnets.
Import
Comprehend Document Classifier can be imported using the ARN, e.g.,
$ pulumi import aws:comprehend/documentClassifier:DocumentClassifier example arn:aws:comprehend:us-west-2:123456789012:document_classifier/example
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aws
Terraform Provider.