Skip to content
v2.278.0

CfnTaskProps Struct ​

Properties for defining a CfnTask.

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 cfnTaskProps: iotsitewise.CfnTaskProps = {
  taskConfiguration: {
    containerTaskConfiguration: {
      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,
    },
  },
  taskName: 'taskName',
  workspaceName: 'workspaceName',

  // the properties below are optional
  description: 'description',
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
python
from aws_cdk import CfnTag
# 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

cfn_task_props = iotsitewise.CfnTaskProps(
    task_configuration=iotsitewise.CfnTask.TaskConfigurationProperty(
        container_task_configuration=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
        )
    ),
    task_name="taskName",
    workspace_name="workspaceName",

    # the properties below are optional
    description="description",
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
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.*;

CfnTaskProps cfnTaskProps = CfnTaskProps.builder()
        .taskConfiguration(TaskConfigurationProperty.builder()
                .containerTaskConfiguration(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())
                .build())
        .taskName("taskName")
        .workspaceName("workspaceName")

        // the properties below are optional
        .description("description")
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .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 cfnTaskProps = new CfnTaskProps {
    TaskConfiguration = new TaskConfigurationProperty {
        ContainerTaskConfiguration = 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
        }
    },
    TaskName = "taskName",
    WorkspaceName = "workspaceName",

    // the properties below are optional
    Description = "description",
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
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"

cfnTaskProps := &CfnTaskProps{
	TaskConfiguration: &TaskConfigurationProperty{
		ContainerTaskConfiguration: &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),
		},
	},
	TaskName: jsii.String("taskName"),
	WorkspaceName: jsii.String("workspaceName"),

	// the properties below are optional
	Description: jsii.String("description"),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}

Properties ​

descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string #
A description of the task.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #
An array of key-value pairs to apply to this resource.
taskConfigurationIResolvable | CfnTask.TaskConfigurationPropertytask_configurationtyping.Union[IResolvable, TaskConfigurationProperty]taskConfigurationIResolvableTaskConfigurationIResolvableTaskConfigurationinterface{} required #
The task execution configuration.
taskNamestringtask_namestrtaskNameStringTaskNamestringTaskName*string required #
The name of the task.

Must be unique within the workspace.

workspaceNamestringworkspace_namestrworkspaceNameStringWorkspaceNamestringWorkspaceName*string required #
The name of the workspace.