CfnTask

class aws_cdk.aws_datasync.CfnTask(scope, id, *, destination_location_arn, source_location_arn, cloud_watch_log_group_arn=None, excludes=None, includes=None, manifest_config=None, name=None, options=None, schedule=None, tags=None, task_report_config=None)

Bases: CfnResource

The AWS::DataSync::Task resource specifies a task.

A task is a set of two locations (source and destination) and a set of Options that you use to control the behavior of a task. If you don’t specify Options when you create a task, AWS DataSync populates them with service defaults.

See:

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

CloudformationResource:

AWS::DataSync::Task

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 import aws_datasync as datasync

cfn_task = datasync.CfnTask(self, "MyCfnTask",
    destination_location_arn="destinationLocationArn",
    source_location_arn="sourceLocationArn",

    # the properties below are optional
    cloud_watch_log_group_arn="cloudWatchLogGroupArn",
    excludes=[datasync.CfnTask.FilterRuleProperty(
        filter_type="filterType",
        value="value"
    )],
    includes=[datasync.CfnTask.FilterRuleProperty(
        filter_type="filterType",
        value="value"
    )],
    manifest_config=datasync.CfnTask.ManifestConfigProperty(
        source=datasync.CfnTask.SourceProperty(
            s3=datasync.CfnTask.ManifestConfigSourceS3Property(
                bucket_access_role_arn="bucketAccessRoleArn",
                manifest_object_path="manifestObjectPath",
                manifest_object_version_id="manifestObjectVersionId",
                s3_bucket_arn="s3BucketArn"
            )
        ),

        # the properties below are optional
        action="action",
        format="format"
    ),
    name="name",
    options=datasync.CfnTask.OptionsProperty(
        atime="atime",
        bytes_per_second=123,
        gid="gid",
        log_level="logLevel",
        mtime="mtime",
        object_tags="objectTags",
        overwrite_mode="overwriteMode",
        posix_permissions="posixPermissions",
        preserve_deleted_files="preserveDeletedFiles",
        preserve_devices="preserveDevices",
        security_descriptor_copy_flags="securityDescriptorCopyFlags",
        task_queueing="taskQueueing",
        transfer_mode="transferMode",
        uid="uid",
        verify_mode="verifyMode"
    ),
    schedule=datasync.CfnTask.TaskScheduleProperty(
        schedule_expression="scheduleExpression",
        status="status"
    ),
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    task_report_config=datasync.CfnTask.TaskReportConfigProperty(
        destination=datasync.CfnTask.DestinationProperty(
            s3=datasync.CfnTask.S3Property(
                bucket_access_role_arn="bucketAccessRoleArn",
                s3_bucket_arn="s3BucketArn",
                subdirectory="subdirectory"
            )
        ),
        output_type="outputType",

        # the properties below are optional
        object_version_ids="objectVersionIds",
        overrides=datasync.CfnTask.OverridesProperty(
            deleted=datasync.CfnTask.DeletedProperty(
                report_level="reportLevel"
            ),
            skipped=datasync.CfnTask.SkippedProperty(
                report_level="reportLevel"
            ),
            transferred=datasync.CfnTask.TransferredProperty(
                report_level="reportLevel"
            ),
            verified=datasync.CfnTask.VerifiedProperty(
                report_level="reportLevel"
            )
        ),
        report_level="reportLevel"
    )
)
Parameters:
  • scope (Construct) – Scope in which this resource is defined.

  • id (str) – Construct identifier for this resource (unique in its scope).

  • destination_location_arn (str) – The Amazon Resource Name (ARN) of an AWS storage resource’s location.

  • source_location_arn (str) – Specifies the ARN of your transfer’s source location.

  • cloud_watch_log_group_arn (Optional[str]) – Specifies the Amazon Resource Name (ARN) of an Amazon CloudWatch log group for monitoring your task. For more information, see Monitoring DataSync with Amazon CloudWatch .

  • excludes (Union[IResolvable, Sequence[Union[IResolvable, FilterRuleProperty, Dict[str, Any]]], None]) – Specifies exclude filters that define the files, objects, and folders in your source location that you don’t want DataSync to transfer. For more information and examples, see Specifying what DataSync transfers by using filters .

  • includes (Union[IResolvable, Sequence[Union[IResolvable, FilterRuleProperty, Dict[str, Any]]], None]) –

    Specifies include filters define the files, objects, and folders in your source location that you want DataSync to transfer. For more information and examples, see Specifying what DataSync transfers by using filters .

  • manifest_config (Union[IResolvable, ManifestConfigProperty, Dict[str, Any], None]) – The configuration of the manifest that lists the files or objects that you want DataSync to transfer. For more information, see Specifying what DataSync transfers by using a manifest .

  • name (Optional[str]) – Specifies the name of your task.

  • options (Union[IResolvable, OptionsProperty, Dict[str, Any], None]) – Specifies your task’s settings, such as preserving file metadata, verifying data integrity, among other options.

  • schedule (Union[IResolvable, TaskScheduleProperty, Dict[str, Any], None]) – Specifies a schedule for when you want your task to run. For more information, see Scheduling your task .

  • tags (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – Specifies the tags that you want to apply to your task. Tags are key-value pairs that help you manage, filter, and search for your DataSync resources.

  • task_report_config (Union[IResolvable, TaskReportConfigProperty, Dict[str, Any], None]) – Specifies how you want to configure a task report, which provides detailed information about your DataSync transfer. For more information, see Monitoring your DataSync transfers with task reports . When using this parameter, your caller identity (the role that you’re using DataSync with) must have the iam:PassRole permission. The AWSDataSyncFullAccess policy includes this permission.

Methods

add_deletion_override(path)

Syntactic sugar for addOverride(path, undefined).

Parameters:

path (str) – The path of the value to delete.

Return type:

None

add_dependency(target)

Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

Parameters:

target (CfnResource) –

Return type:

None

add_depends_on(target)

(deprecated) Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

Parameters:

target (CfnResource) –

Deprecated:

use addDependency

Stability:

deprecated

Return type:

None

add_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters:
  • key (str) –

  • value (Any) –

See:

Return type:

None

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

add_override(path, value)

Adds an override to the synthesized CloudFormation resource.

To add a property override, either use addPropertyOverride or prefix path with “Properties.” (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example:

cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"])
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")

would add the overrides Example:

"Properties": {
  "GlobalSecondaryIndexes": [
    {
      "Projection": {
        "NonKeyAttributes": [ "myattribute" ]
        ...
      }
      ...
    },
    {
      "ProjectionType": "INCLUDE"
      ...
    },
  ]
  ...
}

The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.

Parameters:
  • path (str) –

    • The path of the property, you can use dot notation to override values in complex types. Any intermediate keys will be created as needed.

  • value (Any) –

    • The value. Could be primitive or complex.

Return type:

None

add_property_deletion_override(property_path)

Adds an override that deletes the value of a property from the resource definition.

Parameters:

property_path (str) – The path to the property.

Return type:

None

add_property_override(property_path, value)

Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

Parameters:
  • property_path (str) – The path of the property.

  • value (Any) – The value.

Return type:

None

apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)

Sets the deletion policy of the resource based on the removal policy specified.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT). A list of resources that support this policy can be found in the following link:

Parameters:
  • policy (Optional[RemovalPolicy]) –

  • apply_to_update_replace_policy (Optional[bool]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: true

  • default (Optional[RemovalPolicy]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resource, please consult that specific resource’s documentation.

See:

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options

Return type:

None

get_att(attribute_name, type_hint=None)

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

Parameters:
  • attribute_name (str) – The name of the attribute.

  • type_hint (Optional[ResolutionTypeHint]) –

Return type:

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters:

key (str) –

See:

Return type:

Any

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters:

inspector (TreeInspector) – tree inspector to collect and process attributes.

Return type:

None

obtain_dependencies()

Retrieves an array of resources this resource depends on.

This assembles dependencies on resources across stacks (including nested stacks) automatically.

Return type:

List[Union[Stack, CfnResource]]

obtain_resource_dependencies()

Get a shallow copy of dependencies between this resource and other resources in the same stack.

Return type:

List[CfnResource]

override_logical_id(new_logical_id)

Overrides the auto-generated logical ID with a specific ID.

Parameters:

new_logical_id (str) – The new logical ID to use for this stack element.

Return type:

None

remove_dependency(target)

Indicates that this resource no longer depends on another resource.

This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.

Parameters:

target (CfnResource) –

Return type:

None

replace_dependency(target, new_target)

Replaces one dependency with another.

Parameters:
Return type:

None

to_string()

Returns a string representation of this construct.

Return type:

str

Returns:

a string representation of this resource

Attributes

CFN_RESOURCE_TYPE_NAME = 'AWS::DataSync::Task'
attr_destination_network_interface_arns

The ARNs of the destination elastic network interfaces (ENIs) that were created for your subnet.

CloudformationAttribute:

DestinationNetworkInterfaceArns

attr_source_network_interface_arns

The ARNs of the source ENIs that were created for your subnet.

CloudformationAttribute:

SourceNetworkInterfaceArns

attr_status

The status of the task that was described.

CloudformationAttribute:

Status

attr_task_arn

The ARN of the task.

CloudformationAttribute:

TaskArn

cfn_options

Options for this resource, such as condition, update policy etc.

cfn_resource_type

AWS resource type.

cloud_watch_log_group_arn

Specifies the Amazon Resource Name (ARN) of an Amazon CloudWatch log group for monitoring your task.

creation_stack

return:

the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.

destination_location_arn

The Amazon Resource Name (ARN) of an AWS storage resource’s location.

excludes

Specifies exclude filters that define the files, objects, and folders in your source location that you don’t want DataSync to transfer.

includes

Specifies include filters define the files, objects, and folders in your source location that you want DataSync to transfer.

logical_id

The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

Returns:

the logical ID as a stringified token. This value will only get resolved during synthesis.

manifest_config

The configuration of the manifest that lists the files or objects that you want DataSync to transfer.

name

Specifies the name of your task.

node

The tree node.

options

Specifies your task’s settings, such as preserving file metadata, verifying data integrity, among other options.

ref

Return a string that will be resolved to a CloudFormation { Ref } for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

schedule

Specifies a schedule for when you want your task to run.

source_location_arn

Specifies the ARN of your transfer’s source location.

stack

The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

tags

Tag Manager which manages the tags for this resource.

tags_raw

Specifies the tags that you want to apply to your task.

task_report_config

Specifies how you want to configure a task report, which provides detailed information about your DataSync transfer.

Static Methods

classmethod is_cfn_element(x)

Returns true if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

Parameters:

x (Any) –

Return type:

bool

Returns:

The construct as a stack element or undefined if it is not a stack element.

classmethod is_cfn_resource(x)

Check whether the given object is a CfnResource.

Parameters:

x (Any) –

Return type:

bool

classmethod is_construct(x)

Checks if x is a construct.

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

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

DeletedProperty

class CfnTask.DeletedProperty(*, report_level=None)

Bases: object

The reporting level for the deleted section of your DataSync task report.

Parameters:

report_level (Optional[str]) – Specifies whether you want your task report to include only what went wrong with your transfer or a list of what succeeded and didn’t. - ERRORS_ONLY : A report shows what DataSync was unable to delete. - SUCCESSES_AND_ERRORS : A report shows what DataSync was able and unable to delete.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-deleted.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 import aws_datasync as datasync

deleted_property = datasync.CfnTask.DeletedProperty(
    report_level="reportLevel"
)

Attributes

report_level

Specifies whether you want your task report to include only what went wrong with your transfer or a list of what succeeded and didn’t.

  • ERRORS_ONLY : A report shows what DataSync was unable to delete.

  • SUCCESSES_AND_ERRORS : A report shows what DataSync was able and unable to delete.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-deleted.html#cfn-datasync-task-deleted-reportlevel

DestinationProperty

class CfnTask.DestinationProperty(*, s3=None)

Bases: object

Specifies where DataSync uploads your task report .

Parameters:

s3 (Union[IResolvable, S3Property, Dict[str, Any], None]) – Specifies the Amazon S3 bucket where DataSync uploads your task report.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-destination.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 import aws_datasync as datasync

destination_property = datasync.CfnTask.DestinationProperty(
    s3=datasync.CfnTask.S3Property(
        bucket_access_role_arn="bucketAccessRoleArn",
        s3_bucket_arn="s3BucketArn",
        subdirectory="subdirectory"
    )
)

Attributes

s3

Specifies the Amazon S3 bucket where DataSync uploads your task report.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-destination.html#cfn-datasync-task-destination-s3

FilterRuleProperty

class CfnTask.FilterRuleProperty(*, filter_type=None, value=None)

Bases: object

Specifies which files, folders, and objects to include or exclude when transferring files from source to destination.

Parameters:
  • filter_type (Optional[str]) – The type of filter rule to apply. AWS DataSync only supports the SIMPLE_PATTERN rule type.

  • value (Optional[str]) – A single filter string that consists of the patterns to include or exclude. The patterns are delimited by “|” (that is, a pipe), for example: /folder1|/folder2

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-filterrule.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 import aws_datasync as datasync

filter_rule_property = datasync.CfnTask.FilterRuleProperty(
    filter_type="filterType",
    value="value"
)

Attributes

filter_type

The type of filter rule to apply.

AWS DataSync only supports the SIMPLE_PATTERN rule type.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-filterrule.html#cfn-datasync-task-filterrule-filtertype

value

A single filter string that consists of the patterns to include or exclude.

The patterns are delimited by “|” (that is, a pipe), for example: /folder1|/folder2

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-filterrule.html#cfn-datasync-task-filterrule-value

ManifestConfigProperty

class CfnTask.ManifestConfigProperty(*, source, action=None, format=None)

Bases: object

Configures a manifest, which is a list of files or objects that you want AWS DataSync to transfer.

For more information and configuration examples, see Specifying what DataSync transfers by using a manifest .

Parameters:
  • source (Union[IResolvable, SourceProperty, Dict[str, Any]]) – Specifies the manifest that you want DataSync to use and where it’s hosted. .. epigraph:: You must specify this parameter if you’re configuring a new manifest on or after February 7, 2024. If you don’t, you’ll get a 400 status code and ValidationException error stating that you’re missing the IAM role for DataSync to access the S3 bucket where you’re hosting your manifest. For more information, see Providing DataSync access to your manifest .

  • action (Optional[str]) – Specifies what DataSync uses the manifest for.

  • format (Optional[str]) – Specifies the file format of your manifest. For more information, see Creating a manifest .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-manifestconfig.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 import aws_datasync as datasync

manifest_config_property = datasync.CfnTask.ManifestConfigProperty(
    source=datasync.CfnTask.SourceProperty(
        s3=datasync.CfnTask.ManifestConfigSourceS3Property(
            bucket_access_role_arn="bucketAccessRoleArn",
            manifest_object_path="manifestObjectPath",
            manifest_object_version_id="manifestObjectVersionId",
            s3_bucket_arn="s3BucketArn"
        )
    ),

    # the properties below are optional
    action="action",
    format="format"
)

Attributes

action

Specifies what DataSync uses the manifest for.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-manifestconfig.html#cfn-datasync-task-manifestconfig-action

format

Specifies the file format of your manifest.

For more information, see Creating a manifest .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-manifestconfig.html#cfn-datasync-task-manifestconfig-format

source

Specifies the manifest that you want DataSync to use and where it’s hosted.

You must specify this parameter if you’re configuring a new manifest on or after February 7, 2024.

If you don’t, you’ll get a 400 status code and ValidationException error stating that you’re missing the IAM role for DataSync to access the S3 bucket where you’re hosting your manifest. For more information, see Providing DataSync access to your manifest .

See:

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

ManifestConfigSourceS3Property

class CfnTask.ManifestConfigSourceS3Property(*, bucket_access_role_arn=None, manifest_object_path=None, manifest_object_version_id=None, s3_bucket_arn=None)

Bases: object

Specifies the S3 bucket where you’re hosting the manifest that you want AWS DataSync to use.

For more information and configuration examples, see Specifying what DataSync transfers by using a manifest .

Parameters:
  • bucket_access_role_arn (Optional[str]) –

    Specifies the AWS Identity and Access Management (IAM) role that allows DataSync to access your manifest. For more information, see Providing DataSync access to your manifest .

  • manifest_object_path (Optional[str]) – Specifies the Amazon S3 object key of your manifest. This can include a prefix (for example, prefix/my-manifest.csv ).

  • manifest_object_version_id (Optional[str]) – Specifies the object version ID of the manifest that you want DataSync to use. If you don’t set this, DataSync uses the latest version of the object.

  • s3_bucket_arn (Optional[str]) – Specifies the Amazon Resource Name (ARN) of the S3 bucket where you’re hosting your manifest.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-manifestconfigsources3.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 import aws_datasync as datasync

manifest_config_source_s3_property = datasync.CfnTask.ManifestConfigSourceS3Property(
    bucket_access_role_arn="bucketAccessRoleArn",
    manifest_object_path="manifestObjectPath",
    manifest_object_version_id="manifestObjectVersionId",
    s3_bucket_arn="s3BucketArn"
)

Attributes

bucket_access_role_arn

Specifies the AWS Identity and Access Management (IAM) role that allows DataSync to access your manifest.

For more information, see Providing DataSync access to your manifest .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-manifestconfigsources3.html#cfn-datasync-task-manifestconfigsources3-bucketaccessrolearn

manifest_object_path

Specifies the Amazon S3 object key of your manifest.

This can include a prefix (for example, prefix/my-manifest.csv ).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-manifestconfigsources3.html#cfn-datasync-task-manifestconfigsources3-manifestobjectpath

manifest_object_version_id

Specifies the object version ID of the manifest that you want DataSync to use.

If you don’t set this, DataSync uses the latest version of the object.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-manifestconfigsources3.html#cfn-datasync-task-manifestconfigsources3-manifestobjectversionid

s3_bucket_arn

Specifies the Amazon Resource Name (ARN) of the S3 bucket where you’re hosting your manifest.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-manifestconfigsources3.html#cfn-datasync-task-manifestconfigsources3-s3bucketarn

OptionsProperty

class CfnTask.OptionsProperty(*, atime=None, bytes_per_second=None, gid=None, log_level=None, mtime=None, object_tags=None, overwrite_mode=None, posix_permissions=None, preserve_deleted_files=None, preserve_devices=None, security_descriptor_copy_flags=None, task_queueing=None, transfer_mode=None, uid=None, verify_mode=None)

Bases: object

Represents the options that are available to control the behavior of a StartTaskExecution operation. This behavior includes preserving metadata, such as user ID (UID), group ID (GID), and file permissions; overwriting files in the destination; data integrity verification; and so on.

A task has a set of default options associated with it. If you don’t specify an option in StartTaskExecution , the default value is used. You can override the default options on each task execution by specifying an overriding Options value to StartTaskExecution .

Parameters:
  • atime (Optional[str]) – A file metadata value that shows the last time that a file was accessed (that is, when the file was read or written to). If you set Atime to BEST_EFFORT , AWS DataSync attempts to preserve the original Atime attribute on all source files (that is, the version before the PREPARING phase). However, Atime ‘s behavior is not fully standard across platforms, so AWS DataSync can only do this on a best-effort basis. Default value: BEST_EFFORT BEST_EFFORT : Attempt to preserve the per-file Atime value (recommended). NONE : Ignore Atime . .. epigraph:: If Atime is set to BEST_EFFORT , Mtime must be set to PRESERVE . If Atime is set to NONE , Mtime must also be NONE .

  • bytes_per_second (Union[int, float, None]) – A value that limits the bandwidth used by AWS DataSync . For example, if you want AWS DataSync to use a maximum of 1 MB, set this value to 1048576 (=1024*1024).

  • gid (Optional[str]) – The group ID (GID) of the file’s owners. Default value: INT_VALUE INT_VALUE : Preserve the integer value of the user ID (UID) and group ID (GID) (recommended). NAME : Currently not supported. NONE : Ignore the UID and GID.

  • log_level (Optional[str]) – Specifies the type of logs that DataSync publishes to a Amazon CloudWatch Logs log group. To specify the log group, see CloudWatchLogGroupArn . - BASIC - Publishes logs with only basic information (such as transfer errors). - TRANSFER - Publishes logs for all files or objects that your DataSync task transfers and performs data-integrity checks on. - OFF - No logs are published.

  • mtime (Optional[str]) – A value that indicates the last time that a file was modified (that is, a file was written to) before the PREPARING phase. This option is required for cases when you need to run the same task more than one time. Default value: PRESERVE PRESERVE : Preserve original Mtime (recommended) NONE : Ignore Mtime . .. epigraph:: If Mtime is set to PRESERVE , Atime must be set to BEST_EFFORT . If Mtime is set to NONE , Atime must also be set to NONE .

  • object_tags (Optional[str]) – Specifies whether you want DataSync to PRESERVE object tags (default behavior) when transferring between object storage systems. If you want your DataSync task to ignore object tags, specify the NONE value.

  • overwrite_mode (Optional[str]) – Specifies whether DataSync should modify or preserve data at the destination location. - ALWAYS (default) - DataSync modifies data in the destination location when source data (including metadata) has changed. If DataSync overwrites objects, you might incur additional charges for certain Amazon S3 storage classes (for example, for retrieval or early deletion). For more information, see Storage class considerations with Amazon S3 transfers . - NEVER - DataSync doesn’t overwrite data in the destination location even if the source data has changed. You can use this option to protect against overwriting changes made to files or objects in the destination.

  • posix_permissions (Optional[str]) – A value that determines which users or groups can access a file for a specific purpose, such as reading, writing, or execution of the file. This option should be set only for Network File System (NFS), Amazon EFS, and Amazon S3 locations. For more information about what metadata is copied by DataSync, see Metadata Copied by DataSync . Default value: PRESERVE PRESERVE : Preserve POSIX-style permissions (recommended). NONE : Ignore permissions. .. epigraph:: AWS DataSync can preserve extant permissions of a source location.

  • preserve_deleted_files (Optional[str]) – A value that specifies whether files in the destination that don’t exist in the source file system are preserved. This option can affect your storage costs. If your task deletes objects, you might incur minimum storage duration charges for certain storage classes. For detailed information, see Considerations when working with Amazon S3 storage classes in DataSync in the AWS DataSync User Guide . Default value: PRESERVE PRESERVE : Ignore destination files that aren’t present in the source (recommended). REMOVE : Delete destination files that aren’t present in the source.

  • preserve_devices (Optional[str]) – A value that determines whether AWS DataSync should preserve the metadata of block and character devices in the source file system, and re-create the files with that device name and metadata on the destination. DataSync does not copy the contents of such devices, only the name and metadata. .. epigraph:: AWS DataSync can’t sync the actual contents of such devices, because they are nonterminal and don’t return an end-of-file (EOF) marker. Default value: NONE NONE : Ignore special devices (recommended). PRESERVE : Preserve character and block device metadata. This option isn’t currently supported for Amazon EFS.

  • security_descriptor_copy_flags (Optional[str]) – A value that determines which components of the SMB security descriptor are copied from source to destination objects. This value is only used for transfers between SMB and Amazon FSx for Windows File Server locations, or between two Amazon FSx for Windows File Server locations. For more information about how DataSync handles metadata, see How DataSync Handles Metadata and Special Files . Default value: OWNER_DACL OWNER_DACL : For each copied object, DataSync copies the following metadata: - Object owner. - NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object. When you use option, DataSync does NOT copy the NTFS system access control lists (SACLs), which are used by administrators to log attempts to access a secured object. OWNER_DACL_SACL : For each copied object, DataSync copies the following metadata: - Object owner. - NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object. - NTFS system access control lists (SACLs), which are used by administrators to log attempts to access a secured object. Copying SACLs requires granting additional permissions to the Windows user that DataSync uses to access your SMB location. For information about choosing a user that ensures sufficient permissions to files, folders, and metadata, see user . NONE : None of the SMB security descriptor components are copied. Destination objects are owned by the user that was provided for accessing the destination location. DACLs and SACLs are set based on the destination server’s configuration.

  • task_queueing (Optional[str]) – Specifies whether your transfer tasks should be put into a queue during certain scenarios when running multiple tasks . This is ENABLED by default.

  • transfer_mode (Optional[str]) – A value that determines whether DataSync transfers only the data and metadata that differ between the source and the destination location, or whether DataSync transfers all the content from the source, without comparing it to the destination location. CHANGED : DataSync copies only data or metadata that is new or different from the source location to the destination location. ALL : DataSync copies all source location content to the destination, without comparing it to existing content on the destination.

  • uid (Optional[str]) – The user ID (UID) of the file’s owner. Default value: INT_VALUE INT_VALUE : Preserve the integer value of the UID and group ID (GID) (recommended). NAME : Currently not supported NONE : Ignore the UID and GID.

  • verify_mode (Optional[str]) – A value that determines whether a data integrity verification is performed at the end of a task execution after all data and metadata have been transferred. For more information, see Configure task settings . Default value: POINT_IN_TIME_CONSISTENT ONLY_FILES_TRANSFERRED (recommended): Perform verification only on files that were transferred. POINT_IN_TIME_CONSISTENT : Scan the entire source and entire destination at the end of the transfer to verify that the source and destination are fully synchronized. This option isn’t supported when transferring to S3 Glacier or S3 Glacier Deep Archive storage classes. NONE : No additional verification is done at the end of the transfer, but all data transmissions are integrity-checked with checksum verification during the transfer.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-options.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 import aws_datasync as datasync

options_property = datasync.CfnTask.OptionsProperty(
    atime="atime",
    bytes_per_second=123,
    gid="gid",
    log_level="logLevel",
    mtime="mtime",
    object_tags="objectTags",
    overwrite_mode="overwriteMode",
    posix_permissions="posixPermissions",
    preserve_deleted_files="preserveDeletedFiles",
    preserve_devices="preserveDevices",
    security_descriptor_copy_flags="securityDescriptorCopyFlags",
    task_queueing="taskQueueing",
    transfer_mode="transferMode",
    uid="uid",
    verify_mode="verifyMode"
)

Attributes

atime

A file metadata value that shows the last time that a file was accessed (that is, when the file was read or written to).

If you set Atime to BEST_EFFORT , AWS DataSync attempts to preserve the original Atime attribute on all source files (that is, the version before the PREPARING phase). However, Atime ‘s behavior is not fully standard across platforms, so AWS DataSync can only do this on a best-effort basis.

Default value: BEST_EFFORT

BEST_EFFORT : Attempt to preserve the per-file Atime value (recommended).

NONE : Ignore Atime . .. epigraph:

If ``Atime`` is set to ``BEST_EFFORT`` , ``Mtime`` must be set to ``PRESERVE`` .

If ``Atime`` is set to ``NONE`` , ``Mtime`` must also be ``NONE`` .
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-options.html#cfn-datasync-task-options-atime

bytes_per_second

A value that limits the bandwidth used by AWS DataSync .

For example, if you want AWS DataSync to use a maximum of 1 MB, set this value to 1048576 (=1024*1024).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-options.html#cfn-datasync-task-options-bytespersecond

gid

The group ID (GID) of the file’s owners.

Default value: INT_VALUE

INT_VALUE : Preserve the integer value of the user ID (UID) and group ID (GID) (recommended).

NAME : Currently not supported.

NONE : Ignore the UID and GID.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-options.html#cfn-datasync-task-options-gid

log_level

Specifies the type of logs that DataSync publishes to a Amazon CloudWatch Logs log group.

To specify the log group, see CloudWatchLogGroupArn .

  • BASIC - Publishes logs with only basic information (such as transfer errors).

  • TRANSFER - Publishes logs for all files or objects that your DataSync task transfers and performs data-integrity checks on.

  • OFF - No logs are published.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-options.html#cfn-datasync-task-options-loglevel

mtime

A value that indicates the last time that a file was modified (that is, a file was written to) before the PREPARING phase.

This option is required for cases when you need to run the same task more than one time.

Default value: PRESERVE

PRESERVE : Preserve original Mtime (recommended)

NONE : Ignore Mtime . .. epigraph:

If ``Mtime`` is set to ``PRESERVE`` , ``Atime`` must be set to ``BEST_EFFORT`` .

If ``Mtime`` is set to ``NONE`` , ``Atime`` must also be set to ``NONE`` .
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-options.html#cfn-datasync-task-options-mtime

object_tags

Specifies whether you want DataSync to PRESERVE object tags (default behavior) when transferring between object storage systems.

If you want your DataSync task to ignore object tags, specify the NONE value.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-options.html#cfn-datasync-task-options-objecttags

overwrite_mode

Specifies whether DataSync should modify or preserve data at the destination location.

  • ALWAYS (default) - DataSync modifies data in the destination location when source data (including metadata) has changed.

If DataSync overwrites objects, you might incur additional charges for certain Amazon S3 storage classes (for example, for retrieval or early deletion). For more information, see Storage class considerations with Amazon S3 transfers .

  • NEVER - DataSync doesn’t overwrite data in the destination location even if the source data has changed. You can use this option to protect against overwriting changes made to files or objects in the destination.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-options.html#cfn-datasync-task-options-overwritemode

posix_permissions

A value that determines which users or groups can access a file for a specific purpose, such as reading, writing, or execution of the file.

This option should be set only for Network File System (NFS), Amazon EFS, and Amazon S3 locations. For more information about what metadata is copied by DataSync, see Metadata Copied by DataSync .

Default value: PRESERVE

PRESERVE : Preserve POSIX-style permissions (recommended).

NONE : Ignore permissions. .. epigraph:

AWS DataSync can preserve extant permissions of a source location.
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-options.html#cfn-datasync-task-options-posixpermissions

preserve_deleted_files

A value that specifies whether files in the destination that don’t exist in the source file system are preserved.

This option can affect your storage costs. If your task deletes objects, you might incur minimum storage duration charges for certain storage classes. For detailed information, see Considerations when working with Amazon S3 storage classes in DataSync in the AWS DataSync User Guide .

Default value: PRESERVE

PRESERVE : Ignore destination files that aren’t present in the source (recommended).

REMOVE : Delete destination files that aren’t present in the source.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-options.html#cfn-datasync-task-options-preservedeletedfiles

preserve_devices

A value that determines whether AWS DataSync should preserve the metadata of block and character devices in the source file system, and re-create the files with that device name and metadata on the destination.

DataSync does not copy the contents of such devices, only the name and metadata. .. epigraph:

AWS DataSync can't sync the actual contents of such devices, because they are nonterminal and don't return an end-of-file (EOF) marker.

Default value: NONE

NONE : Ignore special devices (recommended).

PRESERVE : Preserve character and block device metadata. This option isn’t currently supported for Amazon EFS.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-options.html#cfn-datasync-task-options-preservedevices

security_descriptor_copy_flags

A value that determines which components of the SMB security descriptor are copied from source to destination objects.

This value is only used for transfers between SMB and Amazon FSx for Windows File Server locations, or between two Amazon FSx for Windows File Server locations. For more information about how DataSync handles metadata, see How DataSync Handles Metadata and Special Files .

Default value: OWNER_DACL

OWNER_DACL : For each copied object, DataSync copies the following metadata:

  • Object owner.

  • NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.

When you use option, DataSync does NOT copy the NTFS system access control lists (SACLs), which are used by administrators to log attempts to access a secured object.

OWNER_DACL_SACL : For each copied object, DataSync copies the following metadata:

  • Object owner.

  • NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.

  • NTFS system access control lists (SACLs), which are used by administrators to log attempts to access a secured object.

Copying SACLs requires granting additional permissions to the Windows user that DataSync uses to access your SMB location. For information about choosing a user that ensures sufficient permissions to files, folders, and metadata, see user .

NONE : None of the SMB security descriptor components are copied. Destination objects are owned by the user that was provided for accessing the destination location. DACLs and SACLs are set based on the destination server’s configuration.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-options.html#cfn-datasync-task-options-securitydescriptorcopyflags

task_queueing

//docs.aws.amazon.com/datasync/latest/userguide/run-task.html#running-multiple-tasks>`_ . This is ENABLED by default.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-options.html#cfn-datasync-task-options-taskqueueing

Type:

Specifies whether your transfer tasks should be put into a queue during certain scenarios when `running multiple tasks <https

transfer_mode

A value that determines whether DataSync transfers only the data and metadata that differ between the source and the destination location, or whether DataSync transfers all the content from the source, without comparing it to the destination location.

CHANGED : DataSync copies only data or metadata that is new or different from the source location to the destination location.

ALL : DataSync copies all source location content to the destination, without comparing it to existing content on the destination.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-options.html#cfn-datasync-task-options-transfermode

uid

The user ID (UID) of the file’s owner.

Default value: INT_VALUE

INT_VALUE : Preserve the integer value of the UID and group ID (GID) (recommended).

NAME : Currently not supported

NONE : Ignore the UID and GID.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-options.html#cfn-datasync-task-options-uid

verify_mode

A value that determines whether a data integrity verification is performed at the end of a task execution after all data and metadata have been transferred.

For more information, see Configure task settings .

Default value: POINT_IN_TIME_CONSISTENT

ONLY_FILES_TRANSFERRED (recommended): Perform verification only on files that were transferred.

POINT_IN_TIME_CONSISTENT : Scan the entire source and entire destination at the end of the transfer to verify that the source and destination are fully synchronized. This option isn’t supported when transferring to S3 Glacier or S3 Glacier Deep Archive storage classes.

NONE : No additional verification is done at the end of the transfer, but all data transmissions are integrity-checked with checksum verification during the transfer.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-options.html#cfn-datasync-task-options-verifymode

OverridesProperty

class CfnTask.OverridesProperty(*, deleted=None, skipped=None, transferred=None, verified=None)

Bases: object

Customizes the reporting level for aspects of your task report.

For example, your report might generally only include errors, but you could specify that you want a list of successes and errors just for the files that DataSync attempted to delete in your destination location.

Parameters:
  • deleted (Union[IResolvable, DeletedProperty, Dict[str, Any], None]) – Specifies the level of reporting for the files, objects, and directories that DataSync attempted to delete in your destination location. This only applies if you configure your task to delete data in the destination that isn’t in the source.

  • skipped (Union[IResolvable, SkippedProperty, Dict[str, Any], None]) – Specifies the level of reporting for the files, objects, and directories that DataSync attempted to skip during your transfer.

  • transferred (Union[IResolvable, TransferredProperty, Dict[str, Any], None]) – Specifies the level of reporting for the files, objects, and directories that DataSync attempted to transfer.

  • verified (Union[IResolvable, VerifiedProperty, Dict[str, Any], None]) – Specifies the level of reporting for the files, objects, and directories that DataSync attempted to verify during your transfer.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-overrides.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 import aws_datasync as datasync

overrides_property = datasync.CfnTask.OverridesProperty(
    deleted=datasync.CfnTask.DeletedProperty(
        report_level="reportLevel"
    ),
    skipped=datasync.CfnTask.SkippedProperty(
        report_level="reportLevel"
    ),
    transferred=datasync.CfnTask.TransferredProperty(
        report_level="reportLevel"
    ),
    verified=datasync.CfnTask.VerifiedProperty(
        report_level="reportLevel"
    )
)

Attributes

deleted

Specifies the level of reporting for the files, objects, and directories that DataSync attempted to delete in your destination location.

This only applies if you configure your task to delete data in the destination that isn’t in the source.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-overrides.html#cfn-datasync-task-overrides-deleted

skipped

Specifies the level of reporting for the files, objects, and directories that DataSync attempted to skip during your transfer.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-overrides.html#cfn-datasync-task-overrides-skipped

transferred

Specifies the level of reporting for the files, objects, and directories that DataSync attempted to transfer.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-overrides.html#cfn-datasync-task-overrides-transferred

verified

Specifies the level of reporting for the files, objects, and directories that DataSync attempted to verify during your transfer.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-overrides.html#cfn-datasync-task-overrides-verified

S3Property

class CfnTask.S3Property(*, bucket_access_role_arn=None, s3_bucket_arn=None, subdirectory=None)

Bases: object

Parameters:
  • bucket_access_role_arn (Optional[str]) –

  • s3_bucket_arn (Optional[str]) –

  • subdirectory (Optional[str]) –

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-s3.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 import aws_datasync as datasync

s3_property = datasync.CfnTask.S3Property(
    bucket_access_role_arn="bucketAccessRoleArn",
    s3_bucket_arn="s3BucketArn",
    subdirectory="subdirectory"
)

Attributes

bucket_access_role_arn

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-s3.html#cfn-datasync-task-s3-bucketaccessrolearn

Type:

see

s3_bucket_arn

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-s3.html#cfn-datasync-task-s3-s3bucketarn

Type:

see

subdirectory

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-s3.html#cfn-datasync-task-s3-subdirectory

Type:

see

SkippedProperty

class CfnTask.SkippedProperty(*, report_level=None)

Bases: object

The reporting level for the skipped section of your DataSync task report.

Parameters:

report_level (Optional[str]) – Specifies whether you want your task report to include only what went wrong with your transfer or a list of what succeeded and didn’t. - ERRORS_ONLY : A report shows what DataSync was unable to skip. - SUCCESSES_AND_ERRORS : A report shows what DataSync was able and unable to skip.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-skipped.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 import aws_datasync as datasync

skipped_property = datasync.CfnTask.SkippedProperty(
    report_level="reportLevel"
)

Attributes

report_level

Specifies whether you want your task report to include only what went wrong with your transfer or a list of what succeeded and didn’t.

  • ERRORS_ONLY : A report shows what DataSync was unable to skip.

  • SUCCESSES_AND_ERRORS : A report shows what DataSync was able and unable to skip.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-skipped.html#cfn-datasync-task-skipped-reportlevel

SourceProperty

class CfnTask.SourceProperty(*, s3=None)

Bases: object

Specifies the manifest that you want AWS DataSync to use and where it’s hosted.

For more information and configuration examples, see Specifying what DataSync transfers by using a manifest .

Parameters:

s3 (Union[IResolvable, ManifestConfigSourceS3Property, Dict[str, Any], None]) – Specifies the S3 bucket where you’re hosting your manifest.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-source.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 import aws_datasync as datasync

source_property = datasync.CfnTask.SourceProperty(
    s3=datasync.CfnTask.ManifestConfigSourceS3Property(
        bucket_access_role_arn="bucketAccessRoleArn",
        manifest_object_path="manifestObjectPath",
        manifest_object_version_id="manifestObjectVersionId",
        s3_bucket_arn="s3BucketArn"
    )
)

Attributes

s3

Specifies the S3 bucket where you’re hosting your manifest.

See:

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

TaskReportConfigProperty

class CfnTask.TaskReportConfigProperty(*, destination, output_type, object_version_ids=None, overrides=None, report_level=None)

Bases: object

Specifies how you want to configure a task report, which provides detailed information about for your AWS DataSync transfer.

For more information, see Task reports .

Parameters:
  • destination (Union[IResolvable, DestinationProperty, Dict[str, Any]]) –

    Specifies the Amazon S3 bucket where DataSync uploads your task report. For more information, see Task reports .

  • output_type (str) – Specifies the type of task report that you want:. - SUMMARY_ONLY : Provides necessary details about your task, including the number of files, objects, and directories transferred and transfer duration. - STANDARD : Provides complete details about your task, including a full list of files, objects, and directories that were transferred, skipped, verified, and more.

  • object_version_ids (Optional[str]) – Specifies whether your task report includes the new version of each object transferred into an S3 bucket. This only applies if you enable versioning on your bucket . Keep in mind that setting this to INCLUDE can increase the duration of your task execution.

  • overrides (Union[IResolvable, OverridesProperty, Dict[str, Any], None]) – Customizes the reporting level for aspects of your task report. For example, your report might generally only include errors, but you could specify that you want a list of successes and errors just for the files that DataSync attempted to delete in your destination location.

  • report_level (Optional[str]) – Specifies whether you want your task report to include only what went wrong with your transfer or a list of what succeeded and didn’t. - ERRORS_ONLY : A report shows what DataSync was unable to transfer, skip, verify, and delete. - SUCCESSES_AND_ERRORS : A report shows what DataSync was able and unable to transfer, skip, verify, and delete.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-taskreportconfig.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 import aws_datasync as datasync

task_report_config_property = datasync.CfnTask.TaskReportConfigProperty(
    destination=datasync.CfnTask.DestinationProperty(
        s3=datasync.CfnTask.S3Property(
            bucket_access_role_arn="bucketAccessRoleArn",
            s3_bucket_arn="s3BucketArn",
            subdirectory="subdirectory"
        )
    ),
    output_type="outputType",

    # the properties below are optional
    object_version_ids="objectVersionIds",
    overrides=datasync.CfnTask.OverridesProperty(
        deleted=datasync.CfnTask.DeletedProperty(
            report_level="reportLevel"
        ),
        skipped=datasync.CfnTask.SkippedProperty(
            report_level="reportLevel"
        ),
        transferred=datasync.CfnTask.TransferredProperty(
            report_level="reportLevel"
        ),
        verified=datasync.CfnTask.VerifiedProperty(
            report_level="reportLevel"
        )
    ),
    report_level="reportLevel"
)

Attributes

destination

Specifies the Amazon S3 bucket where DataSync uploads your task report.

For more information, see Task reports .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-taskreportconfig.html#cfn-datasync-task-taskreportconfig-destination

object_version_ids

Specifies whether your task report includes the new version of each object transferred into an S3 bucket.

This only applies if you enable versioning on your bucket . Keep in mind that setting this to INCLUDE can increase the duration of your task execution.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-taskreportconfig.html#cfn-datasync-task-taskreportconfig-objectversionids

output_type

.

  • SUMMARY_ONLY : Provides necessary details about your task, including the number of files, objects, and directories transferred and transfer duration.

  • STANDARD : Provides complete details about your task, including a full list of files, objects, and directories that were transferred, skipped, verified, and more.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-taskreportconfig.html#cfn-datasync-task-taskreportconfig-outputtype

Type:

Specifies the type of task report that you want

overrides

Customizes the reporting level for aspects of your task report.

For example, your report might generally only include errors, but you could specify that you want a list of successes and errors just for the files that DataSync attempted to delete in your destination location.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-taskreportconfig.html#cfn-datasync-task-taskreportconfig-overrides

report_level

Specifies whether you want your task report to include only what went wrong with your transfer or a list of what succeeded and didn’t.

  • ERRORS_ONLY : A report shows what DataSync was unable to transfer, skip, verify, and delete.

  • SUCCESSES_AND_ERRORS : A report shows what DataSync was able and unable to transfer, skip, verify, and delete.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-taskreportconfig.html#cfn-datasync-task-taskreportconfig-reportlevel

TaskScheduleProperty

class CfnTask.TaskScheduleProperty(*, schedule_expression=None, status=None)

Bases: object

Configures your AWS DataSync task to run on a schedule (at a minimum interval of 1 hour).

Parameters:
  • schedule_expression (Optional[str]) – Specifies your task schedule by using a cron or rate expression. Use cron expressions for task schedules that run on a specific time and day. For example, the following cron expression creates a task schedule that runs at 8 AM on the first Wednesday of every month: cron(0 8 * * 3#1) Use rate expressions for task schedules that run on a regular interval. For example, the following rate expression creates a task schedule that runs every 12 hours: rate(12 hours) For information about cron and rate expression syntax, see the *Amazon EventBridge User Guide* .

  • status (Optional[str]) – Specifies whether to enable or disable your task schedule. Your schedule is enabled by default, but there can be situations where you need to disable it. For example, you might need to perform maintenance on a storage system before you can begin a recurring DataSync transfer. DataSync might disable your schedule automatically if your task fails repeatedly with the same error. For more information, see the *DataSync User Guide* .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-taskschedule.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 import aws_datasync as datasync

task_schedule_property = datasync.CfnTask.TaskScheduleProperty(
    schedule_expression="scheduleExpression",
    status="status"
)

Attributes

schedule_expression

Specifies your task schedule by using a cron or rate expression.

Use cron expressions for task schedules that run on a specific time and day. For example, the following cron expression creates a task schedule that runs at 8 AM on the first Wednesday of every month:

cron(0 8 * * 3#1)

Use rate expressions for task schedules that run on a regular interval. For example, the following rate expression creates a task schedule that runs every 12 hours:

rate(12 hours)

For information about cron and rate expression syntax, see the *Amazon EventBridge User Guide* .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-taskschedule.html#cfn-datasync-task-taskschedule-scheduleexpression

status

Specifies whether to enable or disable your task schedule.

Your schedule is enabled by default, but there can be situations where you need to disable it. For example, you might need to perform maintenance on a storage system before you can begin a recurring DataSync transfer.

DataSync might disable your schedule automatically if your task fails repeatedly with the same error. For more information, see the *DataSync User Guide* .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-taskschedule.html#cfn-datasync-task-taskschedule-status

TransferredProperty

class CfnTask.TransferredProperty(*, report_level=None)

Bases: object

The reporting level for the transferred section of your DataSync task report.

Parameters:

report_level (Optional[str]) – Specifies whether you want your task report to include only what went wrong with your transfer or a list of what succeeded and didn’t. - ERRORS_ONLY : A report shows what DataSync was unable to transfer. - SUCCESSES_AND_ERRORS : A report shows what DataSync was able and unable to transfer.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-transferred.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 import aws_datasync as datasync

transferred_property = datasync.CfnTask.TransferredProperty(
    report_level="reportLevel"
)

Attributes

report_level

Specifies whether you want your task report to include only what went wrong with your transfer or a list of what succeeded and didn’t.

  • ERRORS_ONLY : A report shows what DataSync was unable to transfer.

  • SUCCESSES_AND_ERRORS : A report shows what DataSync was able and unable to transfer.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-transferred.html#cfn-datasync-task-transferred-reportlevel

VerifiedProperty

class CfnTask.VerifiedProperty(*, report_level=None)

Bases: object

The reporting level for the verified section of your DataSync task report.

Parameters:

report_level (Optional[str]) – Specifies whether you want your task report to include only what went wrong with your transfer or a list of what succeeded and didn’t. - ERRORS_ONLY : A report shows what DataSync was unable to verify. - SUCCESSES_AND_ERRORS : A report shows what DataSync was able and unable to verify.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-verified.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 import aws_datasync as datasync

verified_property = datasync.CfnTask.VerifiedProperty(
    report_level="reportLevel"
)

Attributes

report_level

Specifies whether you want your task report to include only what went wrong with your transfer or a list of what succeeded and didn’t.

  • ERRORS_ONLY : A report shows what DataSync was unable to verify.

  • SUCCESSES_AND_ERRORS : A report shows what DataSync was able and unable to verify.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-verified.html#cfn-datasync-task-verified-reportlevel