public class AbstractAmazonGameLift extends Object implements AmazonGameLift
AmazonGameLift
. Convenient method forms
pass through to the corresponding overload that takes a request object, which
throws an UnsupportedOperationException
.Modifier and Type | Method and Description |
---|---|
CreateAliasResult |
createAlias(CreateAliasRequest request)
Creates an alias for a fleet.
|
CreateBuildResult |
createBuild(CreateBuildRequest request)
|
CreateFleetResult |
createFleet(CreateFleetRequest request)
Creates a new fleet to host game servers.
|
CreateGameSessionResult |
createGameSession(CreateGameSessionRequest request)
Creates a multiplayer game session for players.
|
CreatePlayerSessionResult |
createPlayerSession(CreatePlayerSessionRequest request)
Adds a player to a game session and creates a player session record.
|
CreatePlayerSessionsResult |
createPlayerSessions(CreatePlayerSessionsRequest request)
Adds a group of players to a game session.
|
void |
deleteAlias(DeleteAliasRequest request)
Deletes an alias.
|
void |
deleteBuild(DeleteBuildRequest request)
Deletes a build.
|
void |
deleteFleet(DeleteFleetRequest request)
Deletes everything related to a fleet.
|
DescribeAliasResult |
describeAlias(DescribeAliasRequest request)
Retrieves properties for a specified alias.
|
DescribeBuildResult |
describeBuild(DescribeBuildRequest request)
Retrieves properties for a build.
|
DescribeEC2InstanceLimitsResult |
describeEC2InstanceLimits(DescribeEC2InstanceLimitsRequest request)
Retrieves the maximum number of instances by EC2 instance type for an AWS
account, and includes the current usage level for the account.
|
DescribeFleetAttributesResult |
describeFleetAttributes(DescribeFleetAttributesRequest request)
Retrieves fleet properties, including metadata, status, and
configuration, for one or more fleets.
|
DescribeFleetCapacityResult |
describeFleetCapacity(DescribeFleetCapacityRequest request)
Retrieves the current status of fleet capacity for one or more fleets.
|
DescribeFleetEventsResult |
describeFleetEvents(DescribeFleetEventsRequest request)
Retrieves entries from the fleet event log.
|
DescribeFleetPortSettingsResult |
describeFleetPortSettings(DescribeFleetPortSettingsRequest request)
Retrieves the port settings for a fleet.
|
DescribeFleetUtilizationResult |
describeFleetUtilization(DescribeFleetUtilizationRequest request)
Retrieves utilization statistics for one or more fleets.
|
DescribeGameSessionsResult |
describeGameSessions(DescribeGameSessionsRequest request)
Retrieves properties for a game session.
|
DescribePlayerSessionsResult |
describePlayerSessions(DescribePlayerSessionsRequest request)
Retrieves properties for one or more player sessions.
|
ResponseMetadata |
getCachedResponseMetadata(AmazonWebServiceRequest request)
Returns additional metadata for a previously executed successful request,
typically used for debugging issues where a service isn't acting as
expected.
|
GetGameSessionLogUrlResult |
getGameSessionLogUrl(GetGameSessionLogUrlRequest request)
Retrieves the location of stored game session logs for a specified game
session.
|
ListAliasesResult |
listAliases(ListAliasesRequest request)
Retrieves a collection of alias records for this AWS account.
|
ListBuildsResult |
listBuilds(ListBuildsRequest request)
Retrieves build records all builds associated with an AWS account.
|
ListFleetsResult |
listFleets(ListFleetsRequest request)
Retrieves a collection of fleet records for this AWS account.
|
RequestUploadCredentialsResult |
requestUploadCredentials(RequestUploadCredentialsRequest request)
|
ResolveAliasResult |
resolveAlias(ResolveAliasRequest request)
Retrieves the fleet ID that a specified alias is currently pointing to.
|
void |
setEndpoint(String endpoint)
Overrides the default endpoint for this client
("https://gamelift.us-east-1.amazonaws.com").
|
void |
setRegion(Region region)
An alternative to
AmazonGameLift.setEndpoint(String) , sets the
regional endpoint for this client's service calls. |
void |
shutdown()
Shuts down this client object, releasing any resources that might be held
open.
|
UpdateAliasResult |
updateAlias(UpdateAliasRequest request)
Updates properties for an alias.
|
UpdateBuildResult |
updateBuild(UpdateBuildRequest request)
Updates metadata in a build record, including the build name and version.
|
UpdateFleetAttributesResult |
updateFleetAttributes(UpdateFleetAttributesRequest request)
Updates fleet properties, including name and description, for a fleet.
|
UpdateFleetCapacityResult |
updateFleetCapacity(UpdateFleetCapacityRequest request)
Updates capacity settings for a fleet.
|
UpdateFleetPortSettingsResult |
updateFleetPortSettings(UpdateFleetPortSettingsRequest request)
Updates port settings for a fleet.
|
UpdateGameSessionResult |
updateGameSession(UpdateGameSessionRequest request)
Updates game session properties.
|
public void setEndpoint(String endpoint)
AmazonGameLift
Callers can pass in just the endpoint (ex:
"gamelift.us-east-1.amazonaws.com") or a full URL, including the protocol
(ex: "https://gamelift.us-east-1.amazonaws.com"). If the protocol is not
specified here, the default protocol from this client's
ClientConfiguration
will be used, which by default is HTTPS.
For more information on using AWS regions with the AWS SDK for Java, and a complete list of all available endpoints for all AWS services, see: http://developer.amazonwebservices.com/connect/entry.jspa?externalID= 3912
This method is not threadsafe. An endpoint should be configured when the client is created and before any service requests are made. Changing it afterwards creates inevitable race conditions for any service requests in transit or retrying.
setEndpoint
in interface AmazonGameLift
endpoint
- The endpoint (ex: "gamelift.us-east-1.amazonaws.com") or a full
URL, including the protocol (ex:
"https://gamelift.us-east-1.amazonaws.com") of the region specific
AWS endpoint this client will communicate with.public void setRegion(Region region)
AmazonGameLift
AmazonGameLift.setEndpoint(String)
, sets the
regional endpoint for this client's service calls. Callers can use this
method to control which AWS region they want to work with.
By default, all service endpoints in all regions use the https protocol.
To use http instead, specify it in the ClientConfiguration
supplied at construction.
This method is not threadsafe. A region should be configured when the client is created and before any service requests are made. Changing it afterwards creates inevitable race conditions for any service requests in transit or retrying.
setRegion
in interface AmazonGameLift
region
- The region this client will communicate with. See
Region.getRegion(com.amazonaws.regions.Regions)
for
accessing a given region. Must not be null and must be a region
where the service is available.Region.getRegion(com.amazonaws.regions.Regions)
,
Region.createClient(Class,
com.amazonaws.auth.AWSCredentialsProvider, ClientConfiguration)
,
Region.isServiceSupported(String)
public CreateAliasResult createAlias(CreateAliasRequest request)
AmazonGameLift
Creates an alias for a fleet. An alias allows you to anonymize your fleet by referencing an alias instead of a specific fleet when you create game sessions. GameLift supports two types of routing strategies for aliases. Use a simple route to point to an active fleet.
Alternatively, a terminal routing strategy allows you to display a message to incoming traffic instead of routing players to an active fleet. This option is useful when a game server is no longer supported but you want to provide better messaging than a standard 404 error.
To create a fleet alias, specify an alias name and routing strategy. Optionally, add a description. If successful, a new alias record is returned, including an alias ID, which you'll reference when creating a game session. To reassign the alias to another fleet ID, call UpdateAlias.
createAlias
in interface AmazonGameLift
request
- Represents the input for a request action.public CreateBuildResult createBuild(CreateBuildRequest request)
AmazonGameLift
To create a build, use the CLI command upload-build
, which
creates a new build record and uploads the build files in one step. (See
the GameLift Developer Guide for more details on CLI and on the upload
process.) Call this CreateBuild action only if you have your own S3
client and need to manually upload your build files.
Initializes a new build record and generates information required to upload a game build to GameLift. Once the build record has been created and is in an INITIALIZED state, you can upload your game build.
To create a new build, optionally specify a build name and version. This metadata is stored with other properties in the build record and is displayed in the Amazon GameLift console (it is not surfaced to players). If successful, this action returns the newly created build record along with an S3 storage location and AWS account credentials. Use the location and credentials to upload your game build.
createBuild
in interface AmazonGameLift
request
- Represents the input for a request action.public CreateFleetResult createFleet(CreateFleetRequest request)
AmazonGameLift
Creates a new fleet to host game servers. A fleet consists of a set of EC2 instances of a certain type, which defines the CPU, memory, storage, networking capacity, etc., of each host in the fleet. See the EC2 documentation for more information on instance types. Each instance in the fleet hosts a game server from the specified game build. Once a fleet is ACTIVE, it can begin hosting game sessions.
To create a new fleet, provide a name and the EC2 instance type for the new fleet, and specify the build and server launch path. Builds must be in a READY state before they can be used to build fleets. When configuring the new fleet, you can optionally (1) provide a set of launch parameters to be passed to a game server when activated; (2) limit incoming traffic to a specified range of IP addresses and port numbers; and (3) configure GameLift to store game session logs by specifying the path to the logs stored in your game server files. If the call is successful, GameLift performs the following tasks:
Once a fleet is created, use the following actions to change certain fleet properties (server launch parameters and log paths cannot be changed):
createFleet
in interface AmazonGameLift
request
- Represents the input for a request action.public CreateGameSessionResult createGameSession(CreateGameSessionRequest request)
AmazonGameLift
Creates a multiplayer game session for players. This action creates a game session record and assigns the new session to an instance in the specified fleet, which activates the server initialization process in your game server. A fleet must be in an ACTIVE state before a game session can be created for it.
To create a game session, specify either a fleet ID or an alias ID and indicate the maximum number of players the game session will allow. Optionally, provide a name and a set of properties for your game. If successful, a GameSession object is returned containing session properties, including an IP address. By default, newly created game sessions are set to accept adding any new players to the game session. Use UpdateGameSession to change the creation policy.
createGameSession
in interface AmazonGameLift
request
- Represents the input for a request action.public CreatePlayerSessionResult createPlayerSession(CreatePlayerSessionRequest request)
AmazonGameLift
Adds a player to a game session and creates a player session record. A game session must be in an ACTIVE state, have a creation policy of ALLOW_ALL, and have an open player slot before players can be added to the session.
To create a player session, specify a game session ID and player ID. If successful, the player is added to the game session and a new PlayerSession object is returned.
createPlayerSession
in interface AmazonGameLift
request
- Represents the input for a request action.public CreatePlayerSessionsResult createPlayerSessions(CreatePlayerSessionsRequest request)
AmazonGameLift
Adds a group of players to a game session. Similar to CreatePlayerSession, this action allows you to add multiple players in a single call, which is useful for games that provide party and/or matchmaking features. A game session must be in an ACTIVE state, have a creation policy of ALLOW_ALL, and have an open player slot before players can be added to the session.
To create player sessions, specify a game session ID and a list of player IDs. If successful, the players are added to the game session and a set of new PlayerSession objects is returned.
createPlayerSessions
in interface AmazonGameLift
request
- Represents the input for a request action.public void deleteAlias(DeleteAliasRequest request)
AmazonGameLift
Deletes an alias. This action removes all record of the alias; game clients attempting to access a game server using the deleted alias will receive an error. To delete an alias, specify the alias ID to be deleted.
deleteAlias
in interface AmazonGameLift
request
- Represents the input for a request action.public void deleteBuild(DeleteBuildRequest request)
AmazonGameLift
Deletes a build. This action permanently deletes the build record and any uploaded build files.
To delete a build, specify the build's ID. Deleting a build does not affect the status of any active fleets, but you can no longer create new fleets for the deleted build.
deleteBuild
in interface AmazonGameLift
request
- Represents the input for a request action.public void deleteFleet(DeleteFleetRequest request)
AmazonGameLift
Deletes everything related to a fleet. Before deleting a fleet, you must set the fleet's desired capacity to zero (UpdateFleetCapacity).
This action deallocates the fleet's resources and the fleet record. Once a fleet is deleted, you will no longer be able to use a fleet.
deleteFleet
in interface AmazonGameLift
request
- Represents the input for a request action.public DescribeAliasResult describeAlias(DescribeAliasRequest request)
AmazonGameLift
Retrieves properties for a specified alias. To get the alias, specify an alias ID. If successful, an Alias object is returned.
describeAlias
in interface AmazonGameLift
request
- Represents the input for a request action.public DescribeBuildResult describeBuild(DescribeBuildRequest request)
AmazonGameLift
Retrieves properties for a build. To get a build record, specify a build ID. If successful, an object containing the build properties is returned.
describeBuild
in interface AmazonGameLift
request
- Represents the input for a request action.public DescribeEC2InstanceLimitsResult describeEC2InstanceLimits(DescribeEC2InstanceLimitsRequest request)
AmazonGameLift
Retrieves the maximum number of instances by EC2 instance type for an AWS account, and includes the current usage level for the account.
describeEC2InstanceLimits
in interface AmazonGameLift
request
- Represents the input for a request action.public DescribeFleetAttributesResult describeFleetAttributes(DescribeFleetAttributesRequest request)
AmazonGameLift
Retrieves fleet properties, including metadata, status, and configuration, for one or more fleets. You can request attributes for all fleets, or specify a list of one or more fleet IDs. If successful, a FleetAttributes object is returned for each requested fleet ID. When requesting all fleets, use the pagination parameters to retrieve results as a set of sequential pages. When specifying a list of fleet IDs, an attribute object will only be returned for fleets that currently exist.
There may be a maximum number of fleet IDs you can specify in one request. If a request exceeds this maximum, the request will fail and the error message will include the maximum allowed.
describeFleetAttributes
in interface AmazonGameLift
request
- Represents the input for a request action.public DescribeFleetCapacityResult describeFleetCapacity(DescribeFleetCapacityRequest request)
AmazonGameLift
Retrieves the current status of fleet capacity for one or more fleets. This information includes the number of instances that have been requested for the fleet and the number currently active. You can request capacity for all fleets, or specify a list of one or more fleet IDs. If successful, an FleetCapacity object is returned for each requested fleet ID. When requesting all fleets, use the pagination parameters to retrieve results as a set of sequential pages. When specifying a list of fleet IDs, an attribute object will only be returned for fleets that currently exist.
There may be a maximum number of fleet IDs you can specify in one request. If a request exceeds this maximum, the request will fail and the error message will include the maximum allowed.
describeFleetCapacity
in interface AmazonGameLift
request
- Represents the input for a request action.public DescribeFleetEventsResult describeFleetEvents(DescribeFleetEventsRequest request)
AmazonGameLift
Retrieves entries from the fleet event log. You can specify a time range to limit the result set. This action provides pagination parameters, so you can opt to retrieve results as a set of sequential pages. If successful, a collection of event log entries matching the request are returned.
describeFleetEvents
in interface AmazonGameLift
request
- Represents the input for a request action.public DescribeFleetPortSettingsResult describeFleetPortSettings(DescribeFleetPortSettingsRequest request)
AmazonGameLift
Retrieves the port settings for a fleet. Port settings are used to limit incoming traffic access to game servers in the fleet. To get a fleet's port settings, specify a fleet ID. If successful, an IpPermission object is returned for the requested fleet ID. If the requested fleet has been deleted, the result set will be empty.
describeFleetPortSettings
in interface AmazonGameLift
request
- Represents the input for a request action.public DescribeFleetUtilizationResult describeFleetUtilization(DescribeFleetUtilizationRequest request)
AmazonGameLift
Retrieves utilization statistics for one or more fleets. You can request utilization data for all fleets, or specify a list of one or more fleet IDs. If successful, a FleetUtilization object is returned for each requested fleet ID. When requesting all fleets, use the pagination parameters to retrieve results as a set of sequential pages. When specifying a list of fleet IDs, a utilization object will only be returned for fleets that currently exist.
There may be a maximum number of fleet IDs you can specify in one request. If a request exceeds this maximum, the request will fail and the error message will include the maximum allowed.
describeFleetUtilization
in interface AmazonGameLift
request
- Represents the input for a request action.public DescribeGameSessionsResult describeGameSessions(DescribeGameSessionsRequest request)
AmazonGameLift
Retrieves properties for a game session. You can request properties for a single game session or for all sessions currently running on a fleet.
To get a game session record, specify a single game session ID. Alternatively, you can retrieve properties for all game sessions on a fleet by providing either a fleet ID or alias ID. You can optionally filter this request by game session status. This action provides pagination parameters, so you can opt to retrieve results in sequential chunks. If successful, a GameSession object is returned for each session matching the request.
describeGameSessions
in interface AmazonGameLift
request
- Represents the input for a request action.public DescribePlayerSessionsResult describePlayerSessions(DescribePlayerSessionsRequest request)
AmazonGameLift
Retrieves properties for one or more player sessions. This action can be used for several purposes: (1) provide a PlayerSessionId to request properties for a specific player session; (2) provide a GameSessionId to request properties for all player sessions in the specified game session; (3) provide a PlayerId to request properties for all player sessions of a specified player.
To get game session record(s), specify only one of the following: a player session ID, a game session ID, or a player ID. You can optionally filter this request by player session status. This action provides pagination parameters, so you can opt to retrieve results as a set of sequential pages. If successful, a PlayerSession object is returned for each session matching the request.
describePlayerSessions
in interface AmazonGameLift
request
- Represents the input for a request action.public GetGameSessionLogUrlResult getGameSessionLogUrl(GetGameSessionLogUrlRequest request)
AmazonGameLift
Retrieves the location of stored game session logs for a specified game session. When a game session is terminated, GameLift automatically stores the logs in S3. Use this URL to download the logs.
See the AWS Service Limits page for maximum log file sizes. Log files that exceed this limit will not be saved.
getGameSessionLogUrl
in interface AmazonGameLift
request
- Represents the input for a request action.public ListAliasesResult listAliases(ListAliasesRequest request)
AmazonGameLift
Retrieves a collection of alias records for this AWS account. You can opt to filter the result set by alias name and/or routing strategy type. This action provides pagination parameters, so you can opt to retrieve results in sequential chunks.
Aliases are not listed in any particular order.
listAliases
in interface AmazonGameLift
request
- Represents the input for a request action.public ListBuildsResult listBuilds(ListBuildsRequest request)
AmazonGameLift
Retrieves build records all builds associated with an AWS account. You can filter the result set by build status. This action provides pagination parameters, so you can opt to retrieve the results in a set of sequential pages.
Build records are not listed in any particular order.
listBuilds
in interface AmazonGameLift
request
- Represents the input for a request action.public ListFleetsResult listFleets(ListFleetsRequest request)
AmazonGameLift
Retrieves a collection of fleet records for this AWS account. You can opt to filter the result set by build ID. This action provides pagination parameters, so you can opt to retrieve results in sequential chunks.
Fleet records are not listed in any particular order.
listFleets
in interface AmazonGameLift
request
- Represents the input for a request action.public RequestUploadCredentialsResult requestUploadCredentials(RequestUploadCredentialsRequest request)
AmazonGameLift
Call this action only if you need credentials for a build created with
CreateBuild. This is a rare situation; in most cases, builds are
created using the CLI command upload-build
, which creates a
build record and also uploads build files.
Retrieves a fresh set of upload credentials and the assigned S3 storage location for a specific build. Valid credentials are required to upload your game build files to S3. These credentials are returned when you create the build, but they have a limited lifespan. You can get fresh credentials and use them to re-upload game files as until the build state moves to READY. After this point, you'll need to create a brand new build.
requestUploadCredentials
in interface AmazonGameLift
request
- Represents the input for a request action.public ResolveAliasResult resolveAlias(ResolveAliasRequest request)
AmazonGameLift
Retrieves the fleet ID that a specified alias is currently pointing to.
resolveAlias
in interface AmazonGameLift
request
- Represents the input for a request action.public UpdateAliasResult updateAlias(UpdateAliasRequest request)
AmazonGameLift
Updates properties for an alias. To update properties, specify the alias ID to be updated and provide the information to be changed. To reassign an alias to another fleet, provide an updated routing strategy. If successful, the updated alias record is returned.
updateAlias
in interface AmazonGameLift
request
- Represents the input for a request action.public UpdateBuildResult updateBuild(UpdateBuildRequest request)
AmazonGameLift
Updates metadata in a build record, including the build name and version. To update the metadata, specify the build ID to update and provide the new values. If successful, a build object containing the updated metadata is returned.
updateBuild
in interface AmazonGameLift
request
- Represents the input for a request action.public UpdateFleetAttributesResult updateFleetAttributes(UpdateFleetAttributesRequest request)
AmazonGameLift
Updates fleet properties, including name and description, for a fleet. To update metadata, specify the fleet ID and the property values you want to change. If successful, the fleet ID for the updated fleet is returned.
updateFleetAttributes
in interface AmazonGameLift
request
- Represents the input for a request action.public UpdateFleetCapacityResult updateFleetCapacity(UpdateFleetCapacityRequest request)
AmazonGameLift
Updates capacity settings for a fleet. Use this action to specify the number of EC2 instances (hosts) you want this fleet to contain. Before calling this action, you may want to call DescribeEC2InstanceLimits to get the maximum capacity based on the fleet's EC2 instance type.
To update fleet capacity, specify the fleet ID and the desired number of instances. If successful, GameLift will spin up or terminate instances so that the fleet's active instance count matches the desired instance count. You can view a fleet's current capacity information by calling DescribeFleetCapacity. If the desired instance count is higher than the instance type's limit, the call will throw "Limit Exceeded" exception.
updateFleetCapacity
in interface AmazonGameLift
request
- Represents the input for a request action.public UpdateFleetPortSettingsResult updateFleetPortSettings(UpdateFleetPortSettingsRequest request)
AmazonGameLift
Updates port settings for a fleet. To update settings, specify the fleet ID to be updated and list the permissions you want to update. List the permissions you want to add in InboundPermissionAuthorizations, and permissions you want to remove in InboundPermissionRevocations. Permissions to be removed must match existing fleet permissions. If successful, the fleet ID for the updated fleet is returned.
updateFleetPortSettings
in interface AmazonGameLift
request
- Represents the input for a request action.public UpdateGameSessionResult updateGameSession(UpdateGameSessionRequest request)
AmazonGameLift
Updates game session properties. This includes the session name, maximum player count and the player session creation policy, which either allows or denies new players from joining the session. To update a game session, specify the game session ID and the values you want to change. If successful, an updated GameSession object is returned.
updateGameSession
in interface AmazonGameLift
request
- Represents the input for a request action.public void shutdown()
AmazonGameLift
shutdown
in interface AmazonGameLift
public ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request)
AmazonGameLift
Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic information for an executed request, you should use this method to retrieve it as soon as possible after executing a request.
getCachedResponseMetadata
in interface AmazonGameLift
request
- The originally executed request.Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.