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)

288 lines • 11.7 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.Server = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Definition of AWS::Transfer::Server Resource Type * * ## Example Usage * ### Example * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws_native from "@pulumi/aws-native"; * * const myTransferServer = new aws_native.transfer.Server("myTransferServer", { * endpointDetails: { * addressAllocationIds: [ * "AddressAllocationId-1", * "AddressAllocationId-2", * ], * subnetIds: [ * "SubnetId-1", * "SubnetId-2", * ], * vpcId: "VpcId", * }, * endpointType: aws_native.transfer.ServerEndpointType.Vpc, * loggingRole: "Logging-Role-ARN", * protocols: [aws_native.transfer.ServerProtocol.Sftp], * securityPolicyName: "Security-Policy-Name", * identityProviderDetails: { * invocationRole: "Invocation-Role-ARN", * url: "API_GATEWAY-Invocation-URL", * }, * identityProviderType: aws_native.transfer.ServerIdentityProviderType.ApiGateway, * tags: [{ * key: "KeyName", * value: "ValueName", * }], * }); * * ``` * ### Example * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws_native from "@pulumi/aws-native"; * * const myTransferServer = new aws_native.transfer.Server("myTransferServer", { * endpointDetails: { * addressAllocationIds: [ * "AddressAllocationId-1", * "AddressAllocationId-2", * ], * subnetIds: [ * "SubnetId-1", * "SubnetId-2", * ], * vpcId: "VpcId", * }, * endpointType: aws_native.transfer.ServerEndpointType.Vpc, * loggingRole: "Logging-Role-ARN", * protocols: [aws_native.transfer.ServerProtocol.Sftp], * securityPolicyName: "Security-Policy-Name", * identityProviderDetails: { * invocationRole: "Invocation-Role-ARN", * url: "API_GATEWAY-Invocation-URL", * }, * identityProviderType: aws_native.transfer.ServerIdentityProviderType.ApiGateway, * tags: [{ * key: "KeyName", * value: "ValueName", * }], * }); * * ``` * ### Example * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws_native from "@pulumi/aws-native"; * * const transferWorkflow = new aws_native.transfer.Workflow("transferWorkflow", { * description: "Transfer Family Workflows Blog", * steps: [ * { * type: aws_native.transfer.WorkflowStepType.Copy, * copyStepDetails: { * name: "copyToUserKey", * destinationFileLocation: { * s3FileLocation: { * bucket: "archived-records", * key: "${transfer:UserName}/", * }, * }, * overwriteExisting: aws_native.transfer.WorkflowStepCopyStepDetailsPropertiesOverwriteExisting.True, * }, * }, * { * type: aws_native.transfer.WorkflowStepType.Tag, * tagStepDetails: { * name: "tagFileForArchive", * tags: [{ * key: "Archive", * value: "yes", * }], * }, * }, * { * type: aws_native.transfer.WorkflowStepType.Custom, * customStepDetails: { * name: "transferExtract", * target: "arn:${AWS::Partition}:lambda:${AWS::Region}:${AWS::AccountId}:function:my-function-name", * timeoutSeconds: 60, * }, * }, * { * type: aws_native.transfer.WorkflowStepType.Delete, * deleteStepDetails: { * name: "DeleteInputFile", * sourceFileLocation: "${original.file}", * }, * }, * ], * tags: [{ * key: "Name", * value: "TransferFamilyWorkflows", * }], * }); * const sftpServer = new aws_native.transfer.Server("sftpServer", {workflowDetails: { * onUpload: [{ * executionRole: "your-workflow-execution-role-arn", * workflowId: transferWorkflow.workflowId, * }], * }}); * * ``` * ### Example * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws_native from "@pulumi/aws-native"; * * const transferWorkflow = new aws_native.transfer.Workflow("transferWorkflow", { * description: "Transfer Family Workflows Blog", * steps: [ * { * type: aws_native.transfer.WorkflowStepType.Copy, * copyStepDetails: { * name: "copyToUserKey", * destinationFileLocation: { * s3FileLocation: { * bucket: "archived-records", * key: "${transfer:UserName}/", * }, * }, * overwriteExisting: aws_native.transfer.WorkflowStepCopyStepDetailsPropertiesOverwriteExisting.True, * }, * }, * { * type: aws_native.transfer.WorkflowStepType.Tag, * tagStepDetails: { * name: "tagFileForArchive", * tags: [{ * key: "Archive", * value: "yes", * }], * }, * }, * { * type: aws_native.transfer.WorkflowStepType.Custom, * customStepDetails: { * name: "transferExtract", * target: "arn:${AWS::Partition}:lambda:${AWS::Region}:${AWS::AccountId}:function:my-function-name", * timeoutSeconds: 60, * }, * }, * { * type: aws_native.transfer.WorkflowStepType.Delete, * deleteStepDetails: { * name: "DeleteInputFile", * sourceFileLocation: "${original.file}", * }, * }, * ], * tags: [{ * key: "Name", * value: "TransferFamilyWorkflows", * }], * }); * const sftpServer = new aws_native.transfer.Server("sftpServer", {workflowDetails: { * onUpload: [{ * executionRole: "your-workflow-execution-role-arn", * workflowId: transferWorkflow.workflowId, * }], * }}); * * ``` */ class Server extends pulumi.CustomResource { /** * Get an existing Server 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 Server(name, undefined, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Server. 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'] === Server.__pulumiType; } /** * Create a Server 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) { resourceInputs["certificate"] = args ? args.certificate : undefined; resourceInputs["domain"] = args ? args.domain : undefined; resourceInputs["endpointDetails"] = args ? args.endpointDetails : undefined; resourceInputs["endpointType"] = args ? args.endpointType : undefined; resourceInputs["identityProviderDetails"] = args ? args.identityProviderDetails : undefined; resourceInputs["identityProviderType"] = args ? args.identityProviderType : undefined; resourceInputs["loggingRole"] = args ? args.loggingRole : undefined; resourceInputs["postAuthenticationLoginBanner"] = args ? args.postAuthenticationLoginBanner : undefined; resourceInputs["preAuthenticationLoginBanner"] = args ? args.preAuthenticationLoginBanner : undefined; resourceInputs["protocolDetails"] = args ? args.protocolDetails : undefined; resourceInputs["protocols"] = args ? args.protocols : undefined; resourceInputs["s3StorageOptions"] = args ? args.s3StorageOptions : undefined; resourceInputs["securityPolicyName"] = args ? args.securityPolicyName : undefined; resourceInputs["structuredLogDestinations"] = args ? args.structuredLogDestinations : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["workflowDetails"] = args ? args.workflowDetails : undefined; resourceInputs["arn"] = undefined /*out*/; resourceInputs["as2ServiceManagedEgressIpAddresses"] = undefined /*out*/; resourceInputs["serverId"] = undefined /*out*/; resourceInputs["state"] = undefined /*out*/; } else { resourceInputs["arn"] = undefined /*out*/; resourceInputs["as2ServiceManagedEgressIpAddresses"] = undefined /*out*/; resourceInputs["certificate"] = undefined /*out*/; resourceInputs["domain"] = undefined /*out*/; resourceInputs["endpointDetails"] = undefined /*out*/; resourceInputs["endpointType"] = undefined /*out*/; resourceInputs["identityProviderDetails"] = undefined /*out*/; resourceInputs["identityProviderType"] = undefined /*out*/; resourceInputs["loggingRole"] = undefined /*out*/; resourceInputs["postAuthenticationLoginBanner"] = undefined /*out*/; resourceInputs["preAuthenticationLoginBanner"] = undefined /*out*/; resourceInputs["protocolDetails"] = undefined /*out*/; resourceInputs["protocols"] = undefined /*out*/; resourceInputs["s3StorageOptions"] = undefined /*out*/; resourceInputs["securityPolicyName"] = undefined /*out*/; resourceInputs["serverId"] = undefined /*out*/; resourceInputs["state"] = undefined /*out*/; resourceInputs["structuredLogDestinations"] = undefined /*out*/; resourceInputs["tags"] = undefined /*out*/; resourceInputs["workflowDetails"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const replaceOnChanges = { replaceOnChanges: ["domain", "identityProviderType"] }; opts = pulumi.mergeOptions(opts, replaceOnChanges); super(Server.__pulumiType, name, resourceInputs, opts); } } exports.Server = Server; /** @internal */ Server.__pulumiType = 'aws-native:transfer:Server'; //# sourceMappingURL=server.js.map