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 settings for a FlexMatch matchmaking configuration. These changes affect 15// all matches and game sessions that are created after the update. To update 16// settings, specify the configuration name to be updated and provide the new 17// settings. Learn more Design a FlexMatch Matchmaker 18// (https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-configuration.html) 19// Related operations 20// 21// * CreateMatchmakingConfiguration 22// 23// * 24// DescribeMatchmakingConfigurations 25// 26// * UpdateMatchmakingConfiguration 27// 28// * 29// DeleteMatchmakingConfiguration 30// 31// * CreateMatchmakingRuleSet 32// 33// * 34// DescribeMatchmakingRuleSets 35// 36// * ValidateMatchmakingRuleSet 37// 38// * 39// DeleteMatchmakingRuleSet 40func (c *Client) UpdateMatchmakingConfiguration(ctx context.Context, params *UpdateMatchmakingConfigurationInput, optFns ...func(*Options)) (*UpdateMatchmakingConfigurationOutput, error) { 41 if params == nil { 42 params = &UpdateMatchmakingConfigurationInput{} 43 } 44 45 result, metadata, err := c.invokeOperation(ctx, "UpdateMatchmakingConfiguration", params, optFns, addOperationUpdateMatchmakingConfigurationMiddlewares) 46 if err != nil { 47 return nil, err 48 } 49 50 out := result.(*UpdateMatchmakingConfigurationOutput) 51 out.ResultMetadata = metadata 52 return out, nil 53} 54 55// Represents the input for a request operation. 56type UpdateMatchmakingConfigurationInput struct { 57 58 // A unique identifier for a matchmaking configuration to update. You can use 59 // either the configuration name or ARN value. 60 // 61 // This member is required. 62 Name *string 63 64 // A flag that indicates whether a match that was created with this configuration 65 // must be accepted by the matched players. To require acceptance, set to TRUE. 66 // With this option enabled, matchmaking tickets use the status REQUIRES_ACCEPTANCE 67 // to indicate when a completed potential match is waiting for player acceptance. 68 AcceptanceRequired *bool 69 70 // The length of time (in seconds) to wait for players to accept a proposed match, 71 // if acceptance is required. If any player rejects the match or fails to accept 72 // before the timeout, the tickets are returned to the ticket pool and continue to 73 // be evaluated for an acceptable match. 74 AcceptanceTimeoutSeconds *int32 75 76 // The number of player slots in a match to keep open for future players. For 77 // example, assume that the configuration's rule set specifies a match for a single 78 // 12-person team. If the additional player count is set to 2, only 10 players are 79 // initially selected for the match. This parameter is not used if FlexMatchMode is 80 // set to STANDALONE. 81 AdditionalPlayerCount *int32 82 83 // The method that is used to backfill game sessions created with this matchmaking 84 // configuration. Specify MANUAL when your game manages backfill requests manually 85 // or does not use the match backfill feature. Specify AUTOMATIC to have GameLift 86 // create a StartMatchBackfill request whenever a game session has one or more open 87 // slots. Learn more about manual and automatic backfill in Backfill Existing Games 88 // with FlexMatch 89 // (https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-backfill.html). 90 // Automatic backfill is not available when FlexMatchMode is set to STANDALONE. 91 BackfillMode types.BackfillMode 92 93 // Information to add to all events related to the matchmaking configuration. 94 CustomEventData *string 95 96 // A descriptive label that is associated with matchmaking configuration. 97 Description *string 98 99 // Indicates whether this matchmaking configuration is being used with GameLift 100 // hosting or as a standalone matchmaking solution. 101 // 102 // * STANDALONE - FlexMatch forms 103 // matches and returns match information, including players and team assignments, 104 // in a MatchmakingSucceeded 105 // (https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-events.html#match-events-matchmakingsucceeded) 106 // event. 107 // 108 // * WITH_QUEUE - FlexMatch forms matches and uses the specified GameLift 109 // queue to start a game session for the match. 110 FlexMatchMode types.FlexMatchMode 111 112 // A set of custom properties for a game session, formatted as key-value pairs. 113 // These properties are passed to a game server process in the GameSession object 114 // with a request to start a new game session (see Start a Game Session 115 // (https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-startsession)). 116 // This information is added to the new GameSession object that is created for a 117 // successful match. This parameter is not used if FlexMatchMode is set to 118 // STANDALONE. 119 GameProperties []types.GameProperty 120 121 // A set of custom game session properties, formatted as a single string value. 122 // This data is passed to a game server process in the GameSession object with a 123 // request to start a new game session (see Start a Game Session 124 // (https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-startsession)). 125 // This information is added to the new GameSession object that is created for a 126 // successful match. This parameter is not used if FlexMatchMode is set to 127 // STANDALONE. 128 GameSessionData *string 129 130 // Amazon Resource Name (ARN 131 // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)) 132 // that is assigned to a GameLift game session queue resource and uniquely 133 // identifies it. ARNs are unique across all Regions. Queues can be located in any 134 // Region. Queues are used to start new GameLift-hosted game sessions for matches 135 // that are created with this matchmaking configuration. If FlexMatchMode is set to 136 // STANDALONE, do not set this parameter. 137 GameSessionQueueArns []string 138 139 // An SNS topic ARN that is set up to receive matchmaking notifications. See 140 // Setting up Notifications for Matchmaking 141 // (https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-notification.html) 142 // for more information. 143 NotificationTarget *string 144 145 // The maximum duration, in seconds, that a matchmaking ticket can remain in 146 // process before timing out. Requests that fail due to timing out can be 147 // resubmitted as needed. 148 RequestTimeoutSeconds *int32 149 150 // A unique identifier for a matchmaking rule set to use with this configuration. 151 // You can use either the rule set name or ARN value. A matchmaking configuration 152 // can only use rule sets that are defined in the same Region. 153 RuleSetName *string 154} 155 156// Represents the returned data in response to a request operation. 157type UpdateMatchmakingConfigurationOutput struct { 158 159 // The updated matchmaking configuration. 160 Configuration *types.MatchmakingConfiguration 161 162 // Metadata pertaining to the operation's result. 163 ResultMetadata middleware.Metadata 164} 165 166func addOperationUpdateMatchmakingConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { 167 err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateMatchmakingConfiguration{}, middleware.After) 168 if err != nil { 169 return err 170 } 171 err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateMatchmakingConfiguration{}, middleware.After) 172 if err != nil { 173 return err 174 } 175 if err = addSetLoggerMiddleware(stack, options); err != nil { 176 return err 177 } 178 if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { 179 return err 180 } 181 if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { 182 return err 183 } 184 if err = addResolveEndpointMiddleware(stack, options); err != nil { 185 return err 186 } 187 if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { 188 return err 189 } 190 if err = addRetryMiddlewares(stack, options); err != nil { 191 return err 192 } 193 if err = addHTTPSignerV4Middleware(stack, options); err != nil { 194 return err 195 } 196 if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { 197 return err 198 } 199 if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { 200 return err 201 } 202 if err = addClientUserAgent(stack); err != nil { 203 return err 204 } 205 if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { 206 return err 207 } 208 if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { 209 return err 210 } 211 if err = addOpUpdateMatchmakingConfigurationValidationMiddleware(stack); err != nil { 212 return err 213 } 214 if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateMatchmakingConfiguration(options.Region), middleware.Before); err != nil { 215 return err 216 } 217 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 218 return err 219 } 220 if err = addResponseErrorMiddleware(stack); err != nil { 221 return err 222 } 223 if err = addRequestResponseLogging(stack, options); err != nil { 224 return err 225 } 226 return nil 227} 228 229func newServiceMetadataMiddleware_opUpdateMatchmakingConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { 230 return &awsmiddleware.RegisterServiceMetadata{ 231 Region: region, 232 ServiceID: ServiceID, 233 SigningName: "gamelift", 234 OperationName: "UpdateMatchmakingConfiguration", 235 } 236} 237