UNPKG

@pulumi/aws

Version:

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

100 lines 4.4 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.Endpoint = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a resource to manage an S3 Outposts Endpoint. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.s3outposts.Endpoint("example", { * outpostId: exampleAwsOutpostsOutpost.id, * securityGroupId: exampleAwsSecurityGroup.id, * subnetId: exampleAwsSubnet.id, * }); * ``` * * ## Import * * Using `pulumi import`, import S3 Outposts Endpoints using Amazon Resource Name (ARN), EC2 Security Group identifier, and EC2 Subnet identifier, separated by commas (`,`). For example: * * ```sh * $ pulumi import aws:s3outposts/endpoint:Endpoint example arn:aws:s3-outposts:us-east-1:123456789012:outpost/op-12345678/endpoint/0123456789abcdef,sg-12345678,subnet-12345678 * ``` */ class Endpoint extends pulumi.CustomResource { /** * Get an existing Endpoint 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 Endpoint(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Endpoint. 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'] === Endpoint.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["accessType"] = state?.accessType; resourceInputs["arn"] = state?.arn; resourceInputs["cidrBlock"] = state?.cidrBlock; resourceInputs["creationTime"] = state?.creationTime; resourceInputs["customerOwnedIpv4Pool"] = state?.customerOwnedIpv4Pool; resourceInputs["networkInterfaces"] = state?.networkInterfaces; resourceInputs["outpostId"] = state?.outpostId; resourceInputs["region"] = state?.region; resourceInputs["securityGroupId"] = state?.securityGroupId; resourceInputs["subnetId"] = state?.subnetId; } else { const args = argsOrState; if (args?.outpostId === undefined && !opts.urn) { throw new Error("Missing required property 'outpostId'"); } if (args?.securityGroupId === undefined && !opts.urn) { throw new Error("Missing required property 'securityGroupId'"); } if (args?.subnetId === undefined && !opts.urn) { throw new Error("Missing required property 'subnetId'"); } resourceInputs["accessType"] = args?.accessType; resourceInputs["customerOwnedIpv4Pool"] = args?.customerOwnedIpv4Pool; resourceInputs["outpostId"] = args?.outpostId; resourceInputs["region"] = args?.region; resourceInputs["securityGroupId"] = args?.securityGroupId; resourceInputs["subnetId"] = args?.subnetId; resourceInputs["arn"] = undefined /*out*/; resourceInputs["cidrBlock"] = undefined /*out*/; resourceInputs["creationTime"] = undefined /*out*/; resourceInputs["networkInterfaces"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Endpoint.__pulumiType, name, resourceInputs, opts); } } exports.Endpoint = Endpoint; /** @internal */ Endpoint.__pulumiType = 'aws:s3outposts/endpoint:Endpoint'; //# sourceMappingURL=endpoint.js.map