UNPKG

@pulumi/aws

Version:

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

99 lines 4.18 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.Host = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Resource for managing an AWS CodeConnections Host. * * > **NOTE:** The `aws.codeconnections.Host` resource is created in the state `PENDING`. Authentication with the host provider must be completed in the AWS Console. For more information visit [Set up a pending host](https://docs.aws.amazon.com/dtconsole/latest/userguide/connections-host-setup.html). * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.codeconnections.Host("example", { * name: "example-host", * providerEndpoint: "https://example.com", * providerType: "GitHubEnterpriseServer", * }); * ``` * * ## Import * * Using `pulumi import`, import CodeConnections Host using the ARN. For example: * * ```sh * $ pulumi import aws:codeconnections/host:Host example-host arn:aws:codeconnections:us-west-1:0123456789:host/79d4d357-a2ee-41e4-b350-2fe39ae59448 * ``` */ class Host extends pulumi.CustomResource { /** * Get an existing Host 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 Host(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Host. 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'] === Host.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state?.arn; resourceInputs["name"] = state?.name; resourceInputs["providerEndpoint"] = state?.providerEndpoint; resourceInputs["providerType"] = state?.providerType; resourceInputs["region"] = state?.region; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["timeouts"] = state?.timeouts; resourceInputs["vpcConfiguration"] = state?.vpcConfiguration; } else { const args = argsOrState; if (args?.providerEndpoint === undefined && !opts.urn) { throw new Error("Missing required property 'providerEndpoint'"); } if (args?.providerType === undefined && !opts.urn) { throw new Error("Missing required property 'providerType'"); } resourceInputs["name"] = args?.name; resourceInputs["providerEndpoint"] = args?.providerEndpoint; resourceInputs["providerType"] = args?.providerType; resourceInputs["region"] = args?.region; resourceInputs["tags"] = args?.tags; resourceInputs["timeouts"] = args?.timeouts; resourceInputs["vpcConfiguration"] = args?.vpcConfiguration; resourceInputs["arn"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Host.__pulumiType, name, resourceInputs, opts); } } exports.Host = Host; /** @internal */ Host.__pulumiType = 'aws:codeconnections/host:Host'; //# sourceMappingURL=host.js.map