mirror of https://github.com/tidwall/tile38.git
19093 lines
675 KiB
Go
19093 lines
675 KiB
Go
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||
|
||
package gamelift
|
||
|
||
import (
|
||
"fmt"
|
||
"time"
|
||
|
||
"github.com/aws/aws-sdk-go/aws"
|
||
"github.com/aws/aws-sdk-go/aws/awsutil"
|
||
"github.com/aws/aws-sdk-go/aws/request"
|
||
"github.com/aws/aws-sdk-go/private/protocol"
|
||
"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
|
||
)
|
||
|
||
const opAcceptMatch = "AcceptMatch"
|
||
|
||
// AcceptMatchRequest generates a "aws/request.Request" representing the
|
||
// client's request for the AcceptMatch operation. The "output" return
|
||
// value will be populated with the request's response once the request complets
|
||
// successfuly.
|
||
//
|
||
// Use "Send" method on the returned Request to send the API call to the service.
|
||
// the "output" return value is not valid until after Send returns without error.
|
||
//
|
||
// See AcceptMatch for more information on using the AcceptMatch
|
||
// API call, and error handling.
|
||
//
|
||
// This method is useful when you want to inject custom logic or configuration
|
||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||
//
|
||
//
|
||
// // Example sending a request using the AcceptMatchRequest method.
|
||
// req, resp := client.AcceptMatchRequest(params)
|
||
//
|
||
// err := req.Send()
|
||
// if err == nil { // resp is now filled
|
||
// fmt.Println(resp)
|
||
// }
|
||
//
|
||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/AcceptMatch
|
||
func (c *GameLift) AcceptMatchRequest(input *AcceptMatchInput) (req *request.Request, output *AcceptMatchOutput) {
|
||
op := &request.Operation{
|
||
Name: opAcceptMatch,
|
||
HTTPMethod: "POST",
|
||
HTTPPath: "/",
|
||
}
|
||
|
||
if input == nil {
|
||
input = &AcceptMatchInput{}
|
||
}
|
||
|
||
output = &AcceptMatchOutput{}
|
||
req = c.newRequest(op, input, output)
|
||
return
|
||
}
|
||
|
||
// AcceptMatch API operation for Amazon GameLift.
|
||
//
|
||
// Registers a player's acceptance or rejection of a proposed FlexMatch match.
|
||
// A matchmaking configuration may require player acceptance; if so, then matches
|
||
// built with that configuration cannot be completed unless all players accept
|
||
// the proposed match within a specified time limit.
|
||
//
|
||
// When FlexMatch builds a match, all the matchmaking tickets involved in the
|
||
// proposed match are placed into status REQUIRES_ACCEPTANCE. This is a trigger
|
||
// for your game to get acceptance from all players in the ticket. Acceptances
|
||
// are only valid for tickets when they are in this status; all other acceptances
|
||
// result in an error.
|
||
//
|
||
// To register acceptance, specify the ticket ID, a response, and one or more
|
||
// players. Once all players have registered acceptance, the matchmaking tickets
|
||
// advance to status PLACING, where a new game session is created for the match.
|
||
//
|
||
// If any player rejects the match, or if acceptances are not received before
|
||
// a specified timeout, the proposed match is dropped. The matchmaking tickets
|
||
// are then handled in one of two ways: For tickets where all players accepted
|
||
// the match, the ticket status is returned to SEARCHING to find a new match.
|
||
// For tickets where one or more players failed to accept the match, the ticket
|
||
// status is set to FAILED, and processing is terminated. A new matchmaking
|
||
// request for these players can be submitted as needed.
|
||
//
|
||
// Matchmaking-related operations include:
|
||
//
|
||
// * StartMatchmaking
|
||
//
|
||
// * DescribeMatchmaking
|
||
//
|
||
// * StopMatchmaking
|
||
//
|
||
// * AcceptMatch
|
||
//
|
||
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
|
||
// with awserr.Error's Code and Message methods to get detailed information about
|
||
// the error.
|
||
//
|
||
// See the AWS API reference guide for Amazon GameLift's
|
||
// API operation AcceptMatch for usage and error information.
|
||
//
|
||
// Returned Error Codes:
|
||
// * ErrCodeInvalidRequestException "InvalidRequestException"
|
||
// One or more parameter values in the request are invalid. Correct the invalid
|
||
// parameter values before retrying.
|
||
//
|
||
// * ErrCodeNotFoundException "NotFoundException"
|
||
// A service resource associated with the request could not be found. Clients
|
||
// should not retry such requests.
|
||
//
|
||
// * ErrCodeInternalServiceException "InternalServiceException"
|
||
// The service encountered an unrecoverable internal failure while processing
|
||
// the request. Clients can retry such requests immediately or after a waiting
|
||
// period.
|
||
//
|
||
// * ErrCodeUnsupportedRegionException "UnsupportedRegionException"
|
||
// The requested operation is not supported in the region specified.
|
||
//
|
||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/AcceptMatch
|
||
func (c *GameLift) AcceptMatch(input *AcceptMatchInput) (*AcceptMatchOutput, error) {
|
||
req, out := c.AcceptMatchRequest(input)
|
||
return out, req.Send()
|
||
}
|
||
|
||
// AcceptMatchWithContext is the same as AcceptMatch with the addition of
|
||
// the ability to pass a context and additional request options.
|
||
//
|
||
// See AcceptMatch for details on how to use this API operation.
|
||
//
|
||
// The context must be non-nil and will be used for request cancellation. If
|
||
// the context is nil a panic will occur. In the future the SDK may create
|
||
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
|
||
// for more information on using Contexts.
|
||
func (c *GameLift) AcceptMatchWithContext(ctx aws.Context, input *AcceptMatchInput, opts ...request.Option) (*AcceptMatchOutput, error) {
|
||
req, out := c.AcceptMatchRequest(input)
|
||
req.SetContext(ctx)
|
||
req.ApplyOptions(opts...)
|
||
return out, req.Send()
|
||
}
|
||
|
||
const opCreateAlias = "CreateAlias"
|
||
|
||
// CreateAliasRequest generates a "aws/request.Request" representing the
|
||
// client's request for the CreateAlias operation. The "output" return
|
||
// value will be populated with the request's response once the request complets
|
||
// successfuly.
|
||
//
|
||
// Use "Send" method on the returned Request to send the API call to the service.
|
||
// the "output" return value is not valid until after Send returns without error.
|
||
//
|
||
// See CreateAlias for more information on using the CreateAlias
|
||
// API call, and error handling.
|
||
//
|
||
// This method is useful when you want to inject custom logic or configuration
|
||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||
//
|
||
//
|
||
// // Example sending a request using the CreateAliasRequest method.
|
||
// req, resp := client.CreateAliasRequest(params)
|
||
//
|
||
// err := req.Send()
|
||
// if err == nil { // resp is now filled
|
||
// fmt.Println(resp)
|
||
// }
|
||
//
|
||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreateAlias
|
||
func (c *GameLift) CreateAliasRequest(input *CreateAliasInput) (req *request.Request, output *CreateAliasOutput) {
|
||
op := &request.Operation{
|
||
Name: opCreateAlias,
|
||
HTTPMethod: "POST",
|
||
HTTPPath: "/",
|
||
}
|
||
|
||
if input == nil {
|
||
input = &CreateAliasInput{}
|
||
}
|
||
|
||
output = &CreateAliasOutput{}
|
||
req = c.newRequest(op, input, output)
|
||
return
|
||
}
|
||
|
||
// CreateAlias API operation for Amazon GameLift.
|
||
//
|
||
// Creates an alias for a fleet. In most situations, you can use an alias ID
|
||
// in place of a fleet ID. By using a fleet alias instead of a specific fleet
|
||
// ID, you can switch gameplay and players to a new fleet without changing your
|
||
// game client or other game components. For example, for games in production,
|
||
// using an alias allows you to seamlessly redirect your player base to a new
|
||
// game server update.
|
||
//
|
||
// Amazon GameLift supports two types of routing strategies for aliases: simple
|
||
// and terminal. A simple alias points to an active fleet. A terminal alias
|
||
// is used to display messaging or link to a URL instead of routing players
|
||
// to an active fleet. For example, you might use a terminal alias when a game
|
||
// version is no longer supported and you want to direct players to an upgrade
|
||
// site.
|
||
//
|
||
// To create a fleet alias, specify an alias name, routing strategy, and optional
|
||
// description. Each simple alias can point to only one fleet, but a fleet can
|
||
// have multiple aliases. If successful, a new alias record is returned, including
|
||
// an alias ID, which you can reference when creating a game session. You can
|
||
// reassign an alias to another fleet by calling UpdateAlias.
|
||
//
|
||
// Alias-related operations include:
|
||
//
|
||
// * CreateAlias
|
||
//
|
||
// * ListAliases
|
||
//
|
||
// * DescribeAlias
|
||
//
|
||
// * UpdateAlias
|
||
//
|
||
// * DeleteAlias
|
||
//
|
||
// * ResolveAlias
|
||
//
|
||
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
|
||
// with awserr.Error's Code and Message methods to get detailed information about
|
||
// the error.
|
||
//
|
||
// See the AWS API reference guide for Amazon GameLift's
|
||
// API operation CreateAlias for usage and error information.
|
||
//
|
||
// Returned Error Codes:
|
||
// * ErrCodeUnauthorizedException "UnauthorizedException"
|
||
// The client failed authentication. Clients should not retry such requests.
|
||
//
|
||
// * ErrCodeInvalidRequestException "InvalidRequestException"
|
||
// One or more parameter values in the request are invalid. Correct the invalid
|
||
// parameter values before retrying.
|
||
//
|
||
// * ErrCodeConflictException "ConflictException"
|
||
// The requested operation would cause a conflict with the current state of
|
||
// a service resource associated with the request. Resolve the conflict before
|
||
// retrying this request.
|
||
//
|
||
// * ErrCodeInternalServiceException "InternalServiceException"
|
||
// The service encountered an unrecoverable internal failure while processing
|
||
// the request. Clients can retry such requests immediately or after a waiting
|
||
// period.
|
||
//
|
||
// * ErrCodeLimitExceededException "LimitExceededException"
|
||
// The requested operation would cause the resource to exceed the allowed service
|
||
// limit. Resolve the issue before retrying.
|
||
//
|
||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreateAlias
|
||
func (c *GameLift) CreateAlias(input *CreateAliasInput) (*CreateAliasOutput, error) {
|
||
req, out := c.CreateAliasRequest(input)
|
||
return out, req.Send()
|
||
}
|
||
|
||
// CreateAliasWithContext is the same as CreateAlias with the addition of
|
||
// the ability to pass a context and additional request options.
|
||
//
|
||
// See CreateAlias for details on how to use this API operation.
|
||
//
|
||
// The context must be non-nil and will be used for request cancellation. If
|
||
// the context is nil a panic will occur. In the future the SDK may create
|
||
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
|
||
// for more information on using Contexts.
|
||
func (c *GameLift) CreateAliasWithContext(ctx aws.Context, input *CreateAliasInput, opts ...request.Option) (*CreateAliasOutput, error) {
|
||
req, out := c.CreateAliasRequest(input)
|
||
req.SetContext(ctx)
|
||
req.ApplyOptions(opts...)
|
||
return out, req.Send()
|
||
}
|
||
|
||
const opCreateBuild = "CreateBuild"
|
||
|
||
// CreateBuildRequest generates a "aws/request.Request" representing the
|
||
// client's request for the CreateBuild operation. The "output" return
|
||
// value will be populated with the request's response once the request complets
|
||
// successfuly.
|
||
//
|
||
// Use "Send" method on the returned Request to send the API call to the service.
|
||
// the "output" return value is not valid until after Send returns without error.
|
||
//
|
||
// See CreateBuild for more information on using the CreateBuild
|
||
// API call, and error handling.
|
||
//
|
||
// This method is useful when you want to inject custom logic or configuration
|
||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||
//
|
||
//
|
||
// // Example sending a request using the CreateBuildRequest method.
|
||
// req, resp := client.CreateBuildRequest(params)
|
||
//
|
||
// err := req.Send()
|
||
// if err == nil { // resp is now filled
|
||
// fmt.Println(resp)
|
||
// }
|
||
//
|
||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreateBuild
|
||
func (c *GameLift) CreateBuildRequest(input *CreateBuildInput) (req *request.Request, output *CreateBuildOutput) {
|
||
op := &request.Operation{
|
||
Name: opCreateBuild,
|
||
HTTPMethod: "POST",
|
||
HTTPPath: "/",
|
||
}
|
||
|
||
if input == nil {
|
||
input = &CreateBuildInput{}
|
||
}
|
||
|
||
output = &CreateBuildOutput{}
|
||
req = c.newRequest(op, input, output)
|
||
return
|
||
}
|
||
|
||
// CreateBuild API operation for Amazon GameLift.
|
||
//
|
||
// Creates a new Amazon GameLift build from a set of game server binary files
|
||
// stored in an Amazon Simple Storage Service (Amazon S3) location. To use this
|
||
// API call, create a .zip file containing all of the files for the build and
|
||
// store it in an Amazon S3 bucket under your AWS account. For help on packaging
|
||
// your build files and creating a build, see Uploading Your Game to Amazon
|
||
// GameLift (http://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-build-intro.html).
|
||
//
|
||
// Use this API action ONLY if you are storing your game build files in an Amazon
|
||
// S3 bucket. To create a build using files stored locally, use the CLI command
|
||
// upload-build (http://docs.aws.amazon.com/cli/latest/reference/gamelift/upload-build.html),
|
||
// which uploads the build files from a file location you specify.
|
||
//
|
||
// To create a new build using CreateBuild, identify the storage location and
|
||
// operating system of your game build. You also have the option of specifying
|
||
// a build name and version. If successful, this action creates a new build
|
||
// record with an unique build ID and in INITIALIZED status. Use the API call
|
||
// DescribeBuild to check the status of your build. A build must be in READY
|
||
// status before it can be used to create fleets to host your game.
|
||
//
|
||
// Build-related operations include:
|
||
//
|
||
// * CreateBuild
|
||
//
|
||
// * ListBuilds
|
||
//
|
||
// * DescribeBuild
|
||
//
|
||
// * UpdateBuild
|
||
//
|
||
// * DeleteBuild
|
||
//
|
||
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
|
||
// with awserr.Error's Code and Message methods to get detailed information about
|
||
// the error.
|
||
//
|
||
// See the AWS API reference guide for Amazon GameLift's
|
||
// API operation CreateBuild for usage and error information.
|
||
//
|
||
// Returned Error Codes:
|
||
// * ErrCodeUnauthorizedException "UnauthorizedException"
|
||
// The client failed authentication. Clients should not retry such requests.
|
||
//
|
||
// * ErrCodeInvalidRequestException "InvalidRequestException"
|
||
// One or more parameter values in the request are invalid. Correct the invalid
|
||
// parameter values before retrying.
|
||
//
|
||
// * ErrCodeConflictException "ConflictException"
|
||
// The requested operation would cause a conflict with the current state of
|
||
// a service resource associated with the request. Resolve the conflict before
|
||
// retrying this request.
|
||
//
|
||
// * ErrCodeInternalServiceException "InternalServiceException"
|
||
// The service encountered an unrecoverable internal failure while processing
|
||
// the request. Clients can retry such requests immediately or after a waiting
|
||
// period.
|
||
//
|
||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreateBuild
|
||
func (c *GameLift) CreateBuild(input *CreateBuildInput) (*CreateBuildOutput, error) {
|
||
req, out := c.CreateBuildRequest(input)
|
||
return out, req.Send()
|
||
}
|
||
|
||
// CreateBuildWithContext is the same as CreateBuild with the addition of
|
||
// the ability to pass a context and additional request options.
|
||
//
|
||
// See CreateBuild for details on how to use this API operation.
|
||
//
|
||
// The context must be non-nil and will be used for request cancellation. If
|
||
// the context is nil a panic will occur. In the future the SDK may create
|
||
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
|
||
// for more information on using Contexts.
|
||
func (c *GameLift) CreateBuildWithContext(ctx aws.Context, input *CreateBuildInput, opts ...request.Option) (*CreateBuildOutput, error) {
|
||
req, out := c.CreateBuildRequest(input)
|
||
req.SetContext(ctx)
|
||
req.ApplyOptions(opts...)
|
||
return out, req.Send()
|
||
}
|
||
|
||
const opCreateFleet = "CreateFleet"
|
||
|
||
// CreateFleetRequest generates a "aws/request.Request" representing the
|
||
// client's request for the CreateFleet operation. The "output" return
|
||
// value will be populated with the request's response once the request complets
|
||
// successfuly.
|
||
//
|
||
// Use "Send" method on the returned Request to send the API call to the service.
|
||
// the "output" return value is not valid until after Send returns without error.
|
||
//
|
||
// See CreateFleet for more information on using the CreateFleet
|
||
// API call, and error handling.
|
||
//
|
||
// This method is useful when you want to inject custom logic or configuration
|
||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||
//
|
||
//
|
||
// // Example sending a request using the CreateFleetRequest method.
|
||
// req, resp := client.CreateFleetRequest(params)
|
||
//
|
||
// err := req.Send()
|
||
// if err == nil { // resp is now filled
|
||
// fmt.Println(resp)
|
||
// }
|
||
//
|
||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreateFleet
|
||
func (c *GameLift) CreateFleetRequest(input *CreateFleetInput) (req *request.Request, output *CreateFleetOutput) {
|
||
op := &request.Operation{
|
||
Name: opCreateFleet,
|
||
HTTPMethod: "POST",
|
||
HTTPPath: "/",
|
||
}
|
||
|
||
if input == nil {
|
||
input = &CreateFleetInput{}
|
||
}
|
||
|
||
output = &CreateFleetOutput{}
|
||
req = c.newRequest(op, input, output)
|
||
return
|
||
}
|
||
|
||
// CreateFleet API operation for Amazon GameLift.
|
||
//
|
||
// Creates a new fleet to run your game servers. A fleet is a set of Amazon
|
||
// Elastic Compute Cloud (Amazon EC2) instances, each of which can run multiple
|
||
// server processes to host game sessions. You configure a fleet to create instances
|
||
// with certain hardware specifications (see Amazon EC2 Instance Types (http://aws.amazon.com/ec2/instance-types/)
|
||
// for more information), and deploy a specified game build to each instance.
|
||
// A newly created fleet passes through several statuses; once it reaches the
|
||
// ACTIVE status, it can begin hosting game sessions.
|
||
//
|
||
// To create a new fleet, you must specify the following: (1) fleet name, (2)
|
||
// build ID of an uploaded game build, (3) an EC2 instance type, and (4) a run-time
|
||
// configuration that describes which server processes to run on each instance
|
||
// in the fleet. (Although the run-time configuration is not a required parameter,
|
||
// the fleet cannot be successfully activated without it.)
|
||
//
|
||
// You can also configure the new fleet with the following settings:
|
||
//
|
||
// * Fleet description
|
||
//
|
||
// * Access permissions for inbound traffic
|
||
//
|
||
// * Fleet-wide game session protection
|
||
//
|
||
// * Resource creation limit
|
||
//
|
||
// If you use Amazon CloudWatch for metrics, you can add the new fleet to a
|
||
// metric group. This allows you to view aggregated metrics for a set of fleets.
|
||
// Once you specify a metric group, the new fleet's metrics are included in
|
||
// the metric group's data.
|
||
//
|
||
// You have the option of creating a VPC peering connection with the new fleet.
|
||
// For more information, see VPC Peering with Amazon GameLift Fleets (http://docs.aws.amazon.com/gamelift/latest/developerguide/vpc-peering.html).
|
||
//
|
||
// If the CreateFleet call is successful, Amazon GameLift performs the following
|
||
// tasks:
|
||
//
|
||
// * Creates a fleet record and sets the status to NEW (followed by other
|
||
// statuses as the fleet is activated).
|
||
//
|
||
// * Sets the fleet's target capacity to 1 (desired instances), which causes
|
||
// Amazon GameLift to start one new EC2 instance.
|
||
//
|
||
// * Starts launching server processes on the instance. If the fleet is configured
|
||
// to run multiple server processes per instance, Amazon GameLift staggers
|
||
// each launch by a few seconds.
|
||
//
|
||
// * Begins writing events to the fleet event log, which can be accessed
|
||
// in the Amazon GameLift console.
|
||
//
|
||
// * Sets the fleet's status to ACTIVE as soon as one server process in the
|
||
// fleet is ready to host a game session.
|
||
//
|
||
// Fleet-related operations include:
|
||
//
|
||
// * CreateFleet
|
||
//
|
||
// * ListFleets
|
||
//
|
||
// * Describe fleets:
|
||
//
|
||
// DescribeFleetAttributes
|
||
//
|
||
// DescribeFleetPortSettings
|
||
//
|
||
// DescribeFleetUtilization
|
||
//
|
||
// DescribeRuntimeConfiguration
|
||
//
|
||
// DescribeFleetEvents
|
||
//
|
||
// * Update fleets:
|
||
//
|
||
// UpdateFleetAttributes
|
||
//
|
||
// UpdateFleetCapacity
|
||
//
|
||
// UpdateFleetPortSettings
|
||
//
|
||
// UpdateRuntimeConfiguration
|
||
//
|
||
// * Manage fleet capacity:
|
||
//
|
||
// DescribeFleetCapacity
|
||
//
|
||
// UpdateFleetCapacity
|
||
//
|
||
// PutScalingPolicy (automatic scaling)
|
||
//
|
||
// DescribeScalingPolicies (automatic scaling)
|
||
//
|
||
// DeleteScalingPolicy (automatic scaling)
|
||
//
|
||
// DescribeEC2InstanceLimits
|
||
//
|
||
// * DeleteFleet
|
||
//
|
||
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
|
||
// with awserr.Error's Code and Message methods to get detailed information about
|
||
// the error.
|
||
//
|
||
// See the AWS API reference guide for Amazon GameLift's
|
||
// API operation CreateFleet for usage and error information.
|
||
//
|
||
// Returned Error Codes:
|
||
// * ErrCodeInternalServiceException "InternalServiceException"
|
||
// The service encountered an unrecoverable internal failure while processing
|
||
// the request. Clients can retry such requests immediately or after a waiting
|
||
// period.
|
||
//
|
||
// * ErrCodeNotFoundException "NotFoundException"
|
||
// A service resource associated with the request could not be found. Clients
|
||
// should not retry such requests.
|
||
//
|
||
// * ErrCodeConflictException "ConflictException"
|
||
// The requested operation would cause a conflict with the current state of
|
||
// a service resource associated with the request. Resolve the conflict before
|
||
// retrying this request.
|
||
//
|
||
// * ErrCodeLimitExceededException "LimitExceededException"
|
||
// The requested operation would cause the resource to exceed the allowed service
|
||
// limit. Resolve the issue before retrying.
|
||
//
|
||
// * ErrCodeInvalidRequestException "InvalidRequestException"
|
||
// One or more parameter values in the request are invalid. Correct the invalid
|
||
// parameter values before retrying.
|
||
//
|
||
// * ErrCodeUnauthorizedException "UnauthorizedException"
|
||
// The client failed authentication. Clients should not retry such requests.
|
||
//
|
||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreateFleet
|
||
func (c *GameLift) CreateFleet(input *CreateFleetInput) (*CreateFleetOutput, error) {
|
||
req, out := c.CreateFleetRequest(input)
|
||
return out, req.Send()
|
||
}
|
||
|
||
// CreateFleetWithContext is the same as CreateFleet with the addition of
|
||
// the ability to pass a context and additional request options.
|
||
//
|
||
// See CreateFleet for details on how to use this API operation.
|
||
//
|
||
// The context must be non-nil and will be used for request cancellation. If
|
||
// the context is nil a panic will occur. In the future the SDK may create
|
||
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
|
||
// for more information on using Contexts.
|
||
func (c *GameLift) CreateFleetWithContext(ctx aws.Context, input *CreateFleetInput, opts ...request.Option) (*CreateFleetOutput, error) {
|
||
req, out := c.CreateFleetRequest(input)
|
||
req.SetContext(ctx)
|
||
req.ApplyOptions(opts...)
|
||
return out, req.Send()
|
||
}
|
||
|
||
const opCreateGameSession = "CreateGameSession"
|
||
|
||
// CreateGameSessionRequest generates a "aws/request.Request" representing the
|
||
// client's request for the CreateGameSession operation. The "output" return
|
||
// value will be populated with the request's response once the request complets
|
||
// successfuly.
|
||
//
|
||
// Use "Send" method on the returned Request to send the API call to the service.
|
||
// the "output" return value is not valid until after Send returns without error.
|
||
//
|
||
// See CreateGameSession for more information on using the CreateGameSession
|
||
// API call, and error handling.
|
||
//
|
||
// This method is useful when you want to inject custom logic or configuration
|
||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||
//
|
||
//
|
||
// // Example sending a request using the CreateGameSessionRequest method.
|
||
// req, resp := client.CreateGameSessionRequest(params)
|
||
//
|
||
// err := req.Send()
|
||
// if err == nil { // resp is now filled
|
||
// fmt.Println(resp)
|
||
// }
|
||
//
|
||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreateGameSession
|
||
func (c *GameLift) CreateGameSessionRequest(input *CreateGameSessionInput) (req *request.Request, output *CreateGameSessionOutput) {
|
||
op := &request.Operation{
|
||
Name: opCreateGameSession,
|
||
HTTPMethod: "POST",
|
||
HTTPPath: "/",
|
||
}
|
||
|
||
if input == nil {
|
||
input = &CreateGameSessionInput{}
|
||
}
|
||
|
||
output = &CreateGameSessionOutput{}
|
||
req = c.newRequest(op, input, output)
|
||
return
|
||
}
|
||
|
||
// CreateGameSession API operation for Amazon GameLift.
|
||
//
|
||
// Creates a multiplayer game session for players. This action creates a game
|
||
// session record and assigns an available server process in the specified fleet
|
||
// to host the game session. A fleet must have an ACTIVE status before a game
|
||
// session can be created in it.
|
||
//
|
||
// To create a game session, specify either fleet ID or alias ID and indicate
|
||
// a maximum number of players to allow in the game session. You can also provide
|
||
// a name and game-specific properties for this game session. If successful,
|
||
// a GameSession object is returned containing the game session properties and
|
||
// other settings you specified.
|
||
//
|
||
// Idempotency tokens. You can add a token that uniquely identifies game session
|
||
// requests. This is useful for ensuring that game session requests are idempotent.
|
||
// Multiple requests with the same idempotency token are processed only once;
|
||
// subsequent requests return the original result. All response values are the
|
||
// same with the exception of game session status, which may change.
|
||
//
|
||
// Resource creation limits. If you are creating a game session on a fleet with
|
||
// a resource creation limit policy in force, then you must specify a creator
|
||
// ID. Without this ID, Amazon GameLift has no way to evaluate the policy for
|
||
// this new game session request.
|
||
//
|
||
// Player acceptance policy. By default, newly created game sessions are open
|
||
// to new players. You can restrict new player access by using UpdateGameSession
|
||
// to change the game session's player session creation policy.
|
||
//
|
||
// Game session logs. Logs are retained for all active game sessions for 14
|
||
// days. To access the logs, call GetGameSessionLogUrl to download the log files.
|
||
//
|
||
// Available in Amazon GameLift Local.
|
||
//
|
||
// Game-session-related operations include:
|
||
//
|
||
// * CreateGameSession
|
||
//
|
||
// * DescribeGameSessions
|
||
//
|
||
// * DescribeGameSessionDetails
|
||
//
|
||
// * SearchGameSessions
|
||
//
|
||
// * UpdateGameSession
|
||
//
|
||
// * GetGameSessionLogUrl
|
||
//
|
||
// * Game session placements
|
||
//
|
||
// StartGameSessionPlacement
|
||
//
|
||
// DescribeGameSessionPlacement
|
||
//
|
||
// StopGameSessionPlacement
|
||
//
|
||
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
|
||
// with awserr.Error's Code and Message methods to get detailed information about
|
||
// the error.
|
||
//
|
||
// See the AWS API reference guide for Amazon GameLift's
|
||
// API operation CreateGameSession for usage and error information.
|
||
//
|
||
// Returned Error Codes:
|
||
// * ErrCodeConflictException "ConflictException"
|
||
// The requested operation would cause a conflict with the current state of
|
||
// a service resource associated with the request. Resolve the conflict before
|
||
// retrying this request.
|
||
//
|
||
// * ErrCodeInternalServiceException "InternalServiceException"
|
||
// The service encountered an unrecoverable internal failure while processing
|
||
// the request. Clients can retry such requests immediately or after a waiting
|
||
// period.
|
||
//
|
||
// * ErrCodeUnauthorizedException "UnauthorizedException"
|
||
// The client failed authentication. Clients should not retry such requests.
|
||
//
|
||
// * ErrCodeInvalidFleetStatusException "InvalidFleetStatusException"
|
||
// The requested operation would cause a conflict with the current state of
|
||
// a resource associated with the request and/or the fleet. Resolve the conflict
|
||
// before retrying.
|
||
//
|
||
// * ErrCodeTerminalRoutingStrategyException "TerminalRoutingStrategyException"
|
||
// The service is unable to resolve the routing for a particular alias because
|
||
// it has a terminal RoutingStrategy associated with it. The message returned
|
||
// in this exception is the message defined in the routing strategy itself.
|
||
// Such requests should only be retried if the routing strategy for the specified
|
||
// alias is modified.
|
||
//
|
||
// * ErrCodeInvalidRequestException "InvalidRequestException"
|
||
// One or more parameter values in the request are invalid. Correct the invalid
|
||
// parameter values before retrying.
|
||
//
|
||
// * ErrCodeNotFoundException "NotFoundException"
|
||
// A service resource associated with the request could not be found. Clients
|
||
// should not retry such requests.
|
||
//
|
||
// * ErrCodeFleetCapacityExceededException "FleetCapacityExceededException"
|
||
// The specified fleet has no available instances to fulfill a CreateGameSession
|
||
// request. Clients can retry such requests immediately or after a waiting period.
|
||
//
|
||
// * ErrCodeLimitExceededException "LimitExceededException"
|
||
// The requested operation would cause the resource to exceed the allowed service
|
||
// limit. Resolve the issue before retrying.
|
||
//
|
||
// * ErrCodeIdempotentParameterMismatchException "IdempotentParameterMismatchException"
|
||
// A game session with this custom ID string already exists in this fleet. Resolve
|
||
// this conflict before retrying this request.
|
||
//
|
||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreateGameSession
|
||
func (c *GameLift) CreateGameSession(input *CreateGameSessionInput) (*CreateGameSessionOutput, error) {
|
||
req, out := c.CreateGameSessionRequest(input)
|
||
return out, req.Send()
|
||
}
|
||
|
||
// CreateGameSessionWithContext is the same as CreateGameSession with the addition of
|
||
// the ability to pass a context and additional request options.
|
||
//
|
||
// See CreateGameSession for details on how to use this API operation.
|
||
//
|
||
// The context must be non-nil and will be used for request cancellation. If
|
||
// the context is nil a panic will occur. In the future the SDK may create
|
||
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
|
||
// for more information on using Contexts.
|
||
func (c *GameLift) CreateGameSessionWithContext(ctx aws.Context, input *CreateGameSessionInput, opts ...request.Option) (*CreateGameSessionOutput, error) {
|
||
req, out := c.CreateGameSessionRequest(input)
|
||
req.SetContext(ctx)
|
||
req.ApplyOptions(opts...)
|
||
return out, req.Send()
|
||
}
|
||
|
||
const opCreateGameSessionQueue = "CreateGameSessionQueue"
|
||
|
||
// CreateGameSessionQueueRequest generates a "aws/request.Request" representing the
|
||
// client's request for the CreateGameSessionQueue operation. The "output" return
|
||
// value will be populated with the request's response once the request complets
|
||
// successfuly.
|
||
//
|
||
// Use "Send" method on the returned Request to send the API call to the service.
|
||
// the "output" return value is not valid until after Send returns without error.
|
||
//
|
||
// See CreateGameSessionQueue for more information on using the CreateGameSessionQueue
|
||
// API call, and error handling.
|
||
//
|
||
// This method is useful when you want to inject custom logic or configuration
|
||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||
//
|
||
//
|
||
// // Example sending a request using the CreateGameSessionQueueRequest method.
|
||
// req, resp := client.CreateGameSessionQueueRequest(params)
|
||
//
|
||
// err := req.Send()
|
||
// if err == nil { // resp is now filled
|
||
// fmt.Println(resp)
|
||
// }
|
||
//
|
||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreateGameSessionQueue
|
||
func (c *GameLift) CreateGameSessionQueueRequest(input *CreateGameSessionQueueInput) (req *request.Request, output *CreateGameSessionQueueOutput) {
|
||
op := &request.Operation{
|
||
Name: opCreateGameSessionQueue,
|
||
HTTPMethod: "POST",
|
||
HTTPPath: "/",
|
||
}
|
||
|
||
if input == nil {
|
||
input = &CreateGameSessionQueueInput{}
|
||
}
|
||
|
||
output = &CreateGameSessionQueueOutput{}
|
||
req = c.newRequest(op, input, output)
|
||
return
|
||
}
|
||
|
||
// CreateGameSessionQueue API operation for Amazon GameLift.
|
||
//
|
||
// Establishes a new queue for processing requests to place new game sessions.
|
||
// A queue identifies where new game sessions can be hosted -- by specifying
|
||
// a list of destinations (fleets or aliases) -- and how long requests can wait
|
||
// in the queue before timing out. You can set up a queue to try to place game
|
||
// sessions on fleets in multiple regions. To add placement requests to a queue,
|
||
// call StartGameSessionPlacement and reference the queue name.
|
||
//
|
||
// Destination order. When processing a request for a game session, Amazon GameLift
|
||
// tries each destination in order until it finds one with available resources
|
||
// to host the new game session. A queue's default order is determined by how
|
||
// destinations are listed. The default order is overridden when a game session
|
||
// placement request provides player latency information. Player latency information
|
||
// enables Amazon GameLift to prioritize destinations where players report the
|
||
// lowest average latency, as a result placing the new game session where the
|
||
// majority of players will have the best possible gameplay experience.
|
||
//
|
||
// Player latency policies. For placement requests containing player latency
|
||
// information, use player latency policies to protect individual players from
|
||
// very high latencies. With a latency cap, even when a destination can deliver
|
||
// a low latency for most players, the game is not placed where any individual
|
||
// player is reporting latency higher than a policy's maximum. A queue can have
|
||
// multiple latency policies, which are enforced consecutively starting with
|
||
// the policy with the lowest latency cap. Use multiple policies to gradually
|
||
// relax latency controls; for example, you might set a policy with a low latency
|
||
// cap for the first 60 seconds, a second policy with a higher cap for the next
|
||
// 60 seconds, etc.
|
||
//
|
||
// To create a new queue, provide a name, timeout value, a list of destinations
|
||
// and, if desired, a set of latency policies. If successful, a new queue object
|
||
// is returned.
|
||
//
|
||
// Queue-related operations include:
|
||
//
|
||
// * CreateGameSessionQueue
|
||
//
|
||
// * DescribeGameSessionQueues
|
||
//
|
||
// * UpdateGameSessionQueue
|
||
//
|
||
// * DeleteGameSessionQueue
|
||
//
|
||
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
|
||
// with awserr.Error's Code and Message methods to get detailed information about
|
||
// the error.
|
||
//
|
||
// See the AWS API reference guide for Amazon GameLift's
|
||
// API operation CreateGameSessionQueue for usage and error information.
|
||
//
|
||
// Returned Error Codes:
|
||
// * ErrCodeInternalServiceException "InternalServiceException"
|
||
// The service encountered an unrecoverable internal failure while processing
|
||
// the request. Clients can retry such requests immediately or after a waiting
|
||
// period.
|
||
//
|
||
// * ErrCodeInvalidRequestException "InvalidRequestException"
|
||
// One or more parameter values in the request are invalid. Correct the invalid
|
||
// parameter values before retrying.
|
||
//
|
||
// * ErrCodeUnauthorizedException "UnauthorizedException"
|
||
// The client failed authentication. Clients should not retry such requests.
|
||
//
|
||
// * ErrCodeLimitExceededException "LimitExceededException"
|
||
// The requested operation would cause the resource to exceed the allowed service
|
||
// limit. Resolve the issue before retrying.
|
||
//
|
||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreateGameSessionQueue
|
||
func (c *GameLift) CreateGameSessionQueue(input *CreateGameSessionQueueInput) (*CreateGameSessionQueueOutput, error) {
|
||
req, out := c.CreateGameSessionQueueRequest(input)
|
||
return out, req.Send()
|
||
}
|
||
|
||
// CreateGameSessionQueueWithContext is the same as CreateGameSessionQueue with the addition of
|
||
// the ability to pass a context and additional request options.
|
||
//
|
||
// See CreateGameSessionQueue for details on how to use this API operation.
|
||
//
|
||
// The context must be non-nil and will be used for request cancellation. If
|
||
// the context is nil a panic will occur. In the future the SDK may create
|
||
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
|
||
// for more information on using Contexts.
|
||
func (c *GameLift) CreateGameSessionQueueWithContext(ctx aws.Context, input *CreateGameSessionQueueInput, opts ...request.Option) (*CreateGameSessionQueueOutput, error) {
|
||
req, out := c.CreateGameSessionQueueRequest(input)
|
||
req.SetContext(ctx)
|
||
req.ApplyOptions(opts...)
|
||
return out, req.Send()
|
||
}
|
||
|
||
const opCreateMatchmakingConfiguration = "CreateMatchmakingConfiguration"
|
||
|
||
// CreateMatchmakingConfigurationRequest generates a "aws/request.Request" representing the
|
||
// client's request for the CreateMatchmakingConfiguration operation. The "output" return
|
||
// value will be populated with the request's response once the request complets
|
||
// successfuly.
|
||
//
|
||
// Use "Send" method on the returned Request to send the API call to the service.
|
||
// the "output" return value is not valid until after Send returns without error.
|
||
//
|
||
// See CreateMatchmakingConfiguration for more information on using the CreateMatchmakingConfiguration
|
||
// API call, and error handling.
|
||
//
|
||
// This method is useful when you want to inject custom logic or configuration
|
||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||
//
|
||
//
|
||
// // Example sending a request using the CreateMatchmakingConfigurationRequest method.
|
||
// req, resp := client.CreateMatchmakingConfigurationRequest(params)
|
||
//
|
||
// err := req.Send()
|
||
// if err == nil { // resp is now filled
|
||
// fmt.Println(resp)
|
||
// }
|
||
//
|
||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreateMatchmakingConfiguration
|
||
func (c *GameLift) CreateMatchmakingConfigurationRequest(input *CreateMatchmakingConfigurationInput) (req *request.Request, output *CreateMatchmakingConfigurationOutput) {
|
||
op := &request.Operation{
|
||
Name: opCreateMatchmakingConfiguration,
|
||
HTTPMethod: "POST",
|
||
HTTPPath: "/",
|
||
}
|
||
|
||
if input == nil {
|
||
input = &CreateMatchmakingConfigurationInput{}
|
||
}
|
||
|
||
output = &CreateMatchmakingConfigurationOutput{}
|
||
req = c.newRequest(op, input, output)
|
||
return
|
||
}
|
||
|
||
// CreateMatchmakingConfiguration API operation for Amazon GameLift.
|
||
//
|
||
// Defines a new matchmaking configuration for use with FlexMatch. A matchmaking
|
||
// configuration sets out guidelines for matching players and getting the matches
|
||
// into games. You can set up multiple matchmaking configurations to handle
|
||
// the scenarios needed for your game. Each matchmaking request (StartMatchmaking)
|
||
// specifies a configuration for the match and provides player attributes to
|
||
// support the configuration being used.
|
||
//
|
||
// To create a matchmaking configuration, at a minimum you must specify the
|
||
// following: configuration name; a rule set that governs how to evaluate players
|
||
// and find acceptable matches; a game session queue to use when placing a new
|
||
// game session for the match; and the maximum time allowed for a matchmaking
|
||
// attempt.
|
||
//
|
||
// Player acceptance -- In each configuration, you have the option to require
|
||
// that all players accept participation in a proposed match. To enable this
|
||
// feature, set AcceptanceRequired to true and specify a time limit for player
|
||
// acceptance. Players have the option to accept or reject a proposed match,
|
||
// and a match does not move ahead to game session placement unless all matched
|
||
// players accept.
|
||
//
|
||
// Matchmaking status notification -- There are two ways to track the progress
|
||
// of matchmaking tickets: (1) polling ticket status with DescribeMatchmaking;
|
||
// or (2) receiving notifications with Amazon Simple Notification Service (SNS).
|
||
// To use notifications, you first need to set up an SNS topic to receive the
|
||
// notifications, and provide the topic ARN in the matchmaking configuration
|
||
// (see Setting up Notifications for Matchmaking (http://docs.aws.amazon.com/gamelift/latest/developerguide/match-notification.html)).
|
||
// Since notifications promise only "best effort" delivery, we recommend calling
|
||
// DescribeMatchmaking if no notifications are received within 30 seconds.
|
||
//
|
||
// Operations related to match configurations and rule sets include:
|
||
//
|
||
// * CreateMatchmakingConfiguration
|
||
//
|
||
// * DescribeMatchmakingConfigurations
|
||
//
|
||
// * UpdateMatchmakingConfiguration
|
||
//
|
||
// * DeleteMatchmakingConfiguration
|
||
//
|
||
// * CreateMatchmakingRuleSet
|
||
//
|
||
// * DescribeMatchmakingRuleSets
|
||
//
|
||
// * ValidateMatchmakingRuleSet
|
||
//
|
||
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
|
||
// with awserr.Error's Code and Message methods to get detailed information about
|
||
// the error.
|
||
//
|
||
// See the AWS API reference guide for Amazon GameLift's
|
||
// API operation CreateMatchmakingConfiguration for usage and error information.
|
||
//
|
||
// Returned Error Codes:
|
||
// * ErrCodeInvalidRequestException "InvalidRequestException"
|
||
// One or more parameter values in the request are invalid. Correct the invalid
|
||
// parameter values before retrying.
|
||
//
|
||
// * ErrCodeLimitExceededException "LimitExceededException"
|
||
// The requested operation would cause the resource to exceed the allowed service
|
||
// limit. Resolve the issue before retrying.
|
||
//
|
||
// * ErrCodeNotFoundException "NotFoundException"
|
||
// A service resource associated with the request could not be found. Clients
|
||
// should not retry such requests.
|
||
//
|
||
// * ErrCodeInternalServiceException "InternalServiceException"
|
||
// The service encountered an unrecoverable internal failure while processing
|
||
// the request. Clients can retry such requests immediately or after a waiting
|
||
// period.
|
||
//
|
||
// * ErrCodeUnsupportedRegionException "UnsupportedRegionException"
|
||
// The requested operation is not supported in the region specified.
|
||
//
|
||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreateMatchmakingConfiguration
|
||
func (c *GameLift) CreateMatchmakingConfiguration(input *CreateMatchmakingConfigurationInput) (*CreateMatchmakingConfigurationOutput, error) {
|
||
req, out := c.CreateMatchmakingConfigurationRequest(input)
|
||
return out, req.Send()
|
||
}
|
||
|
||
// CreateMatchmakingConfigurationWithContext is the same as CreateMatchmakingConfiguration with the addition of
|
||
// the ability to pass a context and additional request options.
|
||
//
|
||
// See CreateMatchmakingConfiguration for details on how to use this API operation.
|
||
//
|
||
// The context must be non-nil and will be used for request cancellation. If
|
||
// the context is nil a panic will occur. In the future the SDK may create
|
||
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
|
||
// for more information on using Contexts.
|
||
func (c *GameLift) CreateMatchmakingConfigurationWithContext(ctx aws.Context, input *CreateMatchmakingConfigurationInput, opts ...request.Option) (*CreateMatchmakingConfigurationOutput, error) {
|
||
req, out := c.CreateMatchmakingConfigurationRequest(input)
|
||
req.SetContext(ctx)
|
||
req.ApplyOptions(opts...)
|
||
return out, req.Send()
|
||
}
|
||
|
||
const opCreateMatchmakingRuleSet = "CreateMatchmakingRuleSet"
|
||
|
||
// CreateMatchmakingRuleSetRequest generates a "aws/request.Request" representing the
|
||
// client's request for the CreateMatchmakingRuleSet operation. The "output" return
|
||
// value will be populated with the request's response once the request complets
|
||
// successfuly.
|
||
//
|
||
// Use "Send" method on the returned Request to send the API call to the service.
|
||
// the "output" return value is not valid until after Send returns without error.
|
||
//
|
||
// See CreateMatchmakingRuleSet for more information on using the CreateMatchmakingRuleSet
|
||
// API call, and error handling.
|
||
//
|
||
// This method is useful when you want to inject custom logic or configuration
|
||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||
//
|
||
//
|
||
// // Example sending a request using the CreateMatchmakingRuleSetRequest method.
|
||
// req, resp := client.CreateMatchmakingRuleSetRequest(params)
|
||
//
|
||
// err := req.Send()
|
||
// if err == nil { // resp is now filled
|
||
// fmt.Println(resp)
|
||
// }
|
||
//
|
||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreateMatchmakingRuleSet
|
||
func (c *GameLift) CreateMatchmakingRuleSetRequest(input *CreateMatchmakingRuleSetInput) (req *request.Request, output *CreateMatchmakingRuleSetOutput) {
|
||
op := &request.Operation{
|
||
Name: opCreateMatchmakingRuleSet,
|
||
HTTPMethod: "POST",
|
||
HTTPPath: "/",
|
||
}
|
||
|
||
if input == nil {
|
||
input = &CreateMatchmakingRuleSetInput{}
|
||
}
|
||
|
||
output = &CreateMatchmakingRuleSetOutput{}
|
||
req = c.newRequest(op, input, output)
|
||
return
|
||
}
|
||
|
||
// CreateMatchmakingRuleSet API operation for Amazon GameLift.
|
||
//
|
||
// Creates a new rule set for FlexMatch matchmaking. A rule set describes the
|
||
// type of match to create, such as the number and size of teams, and sets the
|
||
// parameters for acceptable player matches, such as minimum skill level or
|
||
// character type. Rule sets are used in matchmaking configurations, which define
|
||
// how matchmaking requests are handled. Each MatchmakingConfiguration uses
|
||
// one rule set; you can set up multiple rule sets to handle the scenarios that
|
||
// suit your game (such as for different game modes), and create a separate
|
||
// matchmaking configuration for each rule set. See additional information on
|
||
// rule set content in the MatchmakingRuleSet structure. For help creating rule
|
||
// sets, including useful examples, see the topic Adding FlexMatch to Your
|
||
// Game (http://docs.aws.amazon.com/gamelift/latest/developerguide/match-intro.html).
|
||
//
|
||
// Once created, matchmaking rule sets cannot be changed or deleted, so we recommend
|
||
// checking the rule set syntax using ValidateMatchmakingRuleSetbefore creating
|
||
// the rule set.
|
||
//
|
||
// To create a matchmaking rule set, provide the set of rules and a unique name.
|
||
// Rule sets must be defined in the same region as the matchmaking configuration
|
||
// they will be used with. Rule sets cannot be edited or deleted. If you need
|
||
// to change a rule set, create a new one with the necessary edits and then
|
||
// update matchmaking configurations to use the new rule set.
|
||
//
|
||
// Operations related to match configurations and rule sets include:
|
||
//
|
||
// * CreateMatchmakingConfiguration
|
||
//
|
||
// * DescribeMatchmakingConfigurations
|
||
//
|
||
// * UpdateMatchmakingConfiguration
|
||
//
|
||
// * DeleteMatchmakingConfiguration
|
||
//
|
||
// * CreateMatchmakingRuleSet
|
||
//
|
||
// * DescribeMatchmakingRuleSets
|
||
//
|
||
// * ValidateMatchmakingRuleSet
|
||
//
|
||
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
|
||
// with awserr.Error's Code and Message methods to get detailed information about
|
||
// the error.
|
||
//
|
||
// See the AWS API reference guide for Amazon GameLift's
|
||
// API operation CreateMatchmakingRuleSet for usage and error information.
|
||
//
|
||
// Returned Error Codes:
|
||
// * ErrCodeInvalidRequestException "InvalidRequestException"
|
||
// One or more parameter values in the request are invalid. Correct the invalid
|
||
// parameter values before retrying.
|
||
//
|
||
// * ErrCodeInternalServiceException "InternalServiceException"
|
||
// The service encountered an unrecoverable internal failure while processing
|
||
// the request. Clients can retry such requests immediately or after a waiting
|
||
// period.
|
||
//
|
||
// * ErrCodeUnsupportedRegionException "UnsupportedRegionException"
|
||
// The requested operation is not supported in the region specified.
|
||
//
|
||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreateMatchmakingRuleSet
|
||
func (c *GameLift) CreateMatchmakingRuleSet(input *CreateMatchmakingRuleSetInput) (*CreateMatchmakingRuleSetOutput, error) {
|
||
req, out := c.CreateMatchmakingRuleSetRequest(input)
|
||
return out, req.Send()
|
||
}
|
||
|
||
// CreateMatchmakingRuleSetWithContext is the same as CreateMatchmakingRuleSet with the addition of
|
||
// the ability to pass a context and additional request options.
|
||
//
|
||
// See CreateMatchmakingRuleSet for details on how to use this API operation.
|
||
//
|
||
// The context must be non-nil and will be used for request cancellation. If
|
||
// the context is nil a panic will occur. In the future the SDK may create
|
||
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
|
||
// for more information on using Contexts.
|
||
func (c *GameLift) CreateMatchmakingRuleSetWithContext(ctx aws.Context, input *CreateMatchmakingRuleSetInput, opts ...request.Option) (*CreateMatchmakingRuleSetOutput, error) {
|
||
req, out := c.CreateMatchmakingRuleSetRequest(input)
|
||
req.SetContext(ctx)
|
||
req.ApplyOptions(opts...)
|
||
return out, req.Send()
|
||
}
|
||
|
||
const opCreatePlayerSession = "CreatePlayerSession"
|
||
|
||
// CreatePlayerSessionRequest generates a "aws/request.Request" representing the
|
||
// client's request for the CreatePlayerSession operation. The "output" return
|
||
// value will be populated with the request's response once the request complets
|
||
// successfuly.
|
||
//
|
||
// Use "Send" method on the returned Request to send the API call to the service.
|
||
// the "output" return value is not valid until after Send returns without error.
|
||
//
|
||
// See CreatePlayerSession for more information on using the CreatePlayerSession
|
||
// API call, and error handling.
|
||
//
|
||
// This method is useful when you want to inject custom logic or configuration
|
||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||
//
|
||
//
|
||
// // Example sending a request using the CreatePlayerSessionRequest method.
|
||
// req, resp := client.CreatePlayerSessionRequest(params)
|
||
//
|
||
// err := req.Send()
|
||
// if err == nil { // resp is now filled
|
||
// fmt.Println(resp)
|
||
// }
|
||
//
|
||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreatePlayerSession
|
||
func (c *GameLift) CreatePlayerSessionRequest(input *CreatePlayerSessionInput) (req *request.Request, output *CreatePlayerSessionOutput) {
|
||
op := &request.Operation{
|
||
Name: opCreatePlayerSession,
|
||
HTTPMethod: "POST",
|
||
HTTPPath: "/",
|
||
}
|
||
|
||
if input == nil {
|
||
input = &CreatePlayerSessionInput{}
|
||
}
|
||
|
||
output = &CreatePlayerSessionOutput{}
|
||
req = c.newRequest(op, input, output)
|
||
return
|
||
}
|
||
|
||
// CreatePlayerSession API operation for Amazon GameLift.
|
||
//
|
||
// Adds a player to a game session and creates a player session record. Before
|
||
// a player can be added, a game session must have an ACTIVE status, have a
|
||
// creation policy of ALLOW_ALL, and have an open player slot. To add a group
|
||
// of players to a game session, use CreatePlayerSessions.
|
||
//
|
||
// To create a player session, specify a game session ID, player ID, and optionally
|
||
// a string of player data. If successful, the player is added to the game session
|
||
// and a new PlayerSession object is returned. Player sessions cannot be updated.
|
||
//
|
||
// Available in Amazon GameLift Local.
|
||
//
|
||
// Player-session-related operations include:
|
||
//
|
||
// * CreatePlayerSession
|
||
//
|
||
// * CreatePlayerSessions
|
||
//
|
||
// * DescribePlayerSessions
|
||
//
|
||
// * Game session placements
|
||
//
|
||
// StartGameSessionPlacement
|
||
//
|
||
// DescribeGameSessionPlacement
|
||
//
|
||
// StopGameSessionPlacement
|
||
//
|
||
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
|
||
// with awserr.Error's Code and Message methods to get detailed information about
|
||
// the error.
|
||
//
|
||
// See the AWS API reference guide for Amazon GameLift's
|
||
// API operation CreatePlayerSession for usage and error information.
|
||
//
|
||
// Returned Error Codes:
|
||
// * ErrCodeInternalServiceException "InternalServiceException"
|
||
// The service encountered an unrecoverable internal failure while processing
|
||
// the request. Clients can retry such requests immediately or after a waiting
|
||
// period.
|
||
//
|
||
// * ErrCodeUnauthorizedException "UnauthorizedException"
|
||
// The client failed authentication. Clients should not retry such requests.
|
||
//
|
||
// * ErrCodeInvalidGameSessionStatusException "InvalidGameSessionStatusException"
|
||
// The requested operation would cause a conflict with the current state of
|
||
// a resource associated with the request and/or the game instance. Resolve
|
||
// the conflict before retrying.
|
||
//
|
||
// * ErrCodeGameSessionFullException "GameSessionFullException"
|
||