CfnTaskPropsMixin

class aws_cdk.cfn_property_mixins.aws_iotsitewise.CfnTaskPropsMixin(props, *, strategy=None)

Bases: Mixin

Resource schema for AWS::IoTSiteWise::Task.

A task defines a reusable containerized compute workload that can be referenced by one or more pipeline compute nodes.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-task.html

CloudformationResource:

AWS::IoTSiteWise::Task

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_iotsitewise as iotsitewise
import aws_cdk as cdk

# merge_strategy: cdk.IMergeStrategy

cfn_task_props_mixin = iotsitewise.CfnTaskPropsMixin(iotsitewise.CfnTaskMixinProps(
    description="description",
    tags=[cdk.CfnTag(
        key="key",
        value="value"
    )],
    task_configuration=iotsitewise.CfnTaskPropsMixin.TaskConfigurationProperty(
        container_task_configuration=iotsitewise.CfnTaskPropsMixin.ContainerTaskConfigurationProperty(
            command=["command"],
            ecr_uri="ecrUri",
            environment_variables={
                "environment_variables_key": "environmentVariables"
            },
            ephemeral_storage_configuration=iotsitewise.CfnTaskPropsMixin.EphemeralStorageConfigurationProperty(
                storage_class="storageClass",
                storage_size_in_gi_b=123
            ),
            mounts=[iotsitewise.CfnTaskPropsMixin.MountProperty(
                name="name",
                relative_path="relativePath",
                source=iotsitewise.CfnTaskPropsMixin.MountSourceProperty(
                    s3_access_point=iotsitewise.CfnTaskPropsMixin.S3AccessPointSourceProperty(
                        access_point_arn="accessPointArn",
                        prefix="prefix"
                    )
                ),
                storage_type="storageType"
            )],
            processing_type="processingType",
            processing_unit="processingUnit",
            task_execution_role="taskExecutionRole",
            timeout_seconds=123
        )
    ),
    task_name="taskName",
    workspace_name="workspaceName"
),
    strategy=merge_strategy
)

Create a mixin to apply properties to AWS::IoTSiteWise::Task.

Parameters:
  • props (Union[CfnTaskMixinProps, Dict[str, Any]]) – L1 properties to apply.

  • strategy (Optional[IMergeStrategy]) – Strategy for merging nested properties. Default: - PropertyMergeStrategy.combine()

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

None

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['description', 'tags', 'taskConfiguration', 'taskName', 'workspaceName']

Static Methods

classmethod is_mixin(x)

Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

ContainerTaskConfigurationProperty

class CfnTaskPropsMixin.ContainerTaskConfigurationProperty(*, command=None, ecr_uri=None, environment_variables=None, ephemeral_storage_configuration=None, mounts=None, processing_type=None, processing_unit=None, task_execution_role=None, timeout_seconds=None)

Bases: object

Configuration for running a custom container image on managed compute.

Parameters:
  • command (Optional[Sequence[str]]) – The command to execute in the container.

  • ecr_uri (Optional[str]) – The Amazon ECR image URI for the task container.

  • environment_variables (Union[IResolvable, Mapping[str, str], None]) – A map of environment variable key-value pairs.

  • ephemeral_storage_configuration (Union[IResolvable, EphemeralStorageConfigurationProperty, Dict[str, Any], None]) – Configuration for ephemeral storage attached to the container task.

  • mounts (Union[IResolvable, Sequence[Union[IResolvable, MountProperty, Dict[str, Any]]], None]) – Mounts attached to the container filesystem. Each mount exposes an external data source as a local directory inside the container.

  • processing_type (Optional[str]) – The processing type for compute resources.

  • processing_unit (Optional[str]) – The processing unit allocation that determines vCPU, memory, and GPU resources.

  • task_execution_role (Optional[str]) – The ARN of the IAM role that grants the containerized workload permissions to access AWS resources.

  • timeout_seconds (Union[int, float, None]) – The timeout in seconds for task execution. Default: 3600 (1 hour).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-task-containertaskconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_iotsitewise as iotsitewise

container_task_configuration_property = iotsitewise.CfnTaskPropsMixin.ContainerTaskConfigurationProperty(
    command=["command"],
    ecr_uri="ecrUri",
    environment_variables={
        "environment_variables_key": "environmentVariables"
    },
    ephemeral_storage_configuration=iotsitewise.CfnTaskPropsMixin.EphemeralStorageConfigurationProperty(
        storage_class="storageClass",
        storage_size_in_gi_b=123
    ),
    mounts=[iotsitewise.CfnTaskPropsMixin.MountProperty(
        name="name",
        relative_path="relativePath",
        source=iotsitewise.CfnTaskPropsMixin.MountSourceProperty(
            s3_access_point=iotsitewise.CfnTaskPropsMixin.S3AccessPointSourceProperty(
                access_point_arn="accessPointArn",
                prefix="prefix"
            )
        ),
        storage_type="storageType"
    )],
    processing_type="processingType",
    processing_unit="processingUnit",
    task_execution_role="taskExecutionRole",
    timeout_seconds=123
)

Attributes

command

The command to execute in the container.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-task-containertaskconfiguration.html#cfn-iotsitewise-task-containertaskconfiguration-command

ecr_uri

The Amazon ECR image URI for the task container.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-task-containertaskconfiguration.html#cfn-iotsitewise-task-containertaskconfiguration-ecruri

environment_variables

A map of environment variable key-value pairs.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-task-containertaskconfiguration.html#cfn-iotsitewise-task-containertaskconfiguration-environmentvariables

ephemeral_storage_configuration

Configuration for ephemeral storage attached to the container task.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-task-containertaskconfiguration.html#cfn-iotsitewise-task-containertaskconfiguration-ephemeralstorageconfiguration

mounts

Mounts attached to the container filesystem.

Each mount exposes an external data source as a local directory inside the container.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-task-containertaskconfiguration.html#cfn-iotsitewise-task-containertaskconfiguration-mounts

processing_type

The processing type for compute resources.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-task-containertaskconfiguration.html#cfn-iotsitewise-task-containertaskconfiguration-processingtype

processing_unit

The processing unit allocation that determines vCPU, memory, and GPU resources.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-task-containertaskconfiguration.html#cfn-iotsitewise-task-containertaskconfiguration-processingunit

task_execution_role

The ARN of the IAM role that grants the containerized workload permissions to access AWS resources.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-task-containertaskconfiguration.html#cfn-iotsitewise-task-containertaskconfiguration-taskexecutionrole

timeout_seconds

The timeout in seconds for task execution.

Default: 3600 (1 hour).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-task-containertaskconfiguration.html#cfn-iotsitewise-task-containertaskconfiguration-timeoutseconds

EphemeralStorageConfigurationProperty

class CfnTaskPropsMixin.EphemeralStorageConfigurationProperty(*, storage_class=None, storage_size_in_gib=None)

Bases: object

Configuration for ephemeral storage attached to the container task.

Parameters:
  • storage_class (Optional[str]) – The storage type that determines I/O performance characteristics. Family name indicates workload pattern, level number indicates performance within that family.

  • storage_size_in_gib (Union[int, float, None]) – Storage volume size in GiB.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-task-ephemeralstorageconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_iotsitewise as iotsitewise

ephemeral_storage_configuration_property = iotsitewise.CfnTaskPropsMixin.EphemeralStorageConfigurationProperty(
    storage_class="storageClass",
    storage_size_in_gi_b=123
)

Attributes

storage_class

The storage type that determines I/O performance characteristics.

Family name indicates workload pattern, level number indicates performance within that family.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-task-ephemeralstorageconfiguration.html#cfn-iotsitewise-task-ephemeralstorageconfiguration-storageclass

storage_size_in_gib

Storage volume size in GiB.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-task-ephemeralstorageconfiguration.html#cfn-iotsitewise-task-ephemeralstorageconfiguration-storagesizeingib

MountProperty

class CfnTaskPropsMixin.MountProperty(*, name=None, relative_path=None, source=None, storage_type=None)

Bases: object

Attaches a data source to the container filesystem for a task at a customer-supplied relative path under the service-owned mount root.

Parameters:
  • name (Optional[str]) – A unique name for the mount within the task.

  • relative_path (Optional[str]) – The relative path under the service-owned mount root where this mount is attached inside the container.

  • source (Union[IResolvable, MountSourceProperty, Dict[str, Any], None]) – The data source configuration for a mount.

  • storage_type (Optional[str]) – The type of storage used for the mount inside the container.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-task-mount.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_iotsitewise as iotsitewise

mount_property = iotsitewise.CfnTaskPropsMixin.MountProperty(
    name="name",
    relative_path="relativePath",
    source=iotsitewise.CfnTaskPropsMixin.MountSourceProperty(
        s3_access_point=iotsitewise.CfnTaskPropsMixin.S3AccessPointSourceProperty(
            access_point_arn="accessPointArn",
            prefix="prefix"
        )
    ),
    storage_type="storageType"
)

Attributes

name

A unique name for the mount within the task.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-task-mount.html#cfn-iotsitewise-task-mount-name

relative_path

The relative path under the service-owned mount root where this mount is attached inside the container.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-task-mount.html#cfn-iotsitewise-task-mount-relativepath

source

The data source configuration for a mount.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-task-mount.html#cfn-iotsitewise-task-mount-source

storage_type

The type of storage used for the mount inside the container.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-task-mount.html#cfn-iotsitewise-task-mount-storagetype

MountSourceProperty

class CfnTaskPropsMixin.MountSourceProperty(*, s3_access_point=None)

Bases: object

The data source configuration for a mount.

Parameters:

s3_access_point (Union[IResolvable, S3AccessPointSourceProperty, Dict[str, Any], None]) – Configures a mount that reads from an Amazon S3 access point.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-task-mountsource.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_iotsitewise as iotsitewise

mount_source_property = iotsitewise.CfnTaskPropsMixin.MountSourceProperty(
    s3_access_point=iotsitewise.CfnTaskPropsMixin.S3AccessPointSourceProperty(
        access_point_arn="accessPointArn",
        prefix="prefix"
    )
)

Attributes

s3_access_point

Configures a mount that reads from an Amazon S3 access point.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-task-mountsource.html#cfn-iotsitewise-task-mountsource-s3accesspoint

S3AccessPointSourceProperty

class CfnTaskPropsMixin.S3AccessPointSourceProperty(*, access_point_arn=None, prefix=None)

Bases: object

Configures a mount that reads from an Amazon S3 access point.

Parameters:
  • access_point_arn (Optional[str]) – The Amazon Resource Name (ARN) of the Amazon S3 access point. The mount reads objects from the bucket associated with this access point. Access is governed by the access point policy and the task execution role’s IAM permissions.

  • prefix (Optional[str]) – An object key name prefix. If specified, the mount includes only objects whose keys begin with this prefix. To include all objects at the access point, omit this field.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-task-s3accesspointsource.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_iotsitewise as iotsitewise

s3_access_point_source_property = iotsitewise.CfnTaskPropsMixin.S3AccessPointSourceProperty(
    access_point_arn="accessPointArn",
    prefix="prefix"
)

Attributes

access_point_arn

The Amazon Resource Name (ARN) of the Amazon S3 access point.

The mount reads objects from the bucket associated with this access point. Access is governed by the access point policy and the task execution role’s IAM permissions.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-task-s3accesspointsource.html#cfn-iotsitewise-task-s3accesspointsource-accesspointarn

prefix

An object key name prefix.

If specified, the mount includes only objects whose keys begin with this prefix. To include all objects at the access point, omit this field.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-task-s3accesspointsource.html#cfn-iotsitewise-task-s3accesspointsource-prefix

TaskConfigurationProperty

class CfnTaskPropsMixin.TaskConfigurationProperty(*, container_task_configuration=None)

Bases: object

The task execution configuration.

Parameters:

container_task_configuration (Union[IResolvable, ContainerTaskConfigurationProperty, Dict[str, Any], None]) – Configuration for running a custom container image on managed compute.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-task-taskconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_iotsitewise as iotsitewise

task_configuration_property = iotsitewise.CfnTaskPropsMixin.TaskConfigurationProperty(
    container_task_configuration=iotsitewise.CfnTaskPropsMixin.ContainerTaskConfigurationProperty(
        command=["command"],
        ecr_uri="ecrUri",
        environment_variables={
            "environment_variables_key": "environmentVariables"
        },
        ephemeral_storage_configuration=iotsitewise.CfnTaskPropsMixin.EphemeralStorageConfigurationProperty(
            storage_class="storageClass",
            storage_size_in_gi_b=123
        ),
        mounts=[iotsitewise.CfnTaskPropsMixin.MountProperty(
            name="name",
            relative_path="relativePath",
            source=iotsitewise.CfnTaskPropsMixin.MountSourceProperty(
                s3_access_point=iotsitewise.CfnTaskPropsMixin.S3AccessPointSourceProperty(
                    access_point_arn="accessPointArn",
                    prefix="prefix"
                )
            ),
            storage_type="storageType"
        )],
        processing_type="processingType",
        processing_unit="processingUnit",
        task_execution_role="taskExecutionRole",
        timeout_seconds=123
    )
)

Attributes

container_task_configuration

Configuration for running a custom container image on managed compute.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-task-taskconfiguration.html#cfn-iotsitewise-task-taskconfiguration-containertaskconfiguration