AWS::AppFlow::Flow
The AWS::AppFlow::Flow
resource is an Amazon AppFlow resource type that
specifies a new flow.
Note
If you want to use AWS CloudFormation to create a connector profile for connectors that implement OAuth (such as Salesforce, Slack, Zendesk, and Google Analytics), you must fetch the access and refresh tokens. You can do this by implementing your own UI for OAuth, or by retrieving the tokens from elsewhere. Alternatively, you can use the Amazon AppFlow console to create the connector profile, and then use that connector profile in the flow creation CloudFormation template.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::AppFlow::Flow", "Properties" : { "Description" :
String
, "DestinationFlowConfigList" :[ DestinationFlowConfig, ... ]
, "FlowName" :String
, "FlowStatus" :String
, "KMSArn" :String
, "MetadataCatalogConfig" :MetadataCatalogConfig
, "SourceFlowConfig" :SourceFlowConfig
, "Tags" :[ Tag, ... ]
, "Tasks" :[ Task, ... ]
, "TriggerConfig" :TriggerConfig
} }
YAML
Type: AWS::AppFlow::Flow Properties: Description:
String
DestinationFlowConfigList:- DestinationFlowConfig
FlowName:String
FlowStatus:String
KMSArn:String
MetadataCatalogConfig:MetadataCatalogConfig
SourceFlowConfig:SourceFlowConfig
Tags:- Tag
Tasks:- Task
TriggerConfig:TriggerConfig
Properties
Description
-
A user-entered description of the flow.
Required: No
Type: String
Pattern:
[\w!@#\-.?,\s]*
Maximum:
2048
Update requires: No interruption
DestinationFlowConfigList
-
The configuration that controls how Amazon AppFlow places data in the destination connector.
Required: Yes
Type: Array of DestinationFlowConfig
Update requires: No interruption
FlowName
-
The specified name of the flow. Spaces are not allowed. Use underscores (_) or hyphens (-) only.
Required: Yes
Type: String
Pattern:
[a-zA-Z0-9][\w!@#.-]+
Minimum:
1
Maximum:
256
Update requires: Replacement
FlowStatus
-
Sets the status of the flow. You can specify one of the following values:
- Active
-
The flow runs based on the trigger settings that you defined. Active scheduled flows run as scheduled, and active event-triggered flows run when the specified change event occurs. However, active on-demand flows run only when you manually start them by using Amazon AppFlow.
- Suspended
-
You can use this option to deactivate an active flow. Scheduled and event-triggered flows will cease to run until you reactive them. This value only affects scheduled and event-triggered flows. It has no effect for on-demand flows.
If you omit the FlowStatus parameter, Amazon AppFlow creates the flow with a default status. The default status for on-demand flows is Active. The default status for scheduled and event-triggered flows is Draft, which means they’re not yet active.
Required: No
Type: String
Allowed values:
Active | Suspended | Draft
Update requires: No interruption
KMSArn
-
The ARN (Amazon Resource Name) of the Key Management Service (KMS) key you provide for encryption. This is required if you do not want to use the Amazon AppFlow-managed KMS key. If you don't provide anything here, Amazon AppFlow uses the Amazon AppFlow-managed KMS key.
Required: No
Type: String
Pattern:
arn:aws:kms:.*:[0-9]+:.*
Minimum:
20
Maximum:
2048
Update requires: Replacement
MetadataCatalogConfig
-
Specifies the configuration that Amazon AppFlow uses when it catalogs your data. When Amazon AppFlow catalogs your data, it stores metadata in a data catalog.
Required: No
Type: MetadataCatalogConfig
Update requires: No interruption
SourceFlowConfig
-
Contains information about the configuration of the source connector used in the flow.
Required: Yes
Type: SourceFlowConfig
Update requires: No interruption
-
The tags used to organize, track, or control access for your flow.
Required: No
Type: Array of Tag
Update requires: No interruption
Tasks
-
A list of tasks that Amazon AppFlow performs while transferring the data in the flow run.
Required: Yes
Type: Array of Task
Update requires: No interruption
TriggerConfig
-
The trigger settings that determine how and when Amazon AppFlow runs the specified flow.
Required: Yes
Type: TriggerConfig
Update requires: No interruption
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Ref
function, Ref
returns the flow name. For example:
{ "Ref": "myFlowName" }
For more information about using the Ref
function, see Ref
.
Fn::GetAtt
The Fn::GetAtt
intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.
For more information about using the Fn::GetAtt
intrinsic function, see Fn::GetAtt
.
FlowArn
-
The flow's Amazon Resource Name (ARN).
Examples
Test flow for CloudFormation from Salesforce to Amazon S3
The following example shows a test event flow for CloudFormation using Salesforce as the source and Amazon S3 as the destination.
JSON
{ "AWSTemplateFormatVersion":"2010-09-09", "Resources": { "TestFlow": { "Type": "AWS::AppFlow::Flow", "Properties": { "flowName": "MyEventFlow", "description": "Test event flow for CloudFormation from salesforce to s3", "triggerConfig": { "triggerType": "Event" }, "sourceFlowConfig": { "connectorType": "Salesforce", "connectorProfileName": "TestConnectorProfile", "sourceConnectorProperties": { "Salesforce": { "object": "Account", "enableDynamicFieldUpdate": false, "includeDeletedRecords": true } } }, "destinationFlowConfigList": [ { "connectorType": "S3", "destinationConnectorProperties": { "S3": { "bucketName": "TestOutputBucket", "s3OutputFormatConfig": { "fileType": "JSON", "aggregationConfig": { "aggregationType": "None" } } } } } ], "tasks": [ { "taskType": "Filter", "sourceFields": [ "Id", "Name" ], "connectorOperator": { "Salesforce": "PROJECTION" } }, { "taskType": "Map", "sourceFields": [ "Id" ], "taskProperties": [ { "Key": "SOURCE_DATA_TYPE", "Value": "id" }, { "Key": "DESTINATION_DATA_TYPE", "Value": "id" } ], "destinationField": "Id", "connectorOperator": { "Salesforce": "NO_OP" } }, { "taskType": "Map", "sourceFields": [ "Name" ], "taskProperties": [ { "Key": "SOURCE_DATA_TYPE", "Value": "string" }, { "Key": "DESTINATION_DATA_TYPE", "Value": "string" } ], "destinationField": "Name", "connectorOperator": { "Salesforce": "NO_OP" } } ], "tags": [ { "Key": "testKey", "Value": "testValue" } ] } } } }
YAML
AWSTemplateFormatVersion: '2010-09-09' Resources: TestFlow: Type: AWS::AppFlow::Flow Properties: FlowName: MyEventFlow Description: Test flow for CloudFormation from salesforce to s3 TriggerConfig: TriggerType: Event SourceFlowConfig: ConnectorType: Salesforce ConnectorProfileName: TestConnectorProfile SourceConnectorProperties: Salesforce: Object: Account EnableDynamicFieldUpdate: false IncludeDeletedRecords: true DestinationFlowConfigList: - ConnectorType: S3 DestinationConnectorProperties: S3: BucketName: TestOutputBucket S3OutputFormatConfig: FileType: JSON AggregationConfig: AggregationType: None Tasks: - TaskType: Filter ConnectorOperator: Salesforce: PROJECTION SourceFields: - Id - TaskType: Map SourceFields: - Id TaskProperties: - Key: SOURCE_DATA_TYPE Value: id - Key: DESTINATION_DATA_TYPE Value: id DestinationField: Id ConnectorOperator: Salesforce: NO_OP - TaskType: Map SourceFields: - Name TaskProperties: - Key: SOURCE_DATA_TYPE Value: string - Key: DESTINATION_DATA_TYPE Value: string DestinationField: Name ConnectorOperator: Salesforce: NO_OP
See also
-
CreateFlow in the Amazon AppFlow API Reference.
-
DescribeFlow in the Amazon AppFlow API Reference.
-
DeleteFlow in the Amazon AppFlow API Reference.
-
UpdateFlow in the Amazon AppFlow API Reference.