@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
123 lines • 6.25 kB
JavaScript
;
// *** 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, Object.assign(Object.assign({}, 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 ? state.arn : undefined;
resourceInputs["buildArn"] = state ? state.buildArn : undefined;
resourceInputs["buildId"] = state ? state.buildId : undefined;
resourceInputs["certificateConfiguration"] = state ? state.certificateConfiguration : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["ec2InboundPermissions"] = state ? state.ec2InboundPermissions : undefined;
resourceInputs["ec2InstanceType"] = state ? state.ec2InstanceType : undefined;
resourceInputs["fleetType"] = state ? state.fleetType : undefined;
resourceInputs["instanceRoleArn"] = state ? state.instanceRoleArn : undefined;
resourceInputs["logPaths"] = state ? state.logPaths : undefined;
resourceInputs["metricGroups"] = state ? state.metricGroups : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["newGameSessionProtectionPolicy"] = state ? state.newGameSessionProtectionPolicy : undefined;
resourceInputs["operatingSystem"] = state ? state.operatingSystem : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["resourceCreationLimitPolicy"] = state ? state.resourceCreationLimitPolicy : undefined;
resourceInputs["runtimeConfiguration"] = state ? state.runtimeConfiguration : undefined;
resourceInputs["scriptArn"] = state ? state.scriptArn : undefined;
resourceInputs["scriptId"] = state ? state.scriptId : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["tagsAll"] = state ? state.tagsAll : undefined;
}
else {
const args = argsOrState;
if ((!args || args.ec2InstanceType === undefined) && !opts.urn) {
throw new Error("Missing required property 'ec2InstanceType'");
}
resourceInputs["buildId"] = args ? args.buildId : undefined;
resourceInputs["certificateConfiguration"] = args ? args.certificateConfiguration : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["ec2InboundPermissions"] = args ? args.ec2InboundPermissions : undefined;
resourceInputs["ec2InstanceType"] = args ? args.ec2InstanceType : undefined;
resourceInputs["fleetType"] = args ? args.fleetType : undefined;
resourceInputs["instanceRoleArn"] = args ? args.instanceRoleArn : undefined;
resourceInputs["metricGroups"] = args ? args.metricGroups : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["newGameSessionProtectionPolicy"] = args ? args.newGameSessionProtectionPolicy : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["resourceCreationLimitPolicy"] = args ? args.resourceCreationLimitPolicy : undefined;
resourceInputs["runtimeConfiguration"] = args ? args.runtimeConfiguration : undefined;
resourceInputs["scriptId"] = args ? args.scriptId : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
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