1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package gamelift 4 5import ( 6 "context" 7 awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" 8 "github.com/aws/aws-sdk-go-v2/aws/signer/v4" 9 "github.com/aws/aws-sdk-go-v2/service/gamelift/types" 10 "github.com/aws/smithy-go/middleware" 11 smithyhttp "github.com/aws/smithy-go/transport/http" 12) 13 14// Updates the configuration of a game session queue, which determines how the 15// queue processes new game session requests. To update settings, specify the queue 16// name to be updated and provide the new settings. When updating destinations, 17// provide a complete list of destinations. Learn more Using Multi-Region Queues 18// (https://docs.aws.amazon.com/gamelift/latest/developerguide/queues-intro.html) 19// Related actions CreateGameSessionQueue | DescribeGameSessionQueues | 20// UpdateGameSessionQueue | DeleteGameSessionQueue | All APIs by task 21// (https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-awssdk.html#reference-awssdk-resources-fleets) 22func (c *Client) UpdateGameSessionQueue(ctx context.Context, params *UpdateGameSessionQueueInput, optFns ...func(*Options)) (*UpdateGameSessionQueueOutput, error) { 23 if params == nil { 24 params = &UpdateGameSessionQueueInput{} 25 } 26 27 result, metadata, err := c.invokeOperation(ctx, "UpdateGameSessionQueue", params, optFns, addOperationUpdateGameSessionQueueMiddlewares) 28 if err != nil { 29 return nil, err 30 } 31 32 out := result.(*UpdateGameSessionQueueOutput) 33 out.ResultMetadata = metadata 34 return out, nil 35} 36 37// Represents the input for a request operation. 38type UpdateGameSessionQueueInput struct { 39 40 // A descriptive label that is associated with game session queue. Queue names must 41 // be unique within each Region. You can use either the queue ID or ARN value. 42 // 43 // This member is required. 44 Name *string 45 46 // Information to be added to all events that are related to this game session 47 // queue. 48 CustomEventData *string 49 50 // A list of fleets and/or fleet aliases that can be used to fulfill game session 51 // placement requests in the queue. Destinations are identified by either a fleet 52 // ARN or a fleet alias ARN, and are listed in order of placement preference. When 53 // updating this list, provide a complete list of destinations. 54 Destinations []types.GameSessionQueueDestination 55 56 // A list of locations where a queue is allowed to place new game sessions. 57 // Locations are specified in the form of AWS Region codes, such as us-west-2. If 58 // this parameter is not set, game sessions can be placed in any queue location. To 59 // remove an existing filter configuration, pass in an empty set. 60 FilterConfiguration *types.FilterConfiguration 61 62 // An SNS topic ARN that is set up to receive game session placement notifications. 63 // See Setting up notifications for game session placement 64 // (https://docs.aws.amazon.com/gamelift/latest/developerguide/queue-notification.html). 65 NotificationTarget *string 66 67 // A set of policies that act as a sliding cap on player latency. FleetIQ works to 68 // deliver low latency for most players in a game session. These policies ensure 69 // that no individual player can be placed into a game with unreasonably high 70 // latency. Use multiple policies to gradually relax latency requirements a step at 71 // a time. Multiple policies are applied based on their maximum allowed latency, 72 // starting with the lowest value. When updating policies, provide a complete 73 // collection of policies. 74 PlayerLatencyPolicies []types.PlayerLatencyPolicy 75 76 // Custom settings to use when prioritizing destinations and locations for game 77 // session placements. This configuration replaces the FleetIQ default 78 // prioritization process. Priority types that are not explicitly named will be 79 // automatically applied at the end of the prioritization process. To remove an 80 // existing priority configuration, pass in an empty set. 81 PriorityConfiguration *types.PriorityConfiguration 82 83 // The maximum time, in seconds, that a new game session placement request remains 84 // in the queue. When a request exceeds this time, the game session placement 85 // changes to a TIMED_OUT status. 86 TimeoutInSeconds *int32 87} 88 89// Represents the returned data in response to a request operation. 90type UpdateGameSessionQueueOutput struct { 91 92 // An object that describes the newly updated game session queue. 93 GameSessionQueue *types.GameSessionQueue 94 95 // Metadata pertaining to the operation's result. 96 ResultMetadata middleware.Metadata 97} 98 99func addOperationUpdateGameSessionQueueMiddlewares(stack *middleware.Stack, options Options) (err error) { 100 err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateGameSessionQueue{}, middleware.After) 101 if err != nil { 102 return err 103 } 104 err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateGameSessionQueue{}, middleware.After) 105 if err != nil { 106 return err 107 } 108 if err = addSetLoggerMiddleware(stack, options); err != nil { 109 return err 110 } 111 if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { 112 return err 113 } 114 if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { 115 return err 116 } 117 if err = addResolveEndpointMiddleware(stack, options); err != nil { 118 return err 119 } 120 if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { 121 return err 122 } 123 if err = addRetryMiddlewares(stack, options); err != nil { 124 return err 125 } 126 if err = addHTTPSignerV4Middleware(stack, options); err != nil { 127 return err 128 } 129 if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { 130 return err 131 } 132 if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { 133 return err 134 } 135 if err = addClientUserAgent(stack); err != nil { 136 return err 137 } 138 if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { 139 return err 140 } 141 if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { 142 return err 143 } 144 if err = addOpUpdateGameSessionQueueValidationMiddleware(stack); err != nil { 145 return err 146 } 147 if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateGameSessionQueue(options.Region), middleware.Before); err != nil { 148 return err 149 } 150 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 151 return err 152 } 153 if err = addResponseErrorMiddleware(stack); err != nil { 154 return err 155 } 156 if err = addRequestResponseLogging(stack, options); err != nil { 157 return err 158 } 159 return nil 160} 161 162func newServiceMetadataMiddleware_opUpdateGameSessionQueue(region string) *awsmiddleware.RegisterServiceMetadata { 163 return &awsmiddleware.RegisterServiceMetadata{ 164 Region: region, 165 ServiceID: ServiceID, 166 SigningName: "gamelift", 167 OperationName: "UpdateGameSessionQueue", 168 } 169} 170