Workflow

class Workflow : KotlinCustomResource

Provides a AWS Transfer Workflow resource.

Example Usage

Basic single step example

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.transfer.Workflow("example", {steps: [{
deleteStepDetails: {
name: "example",
sourceFileLocation: "${original.file}",
},
type: "DELETE",
}]});
import pulumi
import pulumi_aws as aws
example = aws.transfer.Workflow("example", steps=[{
"delete_step_details": {
"name": "example",
"source_file_location": "${original.file}",
},
"type": "DELETE",
}])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Transfer.Workflow("example", new()
{
Steps = new[]
{
new Aws.Transfer.Inputs.WorkflowStepArgs
{
DeleteStepDetails = new Aws.Transfer.Inputs.WorkflowStepDeleteStepDetailsArgs
{
Name = "example",
SourceFileLocation = "${original.file}",
},
Type = "DELETE",
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/transfer"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := transfer.NewWorkflow(ctx, "example", &transfer.WorkflowArgs{
Steps: transfer.WorkflowStepArray{
&transfer.WorkflowStepArgs{
DeleteStepDetails: &transfer.WorkflowStepDeleteStepDetailsArgs{
Name: pulumi.String("example"),
SourceFileLocation: pulumi.String("${original.file}"),
},
Type: pulumi.String("DELETE"),
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.transfer.Workflow;
import com.pulumi.aws.transfer.WorkflowArgs;
import com.pulumi.aws.transfer.inputs.WorkflowStepArgs;
import com.pulumi.aws.transfer.inputs.WorkflowStepDeleteStepDetailsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new Workflow("example", WorkflowArgs.builder()
.steps(WorkflowStepArgs.builder()
.deleteStepDetails(WorkflowStepDeleteStepDetailsArgs.builder()
.name("example")
.sourceFileLocation("${original.file}")
.build())
.type("DELETE")
.build())
.build());
}
}
resources:
example:
type: aws:transfer:Workflow
properties:
steps:
- deleteStepDetails:
name: example
sourceFileLocation: $${original.file}
type: DELETE

Multistep example

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.transfer.Workflow("example", {steps: [
{
customStepDetails: {
name: "example",
sourceFileLocation: "${original.file}",
target: exampleAwsLambdaFunction.arn,
timeoutSeconds: 60,
},
type: "CUSTOM",
},
{
tagStepDetails: {
name: "example",
sourceFileLocation: "${original.file}",
tags: [{
key: "Name",
value: "Hello World",
}],
},
type: "TAG",
},
]});
import pulumi
import pulumi_aws as aws
example = aws.transfer.Workflow("example", steps=[
{
"custom_step_details": {
"name": "example",
"source_file_location": "${original.file}",
"target": example_aws_lambda_function["arn"],
"timeout_seconds": 60,
},
"type": "CUSTOM",
},
{
"tag_step_details": {
"name": "example",
"source_file_location": "${original.file}",
"tags": [{
"key": "Name",
"value": "Hello World",
}],
},
"type": "TAG",
},
])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Transfer.Workflow("example", new()
{
Steps = new[]
{
new Aws.Transfer.Inputs.WorkflowStepArgs
{
CustomStepDetails = new Aws.Transfer.Inputs.WorkflowStepCustomStepDetailsArgs
{
Name = "example",
SourceFileLocation = "${original.file}",
Target = exampleAwsLambdaFunction.Arn,
TimeoutSeconds = 60,
},
Type = "CUSTOM",
},
new Aws.Transfer.Inputs.WorkflowStepArgs
{
TagStepDetails = new Aws.Transfer.Inputs.WorkflowStepTagStepDetailsArgs
{
Name = "example",
SourceFileLocation = "${original.file}",
Tags = new[]
{
new Aws.Transfer.Inputs.WorkflowStepTagStepDetailsTagArgs
{
Key = "Name",
Value = "Hello World",
},
},
},
Type = "TAG",
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/transfer"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := transfer.NewWorkflow(ctx, "example", &transfer.WorkflowArgs{
Steps: transfer.WorkflowStepArray{
&transfer.WorkflowStepArgs{
CustomStepDetails: &transfer.WorkflowStepCustomStepDetailsArgs{
Name: pulumi.String("example"),
SourceFileLocation: pulumi.String("${original.file}"),
Target: pulumi.Any(exampleAwsLambdaFunction.Arn),
TimeoutSeconds: pulumi.Int(60),
},
Type: pulumi.String("CUSTOM"),
},
&transfer.WorkflowStepArgs{
TagStepDetails: &transfer.WorkflowStepTagStepDetailsArgs{
Name: pulumi.String("example"),
SourceFileLocation: pulumi.String("${original.file}"),
Tags: transfer.WorkflowStepTagStepDetailsTagArray{
&transfer.WorkflowStepTagStepDetailsTagArgs{
Key: pulumi.String("Name"),
Value: pulumi.String("Hello World"),
},
},
},
Type: pulumi.String("TAG"),
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.transfer.Workflow;
import com.pulumi.aws.transfer.WorkflowArgs;
import com.pulumi.aws.transfer.inputs.WorkflowStepArgs;
import com.pulumi.aws.transfer.inputs.WorkflowStepCustomStepDetailsArgs;
import com.pulumi.aws.transfer.inputs.WorkflowStepTagStepDetailsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new Workflow("example", WorkflowArgs.builder()
.steps(
WorkflowStepArgs.builder()
.customStepDetails(WorkflowStepCustomStepDetailsArgs.builder()
.name("example")
.sourceFileLocation("${original.file}")
.target(exampleAwsLambdaFunction.arn())
.timeoutSeconds(60)
.build())
.type("CUSTOM")
.build(),
WorkflowStepArgs.builder()
.tagStepDetails(WorkflowStepTagStepDetailsArgs.builder()
.name("example")
.sourceFileLocation("${original.file}")
.tags(WorkflowStepTagStepDetailsTagArgs.builder()
.key("Name")
.value("Hello World")
.build())
.build())
.type("TAG")
.build())
.build());
}
}
resources:
example:
type: aws:transfer:Workflow
properties:
steps:
- customStepDetails:
name: example
sourceFileLocation: $${original.file}
target: ${exampleAwsLambdaFunction.arn}
timeoutSeconds: 60
type: CUSTOM
- tagStepDetails:
name: example
sourceFileLocation: $${original.file}
tags:
- key: Name
value: Hello World
type: TAG

Import

Using pulumi import, import Transfer Workflows using the worflow_id. For example:

$ pulumi import aws:transfer/workflow:Workflow example example

Properties

Link copied to clipboard
val arn: Output<String>

The Workflow ARN.

Link copied to clipboard
val description: Output<String>?

A textual description for the workflow.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

Specifies the steps (actions) to take if errors are encountered during execution of the workflow. See Workflow Steps below.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val steps: Output<List<WorkflowStep>>

Specifies the details for the steps that are in the specified workflow. See Workflow Steps below.

Link copied to clipboard
val tags: Output<Map<String, String>>?

A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Link copied to clipboard
val tagsAll: Output<Map<String, String>>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Link copied to clipboard
val urn: Output<String>