UNPKG

@pulumi/aws

Version:

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

101 lines 4.19 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.CrossAccountAttachment = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Resource for managing an AWS Global Accelerator Cross Account Attachment. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.globalaccelerator.CrossAccountAttachment("example", {name: "example-cross-account-attachment"}); * ``` * * ### Usage with Optional Arguments * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.globalaccelerator.CrossAccountAttachment("example", { * name: "example-cross-account-attachment", * principals: ["123456789012"], * resources: [{ * endpointId: "arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188", * region: "us-west-2", * }], * }); * ``` * * ## Import * * Using `pulumi import`, import Global Accelerator Cross Account Attachment using the `arn`. For example: * * ```sh * $ pulumi import aws:globalaccelerator/crossAccountAttachment:CrossAccountAttachment example arn:aws:globalaccelerator::012345678910:attachment/01234567-abcd-8910-efgh-123456789012 * ``` */ class CrossAccountAttachment extends pulumi.CustomResource { /** * Get an existing CrossAccountAttachment 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 CrossAccountAttachment(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of CrossAccountAttachment. 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'] === CrossAccountAttachment.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state?.arn; resourceInputs["createdTime"] = state?.createdTime; resourceInputs["lastModifiedTime"] = state?.lastModifiedTime; resourceInputs["name"] = state?.name; resourceInputs["principals"] = state?.principals; resourceInputs["resources"] = state?.resources; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; } else { const args = argsOrState; resourceInputs["name"] = args?.name; resourceInputs["principals"] = args?.principals; resourceInputs["resources"] = args?.resources; resourceInputs["tags"] = args?.tags; resourceInputs["arn"] = undefined /*out*/; resourceInputs["createdTime"] = undefined /*out*/; resourceInputs["lastModifiedTime"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(CrossAccountAttachment.__pulumiType, name, resourceInputs, opts); } } exports.CrossAccountAttachment = CrossAccountAttachment; /** @internal */ CrossAccountAttachment.__pulumiType = 'aws:globalaccelerator/crossAccountAttachment:CrossAccountAttachment'; //# sourceMappingURL=crossAccountAttachment.js.map