Fleet
Provides a GameLift Fleet resource.
Example Usage
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",
}],
},
});Content copied to clipboard
import pulumi
import pulumi_aws as aws
example = aws.gamelift.Fleet("example",
build_id=example_aws_gamelift_build["id"],
ec2_instance_type="t2.micro",
fleet_type="ON_DEMAND",
name="example-fleet-name",
runtime_configuration=aws.gamelift.FleetRuntimeConfigurationArgs(
server_processes=[aws.gamelift.FleetRuntimeConfigurationServerProcessArgs(
concurrent_executions=1,
launch_path="C:\\game\\GomokuServer.exe",
)],
))Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.GameLift.Fleet("example", new()
{
BuildId = exampleAwsGameliftBuild.Id,
Ec2InstanceType = "t2.micro",
FleetType = "ON_DEMAND",
Name = "example-fleet-name",
RuntimeConfiguration = new Aws.GameLift.Inputs.FleetRuntimeConfigurationArgs
{
ServerProcesses = new[]
{
new Aws.GameLift.Inputs.FleetRuntimeConfigurationServerProcessArgs
{
ConcurrentExecutions = 1,
LaunchPath = "C:\\game\\GomokuServer.exe",
},
},
},
});
});Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/gamelift"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := gamelift.NewFleet(ctx, "example", &gamelift.FleetArgs{
BuildId: pulumi.Any(exampleAwsGameliftBuild.Id),
Ec2InstanceType: pulumi.String("t2.micro"),
FleetType: pulumi.String("ON_DEMAND"),
Name: pulumi.String("example-fleet-name"),
RuntimeConfiguration: &gamelift.FleetRuntimeConfigurationArgs{
ServerProcesses: gamelift.FleetRuntimeConfigurationServerProcessArray{
&gamelift.FleetRuntimeConfigurationServerProcessArgs{
ConcurrentExecutions: pulumi.Int(1),
LaunchPath: pulumi.String("C:\\game\\GomokuServer.exe"),
},
},
},
})
if err != nil {
return err
}
return nil
})
}Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.gamelift.Fleet;
import com.pulumi.aws.gamelift.FleetArgs;
import com.pulumi.aws.gamelift.inputs.FleetRuntimeConfigurationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new Fleet("example", FleetArgs.builder()
.buildId(exampleAwsGameliftBuild.id())
.ec2InstanceType("t2.micro")
.fleetType("ON_DEMAND")
.name("example-fleet-name")
.runtimeConfiguration(FleetRuntimeConfigurationArgs.builder()
.serverProcesses(FleetRuntimeConfigurationServerProcessArgs.builder()
.concurrentExecutions(1)
.launchPath("C:\\game\\GomokuServer.exe")
.build())
.build())
.build());
}
}Content copied to clipboard
resources:
example:
type: aws:gamelift:Fleet
properties:
buildId: ${exampleAwsGameliftBuild.id}
ec2InstanceType: t2.micro
fleetType: ON_DEMAND
name: example-fleet-name
runtimeConfiguration:
serverProcesses:
- concurrentExecutions: 1
launchPath: C:\game\GomokuServer.exeContent copied to clipboard
Import
Using pulumi import, import GameLift Fleets using the ID. For example:
$ pulumi import aws:gamelift/fleet:Fleet example <fleet-id>Content copied to clipboard
Properties
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard