api.go 74 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package cloud9
  3. import (
  4. "time"
  5. "github.com/aws/aws-sdk-go/aws"
  6. "github.com/aws/aws-sdk-go/aws/awsutil"
  7. "github.com/aws/aws-sdk-go/aws/request"
  8. "github.com/aws/aws-sdk-go/private/protocol"
  9. "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
  10. )
  11. const opCreateEnvironmentEC2 = "CreateEnvironmentEC2"
  12. // CreateEnvironmentEC2Request generates a "aws/request.Request" representing the
  13. // client's request for the CreateEnvironmentEC2 operation. The "output" return
  14. // value will be populated with the request's response once the request completes
  15. // successfully.
  16. //
  17. // Use "Send" method on the returned Request to send the API call to the service.
  18. // the "output" return value is not valid until after Send returns without error.
  19. //
  20. // See CreateEnvironmentEC2 for more information on using the CreateEnvironmentEC2
  21. // API call, and error handling.
  22. //
  23. // This method is useful when you want to inject custom logic or configuration
  24. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  25. //
  26. //
  27. // // Example sending a request using the CreateEnvironmentEC2Request method.
  28. // req, resp := client.CreateEnvironmentEC2Request(params)
  29. //
  30. // err := req.Send()
  31. // if err == nil { // resp is now filled
  32. // fmt.Println(resp)
  33. // }
  34. //
  35. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/CreateEnvironmentEC2
  36. func (c *Cloud9) CreateEnvironmentEC2Request(input *CreateEnvironmentEC2Input) (req *request.Request, output *CreateEnvironmentEC2Output) {
  37. op := &request.Operation{
  38. Name: opCreateEnvironmentEC2,
  39. HTTPMethod: "POST",
  40. HTTPPath: "/",
  41. }
  42. if input == nil {
  43. input = &CreateEnvironmentEC2Input{}
  44. }
  45. output = &CreateEnvironmentEC2Output{}
  46. req = c.newRequest(op, input, output)
  47. return
  48. }
  49. // CreateEnvironmentEC2 API operation for AWS Cloud9.
  50. //
  51. // Creates an AWS Cloud9 development environment, launches an Amazon Elastic
  52. // Compute Cloud (Amazon EC2) instance, and then connects from the instance
  53. // to the environment.
  54. //
  55. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  56. // with awserr.Error's Code and Message methods to get detailed information about
  57. // the error.
  58. //
  59. // See the AWS API reference guide for AWS Cloud9's
  60. // API operation CreateEnvironmentEC2 for usage and error information.
  61. //
  62. // Returned Error Codes:
  63. // * ErrCodeBadRequestException "BadRequestException"
  64. // The target request is invalid.
  65. //
  66. // * ErrCodeConflictException "ConflictException"
  67. // A conflict occurred.
  68. //
  69. // * ErrCodeNotFoundException "NotFoundException"
  70. // The target resource cannot be found.
  71. //
  72. // * ErrCodeForbiddenException "ForbiddenException"
  73. // An access permissions issue occurred.
  74. //
  75. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  76. // Too many service requests were made over the given time period.
  77. //
  78. // * ErrCodeLimitExceededException "LimitExceededException"
  79. // A service limit was exceeded.
  80. //
  81. // * ErrCodeInternalServerErrorException "InternalServerErrorException"
  82. // An internal server error occurred.
  83. //
  84. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/CreateEnvironmentEC2
  85. func (c *Cloud9) CreateEnvironmentEC2(input *CreateEnvironmentEC2Input) (*CreateEnvironmentEC2Output, error) {
  86. req, out := c.CreateEnvironmentEC2Request(input)
  87. return out, req.Send()
  88. }
  89. // CreateEnvironmentEC2WithContext is the same as CreateEnvironmentEC2 with the addition of
  90. // the ability to pass a context and additional request options.
  91. //
  92. // See CreateEnvironmentEC2 for details on how to use this API operation.
  93. //
  94. // The context must be non-nil and will be used for request cancellation. If
  95. // the context is nil a panic will occur. In the future the SDK may create
  96. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  97. // for more information on using Contexts.
  98. func (c *Cloud9) CreateEnvironmentEC2WithContext(ctx aws.Context, input *CreateEnvironmentEC2Input, opts ...request.Option) (*CreateEnvironmentEC2Output, error) {
  99. req, out := c.CreateEnvironmentEC2Request(input)
  100. req.SetContext(ctx)
  101. req.ApplyOptions(opts...)
  102. return out, req.Send()
  103. }
  104. const opCreateEnvironmentMembership = "CreateEnvironmentMembership"
  105. // CreateEnvironmentMembershipRequest generates a "aws/request.Request" representing the
  106. // client's request for the CreateEnvironmentMembership operation. The "output" return
  107. // value will be populated with the request's response once the request completes
  108. // successfully.
  109. //
  110. // Use "Send" method on the returned Request to send the API call to the service.
  111. // the "output" return value is not valid until after Send returns without error.
  112. //
  113. // See CreateEnvironmentMembership for more information on using the CreateEnvironmentMembership
  114. // API call, and error handling.
  115. //
  116. // This method is useful when you want to inject custom logic or configuration
  117. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  118. //
  119. //
  120. // // Example sending a request using the CreateEnvironmentMembershipRequest method.
  121. // req, resp := client.CreateEnvironmentMembershipRequest(params)
  122. //
  123. // err := req.Send()
  124. // if err == nil { // resp is now filled
  125. // fmt.Println(resp)
  126. // }
  127. //
  128. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/CreateEnvironmentMembership
  129. func (c *Cloud9) CreateEnvironmentMembershipRequest(input *CreateEnvironmentMembershipInput) (req *request.Request, output *CreateEnvironmentMembershipOutput) {
  130. op := &request.Operation{
  131. Name: opCreateEnvironmentMembership,
  132. HTTPMethod: "POST",
  133. HTTPPath: "/",
  134. }
  135. if input == nil {
  136. input = &CreateEnvironmentMembershipInput{}
  137. }
  138. output = &CreateEnvironmentMembershipOutput{}
  139. req = c.newRequest(op, input, output)
  140. return
  141. }
  142. // CreateEnvironmentMembership API operation for AWS Cloud9.
  143. //
  144. // Adds an environment member to an AWS Cloud9 development environment.
  145. //
  146. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  147. // with awserr.Error's Code and Message methods to get detailed information about
  148. // the error.
  149. //
  150. // See the AWS API reference guide for AWS Cloud9's
  151. // API operation CreateEnvironmentMembership for usage and error information.
  152. //
  153. // Returned Error Codes:
  154. // * ErrCodeBadRequestException "BadRequestException"
  155. // The target request is invalid.
  156. //
  157. // * ErrCodeConflictException "ConflictException"
  158. // A conflict occurred.
  159. //
  160. // * ErrCodeNotFoundException "NotFoundException"
  161. // The target resource cannot be found.
  162. //
  163. // * ErrCodeForbiddenException "ForbiddenException"
  164. // An access permissions issue occurred.
  165. //
  166. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  167. // Too many service requests were made over the given time period.
  168. //
  169. // * ErrCodeLimitExceededException "LimitExceededException"
  170. // A service limit was exceeded.
  171. //
  172. // * ErrCodeInternalServerErrorException "InternalServerErrorException"
  173. // An internal server error occurred.
  174. //
  175. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/CreateEnvironmentMembership
  176. func (c *Cloud9) CreateEnvironmentMembership(input *CreateEnvironmentMembershipInput) (*CreateEnvironmentMembershipOutput, error) {
  177. req, out := c.CreateEnvironmentMembershipRequest(input)
  178. return out, req.Send()
  179. }
  180. // CreateEnvironmentMembershipWithContext is the same as CreateEnvironmentMembership with the addition of
  181. // the ability to pass a context and additional request options.
  182. //
  183. // See CreateEnvironmentMembership for details on how to use this API operation.
  184. //
  185. // The context must be non-nil and will be used for request cancellation. If
  186. // the context is nil a panic will occur. In the future the SDK may create
  187. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  188. // for more information on using Contexts.
  189. func (c *Cloud9) CreateEnvironmentMembershipWithContext(ctx aws.Context, input *CreateEnvironmentMembershipInput, opts ...request.Option) (*CreateEnvironmentMembershipOutput, error) {
  190. req, out := c.CreateEnvironmentMembershipRequest(input)
  191. req.SetContext(ctx)
  192. req.ApplyOptions(opts...)
  193. return out, req.Send()
  194. }
  195. const opDeleteEnvironment = "DeleteEnvironment"
  196. // DeleteEnvironmentRequest generates a "aws/request.Request" representing the
  197. // client's request for the DeleteEnvironment operation. The "output" return
  198. // value will be populated with the request's response once the request completes
  199. // successfully.
  200. //
  201. // Use "Send" method on the returned Request to send the API call to the service.
  202. // the "output" return value is not valid until after Send returns without error.
  203. //
  204. // See DeleteEnvironment for more information on using the DeleteEnvironment
  205. // API call, and error handling.
  206. //
  207. // This method is useful when you want to inject custom logic or configuration
  208. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  209. //
  210. //
  211. // // Example sending a request using the DeleteEnvironmentRequest method.
  212. // req, resp := client.DeleteEnvironmentRequest(params)
  213. //
  214. // err := req.Send()
  215. // if err == nil { // resp is now filled
  216. // fmt.Println(resp)
  217. // }
  218. //
  219. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DeleteEnvironment
  220. func (c *Cloud9) DeleteEnvironmentRequest(input *DeleteEnvironmentInput) (req *request.Request, output *DeleteEnvironmentOutput) {
  221. op := &request.Operation{
  222. Name: opDeleteEnvironment,
  223. HTTPMethod: "POST",
  224. HTTPPath: "/",
  225. }
  226. if input == nil {
  227. input = &DeleteEnvironmentInput{}
  228. }
  229. output = &DeleteEnvironmentOutput{}
  230. req = c.newRequest(op, input, output)
  231. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  232. return
  233. }
  234. // DeleteEnvironment API operation for AWS Cloud9.
  235. //
  236. // Deletes an AWS Cloud9 development environment. If an Amazon EC2 instance
  237. // is connected to the environment, also terminates the instance.
  238. //
  239. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  240. // with awserr.Error's Code and Message methods to get detailed information about
  241. // the error.
  242. //
  243. // See the AWS API reference guide for AWS Cloud9's
  244. // API operation DeleteEnvironment for usage and error information.
  245. //
  246. // Returned Error Codes:
  247. // * ErrCodeBadRequestException "BadRequestException"
  248. // The target request is invalid.
  249. //
  250. // * ErrCodeConflictException "ConflictException"
  251. // A conflict occurred.
  252. //
  253. // * ErrCodeNotFoundException "NotFoundException"
  254. // The target resource cannot be found.
  255. //
  256. // * ErrCodeForbiddenException "ForbiddenException"
  257. // An access permissions issue occurred.
  258. //
  259. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  260. // Too many service requests were made over the given time period.
  261. //
  262. // * ErrCodeLimitExceededException "LimitExceededException"
  263. // A service limit was exceeded.
  264. //
  265. // * ErrCodeInternalServerErrorException "InternalServerErrorException"
  266. // An internal server error occurred.
  267. //
  268. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DeleteEnvironment
  269. func (c *Cloud9) DeleteEnvironment(input *DeleteEnvironmentInput) (*DeleteEnvironmentOutput, error) {
  270. req, out := c.DeleteEnvironmentRequest(input)
  271. return out, req.Send()
  272. }
  273. // DeleteEnvironmentWithContext is the same as DeleteEnvironment with the addition of
  274. // the ability to pass a context and additional request options.
  275. //
  276. // See DeleteEnvironment for details on how to use this API operation.
  277. //
  278. // The context must be non-nil and will be used for request cancellation. If
  279. // the context is nil a panic will occur. In the future the SDK may create
  280. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  281. // for more information on using Contexts.
  282. func (c *Cloud9) DeleteEnvironmentWithContext(ctx aws.Context, input *DeleteEnvironmentInput, opts ...request.Option) (*DeleteEnvironmentOutput, error) {
  283. req, out := c.DeleteEnvironmentRequest(input)
  284. req.SetContext(ctx)
  285. req.ApplyOptions(opts...)
  286. return out, req.Send()
  287. }
  288. const opDeleteEnvironmentMembership = "DeleteEnvironmentMembership"
  289. // DeleteEnvironmentMembershipRequest generates a "aws/request.Request" representing the
  290. // client's request for the DeleteEnvironmentMembership operation. The "output" return
  291. // value will be populated with the request's response once the request completes
  292. // successfully.
  293. //
  294. // Use "Send" method on the returned Request to send the API call to the service.
  295. // the "output" return value is not valid until after Send returns without error.
  296. //
  297. // See DeleteEnvironmentMembership for more information on using the DeleteEnvironmentMembership
  298. // API call, and error handling.
  299. //
  300. // This method is useful when you want to inject custom logic or configuration
  301. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  302. //
  303. //
  304. // // Example sending a request using the DeleteEnvironmentMembershipRequest method.
  305. // req, resp := client.DeleteEnvironmentMembershipRequest(params)
  306. //
  307. // err := req.Send()
  308. // if err == nil { // resp is now filled
  309. // fmt.Println(resp)
  310. // }
  311. //
  312. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DeleteEnvironmentMembership
  313. func (c *Cloud9) DeleteEnvironmentMembershipRequest(input *DeleteEnvironmentMembershipInput) (req *request.Request, output *DeleteEnvironmentMembershipOutput) {
  314. op := &request.Operation{
  315. Name: opDeleteEnvironmentMembership,
  316. HTTPMethod: "POST",
  317. HTTPPath: "/",
  318. }
  319. if input == nil {
  320. input = &DeleteEnvironmentMembershipInput{}
  321. }
  322. output = &DeleteEnvironmentMembershipOutput{}
  323. req = c.newRequest(op, input, output)
  324. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  325. return
  326. }
  327. // DeleteEnvironmentMembership API operation for AWS Cloud9.
  328. //
  329. // Deletes an environment member from an AWS Cloud9 development environment.
  330. //
  331. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  332. // with awserr.Error's Code and Message methods to get detailed information about
  333. // the error.
  334. //
  335. // See the AWS API reference guide for AWS Cloud9's
  336. // API operation DeleteEnvironmentMembership for usage and error information.
  337. //
  338. // Returned Error Codes:
  339. // * ErrCodeBadRequestException "BadRequestException"
  340. // The target request is invalid.
  341. //
  342. // * ErrCodeConflictException "ConflictException"
  343. // A conflict occurred.
  344. //
  345. // * ErrCodeNotFoundException "NotFoundException"
  346. // The target resource cannot be found.
  347. //
  348. // * ErrCodeForbiddenException "ForbiddenException"
  349. // An access permissions issue occurred.
  350. //
  351. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  352. // Too many service requests were made over the given time period.
  353. //
  354. // * ErrCodeLimitExceededException "LimitExceededException"
  355. // A service limit was exceeded.
  356. //
  357. // * ErrCodeInternalServerErrorException "InternalServerErrorException"
  358. // An internal server error occurred.
  359. //
  360. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DeleteEnvironmentMembership
  361. func (c *Cloud9) DeleteEnvironmentMembership(input *DeleteEnvironmentMembershipInput) (*DeleteEnvironmentMembershipOutput, error) {
  362. req, out := c.DeleteEnvironmentMembershipRequest(input)
  363. return out, req.Send()
  364. }
  365. // DeleteEnvironmentMembershipWithContext is the same as DeleteEnvironmentMembership with the addition of
  366. // the ability to pass a context and additional request options.
  367. //
  368. // See DeleteEnvironmentMembership for details on how to use this API operation.
  369. //
  370. // The context must be non-nil and will be used for request cancellation. If
  371. // the context is nil a panic will occur. In the future the SDK may create
  372. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  373. // for more information on using Contexts.
  374. func (c *Cloud9) DeleteEnvironmentMembershipWithContext(ctx aws.Context, input *DeleteEnvironmentMembershipInput, opts ...request.Option) (*DeleteEnvironmentMembershipOutput, error) {
  375. req, out := c.DeleteEnvironmentMembershipRequest(input)
  376. req.SetContext(ctx)
  377. req.ApplyOptions(opts...)
  378. return out, req.Send()
  379. }
  380. const opDescribeEnvironmentMemberships = "DescribeEnvironmentMemberships"
  381. // DescribeEnvironmentMembershipsRequest generates a "aws/request.Request" representing the
  382. // client's request for the DescribeEnvironmentMemberships operation. The "output" return
  383. // value will be populated with the request's response once the request completes
  384. // successfully.
  385. //
  386. // Use "Send" method on the returned Request to send the API call to the service.
  387. // the "output" return value is not valid until after Send returns without error.
  388. //
  389. // See DescribeEnvironmentMemberships for more information on using the DescribeEnvironmentMemberships
  390. // API call, and error handling.
  391. //
  392. // This method is useful when you want to inject custom logic or configuration
  393. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  394. //
  395. //
  396. // // Example sending a request using the DescribeEnvironmentMembershipsRequest method.
  397. // req, resp := client.DescribeEnvironmentMembershipsRequest(params)
  398. //
  399. // err := req.Send()
  400. // if err == nil { // resp is now filled
  401. // fmt.Println(resp)
  402. // }
  403. //
  404. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DescribeEnvironmentMemberships
  405. func (c *Cloud9) DescribeEnvironmentMembershipsRequest(input *DescribeEnvironmentMembershipsInput) (req *request.Request, output *DescribeEnvironmentMembershipsOutput) {
  406. op := &request.Operation{
  407. Name: opDescribeEnvironmentMemberships,
  408. HTTPMethod: "POST",
  409. HTTPPath: "/",
  410. Paginator: &request.Paginator{
  411. InputTokens: []string{"nextToken"},
  412. OutputTokens: []string{"nextToken"},
  413. LimitToken: "maxResults",
  414. TruncationToken: "",
  415. },
  416. }
  417. if input == nil {
  418. input = &DescribeEnvironmentMembershipsInput{}
  419. }
  420. output = &DescribeEnvironmentMembershipsOutput{}
  421. req = c.newRequest(op, input, output)
  422. return
  423. }
  424. // DescribeEnvironmentMemberships API operation for AWS Cloud9.
  425. //
  426. // Gets information about environment members for an AWS Cloud9 development
  427. // environment.
  428. //
  429. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  430. // with awserr.Error's Code and Message methods to get detailed information about
  431. // the error.
  432. //
  433. // See the AWS API reference guide for AWS Cloud9's
  434. // API operation DescribeEnvironmentMemberships for usage and error information.
  435. //
  436. // Returned Error Codes:
  437. // * ErrCodeBadRequestException "BadRequestException"
  438. // The target request is invalid.
  439. //
  440. // * ErrCodeConflictException "ConflictException"
  441. // A conflict occurred.
  442. //
  443. // * ErrCodeNotFoundException "NotFoundException"
  444. // The target resource cannot be found.
  445. //
  446. // * ErrCodeForbiddenException "ForbiddenException"
  447. // An access permissions issue occurred.
  448. //
  449. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  450. // Too many service requests were made over the given time period.
  451. //
  452. // * ErrCodeLimitExceededException "LimitExceededException"
  453. // A service limit was exceeded.
  454. //
  455. // * ErrCodeInternalServerErrorException "InternalServerErrorException"
  456. // An internal server error occurred.
  457. //
  458. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DescribeEnvironmentMemberships
  459. func (c *Cloud9) DescribeEnvironmentMemberships(input *DescribeEnvironmentMembershipsInput) (*DescribeEnvironmentMembershipsOutput, error) {
  460. req, out := c.DescribeEnvironmentMembershipsRequest(input)
  461. return out, req.Send()
  462. }
  463. // DescribeEnvironmentMembershipsWithContext is the same as DescribeEnvironmentMemberships with the addition of
  464. // the ability to pass a context and additional request options.
  465. //
  466. // See DescribeEnvironmentMemberships for details on how to use this API operation.
  467. //
  468. // The context must be non-nil and will be used for request cancellation. If
  469. // the context is nil a panic will occur. In the future the SDK may create
  470. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  471. // for more information on using Contexts.
  472. func (c *Cloud9) DescribeEnvironmentMembershipsWithContext(ctx aws.Context, input *DescribeEnvironmentMembershipsInput, opts ...request.Option) (*DescribeEnvironmentMembershipsOutput, error) {
  473. req, out := c.DescribeEnvironmentMembershipsRequest(input)
  474. req.SetContext(ctx)
  475. req.ApplyOptions(opts...)
  476. return out, req.Send()
  477. }
  478. // DescribeEnvironmentMembershipsPages iterates over the pages of a DescribeEnvironmentMemberships operation,
  479. // calling the "fn" function with the response data for each page. To stop
  480. // iterating, return false from the fn function.
  481. //
  482. // See DescribeEnvironmentMemberships method for more information on how to use this operation.
  483. //
  484. // Note: This operation can generate multiple requests to a service.
  485. //
  486. // // Example iterating over at most 3 pages of a DescribeEnvironmentMemberships operation.
  487. // pageNum := 0
  488. // err := client.DescribeEnvironmentMembershipsPages(params,
  489. // func(page *DescribeEnvironmentMembershipsOutput, lastPage bool) bool {
  490. // pageNum++
  491. // fmt.Println(page)
  492. // return pageNum <= 3
  493. // })
  494. //
  495. func (c *Cloud9) DescribeEnvironmentMembershipsPages(input *DescribeEnvironmentMembershipsInput, fn func(*DescribeEnvironmentMembershipsOutput, bool) bool) error {
  496. return c.DescribeEnvironmentMembershipsPagesWithContext(aws.BackgroundContext(), input, fn)
  497. }
  498. // DescribeEnvironmentMembershipsPagesWithContext same as DescribeEnvironmentMembershipsPages except
  499. // it takes a Context and allows setting request options on the pages.
  500. //
  501. // The context must be non-nil and will be used for request cancellation. If
  502. // the context is nil a panic will occur. In the future the SDK may create
  503. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  504. // for more information on using Contexts.
  505. func (c *Cloud9) DescribeEnvironmentMembershipsPagesWithContext(ctx aws.Context, input *DescribeEnvironmentMembershipsInput, fn func(*DescribeEnvironmentMembershipsOutput, bool) bool, opts ...request.Option) error {
  506. p := request.Pagination{
  507. NewRequest: func() (*request.Request, error) {
  508. var inCpy *DescribeEnvironmentMembershipsInput
  509. if input != nil {
  510. tmp := *input
  511. inCpy = &tmp
  512. }
  513. req, _ := c.DescribeEnvironmentMembershipsRequest(inCpy)
  514. req.SetContext(ctx)
  515. req.ApplyOptions(opts...)
  516. return req, nil
  517. },
  518. }
  519. cont := true
  520. for p.Next() && cont {
  521. cont = fn(p.Page().(*DescribeEnvironmentMembershipsOutput), !p.HasNextPage())
  522. }
  523. return p.Err()
  524. }
  525. const opDescribeEnvironmentStatus = "DescribeEnvironmentStatus"
  526. // DescribeEnvironmentStatusRequest generates a "aws/request.Request" representing the
  527. // client's request for the DescribeEnvironmentStatus operation. The "output" return
  528. // value will be populated with the request's response once the request completes
  529. // successfully.
  530. //
  531. // Use "Send" method on the returned Request to send the API call to the service.
  532. // the "output" return value is not valid until after Send returns without error.
  533. //
  534. // See DescribeEnvironmentStatus for more information on using the DescribeEnvironmentStatus
  535. // API call, and error handling.
  536. //
  537. // This method is useful when you want to inject custom logic or configuration
  538. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  539. //
  540. //
  541. // // Example sending a request using the DescribeEnvironmentStatusRequest method.
  542. // req, resp := client.DescribeEnvironmentStatusRequest(params)
  543. //
  544. // err := req.Send()
  545. // if err == nil { // resp is now filled
  546. // fmt.Println(resp)
  547. // }
  548. //
  549. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DescribeEnvironmentStatus
  550. func (c *Cloud9) DescribeEnvironmentStatusRequest(input *DescribeEnvironmentStatusInput) (req *request.Request, output *DescribeEnvironmentStatusOutput) {
  551. op := &request.Operation{
  552. Name: opDescribeEnvironmentStatus,
  553. HTTPMethod: "POST",
  554. HTTPPath: "/",
  555. }
  556. if input == nil {
  557. input = &DescribeEnvironmentStatusInput{}
  558. }
  559. output = &DescribeEnvironmentStatusOutput{}
  560. req = c.newRequest(op, input, output)
  561. return
  562. }
  563. // DescribeEnvironmentStatus API operation for AWS Cloud9.
  564. //
  565. // Gets status information for an AWS Cloud9 development environment.
  566. //
  567. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  568. // with awserr.Error's Code and Message methods to get detailed information about
  569. // the error.
  570. //
  571. // See the AWS API reference guide for AWS Cloud9's
  572. // API operation DescribeEnvironmentStatus for usage and error information.
  573. //
  574. // Returned Error Codes:
  575. // * ErrCodeBadRequestException "BadRequestException"
  576. // The target request is invalid.
  577. //
  578. // * ErrCodeConflictException "ConflictException"
  579. // A conflict occurred.
  580. //
  581. // * ErrCodeNotFoundException "NotFoundException"
  582. // The target resource cannot be found.
  583. //
  584. // * ErrCodeForbiddenException "ForbiddenException"
  585. // An access permissions issue occurred.
  586. //
  587. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  588. // Too many service requests were made over the given time period.
  589. //
  590. // * ErrCodeLimitExceededException "LimitExceededException"
  591. // A service limit was exceeded.
  592. //
  593. // * ErrCodeInternalServerErrorException "InternalServerErrorException"
  594. // An internal server error occurred.
  595. //
  596. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DescribeEnvironmentStatus
  597. func (c *Cloud9) DescribeEnvironmentStatus(input *DescribeEnvironmentStatusInput) (*DescribeEnvironmentStatusOutput, error) {
  598. req, out := c.DescribeEnvironmentStatusRequest(input)
  599. return out, req.Send()
  600. }
  601. // DescribeEnvironmentStatusWithContext is the same as DescribeEnvironmentStatus with the addition of
  602. // the ability to pass a context and additional request options.
  603. //
  604. // See DescribeEnvironmentStatus for details on how to use this API operation.
  605. //
  606. // The context must be non-nil and will be used for request cancellation. If
  607. // the context is nil a panic will occur. In the future the SDK may create
  608. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  609. // for more information on using Contexts.
  610. func (c *Cloud9) DescribeEnvironmentStatusWithContext(ctx aws.Context, input *DescribeEnvironmentStatusInput, opts ...request.Option) (*DescribeEnvironmentStatusOutput, error) {
  611. req, out := c.DescribeEnvironmentStatusRequest(input)
  612. req.SetContext(ctx)
  613. req.ApplyOptions(opts...)
  614. return out, req.Send()
  615. }
  616. const opDescribeEnvironments = "DescribeEnvironments"
  617. // DescribeEnvironmentsRequest generates a "aws/request.Request" representing the
  618. // client's request for the DescribeEnvironments operation. The "output" return
  619. // value will be populated with the request's response once the request completes
  620. // successfully.
  621. //
  622. // Use "Send" method on the returned Request to send the API call to the service.
  623. // the "output" return value is not valid until after Send returns without error.
  624. //
  625. // See DescribeEnvironments for more information on using the DescribeEnvironments
  626. // API call, and error handling.
  627. //
  628. // This method is useful when you want to inject custom logic or configuration
  629. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  630. //
  631. //
  632. // // Example sending a request using the DescribeEnvironmentsRequest method.
  633. // req, resp := client.DescribeEnvironmentsRequest(params)
  634. //
  635. // err := req.Send()
  636. // if err == nil { // resp is now filled
  637. // fmt.Println(resp)
  638. // }
  639. //
  640. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DescribeEnvironments
  641. func (c *Cloud9) DescribeEnvironmentsRequest(input *DescribeEnvironmentsInput) (req *request.Request, output *DescribeEnvironmentsOutput) {
  642. op := &request.Operation{
  643. Name: opDescribeEnvironments,
  644. HTTPMethod: "POST",
  645. HTTPPath: "/",
  646. }
  647. if input == nil {
  648. input = &DescribeEnvironmentsInput{}
  649. }
  650. output = &DescribeEnvironmentsOutput{}
  651. req = c.newRequest(op, input, output)
  652. return
  653. }
  654. // DescribeEnvironments API operation for AWS Cloud9.
  655. //
  656. // Gets information about AWS Cloud9 development environments.
  657. //
  658. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  659. // with awserr.Error's Code and Message methods to get detailed information about
  660. // the error.
  661. //
  662. // See the AWS API reference guide for AWS Cloud9's
  663. // API operation DescribeEnvironments for usage and error information.
  664. //
  665. // Returned Error Codes:
  666. // * ErrCodeBadRequestException "BadRequestException"
  667. // The target request is invalid.
  668. //
  669. // * ErrCodeConflictException "ConflictException"
  670. // A conflict occurred.
  671. //
  672. // * ErrCodeNotFoundException "NotFoundException"
  673. // The target resource cannot be found.
  674. //
  675. // * ErrCodeForbiddenException "ForbiddenException"
  676. // An access permissions issue occurred.
  677. //
  678. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  679. // Too many service requests were made over the given time period.
  680. //
  681. // * ErrCodeLimitExceededException "LimitExceededException"
  682. // A service limit was exceeded.
  683. //
  684. // * ErrCodeInternalServerErrorException "InternalServerErrorException"
  685. // An internal server error occurred.
  686. //
  687. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DescribeEnvironments
  688. func (c *Cloud9) DescribeEnvironments(input *DescribeEnvironmentsInput) (*DescribeEnvironmentsOutput, error) {
  689. req, out := c.DescribeEnvironmentsRequest(input)
  690. return out, req.Send()
  691. }
  692. // DescribeEnvironmentsWithContext is the same as DescribeEnvironments with the addition of
  693. // the ability to pass a context and additional request options.
  694. //
  695. // See DescribeEnvironments for details on how to use this API operation.
  696. //
  697. // The context must be non-nil and will be used for request cancellation. If
  698. // the context is nil a panic will occur. In the future the SDK may create
  699. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  700. // for more information on using Contexts.
  701. func (c *Cloud9) DescribeEnvironmentsWithContext(ctx aws.Context, input *DescribeEnvironmentsInput, opts ...request.Option) (*DescribeEnvironmentsOutput, error) {
  702. req, out := c.DescribeEnvironmentsRequest(input)
  703. req.SetContext(ctx)
  704. req.ApplyOptions(opts...)
  705. return out, req.Send()
  706. }
  707. const opListEnvironments = "ListEnvironments"
  708. // ListEnvironmentsRequest generates a "aws/request.Request" representing the
  709. // client's request for the ListEnvironments operation. The "output" return
  710. // value will be populated with the request's response once the request completes
  711. // successfully.
  712. //
  713. // Use "Send" method on the returned Request to send the API call to the service.
  714. // the "output" return value is not valid until after Send returns without error.
  715. //
  716. // See ListEnvironments for more information on using the ListEnvironments
  717. // API call, and error handling.
  718. //
  719. // This method is useful when you want to inject custom logic or configuration
  720. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  721. //
  722. //
  723. // // Example sending a request using the ListEnvironmentsRequest method.
  724. // req, resp := client.ListEnvironmentsRequest(params)
  725. //
  726. // err := req.Send()
  727. // if err == nil { // resp is now filled
  728. // fmt.Println(resp)
  729. // }
  730. //
  731. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/ListEnvironments
  732. func (c *Cloud9) ListEnvironmentsRequest(input *ListEnvironmentsInput) (req *request.Request, output *ListEnvironmentsOutput) {
  733. op := &request.Operation{
  734. Name: opListEnvironments,
  735. HTTPMethod: "POST",
  736. HTTPPath: "/",
  737. Paginator: &request.Paginator{
  738. InputTokens: []string{"nextToken"},
  739. OutputTokens: []string{"nextToken"},
  740. LimitToken: "maxResults",
  741. TruncationToken: "",
  742. },
  743. }
  744. if input == nil {
  745. input = &ListEnvironmentsInput{}
  746. }
  747. output = &ListEnvironmentsOutput{}
  748. req = c.newRequest(op, input, output)
  749. return
  750. }
  751. // ListEnvironments API operation for AWS Cloud9.
  752. //
  753. // Gets a list of AWS Cloud9 development environment identifiers.
  754. //
  755. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  756. // with awserr.Error's Code and Message methods to get detailed information about
  757. // the error.
  758. //
  759. // See the AWS API reference guide for AWS Cloud9's
  760. // API operation ListEnvironments for usage and error information.
  761. //
  762. // Returned Error Codes:
  763. // * ErrCodeBadRequestException "BadRequestException"
  764. // The target request is invalid.
  765. //
  766. // * ErrCodeConflictException "ConflictException"
  767. // A conflict occurred.
  768. //
  769. // * ErrCodeNotFoundException "NotFoundException"
  770. // The target resource cannot be found.
  771. //
  772. // * ErrCodeForbiddenException "ForbiddenException"
  773. // An access permissions issue occurred.
  774. //
  775. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  776. // Too many service requests were made over the given time period.
  777. //
  778. // * ErrCodeLimitExceededException "LimitExceededException"
  779. // A service limit was exceeded.
  780. //
  781. // * ErrCodeInternalServerErrorException "InternalServerErrorException"
  782. // An internal server error occurred.
  783. //
  784. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/ListEnvironments
  785. func (c *Cloud9) ListEnvironments(input *ListEnvironmentsInput) (*ListEnvironmentsOutput, error) {
  786. req, out := c.ListEnvironmentsRequest(input)
  787. return out, req.Send()
  788. }
  789. // ListEnvironmentsWithContext is the same as ListEnvironments with the addition of
  790. // the ability to pass a context and additional request options.
  791. //
  792. // See ListEnvironments for details on how to use this API operation.
  793. //
  794. // The context must be non-nil and will be used for request cancellation. If
  795. // the context is nil a panic will occur. In the future the SDK may create
  796. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  797. // for more information on using Contexts.
  798. func (c *Cloud9) ListEnvironmentsWithContext(ctx aws.Context, input *ListEnvironmentsInput, opts ...request.Option) (*ListEnvironmentsOutput, error) {
  799. req, out := c.ListEnvironmentsRequest(input)
  800. req.SetContext(ctx)
  801. req.ApplyOptions(opts...)
  802. return out, req.Send()
  803. }
  804. // ListEnvironmentsPages iterates over the pages of a ListEnvironments operation,
  805. // calling the "fn" function with the response data for each page. To stop
  806. // iterating, return false from the fn function.
  807. //
  808. // See ListEnvironments method for more information on how to use this operation.
  809. //
  810. // Note: This operation can generate multiple requests to a service.
  811. //
  812. // // Example iterating over at most 3 pages of a ListEnvironments operation.
  813. // pageNum := 0
  814. // err := client.ListEnvironmentsPages(params,
  815. // func(page *ListEnvironmentsOutput, lastPage bool) bool {
  816. // pageNum++
  817. // fmt.Println(page)
  818. // return pageNum <= 3
  819. // })
  820. //
  821. func (c *Cloud9) ListEnvironmentsPages(input *ListEnvironmentsInput, fn func(*ListEnvironmentsOutput, bool) bool) error {
  822. return c.ListEnvironmentsPagesWithContext(aws.BackgroundContext(), input, fn)
  823. }
  824. // ListEnvironmentsPagesWithContext same as ListEnvironmentsPages except
  825. // it takes a Context and allows setting request options on the pages.
  826. //
  827. // The context must be non-nil and will be used for request cancellation. If
  828. // the context is nil a panic will occur. In the future the SDK may create
  829. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  830. // for more information on using Contexts.
  831. func (c *Cloud9) ListEnvironmentsPagesWithContext(ctx aws.Context, input *ListEnvironmentsInput, fn func(*ListEnvironmentsOutput, bool) bool, opts ...request.Option) error {
  832. p := request.Pagination{
  833. NewRequest: func() (*request.Request, error) {
  834. var inCpy *ListEnvironmentsInput
  835. if input != nil {
  836. tmp := *input
  837. inCpy = &tmp
  838. }
  839. req, _ := c.ListEnvironmentsRequest(inCpy)
  840. req.SetContext(ctx)
  841. req.ApplyOptions(opts...)
  842. return req, nil
  843. },
  844. }
  845. cont := true
  846. for p.Next() && cont {
  847. cont = fn(p.Page().(*ListEnvironmentsOutput), !p.HasNextPage())
  848. }
  849. return p.Err()
  850. }
  851. const opUpdateEnvironment = "UpdateEnvironment"
  852. // UpdateEnvironmentRequest generates a "aws/request.Request" representing the
  853. // client's request for the UpdateEnvironment operation. The "output" return
  854. // value will be populated with the request's response once the request completes
  855. // successfully.
  856. //
  857. // Use "Send" method on the returned Request to send the API call to the service.
  858. // the "output" return value is not valid until after Send returns without error.
  859. //
  860. // See UpdateEnvironment for more information on using the UpdateEnvironment
  861. // API call, and error handling.
  862. //
  863. // This method is useful when you want to inject custom logic or configuration
  864. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  865. //
  866. //
  867. // // Example sending a request using the UpdateEnvironmentRequest method.
  868. // req, resp := client.UpdateEnvironmentRequest(params)
  869. //
  870. // err := req.Send()
  871. // if err == nil { // resp is now filled
  872. // fmt.Println(resp)
  873. // }
  874. //
  875. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/UpdateEnvironment
  876. func (c *Cloud9) UpdateEnvironmentRequest(input *UpdateEnvironmentInput) (req *request.Request, output *UpdateEnvironmentOutput) {
  877. op := &request.Operation{
  878. Name: opUpdateEnvironment,
  879. HTTPMethod: "POST",
  880. HTTPPath: "/",
  881. }
  882. if input == nil {
  883. input = &UpdateEnvironmentInput{}
  884. }
  885. output = &UpdateEnvironmentOutput{}
  886. req = c.newRequest(op, input, output)
  887. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  888. return
  889. }
  890. // UpdateEnvironment API operation for AWS Cloud9.
  891. //
  892. // Changes the settings of an existing AWS Cloud9 development environment.
  893. //
  894. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  895. // with awserr.Error's Code and Message methods to get detailed information about
  896. // the error.
  897. //
  898. // See the AWS API reference guide for AWS Cloud9's
  899. // API operation UpdateEnvironment for usage and error information.
  900. //
  901. // Returned Error Codes:
  902. // * ErrCodeBadRequestException "BadRequestException"
  903. // The target request is invalid.
  904. //
  905. // * ErrCodeConflictException "ConflictException"
  906. // A conflict occurred.
  907. //
  908. // * ErrCodeNotFoundException "NotFoundException"
  909. // The target resource cannot be found.
  910. //
  911. // * ErrCodeForbiddenException "ForbiddenException"
  912. // An access permissions issue occurred.
  913. //
  914. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  915. // Too many service requests were made over the given time period.
  916. //
  917. // * ErrCodeLimitExceededException "LimitExceededException"
  918. // A service limit was exceeded.
  919. //
  920. // * ErrCodeInternalServerErrorException "InternalServerErrorException"
  921. // An internal server error occurred.
  922. //
  923. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/UpdateEnvironment
  924. func (c *Cloud9) UpdateEnvironment(input *UpdateEnvironmentInput) (*UpdateEnvironmentOutput, error) {
  925. req, out := c.UpdateEnvironmentRequest(input)
  926. return out, req.Send()
  927. }
  928. // UpdateEnvironmentWithContext is the same as UpdateEnvironment with the addition of
  929. // the ability to pass a context and additional request options.
  930. //
  931. // See UpdateEnvironment for details on how to use this API operation.
  932. //
  933. // The context must be non-nil and will be used for request cancellation. If
  934. // the context is nil a panic will occur. In the future the SDK may create
  935. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  936. // for more information on using Contexts.
  937. func (c *Cloud9) UpdateEnvironmentWithContext(ctx aws.Context, input *UpdateEnvironmentInput, opts ...request.Option) (*UpdateEnvironmentOutput, error) {
  938. req, out := c.UpdateEnvironmentRequest(input)
  939. req.SetContext(ctx)
  940. req.ApplyOptions(opts...)
  941. return out, req.Send()
  942. }
  943. const opUpdateEnvironmentMembership = "UpdateEnvironmentMembership"
  944. // UpdateEnvironmentMembershipRequest generates a "aws/request.Request" representing the
  945. // client's request for the UpdateEnvironmentMembership operation. The "output" return
  946. // value will be populated with the request's response once the request completes
  947. // successfully.
  948. //
  949. // Use "Send" method on the returned Request to send the API call to the service.
  950. // the "output" return value is not valid until after Send returns without error.
  951. //
  952. // See UpdateEnvironmentMembership for more information on using the UpdateEnvironmentMembership
  953. // API call, and error handling.
  954. //
  955. // This method is useful when you want to inject custom logic or configuration
  956. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  957. //
  958. //
  959. // // Example sending a request using the UpdateEnvironmentMembershipRequest method.
  960. // req, resp := client.UpdateEnvironmentMembershipRequest(params)
  961. //
  962. // err := req.Send()
  963. // if err == nil { // resp is now filled
  964. // fmt.Println(resp)
  965. // }
  966. //
  967. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/UpdateEnvironmentMembership
  968. func (c *Cloud9) UpdateEnvironmentMembershipRequest(input *UpdateEnvironmentMembershipInput) (req *request.Request, output *UpdateEnvironmentMembershipOutput) {
  969. op := &request.Operation{
  970. Name: opUpdateEnvironmentMembership,
  971. HTTPMethod: "POST",
  972. HTTPPath: "/",
  973. }
  974. if input == nil {
  975. input = &UpdateEnvironmentMembershipInput{}
  976. }
  977. output = &UpdateEnvironmentMembershipOutput{}
  978. req = c.newRequest(op, input, output)
  979. return
  980. }
  981. // UpdateEnvironmentMembership API operation for AWS Cloud9.
  982. //
  983. // Changes the settings of an existing environment member for an AWS Cloud9
  984. // development environment.
  985. //
  986. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  987. // with awserr.Error's Code and Message methods to get detailed information about
  988. // the error.
  989. //
  990. // See the AWS API reference guide for AWS Cloud9's
  991. // API operation UpdateEnvironmentMembership for usage and error information.
  992. //
  993. // Returned Error Codes:
  994. // * ErrCodeBadRequestException "BadRequestException"
  995. // The target request is invalid.
  996. //
  997. // * ErrCodeConflictException "ConflictException"
  998. // A conflict occurred.
  999. //
  1000. // * ErrCodeNotFoundException "NotFoundException"
  1001. // The target resource cannot be found.
  1002. //
  1003. // * ErrCodeForbiddenException "ForbiddenException"
  1004. // An access permissions issue occurred.
  1005. //
  1006. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  1007. // Too many service requests were made over the given time period.
  1008. //
  1009. // * ErrCodeLimitExceededException "LimitExceededException"
  1010. // A service limit was exceeded.
  1011. //
  1012. // * ErrCodeInternalServerErrorException "InternalServerErrorException"
  1013. // An internal server error occurred.
  1014. //
  1015. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/UpdateEnvironmentMembership
  1016. func (c *Cloud9) UpdateEnvironmentMembership(input *UpdateEnvironmentMembershipInput) (*UpdateEnvironmentMembershipOutput, error) {
  1017. req, out := c.UpdateEnvironmentMembershipRequest(input)
  1018. return out, req.Send()
  1019. }
  1020. // UpdateEnvironmentMembershipWithContext is the same as UpdateEnvironmentMembership with the addition of
  1021. // the ability to pass a context and additional request options.
  1022. //
  1023. // See UpdateEnvironmentMembership for details on how to use this API operation.
  1024. //
  1025. // The context must be non-nil and will be used for request cancellation. If
  1026. // the context is nil a panic will occur. In the future the SDK may create
  1027. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1028. // for more information on using Contexts.
  1029. func (c *Cloud9) UpdateEnvironmentMembershipWithContext(ctx aws.Context, input *UpdateEnvironmentMembershipInput, opts ...request.Option) (*UpdateEnvironmentMembershipOutput, error) {
  1030. req, out := c.UpdateEnvironmentMembershipRequest(input)
  1031. req.SetContext(ctx)
  1032. req.ApplyOptions(opts...)
  1033. return out, req.Send()
  1034. }
  1035. type CreateEnvironmentEC2Input struct {
  1036. _ struct{} `type:"structure"`
  1037. // The number of minutes until the running instance is shut down after the environment
  1038. // has last been used.
  1039. AutomaticStopTimeMinutes *int64 `locationName:"automaticStopTimeMinutes" type:"integer"`
  1040. // A unique, case-sensitive string that helps AWS Cloud9 to ensure this operation
  1041. // completes no more than one time.
  1042. //
  1043. // For more information, see Client Tokens (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html)
  1044. // in the Amazon EC2 API Reference.
  1045. ClientRequestToken *string `locationName:"clientRequestToken" type:"string"`
  1046. // The description of the environment to create.
  1047. Description *string `locationName:"description" type:"string"`
  1048. // The type of instance to connect to the environment (for example, t2.micro).
  1049. //
  1050. // InstanceType is a required field
  1051. InstanceType *string `locationName:"instanceType" min:"5" type:"string" required:"true"`
  1052. // The name of the environment to create.
  1053. //
  1054. // This name is visible to other AWS IAM users in the same AWS account.
  1055. //
  1056. // Name is a required field
  1057. Name *string `locationName:"name" min:"1" type:"string" required:"true"`
  1058. // The Amazon Resource Name (ARN) of the environment owner. This ARN can be
  1059. // the ARN of any AWS IAM principal. If this value is not specified, the ARN
  1060. // defaults to this environment's creator.
  1061. OwnerArn *string `locationName:"ownerArn" type:"string"`
  1062. // The ID of the subnet in Amazon VPC that AWS Cloud9 will use to communicate
  1063. // with the Amazon EC2 instance.
  1064. SubnetId *string `locationName:"subnetId" min:"5" type:"string"`
  1065. }
  1066. // String returns the string representation
  1067. func (s CreateEnvironmentEC2Input) String() string {
  1068. return awsutil.Prettify(s)
  1069. }
  1070. // GoString returns the string representation
  1071. func (s CreateEnvironmentEC2Input) GoString() string {
  1072. return s.String()
  1073. }
  1074. // Validate inspects the fields of the type to determine if they are valid.
  1075. func (s *CreateEnvironmentEC2Input) Validate() error {
  1076. invalidParams := request.ErrInvalidParams{Context: "CreateEnvironmentEC2Input"}
  1077. if s.InstanceType == nil {
  1078. invalidParams.Add(request.NewErrParamRequired("InstanceType"))
  1079. }
  1080. if s.InstanceType != nil && len(*s.InstanceType) < 5 {
  1081. invalidParams.Add(request.NewErrParamMinLen("InstanceType", 5))
  1082. }
  1083. if s.Name == nil {
  1084. invalidParams.Add(request.NewErrParamRequired("Name"))
  1085. }
  1086. if s.Name != nil && len(*s.Name) < 1 {
  1087. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  1088. }
  1089. if s.SubnetId != nil && len(*s.SubnetId) < 5 {
  1090. invalidParams.Add(request.NewErrParamMinLen("SubnetId", 5))
  1091. }
  1092. if invalidParams.Len() > 0 {
  1093. return invalidParams
  1094. }
  1095. return nil
  1096. }
  1097. // SetAutomaticStopTimeMinutes sets the AutomaticStopTimeMinutes field's value.
  1098. func (s *CreateEnvironmentEC2Input) SetAutomaticStopTimeMinutes(v int64) *CreateEnvironmentEC2Input {
  1099. s.AutomaticStopTimeMinutes = &v
  1100. return s
  1101. }
  1102. // SetClientRequestToken sets the ClientRequestToken field's value.
  1103. func (s *CreateEnvironmentEC2Input) SetClientRequestToken(v string) *CreateEnvironmentEC2Input {
  1104. s.ClientRequestToken = &v
  1105. return s
  1106. }
  1107. // SetDescription sets the Description field's value.
  1108. func (s *CreateEnvironmentEC2Input) SetDescription(v string) *CreateEnvironmentEC2Input {
  1109. s.Description = &v
  1110. return s
  1111. }
  1112. // SetInstanceType sets the InstanceType field's value.
  1113. func (s *CreateEnvironmentEC2Input) SetInstanceType(v string) *CreateEnvironmentEC2Input {
  1114. s.InstanceType = &v
  1115. return s
  1116. }
  1117. // SetName sets the Name field's value.
  1118. func (s *CreateEnvironmentEC2Input) SetName(v string) *CreateEnvironmentEC2Input {
  1119. s.Name = &v
  1120. return s
  1121. }
  1122. // SetOwnerArn sets the OwnerArn field's value.
  1123. func (s *CreateEnvironmentEC2Input) SetOwnerArn(v string) *CreateEnvironmentEC2Input {
  1124. s.OwnerArn = &v
  1125. return s
  1126. }
  1127. // SetSubnetId sets the SubnetId field's value.
  1128. func (s *CreateEnvironmentEC2Input) SetSubnetId(v string) *CreateEnvironmentEC2Input {
  1129. s.SubnetId = &v
  1130. return s
  1131. }
  1132. type CreateEnvironmentEC2Output struct {
  1133. _ struct{} `type:"structure"`
  1134. // The ID of the environment that was created.
  1135. EnvironmentId *string `locationName:"environmentId" type:"string"`
  1136. }
  1137. // String returns the string representation
  1138. func (s CreateEnvironmentEC2Output) String() string {
  1139. return awsutil.Prettify(s)
  1140. }
  1141. // GoString returns the string representation
  1142. func (s CreateEnvironmentEC2Output) GoString() string {
  1143. return s.String()
  1144. }
  1145. // SetEnvironmentId sets the EnvironmentId field's value.
  1146. func (s *CreateEnvironmentEC2Output) SetEnvironmentId(v string) *CreateEnvironmentEC2Output {
  1147. s.EnvironmentId = &v
  1148. return s
  1149. }
  1150. type CreateEnvironmentMembershipInput struct {
  1151. _ struct{} `type:"structure"`
  1152. // The ID of the environment that contains the environment member you want to
  1153. // add.
  1154. //
  1155. // EnvironmentId is a required field
  1156. EnvironmentId *string `locationName:"environmentId" type:"string" required:"true"`
  1157. // The type of environment member permissions you want to associate with this
  1158. // environment member. Available values include:
  1159. //
  1160. // * read-only: Has read-only access to the environment.
  1161. //
  1162. // * read-write: Has read-write access to the environment.
  1163. //
  1164. // Permissions is a required field
  1165. Permissions *string `locationName:"permissions" type:"string" required:"true" enum:"MemberPermissions"`
  1166. // The Amazon Resource Name (ARN) of the environment member you want to add.
  1167. //
  1168. // UserArn is a required field
  1169. UserArn *string `locationName:"userArn" type:"string" required:"true"`
  1170. }
  1171. // String returns the string representation
  1172. func (s CreateEnvironmentMembershipInput) String() string {
  1173. return awsutil.Prettify(s)
  1174. }
  1175. // GoString returns the string representation
  1176. func (s CreateEnvironmentMembershipInput) GoString() string {
  1177. return s.String()
  1178. }
  1179. // Validate inspects the fields of the type to determine if they are valid.
  1180. func (s *CreateEnvironmentMembershipInput) Validate() error {
  1181. invalidParams := request.ErrInvalidParams{Context: "CreateEnvironmentMembershipInput"}
  1182. if s.EnvironmentId == nil {
  1183. invalidParams.Add(request.NewErrParamRequired("EnvironmentId"))
  1184. }
  1185. if s.Permissions == nil {
  1186. invalidParams.Add(request.NewErrParamRequired("Permissions"))
  1187. }
  1188. if s.UserArn == nil {
  1189. invalidParams.Add(request.NewErrParamRequired("UserArn"))
  1190. }
  1191. if invalidParams.Len() > 0 {
  1192. return invalidParams
  1193. }
  1194. return nil
  1195. }
  1196. // SetEnvironmentId sets the EnvironmentId field's value.
  1197. func (s *CreateEnvironmentMembershipInput) SetEnvironmentId(v string) *CreateEnvironmentMembershipInput {
  1198. s.EnvironmentId = &v
  1199. return s
  1200. }
  1201. // SetPermissions sets the Permissions field's value.
  1202. func (s *CreateEnvironmentMembershipInput) SetPermissions(v string) *CreateEnvironmentMembershipInput {
  1203. s.Permissions = &v
  1204. return s
  1205. }
  1206. // SetUserArn sets the UserArn field's value.
  1207. func (s *CreateEnvironmentMembershipInput) SetUserArn(v string) *CreateEnvironmentMembershipInput {
  1208. s.UserArn = &v
  1209. return s
  1210. }
  1211. type CreateEnvironmentMembershipOutput struct {
  1212. _ struct{} `type:"structure"`
  1213. // Information about the environment member that was added.
  1214. Membership *EnvironmentMember `locationName:"membership" type:"structure"`
  1215. }
  1216. // String returns the string representation
  1217. func (s CreateEnvironmentMembershipOutput) String() string {
  1218. return awsutil.Prettify(s)
  1219. }
  1220. // GoString returns the string representation
  1221. func (s CreateEnvironmentMembershipOutput) GoString() string {
  1222. return s.String()
  1223. }
  1224. // SetMembership sets the Membership field's value.
  1225. func (s *CreateEnvironmentMembershipOutput) SetMembership(v *EnvironmentMember) *CreateEnvironmentMembershipOutput {
  1226. s.Membership = v
  1227. return s
  1228. }
  1229. type DeleteEnvironmentInput struct {
  1230. _ struct{} `type:"structure"`
  1231. // The ID of the environment to delete.
  1232. //
  1233. // EnvironmentId is a required field
  1234. EnvironmentId *string `locationName:"environmentId" type:"string" required:"true"`
  1235. }
  1236. // String returns the string representation
  1237. func (s DeleteEnvironmentInput) String() string {
  1238. return awsutil.Prettify(s)
  1239. }
  1240. // GoString returns the string representation
  1241. func (s DeleteEnvironmentInput) GoString() string {
  1242. return s.String()
  1243. }
  1244. // Validate inspects the fields of the type to determine if they are valid.
  1245. func (s *DeleteEnvironmentInput) Validate() error {
  1246. invalidParams := request.ErrInvalidParams{Context: "DeleteEnvironmentInput"}
  1247. if s.EnvironmentId == nil {
  1248. invalidParams.Add(request.NewErrParamRequired("EnvironmentId"))
  1249. }
  1250. if invalidParams.Len() > 0 {
  1251. return invalidParams
  1252. }
  1253. return nil
  1254. }
  1255. // SetEnvironmentId sets the EnvironmentId field's value.
  1256. func (s *DeleteEnvironmentInput) SetEnvironmentId(v string) *DeleteEnvironmentInput {
  1257. s.EnvironmentId = &v
  1258. return s
  1259. }
  1260. type DeleteEnvironmentMembershipInput struct {
  1261. _ struct{} `type:"structure"`
  1262. // The ID of the environment to delete the environment member from.
  1263. //
  1264. // EnvironmentId is a required field
  1265. EnvironmentId *string `locationName:"environmentId" type:"string" required:"true"`
  1266. // The Amazon Resource Name (ARN) of the environment member to delete from the
  1267. // environment.
  1268. //
  1269. // UserArn is a required field
  1270. UserArn *string `locationName:"userArn" type:"string" required:"true"`
  1271. }
  1272. // String returns the string representation
  1273. func (s DeleteEnvironmentMembershipInput) String() string {
  1274. return awsutil.Prettify(s)
  1275. }
  1276. // GoString returns the string representation
  1277. func (s DeleteEnvironmentMembershipInput) GoString() string {
  1278. return s.String()
  1279. }
  1280. // Validate inspects the fields of the type to determine if they are valid.
  1281. func (s *DeleteEnvironmentMembershipInput) Validate() error {
  1282. invalidParams := request.ErrInvalidParams{Context: "DeleteEnvironmentMembershipInput"}
  1283. if s.EnvironmentId == nil {
  1284. invalidParams.Add(request.NewErrParamRequired("EnvironmentId"))
  1285. }
  1286. if s.UserArn == nil {
  1287. invalidParams.Add(request.NewErrParamRequired("UserArn"))
  1288. }
  1289. if invalidParams.Len() > 0 {
  1290. return invalidParams
  1291. }
  1292. return nil
  1293. }
  1294. // SetEnvironmentId sets the EnvironmentId field's value.
  1295. func (s *DeleteEnvironmentMembershipInput) SetEnvironmentId(v string) *DeleteEnvironmentMembershipInput {
  1296. s.EnvironmentId = &v
  1297. return s
  1298. }
  1299. // SetUserArn sets the UserArn field's value.
  1300. func (s *DeleteEnvironmentMembershipInput) SetUserArn(v string) *DeleteEnvironmentMembershipInput {
  1301. s.UserArn = &v
  1302. return s
  1303. }
  1304. type DeleteEnvironmentMembershipOutput struct {
  1305. _ struct{} `type:"structure"`
  1306. }
  1307. // String returns the string representation
  1308. func (s DeleteEnvironmentMembershipOutput) String() string {
  1309. return awsutil.Prettify(s)
  1310. }
  1311. // GoString returns the string representation
  1312. func (s DeleteEnvironmentMembershipOutput) GoString() string {
  1313. return s.String()
  1314. }
  1315. type DeleteEnvironmentOutput struct {
  1316. _ struct{} `type:"structure"`
  1317. }
  1318. // String returns the string representation
  1319. func (s DeleteEnvironmentOutput) String() string {
  1320. return awsutil.Prettify(s)
  1321. }
  1322. // GoString returns the string representation
  1323. func (s DeleteEnvironmentOutput) GoString() string {
  1324. return s.String()
  1325. }
  1326. type DescribeEnvironmentMembershipsInput struct {
  1327. _ struct{} `type:"structure"`
  1328. // The ID of the environment to get environment member information about.
  1329. EnvironmentId *string `locationName:"environmentId" type:"string"`
  1330. // The maximum number of environment members to get information about.
  1331. MaxResults *int64 `locationName:"maxResults" type:"integer"`
  1332. // During a previous call, if there are more than 25 items in the list, only
  1333. // the first 25 items are returned, along with a unique string called a next
  1334. // token. To get the next batch of items in the list, call this operation again,
  1335. // adding the next token to the call. To get all of the items in the list, keep
  1336. // calling this operation with each subsequent next token that is returned,
  1337. // until no more next tokens are returned.
  1338. NextToken *string `locationName:"nextToken" type:"string"`
  1339. // The type of environment member permissions to get information about. Available
  1340. // values include:
  1341. //
  1342. // * owner: Owns the environment.
  1343. //
  1344. // * read-only: Has read-only access to the environment.
  1345. //
  1346. // * read-write: Has read-write access to the environment.
  1347. //
  1348. // If no value is specified, information about all environment members are returned.
  1349. Permissions []*string `locationName:"permissions" type:"list"`
  1350. // The Amazon Resource Name (ARN) of an individual environment member to get
  1351. // information about. If no value is specified, information about all environment
  1352. // members are returned.
  1353. UserArn *string `locationName:"userArn" type:"string"`
  1354. }
  1355. // String returns the string representation
  1356. func (s DescribeEnvironmentMembershipsInput) String() string {
  1357. return awsutil.Prettify(s)
  1358. }
  1359. // GoString returns the string representation
  1360. func (s DescribeEnvironmentMembershipsInput) GoString() string {
  1361. return s.String()
  1362. }
  1363. // SetEnvironmentId sets the EnvironmentId field's value.
  1364. func (s *DescribeEnvironmentMembershipsInput) SetEnvironmentId(v string) *DescribeEnvironmentMembershipsInput {
  1365. s.EnvironmentId = &v
  1366. return s
  1367. }
  1368. // SetMaxResults sets the MaxResults field's value.
  1369. func (s *DescribeEnvironmentMembershipsInput) SetMaxResults(v int64) *DescribeEnvironmentMembershipsInput {
  1370. s.MaxResults = &v
  1371. return s
  1372. }
  1373. // SetNextToken sets the NextToken field's value.
  1374. func (s *DescribeEnvironmentMembershipsInput) SetNextToken(v string) *DescribeEnvironmentMembershipsInput {
  1375. s.NextToken = &v
  1376. return s
  1377. }
  1378. // SetPermissions sets the Permissions field's value.
  1379. func (s *DescribeEnvironmentMembershipsInput) SetPermissions(v []*string) *DescribeEnvironmentMembershipsInput {
  1380. s.Permissions = v
  1381. return s
  1382. }
  1383. // SetUserArn sets the UserArn field's value.
  1384. func (s *DescribeEnvironmentMembershipsInput) SetUserArn(v string) *DescribeEnvironmentMembershipsInput {
  1385. s.UserArn = &v
  1386. return s
  1387. }
  1388. type DescribeEnvironmentMembershipsOutput struct {
  1389. _ struct{} `type:"structure"`
  1390. // Information about the environment members for the environment.
  1391. Memberships []*EnvironmentMember `locationName:"memberships" type:"list"`
  1392. // If there are more than 25 items in the list, only the first 25 items are
  1393. // returned, along with a unique string called a next token. To get the next
  1394. // batch of items in the list, call this operation again, adding the next token
  1395. // to the call.
  1396. NextToken *string `locationName:"nextToken" type:"string"`
  1397. }
  1398. // String returns the string representation
  1399. func (s DescribeEnvironmentMembershipsOutput) String() string {
  1400. return awsutil.Prettify(s)
  1401. }
  1402. // GoString returns the string representation
  1403. func (s DescribeEnvironmentMembershipsOutput) GoString() string {
  1404. return s.String()
  1405. }
  1406. // SetMemberships sets the Memberships field's value.
  1407. func (s *DescribeEnvironmentMembershipsOutput) SetMemberships(v []*EnvironmentMember) *DescribeEnvironmentMembershipsOutput {
  1408. s.Memberships = v
  1409. return s
  1410. }
  1411. // SetNextToken sets the NextToken field's value.
  1412. func (s *DescribeEnvironmentMembershipsOutput) SetNextToken(v string) *DescribeEnvironmentMembershipsOutput {
  1413. s.NextToken = &v
  1414. return s
  1415. }
  1416. type DescribeEnvironmentStatusInput struct {
  1417. _ struct{} `type:"structure"`
  1418. // The ID of the environment to get status information about.
  1419. //
  1420. // EnvironmentId is a required field
  1421. EnvironmentId *string `locationName:"environmentId" type:"string" required:"true"`
  1422. }
  1423. // String returns the string representation
  1424. func (s DescribeEnvironmentStatusInput) String() string {
  1425. return awsutil.Prettify(s)
  1426. }
  1427. // GoString returns the string representation
  1428. func (s DescribeEnvironmentStatusInput) GoString() string {
  1429. return s.String()
  1430. }
  1431. // Validate inspects the fields of the type to determine if they are valid.
  1432. func (s *DescribeEnvironmentStatusInput) Validate() error {
  1433. invalidParams := request.ErrInvalidParams{Context: "DescribeEnvironmentStatusInput"}
  1434. if s.EnvironmentId == nil {
  1435. invalidParams.Add(request.NewErrParamRequired("EnvironmentId"))
  1436. }
  1437. if invalidParams.Len() > 0 {
  1438. return invalidParams
  1439. }
  1440. return nil
  1441. }
  1442. // SetEnvironmentId sets the EnvironmentId field's value.
  1443. func (s *DescribeEnvironmentStatusInput) SetEnvironmentId(v string) *DescribeEnvironmentStatusInput {
  1444. s.EnvironmentId = &v
  1445. return s
  1446. }
  1447. type DescribeEnvironmentStatusOutput struct {
  1448. _ struct{} `type:"structure"`
  1449. // Any informational message about the status of the environment.
  1450. Message *string `locationName:"message" type:"string"`
  1451. // The status of the environment. Available values include:
  1452. //
  1453. // * connecting: The environment is connecting.
  1454. //
  1455. // * creating: The environment is being created.
  1456. //
  1457. // * deleting: The environment is being deleted.
  1458. //
  1459. // * error: The environment is in an error state.
  1460. //
  1461. // * ready: The environment is ready.
  1462. //
  1463. // * stopped: The environment is stopped.
  1464. //
  1465. // * stopping: The environment is stopping.
  1466. Status *string `locationName:"status" type:"string" enum:"EnvironmentStatus"`
  1467. }
  1468. // String returns the string representation
  1469. func (s DescribeEnvironmentStatusOutput) String() string {
  1470. return awsutil.Prettify(s)
  1471. }
  1472. // GoString returns the string representation
  1473. func (s DescribeEnvironmentStatusOutput) GoString() string {
  1474. return s.String()
  1475. }
  1476. // SetMessage sets the Message field's value.
  1477. func (s *DescribeEnvironmentStatusOutput) SetMessage(v string) *DescribeEnvironmentStatusOutput {
  1478. s.Message = &v
  1479. return s
  1480. }
  1481. // SetStatus sets the Status field's value.
  1482. func (s *DescribeEnvironmentStatusOutput) SetStatus(v string) *DescribeEnvironmentStatusOutput {
  1483. s.Status = &v
  1484. return s
  1485. }
  1486. type DescribeEnvironmentsInput struct {
  1487. _ struct{} `type:"structure"`
  1488. // The IDs of individual environments to get information about.
  1489. //
  1490. // EnvironmentIds is a required field
  1491. EnvironmentIds []*string `locationName:"environmentIds" min:"1" type:"list" required:"true"`
  1492. }
  1493. // String returns the string representation
  1494. func (s DescribeEnvironmentsInput) String() string {
  1495. return awsutil.Prettify(s)
  1496. }
  1497. // GoString returns the string representation
  1498. func (s DescribeEnvironmentsInput) GoString() string {
  1499. return s.String()
  1500. }
  1501. // Validate inspects the fields of the type to determine if they are valid.
  1502. func (s *DescribeEnvironmentsInput) Validate() error {
  1503. invalidParams := request.ErrInvalidParams{Context: "DescribeEnvironmentsInput"}
  1504. if s.EnvironmentIds == nil {
  1505. invalidParams.Add(request.NewErrParamRequired("EnvironmentIds"))
  1506. }
  1507. if s.EnvironmentIds != nil && len(s.EnvironmentIds) < 1 {
  1508. invalidParams.Add(request.NewErrParamMinLen("EnvironmentIds", 1))
  1509. }
  1510. if invalidParams.Len() > 0 {
  1511. return invalidParams
  1512. }
  1513. return nil
  1514. }
  1515. // SetEnvironmentIds sets the EnvironmentIds field's value.
  1516. func (s *DescribeEnvironmentsInput) SetEnvironmentIds(v []*string) *DescribeEnvironmentsInput {
  1517. s.EnvironmentIds = v
  1518. return s
  1519. }
  1520. type DescribeEnvironmentsOutput struct {
  1521. _ struct{} `type:"structure"`
  1522. // Information about the environments that are returned.
  1523. Environments []*Environment `locationName:"environments" type:"list"`
  1524. }
  1525. // String returns the string representation
  1526. func (s DescribeEnvironmentsOutput) String() string {
  1527. return awsutil.Prettify(s)
  1528. }
  1529. // GoString returns the string representation
  1530. func (s DescribeEnvironmentsOutput) GoString() string {
  1531. return s.String()
  1532. }
  1533. // SetEnvironments sets the Environments field's value.
  1534. func (s *DescribeEnvironmentsOutput) SetEnvironments(v []*Environment) *DescribeEnvironmentsOutput {
  1535. s.Environments = v
  1536. return s
  1537. }
  1538. // Information about an AWS Cloud9 development environment.
  1539. type Environment struct {
  1540. _ struct{} `type:"structure"`
  1541. // The Amazon Resource Name (ARN) of the environment.
  1542. Arn *string `locationName:"arn" type:"string"`
  1543. // The description for the environment.
  1544. Description *string `locationName:"description" type:"string"`
  1545. // The ID of the environment.
  1546. Id *string `locationName:"id" type:"string"`
  1547. // The name of the environment.
  1548. Name *string `locationName:"name" min:"1" type:"string"`
  1549. // The Amazon Resource Name (ARN) of the environment owner.
  1550. OwnerArn *string `locationName:"ownerArn" type:"string"`
  1551. // The type of environment. Valid values include the following:
  1552. //
  1553. // * ec2: An Amazon Elastic Compute Cloud (Amazon EC2) instance connects
  1554. // to the environment.
  1555. //
  1556. // * ssh: Your own server connects to the environment.
  1557. Type *string `locationName:"type" type:"string" enum:"EnvironmentType"`
  1558. }
  1559. // String returns the string representation
  1560. func (s Environment) String() string {
  1561. return awsutil.Prettify(s)
  1562. }
  1563. // GoString returns the string representation
  1564. func (s Environment) GoString() string {
  1565. return s.String()
  1566. }
  1567. // SetArn sets the Arn field's value.
  1568. func (s *Environment) SetArn(v string) *Environment {
  1569. s.Arn = &v
  1570. return s
  1571. }
  1572. // SetDescription sets the Description field's value.
  1573. func (s *Environment) SetDescription(v string) *Environment {
  1574. s.Description = &v
  1575. return s
  1576. }
  1577. // SetId sets the Id field's value.
  1578. func (s *Environment) SetId(v string) *Environment {
  1579. s.Id = &v
  1580. return s
  1581. }
  1582. // SetName sets the Name field's value.
  1583. func (s *Environment) SetName(v string) *Environment {
  1584. s.Name = &v
  1585. return s
  1586. }
  1587. // SetOwnerArn sets the OwnerArn field's value.
  1588. func (s *Environment) SetOwnerArn(v string) *Environment {
  1589. s.OwnerArn = &v
  1590. return s
  1591. }
  1592. // SetType sets the Type field's value.
  1593. func (s *Environment) SetType(v string) *Environment {
  1594. s.Type = &v
  1595. return s
  1596. }
  1597. // Information about an environment member for an AWS Cloud9 development environment.
  1598. type EnvironmentMember struct {
  1599. _ struct{} `type:"structure"`
  1600. // The ID of the environment for the environment member.
  1601. EnvironmentId *string `locationName:"environmentId" type:"string"`
  1602. // The time, expressed in epoch time format, when the environment member last
  1603. // opened the environment.
  1604. LastAccess *time.Time `locationName:"lastAccess" type:"timestamp"`
  1605. // The type of environment member permissions associated with this environment
  1606. // member. Available values include:
  1607. //
  1608. // * owner: Owns the environment.
  1609. //
  1610. // * read-only: Has read-only access to the environment.
  1611. //
  1612. // * read-write: Has read-write access to the environment.
  1613. Permissions *string `locationName:"permissions" type:"string" enum:"Permissions"`
  1614. // The Amazon Resource Name (ARN) of the environment member.
  1615. UserArn *string `locationName:"userArn" type:"string"`
  1616. // The user ID in AWS Identity and Access Management (AWS IAM) of the environment
  1617. // member.
  1618. UserId *string `locationName:"userId" type:"string"`
  1619. }
  1620. // String returns the string representation
  1621. func (s EnvironmentMember) String() string {
  1622. return awsutil.Prettify(s)
  1623. }
  1624. // GoString returns the string representation
  1625. func (s EnvironmentMember) GoString() string {
  1626. return s.String()
  1627. }
  1628. // SetEnvironmentId sets the EnvironmentId field's value.
  1629. func (s *EnvironmentMember) SetEnvironmentId(v string) *EnvironmentMember {
  1630. s.EnvironmentId = &v
  1631. return s
  1632. }
  1633. // SetLastAccess sets the LastAccess field's value.
  1634. func (s *EnvironmentMember) SetLastAccess(v time.Time) *EnvironmentMember {
  1635. s.LastAccess = &v
  1636. return s
  1637. }
  1638. // SetPermissions sets the Permissions field's value.
  1639. func (s *EnvironmentMember) SetPermissions(v string) *EnvironmentMember {
  1640. s.Permissions = &v
  1641. return s
  1642. }
  1643. // SetUserArn sets the UserArn field's value.
  1644. func (s *EnvironmentMember) SetUserArn(v string) *EnvironmentMember {
  1645. s.UserArn = &v
  1646. return s
  1647. }
  1648. // SetUserId sets the UserId field's value.
  1649. func (s *EnvironmentMember) SetUserId(v string) *EnvironmentMember {
  1650. s.UserId = &v
  1651. return s
  1652. }
  1653. type ListEnvironmentsInput struct {
  1654. _ struct{} `type:"structure"`
  1655. // The maximum number of environments to get identifiers for.
  1656. MaxResults *int64 `locationName:"maxResults" type:"integer"`
  1657. // During a previous call, if there are more than 25 items in the list, only
  1658. // the first 25 items are returned, along with a unique string called a next
  1659. // token. To get the next batch of items in the list, call this operation again,
  1660. // adding the next token to the call. To get all of the items in the list, keep
  1661. // calling this operation with each subsequent next token that is returned,
  1662. // until no more next tokens are returned.
  1663. NextToken *string `locationName:"nextToken" type:"string"`
  1664. }
  1665. // String returns the string representation
  1666. func (s ListEnvironmentsInput) String() string {
  1667. return awsutil.Prettify(s)
  1668. }
  1669. // GoString returns the string representation
  1670. func (s ListEnvironmentsInput) GoString() string {
  1671. return s.String()
  1672. }
  1673. // SetMaxResults sets the MaxResults field's value.
  1674. func (s *ListEnvironmentsInput) SetMaxResults(v int64) *ListEnvironmentsInput {
  1675. s.MaxResults = &v
  1676. return s
  1677. }
  1678. // SetNextToken sets the NextToken field's value.
  1679. func (s *ListEnvironmentsInput) SetNextToken(v string) *ListEnvironmentsInput {
  1680. s.NextToken = &v
  1681. return s
  1682. }
  1683. type ListEnvironmentsOutput struct {
  1684. _ struct{} `type:"structure"`
  1685. // The list of environment identifiers.
  1686. EnvironmentIds []*string `locationName:"environmentIds" type:"list"`
  1687. // If there are more than 25 items in the list, only the first 25 items are
  1688. // returned, along with a unique string called a next token. To get the next
  1689. // batch of items in the list, call this operation again, adding the next token
  1690. // to the call.
  1691. NextToken *string `locationName:"nextToken" type:"string"`
  1692. }
  1693. // String returns the string representation
  1694. func (s ListEnvironmentsOutput) String() string {
  1695. return awsutil.Prettify(s)
  1696. }
  1697. // GoString returns the string representation
  1698. func (s ListEnvironmentsOutput) GoString() string {
  1699. return s.String()
  1700. }
  1701. // SetEnvironmentIds sets the EnvironmentIds field's value.
  1702. func (s *ListEnvironmentsOutput) SetEnvironmentIds(v []*string) *ListEnvironmentsOutput {
  1703. s.EnvironmentIds = v
  1704. return s
  1705. }
  1706. // SetNextToken sets the NextToken field's value.
  1707. func (s *ListEnvironmentsOutput) SetNextToken(v string) *ListEnvironmentsOutput {
  1708. s.NextToken = &v
  1709. return s
  1710. }
  1711. type UpdateEnvironmentInput struct {
  1712. _ struct{} `type:"structure"`
  1713. // Any new or replacement description for the environment.
  1714. Description *string `locationName:"description" type:"string"`
  1715. // The ID of the environment to change settings.
  1716. //
  1717. // EnvironmentId is a required field
  1718. EnvironmentId *string `locationName:"environmentId" type:"string" required:"true"`
  1719. // A replacement name for the environment.
  1720. Name *string `locationName:"name" min:"1" type:"string"`
  1721. }
  1722. // String returns the string representation
  1723. func (s UpdateEnvironmentInput) String() string {
  1724. return awsutil.Prettify(s)
  1725. }
  1726. // GoString returns the string representation
  1727. func (s UpdateEnvironmentInput) GoString() string {
  1728. return s.String()
  1729. }
  1730. // Validate inspects the fields of the type to determine if they are valid.
  1731. func (s *UpdateEnvironmentInput) Validate() error {
  1732. invalidParams := request.ErrInvalidParams{Context: "UpdateEnvironmentInput"}
  1733. if s.EnvironmentId == nil {
  1734. invalidParams.Add(request.NewErrParamRequired("EnvironmentId"))
  1735. }
  1736. if s.Name != nil && len(*s.Name) < 1 {
  1737. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  1738. }
  1739. if invalidParams.Len() > 0 {
  1740. return invalidParams
  1741. }
  1742. return nil
  1743. }
  1744. // SetDescription sets the Description field's value.
  1745. func (s *UpdateEnvironmentInput) SetDescription(v string) *UpdateEnvironmentInput {
  1746. s.Description = &v
  1747. return s
  1748. }
  1749. // SetEnvironmentId sets the EnvironmentId field's value.
  1750. func (s *UpdateEnvironmentInput) SetEnvironmentId(v string) *UpdateEnvironmentInput {
  1751. s.EnvironmentId = &v
  1752. return s
  1753. }
  1754. // SetName sets the Name field's value.
  1755. func (s *UpdateEnvironmentInput) SetName(v string) *UpdateEnvironmentInput {
  1756. s.Name = &v
  1757. return s
  1758. }
  1759. type UpdateEnvironmentMembershipInput struct {
  1760. _ struct{} `type:"structure"`
  1761. // The ID of the environment for the environment member whose settings you want
  1762. // to change.
  1763. //
  1764. // EnvironmentId is a required field
  1765. EnvironmentId *string `locationName:"environmentId" type:"string" required:"true"`
  1766. // The replacement type of environment member permissions you want to associate
  1767. // with this environment member. Available values include:
  1768. //
  1769. // * read-only: Has read-only access to the environment.
  1770. //
  1771. // * read-write: Has read-write access to the environment.
  1772. //
  1773. // Permissions is a required field
  1774. Permissions *string `locationName:"permissions" type:"string" required:"true" enum:"MemberPermissions"`
  1775. // The Amazon Resource Name (ARN) of the environment member whose settings you
  1776. // want to change.
  1777. //
  1778. // UserArn is a required field
  1779. UserArn *string `locationName:"userArn" type:"string" required:"true"`
  1780. }
  1781. // String returns the string representation
  1782. func (s UpdateEnvironmentMembershipInput) String() string {
  1783. return awsutil.Prettify(s)
  1784. }
  1785. // GoString returns the string representation
  1786. func (s UpdateEnvironmentMembershipInput) GoString() string {
  1787. return s.String()
  1788. }
  1789. // Validate inspects the fields of the type to determine if they are valid.
  1790. func (s *UpdateEnvironmentMembershipInput) Validate() error {
  1791. invalidParams := request.ErrInvalidParams{Context: "UpdateEnvironmentMembershipInput"}
  1792. if s.EnvironmentId == nil {
  1793. invalidParams.Add(request.NewErrParamRequired("EnvironmentId"))
  1794. }
  1795. if s.Permissions == nil {
  1796. invalidParams.Add(request.NewErrParamRequired("Permissions"))
  1797. }
  1798. if s.UserArn == nil {
  1799. invalidParams.Add(request.NewErrParamRequired("UserArn"))
  1800. }
  1801. if invalidParams.Len() > 0 {
  1802. return invalidParams
  1803. }
  1804. return nil
  1805. }
  1806. // SetEnvironmentId sets the EnvironmentId field's value.
  1807. func (s *UpdateEnvironmentMembershipInput) SetEnvironmentId(v string) *UpdateEnvironmentMembershipInput {
  1808. s.EnvironmentId = &v
  1809. return s
  1810. }
  1811. // SetPermissions sets the Permissions field's value.
  1812. func (s *UpdateEnvironmentMembershipInput) SetPermissions(v string) *UpdateEnvironmentMembershipInput {
  1813. s.Permissions = &v
  1814. return s
  1815. }
  1816. // SetUserArn sets the UserArn field's value.
  1817. func (s *UpdateEnvironmentMembershipInput) SetUserArn(v string) *UpdateEnvironmentMembershipInput {
  1818. s.UserArn = &v
  1819. return s
  1820. }
  1821. type UpdateEnvironmentMembershipOutput struct {
  1822. _ struct{} `type:"structure"`
  1823. // Information about the environment member whose settings were changed.
  1824. Membership *EnvironmentMember `locationName:"membership" type:"structure"`
  1825. }
  1826. // String returns the string representation
  1827. func (s UpdateEnvironmentMembershipOutput) String() string {
  1828. return awsutil.Prettify(s)
  1829. }
  1830. // GoString returns the string representation
  1831. func (s UpdateEnvironmentMembershipOutput) GoString() string {
  1832. return s.String()
  1833. }
  1834. // SetMembership sets the Membership field's value.
  1835. func (s *UpdateEnvironmentMembershipOutput) SetMembership(v *EnvironmentMember) *UpdateEnvironmentMembershipOutput {
  1836. s.Membership = v
  1837. return s
  1838. }
  1839. type UpdateEnvironmentOutput struct {
  1840. _ struct{} `type:"structure"`
  1841. }
  1842. // String returns the string representation
  1843. func (s UpdateEnvironmentOutput) String() string {
  1844. return awsutil.Prettify(s)
  1845. }
  1846. // GoString returns the string representation
  1847. func (s UpdateEnvironmentOutput) GoString() string {
  1848. return s.String()
  1849. }
  1850. const (
  1851. // EnvironmentStatusError is a EnvironmentStatus enum value
  1852. EnvironmentStatusError = "error"
  1853. // EnvironmentStatusCreating is a EnvironmentStatus enum value
  1854. EnvironmentStatusCreating = "creating"
  1855. // EnvironmentStatusConnecting is a EnvironmentStatus enum value
  1856. EnvironmentStatusConnecting = "connecting"
  1857. // EnvironmentStatusReady is a EnvironmentStatus enum value
  1858. EnvironmentStatusReady = "ready"
  1859. // EnvironmentStatusStopping is a EnvironmentStatus enum value
  1860. EnvironmentStatusStopping = "stopping"
  1861. // EnvironmentStatusStopped is a EnvironmentStatus enum value
  1862. EnvironmentStatusStopped = "stopped"
  1863. // EnvironmentStatusDeleting is a EnvironmentStatus enum value
  1864. EnvironmentStatusDeleting = "deleting"
  1865. )
  1866. const (
  1867. // EnvironmentTypeSsh is a EnvironmentType enum value
  1868. EnvironmentTypeSsh = "ssh"
  1869. // EnvironmentTypeEc2 is a EnvironmentType enum value
  1870. EnvironmentTypeEc2 = "ec2"
  1871. )
  1872. const (
  1873. // MemberPermissionsReadWrite is a MemberPermissions enum value
  1874. MemberPermissionsReadWrite = "read-write"
  1875. // MemberPermissionsReadOnly is a MemberPermissions enum value
  1876. MemberPermissionsReadOnly = "read-only"
  1877. )
  1878. const (
  1879. // PermissionsOwner is a Permissions enum value
  1880. PermissionsOwner = "owner"
  1881. // PermissionsReadWrite is a Permissions enum value
  1882. PermissionsReadWrite = "read-write"
  1883. // PermissionsReadOnly is a Permissions enum value
  1884. PermissionsReadOnly = "read-only"
  1885. )