# TrainedModelsConfigurationPolicyProperty

- Source: Generated at build time
- Type last changed: v2.245.0 · 27 Mar 2026

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cleanroomsml as cleanroomsml } from 'aws-cdk-lib';
const trainedModelsConfigurationPolicyProperty: cleanroomsml.CfnConfiguredModelAlgorithmAssociation.TrainedModelsConfigurationPolicyProperty = {
  containerLogs: [{
    allowedAccountIds: ['allowedAccountIds'],

    // the properties below are optional
    filterPattern: 'filterPattern',
    logRedactionConfiguration: {
      entitiesToRedact: ['entitiesToRedact'],

      // the properties below are optional
      customEntityConfig: {
        customDataIdentifiers: ['customDataIdentifiers'],
      },
    },
    logType: 'logType',
  }],
  containerMetrics: {
    noiseLevel: 'noiseLevel',
  },
  maxArtifactSize: {
    unit: 'unit',
    value: 123,
  },
};
```

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_cleanroomsml as cleanroomsml

trained_models_configuration_policy_property = cleanroomsml.CfnConfiguredModelAlgorithmAssociation.TrainedModelsConfigurationPolicyProperty(
    container_logs=[cleanroomsml.CfnConfiguredModelAlgorithmAssociation.LogsConfigurationPolicyProperty(
        allowed_account_ids=["allowedAccountIds"],

        # the properties below are optional
        filter_pattern="filterPattern",
        log_redaction_configuration=cleanroomsml.CfnConfiguredModelAlgorithmAssociation.LogRedactionConfigurationProperty(
            entities_to_redact=["entitiesToRedact"],

            # the properties below are optional
            custom_entity_config=cleanroomsml.CfnConfiguredModelAlgorithmAssociation.CustomEntityConfigProperty(
                custom_data_identifiers=["customDataIdentifiers"]
            )
        ),
        log_type="logType"
    )],
    container_metrics=cleanroomsml.CfnConfiguredModelAlgorithmAssociation.MetricsConfigurationPolicyProperty(
        noise_level="noiseLevel"
    ),
    max_artifact_size=cleanroomsml.CfnConfiguredModelAlgorithmAssociation.TrainedModelArtifactMaxSizeProperty(
        unit="unit",
        value=123
    )
)
```

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.cleanroomsml.*;

TrainedModelsConfigurationPolicyProperty trainedModelsConfigurationPolicyProperty = TrainedModelsConfigurationPolicyProperty.builder()
        .containerLogs(List.of(LogsConfigurationPolicyProperty.builder()
                .allowedAccountIds(List.of("allowedAccountIds"))

                // the properties below are optional
                .filterPattern("filterPattern")
                .logRedactionConfiguration(LogRedactionConfigurationProperty.builder()
                        .entitiesToRedact(List.of("entitiesToRedact"))

                        // the properties below are optional
                        .customEntityConfig(CustomEntityConfigProperty.builder()
                                .customDataIdentifiers(List.of("customDataIdentifiers"))
                                .build())
                        .build())
                .logType("logType")
                .build()))
        .containerMetrics(MetricsConfigurationPolicyProperty.builder()
                .noiseLevel("noiseLevel")
                .build())
        .maxArtifactSize(TrainedModelArtifactMaxSizeProperty.builder()
                .unit("unit")
                .value(123)
                .build())
        .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.CleanRoomsML;

var trainedModelsConfigurationPolicyProperty = new TrainedModelsConfigurationPolicyProperty {
    ContainerLogs = new [] { new LogsConfigurationPolicyProperty {
        AllowedAccountIds = new [] { "allowedAccountIds" },

        // the properties below are optional
        FilterPattern = "filterPattern",
        LogRedactionConfiguration = new LogRedactionConfigurationProperty {
            EntitiesToRedact = new [] { "entitiesToRedact" },

            // the properties below are optional
            CustomEntityConfig = new CustomEntityConfigProperty {
                CustomDataIdentifiers = new [] { "customDataIdentifiers" }
            }
        },
        LogType = "logType"
    } },
    ContainerMetrics = new MetricsConfigurationPolicyProperty {
        NoiseLevel = "noiseLevel"
    },
    MaxArtifactSize = new TrainedModelArtifactMaxSizeProperty {
        Unit = "unit",
        Value = 123
    }
};
```

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"

trainedModelsConfigurationPolicyProperty := &TrainedModelsConfigurationPolicyProperty{
	ContainerLogs: []interface{}{
		&LogsConfigurationPolicyProperty{
			AllowedAccountIds: []*string{
				jsii.String("allowedAccountIds"),
			},

			// the properties below are optional
			FilterPattern: jsii.String("filterPattern"),
			LogRedactionConfiguration: &LogRedactionConfigurationProperty{
				EntitiesToRedact: []*string{
					jsii.String("entitiesToRedact"),
				},

				// the properties below are optional
				CustomEntityConfig: &CustomEntityConfigProperty{
					CustomDataIdentifiers: []*string{
						jsii.String("customDataIdentifiers"),
					},
				},
			},
			LogType: jsii.String("logType"),
		},
	},
	ContainerMetrics: &MetricsConfigurationPolicyProperty{
		NoiseLevel: jsii.String("noiseLevel"),
	},
	MaxArtifactSize: &TrainedModelArtifactMaxSizeProperty{
		Unit: jsii.String("unit"),
		Value: jsii.Number(123),
	},
}
```

## Properties

- `containerLogs`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnConfiguredModelAlgorithmAssociation.LogsConfigurationPolicyProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_cleanroomsml.CfnConfiguredModelAlgorithmAssociation.LogsConfigurationPolicyProperty.html)[]

- `containerMetrics`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnConfiguredModelAlgorithmAssociation.MetricsConfigurationPolicyProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_cleanroomsml.CfnConfiguredModelAlgorithmAssociation.MetricsConfigurationPolicyProperty.html)

- `maxArtifactSize`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnConfiguredModelAlgorithmAssociation.TrainedModelArtifactMaxSizeProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_cleanroomsml.CfnConfiguredModelAlgorithmAssociation.TrainedModelArtifactMaxSizeProperty.html)
