CfnMLTransformProps

class aws_cdk.aws_glue.CfnMLTransformProps(*, input_record_tables, role, transform_parameters, description=None, glue_version=None, max_capacity=None, max_retries=None, name=None, number_of_workers=None, tags=None, timeout=None, transform_encryption=None, worker_type=None)

Bases: object

Properties for defining a CfnMLTransform.

Parameters
  • input_record_tables (Union[IResolvable, InputRecordTablesProperty]) – A list of AWS Glue table definitions used by the transform.

  • role (str) – The name or Amazon Resource Name (ARN) of the IAM role with the required permissions. The required permissions include both AWS Glue service role permissions to AWS Glue resources, and Amazon S3 permissions required by the transform. - This role needs AWS Glue service role permissions to allow access to resources in AWS Glue . See Attach a Policy to IAM Users That Access AWS Glue . - This role needs permission to your Amazon Simple Storage Service (Amazon S3) sources, targets, temporary directory, scripts, and any libraries used by the task run for this transform.

  • transform_parameters (Union[IResolvable, TransformParametersProperty]) – The algorithm-specific parameters that are associated with the machine learning transform.

  • description (Optional[str]) – A user-defined, long-form description text for the machine learning transform.

  • glue_version (Optional[str]) – This value determines which version of AWS Glue this machine learning transform is compatible with. Glue 1.0 is recommended for most customers. If the value is not set, the Glue compatibility defaults to Glue 0.9. For more information, see AWS Glue Versions in the developer guide.

  • max_capacity (Union[int, float, None]) – The number of AWS Glue data processing units (DPUs) that are allocated to task runs for this transform. You can allocate from 2 to 100 DPUs; the default is 10. A DPU is a relative measure of processing power that consists of 4 vCPUs of compute capacity and 16 GB of memory. For more information, see the AWS Glue pricing page . MaxCapacity is a mutually exclusive option with NumberOfWorkers and WorkerType . - If either NumberOfWorkers or WorkerType is set, then MaxCapacity cannot be set. - If MaxCapacity is set then neither NumberOfWorkers or WorkerType can be set. - If WorkerType is set, then NumberOfWorkers is required (and vice versa). - MaxCapacity and NumberOfWorkers must both be at least 1. When the WorkerType field is set to a value other than Standard , the MaxCapacity field is set automatically and becomes read-only.

  • max_retries (Union[int, float, None]) – The maximum number of times to retry after an MLTaskRun of the machine learning transform fails.

  • name (Optional[str]) – A user-defined name for the machine learning transform. Names are required to be unique. Name is optional:. - If you supply Name , the stack cannot be repeatedly created. - If Name is not provided, a randomly generated name will be used instead.

  • number_of_workers (Union[int, float, None]) – The number of workers of a defined workerType that are allocated when a task of the transform runs. If WorkerType is set, then NumberOfWorkers is required (and vice versa).

  • tags (Optional[Any]) – The tags to use with this machine learning transform. You may use tags to limit access to the machine learning transform. For more information about tags in AWS Glue , see AWS Tags in AWS Glue in the developer guide.

  • timeout (Union[int, float, None]) – The timeout in minutes of the machine learning transform.

  • transform_encryption (Union[IResolvable, TransformEncryptionProperty, None]) – The encryption-at-rest settings of the transform that apply to accessing user data. Machine learning transforms can access user data encrypted in Amazon S3 using KMS. Additionally, imported labels and trained transforms can now be encrypted using a customer provided KMS key.

  • worker_type (Optional[str]) – The type of predefined worker that is allocated when a task of this transform runs. Accepts a value of Standard, G.1X, or G.2X. - For the Standard worker type, each worker provides 4 vCPU, 16 GB of memory and a 50GB disk, and 2 executors per worker. - For the G.1X worker type, each worker provides 4 vCPU, 16 GB of memory and a 64GB disk, and 1 executor per worker. - For the G.2X worker type, each worker provides 8 vCPU, 32 GB of memory and a 128GB disk, and 1 executor per worker. MaxCapacity is a mutually exclusive option with NumberOfWorkers and WorkerType . - If either NumberOfWorkers or WorkerType is set, then MaxCapacity cannot be set. - If MaxCapacity is set then neither NumberOfWorkers or WorkerType can be set. - If WorkerType is set, then NumberOfWorkers is required (and vice versa). - MaxCapacity and NumberOfWorkers must both be at least 1.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-mltransform.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_glue as glue

# tags: Any

cfn_mLTransform_props = glue.CfnMLTransformProps(
    input_record_tables=glue.CfnMLTransform.InputRecordTablesProperty(
        glue_tables=[glue.CfnMLTransform.GlueTablesProperty(
            database_name="databaseName",
            table_name="tableName",

            # the properties below are optional
            catalog_id="catalogId",
            connection_name="connectionName"
        )]
    ),
    role="role",
    transform_parameters=glue.CfnMLTransform.TransformParametersProperty(
        transform_type="transformType",

        # the properties below are optional
        find_matches_parameters=glue.CfnMLTransform.FindMatchesParametersProperty(
            primary_key_column_name="primaryKeyColumnName",

            # the properties below are optional
            accuracy_cost_tradeoff=123,
            enforce_provided_labels=False,
            precision_recall_tradeoff=123
        )
    ),

    # the properties below are optional
    description="description",
    glue_version="glueVersion",
    max_capacity=123,
    max_retries=123,
    name="name",
    number_of_workers=123,
    tags=tags,
    timeout=123,
    transform_encryption=glue.CfnMLTransform.TransformEncryptionProperty(
        ml_user_data_encryption=glue.CfnMLTransform.MLUserDataEncryptionProperty(
            ml_user_data_encryption_mode="mlUserDataEncryptionMode",

            # the properties below are optional
            kms_key_id="kmsKeyId"
        ),
        task_run_security_configuration_name="taskRunSecurityConfigurationName"
    ),
    worker_type="workerType"
)

Attributes

description

A user-defined, long-form description text for the machine learning transform.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-mltransform.html#cfn-glue-mltransform-description

Return type

Optional[str]

glue_version

This value determines which version of AWS Glue this machine learning transform is compatible with.

Glue 1.0 is recommended for most customers. If the value is not set, the Glue compatibility defaults to Glue 0.9. For more information, see AWS Glue Versions in the developer guide.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-mltransform.html#cfn-glue-mltransform-glueversion

Return type

Optional[str]

input_record_tables

A list of AWS Glue table definitions used by the transform.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-mltransform.html#cfn-glue-mltransform-inputrecordtables

Return type

Union[IResolvable, InputRecordTablesProperty]

max_capacity

The number of AWS Glue data processing units (DPUs) that are allocated to task runs for this transform.

You can allocate from 2 to 100 DPUs; the default is 10. A DPU is a relative measure of processing power that consists of 4 vCPUs of compute capacity and 16 GB of memory. For more information, see the AWS Glue pricing page .

MaxCapacity is a mutually exclusive option with NumberOfWorkers and WorkerType .

  • If either NumberOfWorkers or WorkerType is set, then MaxCapacity cannot be set.

  • If MaxCapacity is set then neither NumberOfWorkers or WorkerType can be set.

  • If WorkerType is set, then NumberOfWorkers is required (and vice versa).

  • MaxCapacity and NumberOfWorkers must both be at least 1.

When the WorkerType field is set to a value other than Standard , the MaxCapacity field is set automatically and becomes read-only.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-mltransform.html#cfn-glue-mltransform-maxcapacity

Return type

Union[int, float, None]

max_retries

The maximum number of times to retry after an MLTaskRun of the machine learning transform fails.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-mltransform.html#cfn-glue-mltransform-maxretries

Return type

Union[int, float, None]

name

.

  • If you supply Name , the stack cannot be repeatedly created.

  • If Name is not provided, a randomly generated name will be used instead.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-mltransform.html#cfn-glue-mltransform-name

Type

A user-defined name for the machine learning transform. Names are required to be unique. Name is optional

Return type

Optional[str]

number_of_workers

The number of workers of a defined workerType that are allocated when a task of the transform runs.

If WorkerType is set, then NumberOfWorkers is required (and vice versa).

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-mltransform.html#cfn-glue-mltransform-numberofworkers

Return type

Union[int, float, None]

role

The name or Amazon Resource Name (ARN) of the IAM role with the required permissions.

The required permissions include both AWS Glue service role permissions to AWS Glue resources, and Amazon S3 permissions required by the transform.

  • This role needs AWS Glue service role permissions to allow access to resources in AWS Glue . See Attach a Policy to IAM Users That Access AWS Glue .

  • This role needs permission to your Amazon Simple Storage Service (Amazon S3) sources, targets, temporary directory, scripts, and any libraries used by the task run for this transform.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-mltransform.html#cfn-glue-mltransform-role

Return type

str

tags

The tags to use with this machine learning transform.

You may use tags to limit access to the machine learning transform. For more information about tags in AWS Glue , see AWS Tags in AWS Glue in the developer guide.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-mltransform.html#cfn-glue-mltransform-tags

Return type

Any

timeout

The timeout in minutes of the machine learning transform.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-mltransform.html#cfn-glue-mltransform-timeout

Return type

Union[int, float, None]

transform_encryption

The encryption-at-rest settings of the transform that apply to accessing user data.

Machine learning transforms can access user data encrypted in Amazon S3 using KMS.

Additionally, imported labels and trained transforms can now be encrypted using a customer provided KMS key.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-mltransform.html#cfn-glue-mltransform-transformencryption

Return type

Union[IResolvable, TransformEncryptionProperty, None]

transform_parameters

The algorithm-specific parameters that are associated with the machine learning transform.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-mltransform.html#cfn-glue-mltransform-transformparameters

Return type

Union[IResolvable, TransformParametersProperty]

worker_type

The type of predefined worker that is allocated when a task of this transform runs.

Accepts a value of Standard, G.1X, or G.2X.

  • For the Standard worker type, each worker provides 4 vCPU, 16 GB of memory and a 50GB disk, and 2 executors per worker.

  • For the G.1X worker type, each worker provides 4 vCPU, 16 GB of memory and a 64GB disk, and 1 executor per worker.

  • For the G.2X worker type, each worker provides 8 vCPU, 32 GB of memory and a 128GB disk, and 1 executor per worker.

MaxCapacity is a mutually exclusive option with NumberOfWorkers and WorkerType .

  • If either NumberOfWorkers or WorkerType is set, then MaxCapacity cannot be set.

  • If MaxCapacity is set then neither NumberOfWorkers or WorkerType can be set.

  • If WorkerType is set, then NumberOfWorkers is required (and vice versa).

  • MaxCapacity and NumberOfWorkers must both be at least 1.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-mltransform.html#cfn-glue-mltransform-workertype

Return type

Optional[str]