Comprehend / Client / update_flywheel

update_flywheel#

Comprehend.Client.update_flywheel(**kwargs)#

Update the configuration information for an existing flywheel.

See also: AWS API Documentation

Request Syntax

response = client.update_flywheel(
    FlywheelArn='string',
    ActiveModelArn='string',
    DataAccessRoleArn='string',
    DataSecurityConfig={
        'ModelKmsKeyId': 'string',
        'VolumeKmsKeyId': 'string',
        'VpcConfig': {
            'SecurityGroupIds': [
                'string',
            ],
            'Subnets': [
                'string',
            ]
        }
    }
)
Parameters:
  • FlywheelArn (string) –

    [REQUIRED]

    The Amazon Resource Number (ARN) of the flywheel to update.

  • ActiveModelArn (string) – The Amazon Resource Number (ARN) of the active model version.

  • DataAccessRoleArn (string) – The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend permission to access the flywheel data.

  • DataSecurityConfig (dict) –

    Flywheel data security configuration.

    • ModelKmsKeyId (string) –

      ID for the KMS key that Amazon Comprehend uses to encrypt trained custom models. The ModelKmsKeyId can be either of the following formats:

      • KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"

      • Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"

    • VolumeKmsKeyId (string) –

      ID for the KMS key that Amazon Comprehend uses to encrypt the volume.

    • VpcConfig (dict) –

      Configuration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are using for the job. For more information, see Amazon VPC.

      • SecurityGroupIds (list) – [REQUIRED]

        The ID number for a security group on an instance of your private VPC. Security groups on your VPC function serve as a virtual firewall to control inbound and outbound traffic and provides security for the resources that you’ll be accessing on the VPC. This ID number is preceded by “sg-”, for instance: “sg-03b388029b0a285ea”. For more information, see Security Groups for your VPC.

        • (string) –

      • Subnets (list) – [REQUIRED]

        The ID for each subnet being used in your private VPC. This subnet is a subset of the a range of IPv4 addresses used by the VPC and is specific to a given availability zone in the VPC’s Region. This ID number is preceded by “subnet-”, for instance: “subnet-04ccf456919e69055”. For more information, see VPCs and Subnets.

        • (string) –

Return type:

dict

Returns:

Response Syntax

{
    'FlywheelProperties': {
        'FlywheelArn': 'string',
        'ActiveModelArn': 'string',
        'DataAccessRoleArn': 'string',
        'TaskConfig': {
            'LanguageCode': 'en'|'es'|'fr'|'de'|'it'|'pt'|'ar'|'hi'|'ja'|'ko'|'zh'|'zh-TW',
            'DocumentClassificationConfig': {
                'Mode': 'MULTI_CLASS'|'MULTI_LABEL',
                'Labels': [
                    'string',
                ]
            },
            'EntityRecognitionConfig': {
                'EntityTypes': [
                    {
                        'Type': 'string'
                    },
                ]
            }
        },
        'DataLakeS3Uri': 'string',
        'DataSecurityConfig': {
            'ModelKmsKeyId': 'string',
            'VolumeKmsKeyId': 'string',
            'DataLakeKmsKeyId': 'string',
            'VpcConfig': {
                'SecurityGroupIds': [
                    'string',
                ],
                'Subnets': [
                    'string',
                ]
            }
        },
        'Status': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'FAILED',
        'ModelType': 'DOCUMENT_CLASSIFIER'|'ENTITY_RECOGNIZER',
        'Message': 'string',
        'CreationTime': datetime(2015, 1, 1),
        'LastModifiedTime': datetime(2015, 1, 1),
        'LatestFlywheelIteration': 'string'
    }
}

Response Structure

  • (dict) –

    • FlywheelProperties (dict) –

      The flywheel properties.

      • FlywheelArn (string) –

        The Amazon Resource Number (ARN) of the flywheel.

      • ActiveModelArn (string) –

        The Amazon Resource Number (ARN) of the active model version.

      • DataAccessRoleArn (string) –

        The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend permission to access the flywheel data.

      • TaskConfig (dict) –

        Configuration about the custom classifier associated with the flywheel.

        • LanguageCode (string) –

          Language code for the language that the model supports.

        • DocumentClassificationConfig (dict) –

          Configuration required for a classification model.

          • Mode (string) –

            Classification mode indicates whether the documents are MULTI_CLASS or MULTI_LABEL.

          • Labels (list) –

            One or more labels to associate with the custom classifier.

            • (string) –

        • EntityRecognitionConfig (dict) –

          Configuration required for an entity recognition model.

          • EntityTypes (list) –

            Up to 25 entity types that the model is trained to recognize.

            • (dict) –

              An entity type within a labeled training dataset that Amazon Comprehend uses to train a custom entity recognizer.

              • Type (string) –

                An entity type within a labeled training dataset that Amazon Comprehend uses to train a custom entity recognizer.

                Entity types must not contain the following invalid characters: n (line break), \n (escaped line break, r (carriage return), \r (escaped carriage return), t (tab), \t (escaped tab), space, and , (comma).

      • DataLakeS3Uri (string) –

        Amazon S3 URI of the data lake location.

      • DataSecurityConfig (dict) –

        Data security configuration.

        • ModelKmsKeyId (string) –

          ID for the KMS key that Amazon Comprehend uses to encrypt trained custom models. The ModelKmsKeyId can be either of the following formats:

          • KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"

          • Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"

        • VolumeKmsKeyId (string) –

          ID for the KMS key that Amazon Comprehend uses to encrypt the volume.

        • DataLakeKmsKeyId (string) –

          ID for the KMS key that Amazon Comprehend uses to encrypt the data in the data lake.

        • VpcConfig (dict) –

          Configuration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are using for the job. For more information, see Amazon VPC.

          • SecurityGroupIds (list) –

            The ID number for a security group on an instance of your private VPC. Security groups on your VPC function serve as a virtual firewall to control inbound and outbound traffic and provides security for the resources that you’ll be accessing on the VPC. This ID number is preceded by “sg-”, for instance: “sg-03b388029b0a285ea”. For more information, see Security Groups for your VPC.

            • (string) –

          • Subnets (list) –

            The ID for each subnet being used in your private VPC. This subnet is a subset of the a range of IPv4 addresses used by the VPC and is specific to a given availability zone in the VPC’s Region. This ID number is preceded by “subnet-”, for instance: “subnet-04ccf456919e69055”. For more information, see VPCs and Subnets.

            • (string) –

      • Status (string) –

        The status of the flywheel.

      • ModelType (string) –

        Model type of the flywheel’s model.

      • Message (string) –

        A description of the status of the flywheel.

      • CreationTime (datetime) –

        Creation time of the flywheel.

      • LastModifiedTime (datetime) –

        Last modified time for the flywheel.

      • LatestFlywheelIteration (string) –

        The most recent flywheel iteration.

Exceptions

  • Comprehend.Client.exceptions.InvalidRequestException

  • Comprehend.Client.exceptions.TooManyRequestsException

  • Comprehend.Client.exceptions.KmsKeyValidationException

  • Comprehend.Client.exceptions.ResourceNotFoundException

  • Comprehend.Client.exceptions.InternalServerException