service.go 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. package gamelift
  3. import (
  4. "github.com/aws/aws-sdk-go/aws"
  5. "github.com/aws/aws-sdk-go/aws/client"
  6. "github.com/aws/aws-sdk-go/aws/client/metadata"
  7. "github.com/aws/aws-sdk-go/aws/request"
  8. "github.com/aws/aws-sdk-go/aws/signer/v4"
  9. "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
  10. )
  11. // Welcome to the Amazon GameLift API Reference. Amazon GameLift is a managed
  12. // Amazon Web Services (AWS) service for developers who need a scalable, server-based
  13. // solution for multiplayer games. Amazon GameLift provides setup and deployment
  14. // of game servers, and handles infrastructure scaling and session management.
  15. //
  16. // This reference describes the low-level service API for GameLift. You can
  17. // call this API directly or use the AWS SDK (http://aws.amazon.com/tools/#sdk)
  18. // for your preferred language. The AWS SDK includes a set of high-level GameLift
  19. // actions multiplayer game sessions. Alternatively, you can use the AWS command-line
  20. // interface (http://aws.amazon.com/cli/) (CLI) tool, which includes commands
  21. // for GameLift. For administrative actions, you can also use the Amazon GameLift
  22. // console.
  23. //
  24. // More Resources
  25. //
  26. // * Amazon GameLift Developer Guide (http://docs.aws.amazon.com/gamelift/latest/developerguide/):
  27. // Learn more about GameLift features and how to use them
  28. //
  29. // * Lumberyard and GameLift Tutorials (https://gamedev.amazon.com/forums/tutorials):
  30. // Get started fast with walkthroughs and sample projects
  31. //
  32. // * GameDev Blog (http://aws.amazon.com/blogs/gamedev/): Stay up to date
  33. // with new features and techniques
  34. //
  35. // * GameDev Forums (https://gamedev.amazon.com/forums/spaces/123/gamelift-discussion.html):
  36. // Connect with the GameDev community
  37. //
  38. // Manage Games and Players Through GameLift
  39. //
  40. // Call these actions from your game clients and/or services to create and manage
  41. // multiplayer game sessions and player sessions.
  42. //
  43. // * Game sessions:
  44. //
  45. // CreateGameSession
  46. //
  47. // DescribeGameSessions
  48. //
  49. // DescribeGameSessionDetails
  50. //
  51. // UpdateGameSession
  52. //
  53. // SearchGameSessions
  54. //
  55. // * Player sessions:
  56. //
  57. // CreatePlayerSession
  58. //
  59. // CreatePlayerSessions
  60. //
  61. // DescribePlayerSessions
  62. //
  63. // * Other actions:
  64. //
  65. // GetGameSessionLogUrl
  66. //
  67. // Set Up and Manage Game Servers
  68. //
  69. // Use these administrative actions to configure GameLift to host your game
  70. // servers. When setting up GameLift, you will need to (1) configure a build
  71. // for your game and upload build files, and (2) set up one or more fleets to
  72. // host game sessions. Once you've created and activated a fleet, you can assign
  73. // aliases to it, scale capacity, track performance and utilization, etc.
  74. //
  75. // * Game builds:
  76. //
  77. // ListBuilds
  78. //
  79. // CreateBuild
  80. //
  81. // DescribeBuild
  82. //
  83. // UpdateBuild
  84. //
  85. // DeleteBuild
  86. //
  87. // RequestUploadCredentials
  88. //
  89. // * Fleets:
  90. //
  91. // ListFleets
  92. //
  93. // CreateFleet
  94. //
  95. // Describe fleets:
  96. //
  97. // DescribeFleetAttributes
  98. //
  99. // DescribeFleetCapacity
  100. //
  101. // DescribeFleetPortSettings
  102. //
  103. // DescribeFleetUtilization
  104. //
  105. // DescribeEC2InstanceLimits
  106. //
  107. // DescribeFleetEvents
  108. //
  109. // DescribeRuntimeConfiguration
  110. //
  111. // Update fleets:
  112. //
  113. // UpdateFleetAttributes
  114. //
  115. // UpdateFleetCapacity
  116. //
  117. // UpdateFleetPortSettings
  118. //
  119. // UpdateRuntimeConfiguration
  120. //
  121. // DeleteFleet
  122. //
  123. // * Manage fleet aliases:
  124. //
  125. // ListAliases
  126. //
  127. // CreateAlias
  128. //
  129. // DescribeAlias
  130. //
  131. // UpdateAlias
  132. //
  133. // DeleteAlias
  134. //
  135. // ResolveAlias
  136. //
  137. // * Manage autoscaling:
  138. //
  139. // PutScalingPolicy
  140. //
  141. // DescribeScalingPolicies
  142. //
  143. // DeleteScalingPolicy
  144. //
  145. // To view changes to the API, see the GameLift Document History (http://docs.aws.amazon.com/gamelift/latest/developerguide/doc-history.html)
  146. // page.
  147. //The service client's operations are safe to be used concurrently.
  148. // It is not safe to mutate any of the client's properties though.
  149. type GameLift struct {
  150. *client.Client
  151. }
  152. // Used for custom client initialization logic
  153. var initClient func(*client.Client)
  154. // Used for custom request initialization logic
  155. var initRequest func(*request.Request)
  156. // A ServiceName is the name of the service the client will make API calls to.
  157. const ServiceName = "gamelift"
  158. // New creates a new instance of the GameLift client with a session.
  159. // If additional configuration is needed for the client instance use the optional
  160. // aws.Config parameter to add your extra config.
  161. //
  162. // Example:
  163. // // Create a GameLift client from just a session.
  164. // svc := gamelift.New(mySession)
  165. //
  166. // // Create a GameLift client with additional configuration
  167. // svc := gamelift.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
  168. func New(p client.ConfigProvider, cfgs ...*aws.Config) *GameLift {
  169. c := p.ClientConfig(ServiceName, cfgs...)
  170. return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
  171. }
  172. // newClient creates, initializes and returns a new service client instance.
  173. func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *GameLift {
  174. svc := &GameLift{
  175. Client: client.New(
  176. cfg,
  177. metadata.ClientInfo{
  178. ServiceName: ServiceName,
  179. SigningRegion: signingRegion,
  180. Endpoint: endpoint,
  181. APIVersion: "2015-10-01",
  182. JSONVersion: "1.1",
  183. TargetPrefix: "GameLift",
  184. },
  185. handlers,
  186. ),
  187. }
  188. // Handlers
  189. svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
  190. svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
  191. svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
  192. svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
  193. svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler)
  194. // Run custom client initialization if present
  195. if initClient != nil {
  196. initClient(svc.Client)
  197. }
  198. return svc
  199. }
  200. // newRequest creates a new request for a GameLift operation and runs any
  201. // custom request initialization.
  202. func (c *GameLift) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  203. req := c.NewRequest(op, params, data)
  204. // Run custom request initialization if present
  205. if initRequest != nil {
  206. initRequest(req)
  207. }
  208. return req
  209. }