Class CfnFlywheel

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-10-05T03:43:40.913Z") @Stability(Stable) public class CfnFlywheel extends CfnResource implements IInspectable, ITaggable
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();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String 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 software.constructs.Construct scope, @NotNull String id, @NotNull CfnFlywheelProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The Amazon Resource Name (ARN) of the flywheel.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getDataAccessRoleArn

      @Stability(Stable) @NotNull public String getDataAccessRoleArn()
      The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend permission to access the flywheel data.
    • setDataAccessRoleArn

      @Stability(Stable) public void setDataAccessRoleArn(@NotNull String value)
      The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend permission to access the flywheel data.
    • getDataLakeS3Uri

      @Stability(Stable) @NotNull public String getDataLakeS3Uri()
      Amazon S3 URI of the data lake location.
    • setDataLakeS3Uri

      @Stability(Stable) public void setDataLakeS3Uri(@NotNull String value)
      Amazon S3 URI of the data lake location.
    • getFlywheelName

      @Stability(Stable) @NotNull public String getFlywheelName()
      Name for the flywheel.
    • setFlywheelName

      @Stability(Stable) public void setFlywheelName(@NotNull String value)
      Name for the flywheel.
    • getActiveModelArn

      @Stability(Stable) @Nullable public String getActiveModelArn()
      The Amazon Resource Number (ARN) of the active model version.
    • setActiveModelArn

      @Stability(Stable) public void setActiveModelArn(@Nullable String value)
      The Amazon Resource Number (ARN) of the active model version.
    • getDataSecurityConfig

      @Stability(Stable) @Nullable public Object getDataSecurityConfig()
      Data security configuration.
    • setDataSecurityConfig

      @Stability(Stable) public void setDataSecurityConfig(@Nullable IResolvable value)
      Data security configuration.
    • setDataSecurityConfig

      @Stability(Stable) public void setDataSecurityConfig(@Nullable CfnFlywheel.DataSecurityConfigProperty value)
      Data security configuration.
    • getModelType

      @Stability(Stable) @Nullable public String getModelType()
      Model type of the flywheel's model.
    • setModelType

      @Stability(Stable) public void setModelType(@Nullable String value)
      Model type of the flywheel's model.
    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      Tags associated with the endpoint being created.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      Tags associated with the endpoint being created.
    • getTaskConfig

      @Stability(Stable) @Nullable public Object getTaskConfig()
      Configuration about the model associated with a flywheel.
    • setTaskConfig

      @Stability(Stable) public void setTaskConfig(@Nullable IResolvable value)
      Configuration about the model associated with a flywheel.
    • setTaskConfig

      @Stability(Stable) public void setTaskConfig(@Nullable CfnFlywheel.TaskConfigProperty value)
      Configuration about the model associated with a flywheel.