UNPKG

@pulumi/aws

Version:

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

118 lines 4.88 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.Access = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a AWS Transfer Access resource. * * > **NOTE:** We suggest using explicit JSON encoding or `aws.iam.getPolicyDocument` when assigning a value to `policy`. They seamlessly translate configuration to JSON, enabling you to maintain consistency within your configuration without the need for context switches. Also, you can sidestep potential complications arising from formatting discrepancies, whitespace inconsistencies, and other nuances inherent to JSON. * * ## Example Usage * * ### Basic S3 * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.transfer.Access("example", { * externalId: "S-1-1-12-1234567890-123456789-1234567890-1234", * serverId: exampleAwsTransferServer.id, * role: exampleAwsIamRole.arn, * homeDirectory: `/${exampleAwsS3Bucket.id}/`, * }); * ``` * * ### Basic EFS * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const test = new aws.transfer.Access("test", { * externalId: "S-1-1-12-1234567890-123456789-1234567890-1234", * serverId: testAwsTransferServer.id, * role: testAwsIamRole.arn, * homeDirectory: `/${testAwsEfsFileSystem.id}/`, * posixProfile: { * gid: 1000, * uid: 1000, * }, * }); * ``` * * ## Import * * Using `pulumi import`, import Transfer Accesses using the `server_id` and `external_id`. For example: * * ```sh * $ pulumi import aws:transfer/access:Access example s-12345678/S-1-1-12-1234567890-123456789-1234567890-1234 * ``` */ class Access extends pulumi.CustomResource { /** * Get an existing Access 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 Access(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Access. 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'] === Access.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["externalId"] = state?.externalId; resourceInputs["homeDirectory"] = state?.homeDirectory; resourceInputs["homeDirectoryMappings"] = state?.homeDirectoryMappings; resourceInputs["homeDirectoryType"] = state?.homeDirectoryType; resourceInputs["policy"] = state?.policy; resourceInputs["posixProfile"] = state?.posixProfile; resourceInputs["region"] = state?.region; resourceInputs["role"] = state?.role; resourceInputs["serverId"] = state?.serverId; } else { const args = argsOrState; if (args?.externalId === undefined && !opts.urn) { throw new Error("Missing required property 'externalId'"); } if (args?.serverId === undefined && !opts.urn) { throw new Error("Missing required property 'serverId'"); } resourceInputs["externalId"] = args?.externalId; resourceInputs["homeDirectory"] = args?.homeDirectory; resourceInputs["homeDirectoryMappings"] = args?.homeDirectoryMappings; resourceInputs["homeDirectoryType"] = args?.homeDirectoryType; resourceInputs["policy"] = args?.policy; resourceInputs["posixProfile"] = args?.posixProfile; resourceInputs["region"] = args?.region; resourceInputs["role"] = args?.role; resourceInputs["serverId"] = args?.serverId; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Access.__pulumiType, name, resourceInputs, opts); } } exports.Access = Access; /** @internal */ Access.__pulumiType = 'aws:transfer/access:Access'; //# sourceMappingURL=access.js.map