UNPKG

@pulumi/aws-native

Version:

The Pulumi AWS Cloud Control Provider enables you to build, deploy, and manage [any AWS resource that's supported by the AWS Cloud Control API](https://github.com/pulumi/pulumi-aws-native/blob/master/provider/cmd/pulumi-gen-aws-native/supported-types.txt)

163 lines 6.99 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.GameSessionQueue = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * The AWS::GameLift::GameSessionQueue resource creates an Amazon GameLift (GameLift) game session queue. * * ## Example Usage * ### Example * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws_native from "@pulumi/aws-native"; * * const queue = new aws_native.gamelift.GameSessionQueue("queue", { * name: "MyGameSessionQueue", * timeoutInSeconds: 60, * notificationTarget: "arn:aws:sns:us-west-2:111122223333:My_Placement_SNS_Topic", * destinations: [ * { * destinationArn: "arn:aws:gamelift:us-west-2:012345678912:fleet/fleet-id", * }, * { * destinationArn: "arn:aws:gamelift:us-west-2:012345678912:alias/alias-id", * }, * ], * playerLatencyPolicies: [{ * maximumIndividualPlayerLatencyMilliseconds: 1000, * policyDurationSeconds: 60, * }], * priorityConfiguration: { * locationOrder: [ * "us-west-2", * "us-east-1", * ], * priorityOrder: [ * aws_native.gamelift.GameSessionQueuePriorityOrderItem.Cost, * aws_native.gamelift.GameSessionQueuePriorityOrderItem.Latency, * aws_native.gamelift.GameSessionQueuePriorityOrderItem.Location, * aws_native.gamelift.GameSessionQueuePriorityOrderItem.Destination, * ], * }, * filterConfiguration: { * allowedLocations: [ * "us-east-1", * "us-west-2", * ], * }, * }); * * ``` * ### Example * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws_native from "@pulumi/aws-native"; * * const queueResource = new aws_native.gamelift.GameSessionQueue("queueResource", {name: "MyGameSessionQueue"}); * const matchmakingRuleSetResource = new aws_native.gamelift.MatchmakingRuleSet("matchmakingRuleSetResource", { * name: "MyRuleSet", * ruleSetBody: "{\"name\": \"MyMatchmakingRuleSet\",\"ruleLanguageVersion\": \"1.0\", \"teams\": [{\"name\": \"MyTeam\",\"minPlayers\": 1,\"maxPlayers\": 20}]}", * }); * const matchmakingConfigurationResource = new aws_native.gamelift.MatchmakingConfiguration("matchmakingConfigurationResource", { * name: "MyMatchmakingConfiguration", * acceptanceRequired: true, * acceptanceTimeoutSeconds: 60, * additionalPlayerCount: 8, * backfillMode: aws_native.gamelift.MatchmakingConfigurationBackfillMode.Automatic, * customEventData: "MyCustomEventData", * description: "A basic matchmaking configuration for a GameLift-hosted game", * flexMatchMode: aws_native.gamelift.MatchmakingConfigurationFlexMatchMode.WithQueue, * gameSessionData: "MyGameSessionData", * gameProperties: [ * { * key: "level", * value: "10", * }, * { * key: "gameMode", * value: "hard", * }, * ], * gameSessionQueueArns: [queueResource.arn], * requestTimeoutSeconds: 100, * ruleSetName: matchmakingRuleSetResource.id, * }, { * dependsOn: [ * queueResource, * matchmakingRuleSetResource, * ], * }); * * ``` */ class GameSessionQueue extends pulumi.CustomResource { /** * Get an existing GameSessionQueue 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 opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, opts) { return new GameSessionQueue(name, undefined, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of GameSessionQueue. 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'] === GameSessionQueue.__pulumiType; } /** * Create a GameSessionQueue resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name, args, opts) { let resourceInputs = {}; opts = opts || {}; if (!opts.id) { resourceInputs["customEventData"] = args ? args.customEventData : undefined; resourceInputs["destinations"] = args ? args.destinations : undefined; resourceInputs["filterConfiguration"] = args ? args.filterConfiguration : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["notificationTarget"] = args ? args.notificationTarget : undefined; resourceInputs["playerLatencyPolicies"] = args ? args.playerLatencyPolicies : undefined; resourceInputs["priorityConfiguration"] = args ? args.priorityConfiguration : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["timeoutInSeconds"] = args ? args.timeoutInSeconds : undefined; resourceInputs["arn"] = undefined /*out*/; } else { resourceInputs["arn"] = undefined /*out*/; resourceInputs["customEventData"] = undefined /*out*/; resourceInputs["destinations"] = undefined /*out*/; resourceInputs["filterConfiguration"] = undefined /*out*/; resourceInputs["name"] = undefined /*out*/; resourceInputs["notificationTarget"] = undefined /*out*/; resourceInputs["playerLatencyPolicies"] = undefined /*out*/; resourceInputs["priorityConfiguration"] = undefined /*out*/; resourceInputs["tags"] = undefined /*out*/; resourceInputs["timeoutInSeconds"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const replaceOnChanges = { replaceOnChanges: ["name"] }; opts = pulumi.mergeOptions(opts, replaceOnChanges); super(GameSessionQueue.__pulumiType, name, resourceInputs, opts); } } exports.GameSessionQueue = GameSessionQueue; /** @internal */ GameSessionQueue.__pulumiType = 'aws-native:gamelift:GameSessionQueue'; //# sourceMappingURL=gameSessionQueue.js.map