# CfnMLTransformProps

Properties for defining a `CfnMLTransform`.

Used as props by: [CfnMLTransform](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_glue.CfnMLTransform.html)

- Source: Generated at build time

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_glue as glue } from 'aws-cdk-lib';

declare const tags: any;
const cfnMLTransformProps: glue.CfnMLTransformProps = {
  inputRecordTables: {
    glueTables: [{
      databaseName: 'databaseName',
      tableName: 'tableName',

      // the properties below are optional
      catalogId: 'catalogId',
      connectionName: 'connectionName',
    }],
  },
  role: 'role',
  transformParameters: {
    transformType: 'transformType',

    // the properties below are optional
    findMatchesParameters: {
      primaryKeyColumnName: 'primaryKeyColumnName',

      // the properties below are optional
      accuracyCostTradeoff: 123,
      enforceProvidedLabels: false,
      precisionRecallTradeoff: 123,
    },
  },

  // the properties below are optional
  description: 'description',
  glueVersion: 'glueVersion',
  maxCapacity: 123,
  maxRetries: 123,
  name: 'name',
  numberOfWorkers: 123,
  tags: tags,
  timeout: 123,
  transformEncryption: {
    mlUserDataEncryption: {
      mlUserDataEncryptionMode: 'mlUserDataEncryptionMode',

      // the properties below are optional
      kmsKeyId: 'kmsKeyId',
    },
    taskRunSecurityConfigurationName: 'taskRunSecurityConfigurationName',
  },
  workerType: 'workerType',
};
```

Python:

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

# tags: Any

cfn_ml_transform_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"
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.glue.*;

Object tags;

CfnMLTransformProps cfnMLTransformProps = CfnMLTransformProps.builder()
        .inputRecordTables(InputRecordTablesProperty.builder()
                .glueTables(List.of(GlueTablesProperty.builder()
                        .databaseName("databaseName")
                        .tableName("tableName")

                        // the properties below are optional
                        .catalogId("catalogId")
                        .connectionName("connectionName")
                        .build()))
                .build())
        .role("role")
        .transformParameters(TransformParametersProperty.builder()
                .transformType("transformType")

                // the properties below are optional
                .findMatchesParameters(FindMatchesParametersProperty.builder()
                        .primaryKeyColumnName("primaryKeyColumnName")

                        // the properties below are optional
                        .accuracyCostTradeoff(123)
                        .enforceProvidedLabels(false)
                        .precisionRecallTradeoff(123)
                        .build())
                .build())

        // the properties below are optional
        .description("description")
        .glueVersion("glueVersion")
        .maxCapacity(123)
        .maxRetries(123)
        .name("name")
        .numberOfWorkers(123)
        .tags(tags)
        .timeout(123)
        .transformEncryption(TransformEncryptionProperty.builder()
                .mlUserDataEncryption(MLUserDataEncryptionProperty.builder()
                        .mlUserDataEncryptionMode("mlUserDataEncryptionMode")

                        // the properties below are optional
                        .kmsKeyId("kmsKeyId")
                        .build())
                .taskRunSecurityConfigurationName("taskRunSecurityConfigurationName")
                .build())
        .workerType("workerType")
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Glue;

var tags;

var cfnMLTransformProps = new CfnMLTransformProps {
    InputRecordTables = new InputRecordTablesProperty {
        GlueTables = new [] { new GlueTablesProperty {
            DatabaseName = "databaseName",
            TableName = "tableName",

            // the properties below are optional
            CatalogId = "catalogId",
            ConnectionName = "connectionName"
        } }
    },
    Role = "role",
    TransformParameters = new TransformParametersProperty {
        TransformType = "transformType",

        // the properties below are optional
        FindMatchesParameters = new FindMatchesParametersProperty {
            PrimaryKeyColumnName = "primaryKeyColumnName",

            // the properties below are optional
            AccuracyCostTradeoff = 123,
            EnforceProvidedLabels = false,
            PrecisionRecallTradeoff = 123
        }
    },

    // the properties below are optional
    Description = "description",
    GlueVersion = "glueVersion",
    MaxCapacity = 123,
    MaxRetries = 123,
    Name = "name",
    NumberOfWorkers = 123,
    Tags = tags,
    Timeout = 123,
    TransformEncryption = new TransformEncryptionProperty {
        MlUserDataEncryption = new MLUserDataEncryptionProperty {
            MlUserDataEncryptionMode = "mlUserDataEncryptionMode",

            // the properties below are optional
            KmsKeyId = "kmsKeyId"
        },
        TaskRunSecurityConfigurationName = "taskRunSecurityConfigurationName"
    },
    WorkerType = "workerType"
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var tags interface{}

cfnMLTransformProps := &CfnMLTransformProps{
	InputRecordTables: &InputRecordTablesProperty{
		GlueTables: []interface{}{
			&GlueTablesProperty{
				DatabaseName: jsii.String("databaseName"),
				TableName: jsii.String("tableName"),

				// the properties below are optional
				CatalogId: jsii.String("catalogId"),
				ConnectionName: jsii.String("connectionName"),
			},
		},
	},
	Role: jsii.String("role"),
	TransformParameters: &TransformParametersProperty{
		TransformType: jsii.String("transformType"),

		// the properties below are optional
		FindMatchesParameters: &FindMatchesParametersProperty{
			PrimaryKeyColumnName: jsii.String("primaryKeyColumnName"),

			// the properties below are optional
			AccuracyCostTradeoff: jsii.Number(123),
			EnforceProvidedLabels: jsii.Boolean(false),
			PrecisionRecallTradeoff: jsii.Number(123),
		},
	},

	// the properties below are optional
	Description: jsii.String("description"),
	GlueVersion: jsii.String("glueVersion"),
	MaxCapacity: jsii.Number(123),
	MaxRetries: jsii.Number(123),
	Name: jsii.String("name"),
	NumberOfWorkers: jsii.Number(123),
	Tags: tags,
	Timeout: jsii.Number(123),
	TransformEncryption: &TransformEncryptionProperty{
		MlUserDataEncryption: &MLUserDataEncryptionProperty{
			MlUserDataEncryptionMode: jsii.String("mlUserDataEncryptionMode"),

			// the properties below are optional
			KmsKeyId: jsii.String("kmsKeyId"),
		},
		TaskRunSecurityConfigurationName: jsii.String("taskRunSecurityConfigurationName"),
	},
	WorkerType: jsii.String("workerType"),
}
```

## Properties

- `description`: string — A user-defined, long-form description text for the machine learning transform.

- `glueVersion`: string — 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](https://docs.aws.amazon.com/glue/latest/dg/release-notes.html#release-notes-versions) in the developer guide.

- `inputRecordTables`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnMLTransform.InputRecordTablesProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_glue.CfnMLTransform.InputRecordTablesProperty.html) (required) — A list of AWS Glue table definitions used by the transform.

- `maxCapacity`: number — 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](https://docs.aws.amazon.com/glue/pricing/) .

  `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.

- `maxRetries`: number — The maximum number of times to retry after an `MLTaskRun` of the machine learning transform fails.

- `name`: string — 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.

- `numberOfWorkers`: number — 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).

- `role`: string (required) — 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](https://docs.aws.amazon.com/glue/latest/dg/attach-policy-iam-user.html) .
  - 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.

- `tags`: 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](https://docs.aws.amazon.com/glue/latest/dg/monitor-tags.html) in the developer guide.

- `timeout`: number — The timeout in minutes of the machine learning transform.

- `transformEncryption`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnMLTransform.TransformEncryptionProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_glue.CfnMLTransform.TransformEncryptionProperty.html) — 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.

- `transformParameters`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnMLTransform.TransformParametersProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_glue.CfnMLTransform.TransformParametersProperty.html) (required) — The algorithm-specific parameters that are associated with the machine learning transform.

- `workerType`: string — 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.
