UNPKG

@pulumi/aws-native

Version:

The Pulumi AWS Cloud Control Provider enables you to build, deploy, and manage [any AWS resource that's supported by the AWS Cloud Control API](https://github.com/pulumi/pulumi-aws-native/blob/master/provider/cmd/pulumi-gen-aws-native/supported-types.txt)

269 lines • 10.8 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.Flow = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Resource schema for AWS::AppFlow::Flow. * * ## Example Usage * ### Example * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws_native from "@pulumi/aws-native"; * * const testFlow = new aws_native.appflow.Flow("testFlow", { * flowName: "MyEventFlow", * description: "Test event flow for CloudFormation from salesforce to s3", * triggerConfig: { * triggerType: aws_native.appflow.FlowTriggerType.Event, * }, * sourceFlowConfig: { * connectorType: aws_native.appflow.FlowConnectorType.Salesforce, * connectorProfileName: "TestConnectorProfile", * sourceConnectorProperties: { * salesforce: { * object: "Account", * enableDynamicFieldUpdate: false, * includeDeletedRecords: true, * }, * }, * }, * destinationFlowConfigList: [{ * connectorType: aws_native.appflow.FlowConnectorType.S3, * destinationConnectorProperties: { * s3: { * bucketName: "TestOutputBucket", * s3OutputFormatConfig: { * fileType: aws_native.appflow.FlowFileType.Json, * aggregationConfig: { * aggregationType: aws_native.appflow.FlowAggregationType.None, * }, * }, * }, * }, * }], * tasks: [ * { * taskType: aws_native.appflow.FlowTaskType.Filter, * sourceFields: [ * "Id", * "Name", * ], * connectorOperator: { * salesforce: aws_native.appflow.FlowSalesforceConnectorOperator.Projection, * }, * }, * { * taskType: aws_native.appflow.FlowTaskType.Map, * sourceFields: ["Id"], * taskProperties: [ * { * key: aws_native.appflow.FlowOperatorPropertiesKeys.SourceDataType, * value: "id", * }, * { * key: aws_native.appflow.FlowOperatorPropertiesKeys.DestinationDataType, * value: "id", * }, * ], * destinationField: "Id", * connectorOperator: { * salesforce: aws_native.appflow.FlowSalesforceConnectorOperator.NoOp, * }, * }, * { * taskType: aws_native.appflow.FlowTaskType.Map, * sourceFields: ["Name"], * taskProperties: [ * { * key: aws_native.appflow.FlowOperatorPropertiesKeys.SourceDataType, * value: "string", * }, * { * key: aws_native.appflow.FlowOperatorPropertiesKeys.DestinationDataType, * value: "string", * }, * ], * destinationField: "Name", * connectorOperator: { * salesforce: aws_native.appflow.FlowSalesforceConnectorOperator.NoOp, * }, * }, * ], * tags: [{ * key: "testKey", * value: "testValue", * }], * }); * * ``` * ### Example * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws_native from "@pulumi/aws-native"; * * const testFlow = new aws_native.appflow.Flow("testFlow", { * flowName: "MyEventFlow", * description: "Test flow for CloudFormation from salesforce to s3", * triggerConfig: { * triggerType: aws_native.appflow.FlowTriggerType.Event, * }, * sourceFlowConfig: { * connectorType: aws_native.appflow.FlowConnectorType.Salesforce, * connectorProfileName: "TestConnectorProfile", * sourceConnectorProperties: { * salesforce: { * object: "Account", * enableDynamicFieldUpdate: false, * includeDeletedRecords: true, * }, * }, * }, * destinationFlowConfigList: [{ * connectorType: aws_native.appflow.FlowConnectorType.S3, * destinationConnectorProperties: { * s3: { * bucketName: "TestOutputBucket", * s3OutputFormatConfig: { * fileType: aws_native.appflow.FlowFileType.Json, * aggregationConfig: { * aggregationType: aws_native.appflow.FlowAggregationType.None, * }, * }, * }, * }, * }], * tasks: [ * { * taskType: aws_native.appflow.FlowTaskType.Filter, * connectorOperator: { * salesforce: aws_native.appflow.FlowSalesforceConnectorOperator.Projection, * }, * sourceFields: ["Id"], * }, * { * taskType: aws_native.appflow.FlowTaskType.Map, * sourceFields: ["Id"], * taskProperties: [ * { * key: aws_native.appflow.FlowOperatorPropertiesKeys.SourceDataType, * value: "id", * }, * { * key: aws_native.appflow.FlowOperatorPropertiesKeys.DestinationDataType, * value: "id", * }, * ], * destinationField: "Id", * connectorOperator: { * salesforce: aws_native.appflow.FlowSalesforceConnectorOperator.NoOp, * }, * }, * { * taskType: aws_native.appflow.FlowTaskType.Map, * sourceFields: ["Name"], * taskProperties: [ * { * key: aws_native.appflow.FlowOperatorPropertiesKeys.SourceDataType, * value: "string", * }, * { * key: aws_native.appflow.FlowOperatorPropertiesKeys.DestinationDataType, * value: "string", * }, * ], * destinationField: "Name", * connectorOperator: { * salesforce: aws_native.appflow.FlowSalesforceConnectorOperator.NoOp, * }, * }, * ], * }); * * ``` */ class Flow extends pulumi.CustomResource { /** * Get an existing Flow resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, opts) { return new Flow(name, undefined, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Flow. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === Flow.__pulumiType; } /** * Create a Flow resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name, args, opts) { let resourceInputs = {}; opts = opts || {}; if (!opts.id) { if ((!args || args.destinationFlowConfigList === undefined) && !opts.urn) { throw new Error("Missing required property 'destinationFlowConfigList'"); } if ((!args || args.sourceFlowConfig === undefined) && !opts.urn) { throw new Error("Missing required property 'sourceFlowConfig'"); } if ((!args || args.tasks === undefined) && !opts.urn) { throw new Error("Missing required property 'tasks'"); } if ((!args || args.triggerConfig === undefined) && !opts.urn) { throw new Error("Missing required property 'triggerConfig'"); } resourceInputs["description"] = args ? args.description : undefined; resourceInputs["destinationFlowConfigList"] = args ? args.destinationFlowConfigList : undefined; resourceInputs["flowName"] = args ? args.flowName : undefined; resourceInputs["flowStatus"] = args ? args.flowStatus : undefined; resourceInputs["kmsArn"] = args ? args.kmsArn : undefined; resourceInputs["metadataCatalogConfig"] = args ? args.metadataCatalogConfig : undefined; resourceInputs["sourceFlowConfig"] = args ? args.sourceFlowConfig : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["tasks"] = args ? args.tasks : undefined; resourceInputs["triggerConfig"] = args ? args.triggerConfig : undefined; resourceInputs["flowArn"] = undefined /*out*/; } else { resourceInputs["description"] = undefined /*out*/; resourceInputs["destinationFlowConfigList"] = undefined /*out*/; resourceInputs["flowArn"] = undefined /*out*/; resourceInputs["flowName"] = undefined /*out*/; resourceInputs["flowStatus"] = undefined /*out*/; resourceInputs["kmsArn"] = undefined /*out*/; resourceInputs["metadataCatalogConfig"] = undefined /*out*/; resourceInputs["sourceFlowConfig"] = undefined /*out*/; resourceInputs["tags"] = undefined /*out*/; resourceInputs["tasks"] = undefined /*out*/; resourceInputs["triggerConfig"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const replaceOnChanges = { replaceOnChanges: ["flowName", "kmsArn"] }; opts = pulumi.mergeOptions(opts, replaceOnChanges); super(Flow.__pulumiType, name, resourceInputs, opts); } } exports.Flow = Flow; /** @internal */ Flow.__pulumiType = 'aws-native:appflow:Flow'; //# sourceMappingURL=flow.js.map