Workflow class

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/v7/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
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_transfer_workflow" "example" {
  steps {
    delete_step_details = {
      name                 = "example"
      source_file_location = "$${original.file}"
    }
    type = "DELETE"
  }
}
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.ArrayList;
import java.util.Arrays;
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: {
            tags: [{
                key: "Name",
                value: "Hello World",
            }],
            name: "example",
            sourceFileLocation: "${original.file}",
        },
        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": {
            "tags": [{
                "key": "Name",
                "value": "Hello World",
            }],
            "name": "example",
            "source_file_location": "${original.file}",
        },
        "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
                {
                    Tags = new[]
                    {
                        new Aws.Transfer.Inputs.WorkflowStepTagStepDetailsTagArgs
                        {
                            Key = "Name",
                            Value = "Hello World",
                        },
                    },
                    Name = "example",
                    SourceFileLocation = "${original.file}",
                },
                Type = "TAG",
            },
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/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{
						Tags: transfer.WorkflowStepTagStepDetailsTagArray{
							&transfer.WorkflowStepTagStepDetailsTagArgs{
								Key:   pulumi.String("Name"),
								Value: pulumi.String("Hello World"),
							},
						},
						Name:               pulumi.String("example"),
						SourceFileLocation: pulumi.String("${original.file}"),
					},
					Type: pulumi.String("TAG"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_transfer_workflow" "example" {
  steps {
    custom_step_details = {
      name                 = "example"
      source_file_location = "$${original.file}"
      target               = exampleAwsLambdaFunction.arn
      timeout_seconds      = 60
    }
    type = "CUSTOM"
  }
  steps {
    tag_step_details = {
      tags = [{
        "key"   = "Name"
        "value" = "Hello World"
      }]
      name                 = "example"
      source_file_location = "$${original.file}"
    }
    type = "TAG"
  }
}
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 com.pulumi.aws.transfer.inputs.WorkflowStepTagStepDetailsTagArgs;
import java.util.ArrayList;
import java.util.Arrays;
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()
                        .tags(WorkflowStepTagStepDetailsTagArgs.builder()
                            .key("Name")
                            .value("Hello World")
                            .build())
                        .name("example")
                        .sourceFileLocation("${original.file}")
                        .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:
            tags:
              - key: Name
                value: Hello World
            name: example
            sourceFileLocation: $${original.file}
          type: TAG

Import

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

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

Constructors

Workflow(String name, {WorkflowArgs? args, CustomResourceOptions? options})
Creates a new Workflow. name The Pulumi resource name. args Arguments used to configure this Workflow. The set of arguments for Workflow. options Resource options controlling this resource's behavior.
Workflow.reference(String urn)
Creates a typed reference to an existing Workflow resource.

Properties

arn ↔ Output<String>
Workflow ARN.
latefinal
childResources → Set<Resource>
finalinherited
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
description ↔ Output<String?>
Textual description for the workflow.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
id ↔ Output<String>
getter/setter pairinherited
isCustom → bool
Returns whether this resource is provider-managed.
no setterinherited
isProtected → bool
Returns whether this resource is protected from deletion.
no setterinherited
isRemote → bool
Whether this resource is registered as remote.
no setterinherited
isResourceReference → bool
Whether this instance represents a resource value returned over RPC.
finalinherited
onExceptionSteps ↔ Output<List<WorkflowOnExceptionStep>?>
Steps (actions) to take if errors are encountered during execution of the workflow. See onExceptionSteps Block below.
latefinal
region ↔ Output<String>
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
resourceTransforms → List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
steps ↔ Output<List<WorkflowStep>>
Details for the steps that are in the specified workflow. See steps Block below.
latefinal
tags ↔ Output<Map<String, String>?>
Map of tags to assign to the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
latefinal
tagsAll ↔ Output<Map<String, String>>
Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
latefinal
transformations → List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
urn ↔ Output<String>
latefinalinherited

Methods

failId(Object error) → void
Completes this resource ID with an error when registration fails.
inherited
failOutputs(Object error) → void
Completes all output properties with error.
inherited
failUrn(Object error) → void
Completes this resource URN with an error when registration fails.
inherited
getProvider(String moduleMember) → ProviderResource?
Returns provider for moduleMember's package, if configured.
inherited
getResourceName() → String
Returns this resource's logical name.
inherited
getResourceType() → String
Returns this resource's Pulumi type token.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerOutput<T>(String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output<T>
Registers a dynamic output property for this resource.
inherited
resolveId(String? value, {required bool isKnown}) → void
Resolves the provider-assigned ID for this resource.
inherited
resolveOutputs(Struct outputs) → void
Resolves all output properties from a monitor response payload.
inherited
resolveUrn(String value) → void
Resolves this resource's URN once assigned by the engine.
inherited
serializeProperties(Map<String, dynamic> properties) → Future<Struct>
Serializes resource properties for RPC transmission.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

get(String name, Input<String> id, {WorkflowState? state, CustomResourceOptions? options}) → Workflow
Gets an existing Workflow resource's state with the given name and id.