Class CfnFlywheel
- All Implemented Interfaces:
IConstruct,IDependable,IInspectable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
AWS::Comprehend::Flywheel.
A flywheel is an AWS resource that orchestrates the ongoing training of a model for custom classification or custom entity recognition. You can create a flywheel to start with an existing trained model, or Comprehend can create and train a new model.
When you create the flywheel, Comprehend creates a data lake in your account. The data lake holds the training data and test data for all versions of the model.
To use a flywheel with an existing trained model, you specify the active model version. Comprehend copies the model's training data and test data into the flywheel's data lake.
To use the flywheel with a new model, you need to provide a dataset for training data (and optional test data) when you create the flywheel.
For more information about flywheels, see Flywheel overview in the Amazon Comprehend Developer Guide .
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.comprehend.*;
CfnFlywheel cfnFlywheel = CfnFlywheel.Builder.create(this, "MyCfnFlywheel")
.dataAccessRoleArn("dataAccessRoleArn")
.dataLakeS3Uri("dataLakeS3Uri")
.flywheelName("flywheelName")
// the properties below are optional
.activeModelArn("activeModelArn")
.dataSecurityConfig(DataSecurityConfigProperty.builder()
.dataLakeKmsKeyId("dataLakeKmsKeyId")
.modelKmsKeyId("modelKmsKeyId")
.volumeKmsKeyId("volumeKmsKeyId")
.vpcConfig(VpcConfigProperty.builder()
.securityGroupIds(List.of("securityGroupIds"))
.subnets(List.of("subnets"))
.build())
.build())
.modelType("modelType")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.taskConfig(TaskConfigProperty.builder()
.languageCode("languageCode")
// the properties below are optional
.documentClassificationConfig(DocumentClassificationConfigProperty.builder()
.mode("mode")
// the properties below are optional
.labels(List.of("labels"))
.build())
.entityRecognitionConfig(EntityRecognitionConfigProperty.builder()
.entityTypes(List.of(EntityTypesListItemProperty.builder()
.type("type")
.build()))
.build())
.build())
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnFlywheel.static interfaceData security configuration.static interfaceConfiguration required for a document classification model.static interfaceConfiguration required for an entity recognition model.static interfaceAn entity type within a labeled training dataset that Amazon Comprehend uses to train a custom entity recognizer.static interfaceConfiguration about the model associated with a flywheel.static interfaceConfiguration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are using for the job.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionCfnFlywheel(Construct scope, String id, CfnFlywheelProps props) Create a newAWS::Comprehend::Flywheel.protectedCfnFlywheel(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnFlywheel(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionThe Amazon Resource Number (ARN) of the active model version.The Amazon Resource Name (ARN) of the flywheel.The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend permission to access the flywheel data.Amazon S3 URI of the data lake location.Data security configuration.Name for the flywheel.Model type of the flywheel's model.getTags()Tags associated with the endpoint being created.Configuration about the model associated with a flywheel.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetActiveModelArn(String value) The Amazon Resource Number (ARN) of the active model version.voidsetDataAccessRoleArn(String value) The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend permission to access the flywheel data.voidsetDataLakeS3Uri(String value) Amazon S3 URI of the data lake location.voidsetDataSecurityConfig(IResolvable value) Data security configuration.voidData security configuration.voidsetFlywheelName(String value) Name for the flywheel.voidsetModelType(String value) Model type of the flywheel's model.voidsetTaskConfig(IResolvable value) Configuration about the model associated with a flywheel.voidConfiguration about the model associated with a flywheel.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.core.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnFlywheel
protected CfnFlywheel(software.amazon.jsii.JsiiObjectRef objRef) -
CfnFlywheel
protected CfnFlywheel(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnFlywheel
@Stability(Stable) public CfnFlywheel(@NotNull Construct scope, @NotNull String id, @NotNull CfnFlywheelProps props) Create a newAWS::Comprehend::Flywheel.- Parameters:
scope-- scope in which this resource is defined.
id-- scoped id of the resource.
props-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrArn
The Amazon Resource Name (ARN) of the flywheel. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getTags
Tags associated with the endpoint being created.A tag is a key-value pair that adds metadata to the endpoint. For example, a tag with "Sales" as the key might be added to an endpoint to indicate its use by the sales department.
-
getDataAccessRoleArn
The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend permission to access the flywheel data. -
setDataAccessRoleArn
The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend permission to access the flywheel data. -
getDataLakeS3Uri
Amazon S3 URI of the data lake location. -
setDataLakeS3Uri
Amazon S3 URI of the data lake location. -
getFlywheelName
Name for the flywheel. -
setFlywheelName
Name for the flywheel. -
getActiveModelArn
The Amazon Resource Number (ARN) of the active model version. -
setActiveModelArn
The Amazon Resource Number (ARN) of the active model version. -
getDataSecurityConfig
Data security configuration. -
setDataSecurityConfig
@Stability(Stable) public void setDataSecurityConfig(@Nullable CfnFlywheel.DataSecurityConfigProperty value) Data security configuration. -
setDataSecurityConfig
Data security configuration. -
getModelType
Model type of the flywheel's model. -
setModelType
Model type of the flywheel's model. -
getTaskConfig
Configuration about the model associated with a flywheel. -
setTaskConfig
Configuration about the model associated with a flywheel. -
setTaskConfig
Configuration about the model associated with a flywheel.
-