ContainerTaskConfigurationProperty Struct
Configuration for running a custom container image on managed compute.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_iotsitewise as iotsitewise } from 'aws-cdk-lib';
const containerTaskConfigurationProperty: iotsitewise.CfnTask.ContainerTaskConfigurationProperty = {
ecrUri: 'ecrUri',
processingType: 'processingType',
processingUnit: 'processingUnit',
taskExecutionRole: 'taskExecutionRole',
// the properties below are optional
command: ['command'],
environmentVariables: {
environmentVariablesKey: 'environmentVariables',
},
ephemeralStorageConfiguration: {
storageClass: 'storageClass',
storageSizeInGiB: 123,
},
mounts: [{
name: 'name',
relativePath: 'relativePath',
source: {
s3AccessPoint: {
accessPointArn: 'accessPointArn',
// the properties below are optional
prefix: 'prefix',
},
},
storageType: 'storageType',
}],
timeoutSeconds: 123,
};
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_iotsitewise as iotsitewise
container_task_configuration_property = iotsitewise.CfnTask.ContainerTaskConfigurationProperty(
ecr_uri="ecrUri",
processing_type="processingType",
processing_unit="processingUnit",
task_execution_role="taskExecutionRole",
# the properties below are optional
command=["command"],
environment_variables={
"environment_variables_key": "environmentVariables"
},
ephemeral_storage_configuration=iotsitewise.CfnTask.EphemeralStorageConfigurationProperty(
storage_class="storageClass",
storage_size_in_gi_b=123
),
mounts=[iotsitewise.CfnTask.MountProperty(
name="name",
relative_path="relativePath",
source=iotsitewise.CfnTask.MountSourceProperty(
s3_access_point=iotsitewise.CfnTask.S3AccessPointSourceProperty(
access_point_arn="accessPointArn",
# the properties below are optional
prefix="prefix"
)
),
storage_type="storageType"
)],
timeout_seconds=123
)
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.iotsitewise.*;
ContainerTaskConfigurationProperty containerTaskConfigurationProperty = ContainerTaskConfigurationProperty.builder()
.ecrUri("ecrUri")
.processingType("processingType")
.processingUnit("processingUnit")
.taskExecutionRole("taskExecutionRole")
// the properties below are optional
.command(List.of("command"))
.environmentVariables(Map.of(
"environmentVariablesKey", "environmentVariables"))
.ephemeralStorageConfiguration(EphemeralStorageConfigurationProperty.builder()
.storageClass("storageClass")
.storageSizeInGiB(123)
.build())
.mounts(List.of(MountProperty.builder()
.name("name")
.relativePath("relativePath")
.source(MountSourceProperty.builder()
.s3AccessPoint(S3AccessPointSourceProperty.builder()
.accessPointArn("accessPointArn")
// the properties below are optional
.prefix("prefix")
.build())
.build())
.storageType("storageType")
.build()))
.timeoutSeconds(123)
.build();
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.IoTSiteWise;
var containerTaskConfigurationProperty = new ContainerTaskConfigurationProperty {
EcrUri = "ecrUri",
ProcessingType = "processingType",
ProcessingUnit = "processingUnit",
TaskExecutionRole = "taskExecutionRole",
// the properties below are optional
Command = new [] { "command" },
EnvironmentVariables = new Dictionary<string, string> {
{ "environmentVariablesKey", "environmentVariables" }
},
EphemeralStorageConfiguration = new EphemeralStorageConfigurationProperty {
StorageClass = "storageClass",
StorageSizeInGiB = 123
},
Mounts = new [] { new MountProperty {
Name = "name",
RelativePath = "relativePath",
Source = new MountSourceProperty {
S3AccessPoint = new S3AccessPointSourceProperty {
AccessPointArn = "accessPointArn",
// the properties below are optional
Prefix = "prefix"
}
},
StorageType = "storageType"
} },
TimeoutSeconds = 123
};
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"
containerTaskConfigurationProperty := &ContainerTaskConfigurationProperty{
EcrUri: jsii.String("ecrUri"),
ProcessingType: jsii.String("processingType"),
ProcessingUnit: jsii.String("processingUnit"),
TaskExecutionRole: jsii.String("taskExecutionRole"),
// the properties below are optional
Command: []*string{
jsii.String("command"),
},
EnvironmentVariables: map[string]*string{
"environmentVariablesKey": jsii.String("environmentVariables"),
},
EphemeralStorageConfiguration: &EphemeralStorageConfigurationProperty{
StorageClass: jsii.String("storageClass"),
StorageSizeInGiB: jsii.Number(123),
},
Mounts: []interface{}{
&MountProperty{
Name: jsii.String("name"),
RelativePath: jsii.String("relativePath"),
Source: &MountSourceProperty{
S3AccessPoint: &S3AccessPointSourceProperty{
AccessPointArn: jsii.String("accessPointArn"),
// the properties below are optional
Prefix: jsii.String("prefix"),
},
},
StorageType: jsii.String("storageType"),
},
},
TimeoutSeconds: jsii.Number(123),
}
Properties
commandoptionalstring[]commandoptionaltyping.List[str]commandoptionalList<String>Commandoptionalstring[]Commandoptional*[]*string #The command to execute in the container.
The Amazon ECR image URI for the task container.
environmentVariablesoptionalIResolvable | { [key: string]: string }environment_variablesoptionaltyping.Union[IResolvable, typing.Mapping[str, str]]environmentVariablesoptionalIResolvableEnvironmentVariablesoptionalIResolvableEnvironmentVariablesoptionalinterface{} #A map of environment variable key-value pairs.
ephemeralStorageConfigurationoptionalIResolvable | CfnTask.ephemeral_storage_configurationoptionaltyping.Union[IResolvable, EphemeralStorageConfigurationProperty]ephemeralStorageConfigurationoptionalIResolvableEphemeralStorageConfigurationoptionalIResolvableEphemeralStorageConfigurationoptionalinterface{} #Configuration for ephemeral storage attached to the container task.
mountsoptionalIResolvable | IResolvable | CfnTask.MountProperty[]mountsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, MountProperty]]]mountsoptionalIResolvableMountsoptionalIResolvableMountsoptionalinterface{} #Mounts attached to the container filesystem.
Each mount exposes an external data source as a local directory inside the container.
processingTypestringprocessing_typestrprocessingTypeStringProcessingTypestringProcessingType*string required #The processing type for compute resources.
processingUnitstringprocessing_unitstrprocessingUnitStringProcessingUnitstringProcessingUnit*string required #The processing unit allocation that determines vCPU, memory, and GPU resources.
taskExecutionRolestringtask_execution_rolestrtaskExecutionRoleStringTaskExecutionRolestringTaskExecutionRole*string required #The ARN of the IAM role that grants the containerized workload permissions to access AWS resources.
timeoutSecondsoptionalnumbertimeout_secondsoptionalint | floattimeoutSecondsoptionalNumberTimeoutSecondsoptionaldoubleTimeoutSecondsoptional*float64 #The timeout in seconds for task execution.
Default: 3600 (1 hour).