UNPKG

@pulumi/aws

Version:

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

123 lines 5.54 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.Fleet = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a GameLift Fleet resource. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.gamelift.Fleet("example", { * buildId: exampleAwsGameliftBuild.id, * ec2InstanceType: "t2.micro", * fleetType: "ON_DEMAND", * name: "example-fleet-name", * runtimeConfiguration: { * serverProcesses: [{ * concurrentExecutions: 1, * launchPath: "C:\\game\\GomokuServer.exe", * }], * }, * }); * ``` * * ## Import * * Using `pulumi import`, import GameLift Fleets using the ID. For example: * * ```sh * $ pulumi import aws:gamelift/fleet:Fleet example <fleet-id> * ``` */ class Fleet extends pulumi.CustomResource { /** * Get an existing Fleet 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 Fleet(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Fleet. 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'] === Fleet.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state?.arn; resourceInputs["buildArn"] = state?.buildArn; resourceInputs["buildId"] = state?.buildId; resourceInputs["certificateConfiguration"] = state?.certificateConfiguration; resourceInputs["description"] = state?.description; resourceInputs["ec2InboundPermissions"] = state?.ec2InboundPermissions; resourceInputs["ec2InstanceType"] = state?.ec2InstanceType; resourceInputs["fleetType"] = state?.fleetType; resourceInputs["instanceRoleArn"] = state?.instanceRoleArn; resourceInputs["logPaths"] = state?.logPaths; resourceInputs["metricGroups"] = state?.metricGroups; resourceInputs["name"] = state?.name; resourceInputs["newGameSessionProtectionPolicy"] = state?.newGameSessionProtectionPolicy; resourceInputs["operatingSystem"] = state?.operatingSystem; resourceInputs["region"] = state?.region; resourceInputs["resourceCreationLimitPolicy"] = state?.resourceCreationLimitPolicy; resourceInputs["runtimeConfiguration"] = state?.runtimeConfiguration; resourceInputs["scriptArn"] = state?.scriptArn; resourceInputs["scriptId"] = state?.scriptId; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; } else { const args = argsOrState; if (args?.ec2InstanceType === undefined && !opts.urn) { throw new Error("Missing required property 'ec2InstanceType'"); } resourceInputs["buildId"] = args?.buildId; resourceInputs["certificateConfiguration"] = args?.certificateConfiguration; resourceInputs["description"] = args?.description; resourceInputs["ec2InboundPermissions"] = args?.ec2InboundPermissions; resourceInputs["ec2InstanceType"] = args?.ec2InstanceType; resourceInputs["fleetType"] = args?.fleetType; resourceInputs["instanceRoleArn"] = args?.instanceRoleArn; resourceInputs["metricGroups"] = args?.metricGroups; resourceInputs["name"] = args?.name; resourceInputs["newGameSessionProtectionPolicy"] = args?.newGameSessionProtectionPolicy; resourceInputs["region"] = args?.region; resourceInputs["resourceCreationLimitPolicy"] = args?.resourceCreationLimitPolicy; resourceInputs["runtimeConfiguration"] = args?.runtimeConfiguration; resourceInputs["scriptId"] = args?.scriptId; resourceInputs["tags"] = args?.tags; resourceInputs["arn"] = undefined /*out*/; resourceInputs["buildArn"] = undefined /*out*/; resourceInputs["logPaths"] = undefined /*out*/; resourceInputs["operatingSystem"] = undefined /*out*/; resourceInputs["scriptArn"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Fleet.__pulumiType, name, resourceInputs, opts); } } exports.Fleet = Fleet; /** @internal */ Fleet.__pulumiType = 'aws:gamelift/fleet:Fleet'; //# sourceMappingURL=fleet.js.map