# CopyStepDetailsProperty

Details for a step that performs a file copy.

Consists of the following values:

- A description
- An Amazon S3 location for the destination of the file copy.
- A flag that indicates whether to overwrite an existing file of the same name. The default is `FALSE` .

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_transfer as transfer } from 'aws-cdk-lib';
const copyStepDetailsProperty: transfer.CfnWorkflow.CopyStepDetailsProperty = {
  destinationFileLocation: {
    s3FileLocation: {
      bucket: 'bucket',
      key: 'key',
    },
  },
  name: 'name',
  overwriteExisting: 'overwriteExisting',
  sourceFileLocation: 'sourceFileLocation',
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_transfer as transfer

copy_step_details_property = transfer.CfnWorkflow.CopyStepDetailsProperty(
    destination_file_location=transfer.CfnWorkflow.S3FileLocationProperty(
        s3_file_location=transfer.CfnWorkflow.S3InputFileLocationProperty(
            bucket="bucket",
            key="key"
        )
    ),
    name="name",
    overwrite_existing="overwriteExisting",
    source_file_location="sourceFileLocation"
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.transfer.*;

CopyStepDetailsProperty copyStepDetailsProperty = CopyStepDetailsProperty.builder()
        .destinationFileLocation(S3FileLocationProperty.builder()
                .s3FileLocation(S3InputFileLocationProperty.builder()
                        .bucket("bucket")
                        .key("key")
                        .build())
                .build())
        .name("name")
        .overwriteExisting("overwriteExisting")
        .sourceFileLocation("sourceFileLocation")
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Transfer;

var copyStepDetailsProperty = new CopyStepDetailsProperty {
    DestinationFileLocation = new S3FileLocationProperty {
        S3FileLocation = new S3InputFileLocationProperty {
            Bucket = "bucket",
            Key = "key"
        }
    },
    Name = "name",
    OverwriteExisting = "overwriteExisting",
    SourceFileLocation = "sourceFileLocation"
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

copyStepDetailsProperty := &CopyStepDetailsProperty{
	DestinationFileLocation: &S3FileLocationProperty{
		S3FileLocation: &S3InputFileLocationProperty{
			Bucket: jsii.String("bucket"),
			Key: jsii.String("key"),
		},
	},
	Name: jsii.String("name"),
	OverwriteExisting: jsii.String("overwriteExisting"),
	SourceFileLocation: jsii.String("sourceFileLocation"),
}
```

## Properties

- `destinationFileLocation`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnWorkflow.S3FileLocationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_transfer.CfnWorkflow.S3FileLocationProperty.html) — Specifies the location for the file being copied.

  Use `${Transfer:UserName}` or `${Transfer:UploadDate}` in this field to parametrize the destination prefix by username or uploaded date.

  - Set the value of `DestinationFileLocation` to `${Transfer:UserName}` to copy uploaded files to an Amazon S3 bucket that is prefixed with the name of the Transfer Family user that uploaded the file.
  - Set the value of `DestinationFileLocation` to `${Transfer:UploadDate}` to copy uploaded files to an Amazon S3 bucket that is prefixed with the date of the upload.

  > The system resolves `UploadDate` to a date format of *YYYY-MM-DD* , based on the date the file is uploaded in UTC.

- `name`: string — The name of the step, used as an identifier.

- `overwriteExisting`: string — A flag that indicates whether to overwrite an existing file of the same name. The default is `FALSE` .

  If the workflow is processing a file that has the same name as an existing file, the behavior is as follows:

  - If `OverwriteExisting` is `TRUE` , the existing file is replaced with the file being processed.
  - If `OverwriteExisting` is `FALSE` , nothing happens, and the workflow processing stops.

- `sourceFileLocation`: string — Specifies which file to use as input to the workflow step: either the output from the previous step, or the originally uploaded file for the workflow.

  - To use the previous file as the input, enter `${previous.file}` . In this case, this workflow step uses the output file from the previous workflow step as input. This is the default value.
  - To use the originally uploaded file location as input for this step, enter `${original.file}` .
