UNPKG

@pulumi/aws

Version:

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

115 lines 4.87 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.Agreement = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a AWS Transfer AS2 Agreement resource. * * ## Example Usage * * ### Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.transfer.Agreement("example", { * accessRole: test.arn, * baseDirectory: "/DOC-EXAMPLE-BUCKET/home/mydirectory", * description: "example", * localProfileId: local.profileId, * partnerProfileId: partner.profileId, * serverId: testAwsTransferServer.id, * }); * ``` * * ## Import * * Using `pulumi import`, import Transfer AS2 Agreement using the `server_id/agreement_id`. For example: * * ```sh * $ pulumi import aws:transfer/agreement:Agreement example s-4221a88afd5f4362a/a-4221a88afd5f4362a * ``` */ class Agreement extends pulumi.CustomResource { /** * Get an existing Agreement 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 Agreement(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Agreement. 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'] === Agreement.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["accessRole"] = state?.accessRole; resourceInputs["agreementId"] = state?.agreementId; resourceInputs["arn"] = state?.arn; resourceInputs["baseDirectory"] = state?.baseDirectory; resourceInputs["description"] = state?.description; resourceInputs["localProfileId"] = state?.localProfileId; resourceInputs["partnerProfileId"] = state?.partnerProfileId; resourceInputs["region"] = state?.region; resourceInputs["serverId"] = state?.serverId; resourceInputs["status"] = state?.status; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; } else { const args = argsOrState; if (args?.accessRole === undefined && !opts.urn) { throw new Error("Missing required property 'accessRole'"); } if (args?.baseDirectory === undefined && !opts.urn) { throw new Error("Missing required property 'baseDirectory'"); } if (args?.localProfileId === undefined && !opts.urn) { throw new Error("Missing required property 'localProfileId'"); } if (args?.partnerProfileId === undefined && !opts.urn) { throw new Error("Missing required property 'partnerProfileId'"); } if (args?.serverId === undefined && !opts.urn) { throw new Error("Missing required property 'serverId'"); } resourceInputs["accessRole"] = args?.accessRole; resourceInputs["baseDirectory"] = args?.baseDirectory; resourceInputs["description"] = args?.description; resourceInputs["localProfileId"] = args?.localProfileId; resourceInputs["partnerProfileId"] = args?.partnerProfileId; resourceInputs["region"] = args?.region; resourceInputs["serverId"] = args?.serverId; resourceInputs["tags"] = args?.tags; resourceInputs["agreementId"] = undefined /*out*/; resourceInputs["arn"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Agreement.__pulumiType, name, resourceInputs, opts); } } exports.Agreement = Agreement; /** @internal */ Agreement.__pulumiType = 'aws:transfer/agreement:Agreement'; //# sourceMappingURL=agreement.js.map