UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

126 lines 4.78 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.Connector = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a AWS Transfer AS2 Connector resource. * * ## Example Usage * * ### Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.transfer.Connector("example", { * accessRole: test.arn, * as2Config: { * compression: "DISABLED", * encryptionAlgorithm: "AWS128_CBC", * messageSubject: "For Connector", * localProfileId: local.profileId, * mdnResponse: "NONE", * mdnSigningAlgorithm: "NONE", * partnerProfileId: partner.profileId, * signingAlgorithm: "NONE", * }, * url: "http://www.test.com", * }); * ``` * * ### SFTP Connector * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.transfer.Connector("example", { * accessRole: test.arn, * sftpConfig: { * trustedHostKeys: ["ssh-rsa AAAAB3NYourKeysHere"], * userSecretId: exampleAwsSecretsmanagerSecret.id, * }, * url: "sftp://test.com", * }); * ``` * * ## Import * * Using `pulumi import`, import Transfer AS2 Connector using the `connector_id`. For example: * * ```sh * $ pulumi import aws:transfer/connector:Connector example c-4221a88afd5f4362a * ``` */ class Connector extends pulumi.CustomResource { /** * Get an existing Connector 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 state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, state, opts) { return new Connector(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Connector. 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'] === Connector.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["accessRole"] = state?.accessRole; resourceInputs["arn"] = state?.arn; resourceInputs["as2Config"] = state?.as2Config; resourceInputs["connectorId"] = state?.connectorId; resourceInputs["loggingRole"] = state?.loggingRole; resourceInputs["region"] = state?.region; resourceInputs["securityPolicyName"] = state?.securityPolicyName; resourceInputs["sftpConfig"] = state?.sftpConfig; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["url"] = state?.url; } else { const args = argsOrState; if (args?.accessRole === undefined && !opts.urn) { throw new Error("Missing required property 'accessRole'"); } if (args?.url === undefined && !opts.urn) { throw new Error("Missing required property 'url'"); } resourceInputs["accessRole"] = args?.accessRole; resourceInputs["as2Config"] = args?.as2Config; resourceInputs["loggingRole"] = args?.loggingRole; resourceInputs["region"] = args?.region; resourceInputs["securityPolicyName"] = args?.securityPolicyName; resourceInputs["sftpConfig"] = args?.sftpConfig; resourceInputs["tags"] = args?.tags; resourceInputs["url"] = args?.url; resourceInputs["arn"] = undefined /*out*/; resourceInputs["connectorId"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Connector.__pulumiType, name, resourceInputs, opts); } } exports.Connector = Connector; /** @internal */ Connector.__pulumiType = 'aws:transfer/connector:Connector'; //# sourceMappingURL=connector.js.map