api.go 78 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package mediastore
  3. import (
  4. "fmt"
  5. "time"
  6. "github.com/aws/aws-sdk-go/aws"
  7. "github.com/aws/aws-sdk-go/aws/awsutil"
  8. "github.com/aws/aws-sdk-go/aws/request"
  9. "github.com/aws/aws-sdk-go/private/protocol"
  10. "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
  11. )
  12. const opCreateContainer = "CreateContainer"
  13. // CreateContainerRequest generates a "aws/request.Request" representing the
  14. // client's request for the CreateContainer operation. The "output" return
  15. // value will be populated with the request's response once the request completes
  16. // successfully.
  17. //
  18. // Use "Send" method on the returned Request to send the API call to the service.
  19. // the "output" return value is not valid until after Send returns without error.
  20. //
  21. // See CreateContainer for more information on using the CreateContainer
  22. // API call, and error handling.
  23. //
  24. // This method is useful when you want to inject custom logic or configuration
  25. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  26. //
  27. //
  28. // // Example sending a request using the CreateContainerRequest method.
  29. // req, resp := client.CreateContainerRequest(params)
  30. //
  31. // err := req.Send()
  32. // if err == nil { // resp is now filled
  33. // fmt.Println(resp)
  34. // }
  35. //
  36. // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/CreateContainer
  37. func (c *MediaStore) CreateContainerRequest(input *CreateContainerInput) (req *request.Request, output *CreateContainerOutput) {
  38. op := &request.Operation{
  39. Name: opCreateContainer,
  40. HTTPMethod: "POST",
  41. HTTPPath: "/",
  42. }
  43. if input == nil {
  44. input = &CreateContainerInput{}
  45. }
  46. output = &CreateContainerOutput{}
  47. req = c.newRequest(op, input, output)
  48. return
  49. }
  50. // CreateContainer API operation for AWS Elemental MediaStore.
  51. //
  52. // Creates a storage container to hold objects. A container is similar to a
  53. // bucket in the Amazon S3 service.
  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 Elemental MediaStore's
  60. // API operation CreateContainer for usage and error information.
  61. //
  62. // Returned Error Codes:
  63. // * ErrCodeContainerInUseException "ContainerInUseException"
  64. // The container that you specified in the request already exists or is being
  65. // updated.
  66. //
  67. // * ErrCodeLimitExceededException "LimitExceededException"
  68. // A service limit has been exceeded.
  69. //
  70. // * ErrCodeInternalServerError "InternalServerError"
  71. // The service is temporarily unavailable.
  72. //
  73. // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/CreateContainer
  74. func (c *MediaStore) CreateContainer(input *CreateContainerInput) (*CreateContainerOutput, error) {
  75. req, out := c.CreateContainerRequest(input)
  76. return out, req.Send()
  77. }
  78. // CreateContainerWithContext is the same as CreateContainer with the addition of
  79. // the ability to pass a context and additional request options.
  80. //
  81. // See CreateContainer for details on how to use this API operation.
  82. //
  83. // The context must be non-nil and will be used for request cancellation. If
  84. // the context is nil a panic will occur. In the future the SDK may create
  85. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  86. // for more information on using Contexts.
  87. func (c *MediaStore) CreateContainerWithContext(ctx aws.Context, input *CreateContainerInput, opts ...request.Option) (*CreateContainerOutput, error) {
  88. req, out := c.CreateContainerRequest(input)
  89. req.SetContext(ctx)
  90. req.ApplyOptions(opts...)
  91. return out, req.Send()
  92. }
  93. const opDeleteContainer = "DeleteContainer"
  94. // DeleteContainerRequest generates a "aws/request.Request" representing the
  95. // client's request for the DeleteContainer operation. The "output" return
  96. // value will be populated with the request's response once the request completes
  97. // successfully.
  98. //
  99. // Use "Send" method on the returned Request to send the API call to the service.
  100. // the "output" return value is not valid until after Send returns without error.
  101. //
  102. // See DeleteContainer for more information on using the DeleteContainer
  103. // API call, and error handling.
  104. //
  105. // This method is useful when you want to inject custom logic or configuration
  106. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  107. //
  108. //
  109. // // Example sending a request using the DeleteContainerRequest method.
  110. // req, resp := client.DeleteContainerRequest(params)
  111. //
  112. // err := req.Send()
  113. // if err == nil { // resp is now filled
  114. // fmt.Println(resp)
  115. // }
  116. //
  117. // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteContainer
  118. func (c *MediaStore) DeleteContainerRequest(input *DeleteContainerInput) (req *request.Request, output *DeleteContainerOutput) {
  119. op := &request.Operation{
  120. Name: opDeleteContainer,
  121. HTTPMethod: "POST",
  122. HTTPPath: "/",
  123. }
  124. if input == nil {
  125. input = &DeleteContainerInput{}
  126. }
  127. output = &DeleteContainerOutput{}
  128. req = c.newRequest(op, input, output)
  129. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  130. return
  131. }
  132. // DeleteContainer API operation for AWS Elemental MediaStore.
  133. //
  134. // Deletes the specified container. Before you make a DeleteContainer request,
  135. // delete any objects in the container or in any folders in the container. You
  136. // can delete only empty containers.
  137. //
  138. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  139. // with awserr.Error's Code and Message methods to get detailed information about
  140. // the error.
  141. //
  142. // See the AWS API reference guide for AWS Elemental MediaStore's
  143. // API operation DeleteContainer for usage and error information.
  144. //
  145. // Returned Error Codes:
  146. // * ErrCodeContainerInUseException "ContainerInUseException"
  147. // The container that you specified in the request already exists or is being
  148. // updated.
  149. //
  150. // * ErrCodeContainerNotFoundException "ContainerNotFoundException"
  151. // The container that you specified in the request does not exist.
  152. //
  153. // * ErrCodeInternalServerError "InternalServerError"
  154. // The service is temporarily unavailable.
  155. //
  156. // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteContainer
  157. func (c *MediaStore) DeleteContainer(input *DeleteContainerInput) (*DeleteContainerOutput, error) {
  158. req, out := c.DeleteContainerRequest(input)
  159. return out, req.Send()
  160. }
  161. // DeleteContainerWithContext is the same as DeleteContainer with the addition of
  162. // the ability to pass a context and additional request options.
  163. //
  164. // See DeleteContainer for details on how to use this API operation.
  165. //
  166. // The context must be non-nil and will be used for request cancellation. If
  167. // the context is nil a panic will occur. In the future the SDK may create
  168. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  169. // for more information on using Contexts.
  170. func (c *MediaStore) DeleteContainerWithContext(ctx aws.Context, input *DeleteContainerInput, opts ...request.Option) (*DeleteContainerOutput, error) {
  171. req, out := c.DeleteContainerRequest(input)
  172. req.SetContext(ctx)
  173. req.ApplyOptions(opts...)
  174. return out, req.Send()
  175. }
  176. const opDeleteContainerPolicy = "DeleteContainerPolicy"
  177. // DeleteContainerPolicyRequest generates a "aws/request.Request" representing the
  178. // client's request for the DeleteContainerPolicy operation. The "output" return
  179. // value will be populated with the request's response once the request completes
  180. // successfully.
  181. //
  182. // Use "Send" method on the returned Request to send the API call to the service.
  183. // the "output" return value is not valid until after Send returns without error.
  184. //
  185. // See DeleteContainerPolicy for more information on using the DeleteContainerPolicy
  186. // API call, and error handling.
  187. //
  188. // This method is useful when you want to inject custom logic or configuration
  189. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  190. //
  191. //
  192. // // Example sending a request using the DeleteContainerPolicyRequest method.
  193. // req, resp := client.DeleteContainerPolicyRequest(params)
  194. //
  195. // err := req.Send()
  196. // if err == nil { // resp is now filled
  197. // fmt.Println(resp)
  198. // }
  199. //
  200. // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteContainerPolicy
  201. func (c *MediaStore) DeleteContainerPolicyRequest(input *DeleteContainerPolicyInput) (req *request.Request, output *DeleteContainerPolicyOutput) {
  202. op := &request.Operation{
  203. Name: opDeleteContainerPolicy,
  204. HTTPMethod: "POST",
  205. HTTPPath: "/",
  206. }
  207. if input == nil {
  208. input = &DeleteContainerPolicyInput{}
  209. }
  210. output = &DeleteContainerPolicyOutput{}
  211. req = c.newRequest(op, input, output)
  212. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  213. return
  214. }
  215. // DeleteContainerPolicy API operation for AWS Elemental MediaStore.
  216. //
  217. // Deletes the access policy that is associated with the specified container.
  218. //
  219. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  220. // with awserr.Error's Code and Message methods to get detailed information about
  221. // the error.
  222. //
  223. // See the AWS API reference guide for AWS Elemental MediaStore's
  224. // API operation DeleteContainerPolicy for usage and error information.
  225. //
  226. // Returned Error Codes:
  227. // * ErrCodeContainerInUseException "ContainerInUseException"
  228. // The container that you specified in the request already exists or is being
  229. // updated.
  230. //
  231. // * ErrCodeContainerNotFoundException "ContainerNotFoundException"
  232. // The container that you specified in the request does not exist.
  233. //
  234. // * ErrCodePolicyNotFoundException "PolicyNotFoundException"
  235. // The policy that you specified in the request does not exist.
  236. //
  237. // * ErrCodeInternalServerError "InternalServerError"
  238. // The service is temporarily unavailable.
  239. //
  240. // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteContainerPolicy
  241. func (c *MediaStore) DeleteContainerPolicy(input *DeleteContainerPolicyInput) (*DeleteContainerPolicyOutput, error) {
  242. req, out := c.DeleteContainerPolicyRequest(input)
  243. return out, req.Send()
  244. }
  245. // DeleteContainerPolicyWithContext is the same as DeleteContainerPolicy with the addition of
  246. // the ability to pass a context and additional request options.
  247. //
  248. // See DeleteContainerPolicy for details on how to use this API operation.
  249. //
  250. // The context must be non-nil and will be used for request cancellation. If
  251. // the context is nil a panic will occur. In the future the SDK may create
  252. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  253. // for more information on using Contexts.
  254. func (c *MediaStore) DeleteContainerPolicyWithContext(ctx aws.Context, input *DeleteContainerPolicyInput, opts ...request.Option) (*DeleteContainerPolicyOutput, error) {
  255. req, out := c.DeleteContainerPolicyRequest(input)
  256. req.SetContext(ctx)
  257. req.ApplyOptions(opts...)
  258. return out, req.Send()
  259. }
  260. const opDeleteCorsPolicy = "DeleteCorsPolicy"
  261. // DeleteCorsPolicyRequest generates a "aws/request.Request" representing the
  262. // client's request for the DeleteCorsPolicy operation. The "output" return
  263. // value will be populated with the request's response once the request completes
  264. // successfully.
  265. //
  266. // Use "Send" method on the returned Request to send the API call to the service.
  267. // the "output" return value is not valid until after Send returns without error.
  268. //
  269. // See DeleteCorsPolicy for more information on using the DeleteCorsPolicy
  270. // API call, and error handling.
  271. //
  272. // This method is useful when you want to inject custom logic or configuration
  273. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  274. //
  275. //
  276. // // Example sending a request using the DeleteCorsPolicyRequest method.
  277. // req, resp := client.DeleteCorsPolicyRequest(params)
  278. //
  279. // err := req.Send()
  280. // if err == nil { // resp is now filled
  281. // fmt.Println(resp)
  282. // }
  283. //
  284. // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteCorsPolicy
  285. func (c *MediaStore) DeleteCorsPolicyRequest(input *DeleteCorsPolicyInput) (req *request.Request, output *DeleteCorsPolicyOutput) {
  286. op := &request.Operation{
  287. Name: opDeleteCorsPolicy,
  288. HTTPMethod: "POST",
  289. HTTPPath: "/",
  290. }
  291. if input == nil {
  292. input = &DeleteCorsPolicyInput{}
  293. }
  294. output = &DeleteCorsPolicyOutput{}
  295. req = c.newRequest(op, input, output)
  296. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  297. return
  298. }
  299. // DeleteCorsPolicy API operation for AWS Elemental MediaStore.
  300. //
  301. // Deletes the cross-origin resource sharing (CORS) configuration information
  302. // that is set for the container.
  303. //
  304. // To use this operation, you must have permission to perform the MediaStore:DeleteCorsPolicy
  305. // action. The container owner has this permission by default and can grant
  306. // this permission to others.
  307. //
  308. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  309. // with awserr.Error's Code and Message methods to get detailed information about
  310. // the error.
  311. //
  312. // See the AWS API reference guide for AWS Elemental MediaStore's
  313. // API operation DeleteCorsPolicy for usage and error information.
  314. //
  315. // Returned Error Codes:
  316. // * ErrCodeContainerInUseException "ContainerInUseException"
  317. // The container that you specified in the request already exists or is being
  318. // updated.
  319. //
  320. // * ErrCodeContainerNotFoundException "ContainerNotFoundException"
  321. // The container that you specified in the request does not exist.
  322. //
  323. // * ErrCodeCorsPolicyNotFoundException "CorsPolicyNotFoundException"
  324. // The CORS policy that you specified in the request does not exist.
  325. //
  326. // * ErrCodeInternalServerError "InternalServerError"
  327. // The service is temporarily unavailable.
  328. //
  329. // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteCorsPolicy
  330. func (c *MediaStore) DeleteCorsPolicy(input *DeleteCorsPolicyInput) (*DeleteCorsPolicyOutput, error) {
  331. req, out := c.DeleteCorsPolicyRequest(input)
  332. return out, req.Send()
  333. }
  334. // DeleteCorsPolicyWithContext is the same as DeleteCorsPolicy with the addition of
  335. // the ability to pass a context and additional request options.
  336. //
  337. // See DeleteCorsPolicy for details on how to use this API operation.
  338. //
  339. // The context must be non-nil and will be used for request cancellation. If
  340. // the context is nil a panic will occur. In the future the SDK may create
  341. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  342. // for more information on using Contexts.
  343. func (c *MediaStore) DeleteCorsPolicyWithContext(ctx aws.Context, input *DeleteCorsPolicyInput, opts ...request.Option) (*DeleteCorsPolicyOutput, error) {
  344. req, out := c.DeleteCorsPolicyRequest(input)
  345. req.SetContext(ctx)
  346. req.ApplyOptions(opts...)
  347. return out, req.Send()
  348. }
  349. const opDeleteLifecyclePolicy = "DeleteLifecyclePolicy"
  350. // DeleteLifecyclePolicyRequest generates a "aws/request.Request" representing the
  351. // client's request for the DeleteLifecyclePolicy operation. The "output" return
  352. // value will be populated with the request's response once the request completes
  353. // successfully.
  354. //
  355. // Use "Send" method on the returned Request to send the API call to the service.
  356. // the "output" return value is not valid until after Send returns without error.
  357. //
  358. // See DeleteLifecyclePolicy for more information on using the DeleteLifecyclePolicy
  359. // API call, and error handling.
  360. //
  361. // This method is useful when you want to inject custom logic or configuration
  362. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  363. //
  364. //
  365. // // Example sending a request using the DeleteLifecyclePolicyRequest method.
  366. // req, resp := client.DeleteLifecyclePolicyRequest(params)
  367. //
  368. // err := req.Send()
  369. // if err == nil { // resp is now filled
  370. // fmt.Println(resp)
  371. // }
  372. //
  373. // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteLifecyclePolicy
  374. func (c *MediaStore) DeleteLifecyclePolicyRequest(input *DeleteLifecyclePolicyInput) (req *request.Request, output *DeleteLifecyclePolicyOutput) {
  375. op := &request.Operation{
  376. Name: opDeleteLifecyclePolicy,
  377. HTTPMethod: "POST",
  378. HTTPPath: "/",
  379. }
  380. if input == nil {
  381. input = &DeleteLifecyclePolicyInput{}
  382. }
  383. output = &DeleteLifecyclePolicyOutput{}
  384. req = c.newRequest(op, input, output)
  385. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  386. return
  387. }
  388. // DeleteLifecyclePolicy API operation for AWS Elemental MediaStore.
  389. //
  390. // Removes an object lifecycle policy from a container.
  391. //
  392. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  393. // with awserr.Error's Code and Message methods to get detailed information about
  394. // the error.
  395. //
  396. // See the AWS API reference guide for AWS Elemental MediaStore's
  397. // API operation DeleteLifecyclePolicy for usage and error information.
  398. //
  399. // Returned Error Codes:
  400. // * ErrCodeContainerInUseException "ContainerInUseException"
  401. // The container that you specified in the request already exists or is being
  402. // updated.
  403. //
  404. // * ErrCodeContainerNotFoundException "ContainerNotFoundException"
  405. // The container that you specified in the request does not exist.
  406. //
  407. // * ErrCodePolicyNotFoundException "PolicyNotFoundException"
  408. // The policy that you specified in the request does not exist.
  409. //
  410. // * ErrCodeInternalServerError "InternalServerError"
  411. // The service is temporarily unavailable.
  412. //
  413. // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteLifecyclePolicy
  414. func (c *MediaStore) DeleteLifecyclePolicy(input *DeleteLifecyclePolicyInput) (*DeleteLifecyclePolicyOutput, error) {
  415. req, out := c.DeleteLifecyclePolicyRequest(input)
  416. return out, req.Send()
  417. }
  418. // DeleteLifecyclePolicyWithContext is the same as DeleteLifecyclePolicy with the addition of
  419. // the ability to pass a context and additional request options.
  420. //
  421. // See DeleteLifecyclePolicy for details on how to use this API operation.
  422. //
  423. // The context must be non-nil and will be used for request cancellation. If
  424. // the context is nil a panic will occur. In the future the SDK may create
  425. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  426. // for more information on using Contexts.
  427. func (c *MediaStore) DeleteLifecyclePolicyWithContext(ctx aws.Context, input *DeleteLifecyclePolicyInput, opts ...request.Option) (*DeleteLifecyclePolicyOutput, error) {
  428. req, out := c.DeleteLifecyclePolicyRequest(input)
  429. req.SetContext(ctx)
  430. req.ApplyOptions(opts...)
  431. return out, req.Send()
  432. }
  433. const opDescribeContainer = "DescribeContainer"
  434. // DescribeContainerRequest generates a "aws/request.Request" representing the
  435. // client's request for the DescribeContainer operation. The "output" return
  436. // value will be populated with the request's response once the request completes
  437. // successfully.
  438. //
  439. // Use "Send" method on the returned Request to send the API call to the service.
  440. // the "output" return value is not valid until after Send returns without error.
  441. //
  442. // See DescribeContainer for more information on using the DescribeContainer
  443. // API call, and error handling.
  444. //
  445. // This method is useful when you want to inject custom logic or configuration
  446. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  447. //
  448. //
  449. // // Example sending a request using the DescribeContainerRequest method.
  450. // req, resp := client.DescribeContainerRequest(params)
  451. //
  452. // err := req.Send()
  453. // if err == nil { // resp is now filled
  454. // fmt.Println(resp)
  455. // }
  456. //
  457. // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DescribeContainer
  458. func (c *MediaStore) DescribeContainerRequest(input *DescribeContainerInput) (req *request.Request, output *DescribeContainerOutput) {
  459. op := &request.Operation{
  460. Name: opDescribeContainer,
  461. HTTPMethod: "POST",
  462. HTTPPath: "/",
  463. }
  464. if input == nil {
  465. input = &DescribeContainerInput{}
  466. }
  467. output = &DescribeContainerOutput{}
  468. req = c.newRequest(op, input, output)
  469. return
  470. }
  471. // DescribeContainer API operation for AWS Elemental MediaStore.
  472. //
  473. // Retrieves the properties of the requested container. This request is commonly
  474. // used to retrieve the endpoint of a container. An endpoint is a value assigned
  475. // by the service when a new container is created. A container's endpoint does
  476. // not change after it has been assigned. The DescribeContainer request returns
  477. // a single Container object based on ContainerName. To return all Container
  478. // objects that are associated with a specified AWS account, use ListContainers.
  479. //
  480. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  481. // with awserr.Error's Code and Message methods to get detailed information about
  482. // the error.
  483. //
  484. // See the AWS API reference guide for AWS Elemental MediaStore's
  485. // API operation DescribeContainer for usage and error information.
  486. //
  487. // Returned Error Codes:
  488. // * ErrCodeContainerNotFoundException "ContainerNotFoundException"
  489. // The container that you specified in the request does not exist.
  490. //
  491. // * ErrCodeInternalServerError "InternalServerError"
  492. // The service is temporarily unavailable.
  493. //
  494. // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DescribeContainer
  495. func (c *MediaStore) DescribeContainer(input *DescribeContainerInput) (*DescribeContainerOutput, error) {
  496. req, out := c.DescribeContainerRequest(input)
  497. return out, req.Send()
  498. }
  499. // DescribeContainerWithContext is the same as DescribeContainer with the addition of
  500. // the ability to pass a context and additional request options.
  501. //
  502. // See DescribeContainer for details on how to use this API operation.
  503. //
  504. // The context must be non-nil and will be used for request cancellation. If
  505. // the context is nil a panic will occur. In the future the SDK may create
  506. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  507. // for more information on using Contexts.
  508. func (c *MediaStore) DescribeContainerWithContext(ctx aws.Context, input *DescribeContainerInput, opts ...request.Option) (*DescribeContainerOutput, error) {
  509. req, out := c.DescribeContainerRequest(input)
  510. req.SetContext(ctx)
  511. req.ApplyOptions(opts...)
  512. return out, req.Send()
  513. }
  514. const opGetContainerPolicy = "GetContainerPolicy"
  515. // GetContainerPolicyRequest generates a "aws/request.Request" representing the
  516. // client's request for the GetContainerPolicy operation. The "output" return
  517. // value will be populated with the request's response once the request completes
  518. // successfully.
  519. //
  520. // Use "Send" method on the returned Request to send the API call to the service.
  521. // the "output" return value is not valid until after Send returns without error.
  522. //
  523. // See GetContainerPolicy for more information on using the GetContainerPolicy
  524. // API call, and error handling.
  525. //
  526. // This method is useful when you want to inject custom logic or configuration
  527. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  528. //
  529. //
  530. // // Example sending a request using the GetContainerPolicyRequest method.
  531. // req, resp := client.GetContainerPolicyRequest(params)
  532. //
  533. // err := req.Send()
  534. // if err == nil { // resp is now filled
  535. // fmt.Println(resp)
  536. // }
  537. //
  538. // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/GetContainerPolicy
  539. func (c *MediaStore) GetContainerPolicyRequest(input *GetContainerPolicyInput) (req *request.Request, output *GetContainerPolicyOutput) {
  540. op := &request.Operation{
  541. Name: opGetContainerPolicy,
  542. HTTPMethod: "POST",
  543. HTTPPath: "/",
  544. }
  545. if input == nil {
  546. input = &GetContainerPolicyInput{}
  547. }
  548. output = &GetContainerPolicyOutput{}
  549. req = c.newRequest(op, input, output)
  550. return
  551. }
  552. // GetContainerPolicy API operation for AWS Elemental MediaStore.
  553. //
  554. // Retrieves the access policy for the specified container. For information
  555. // about the data that is included in an access policy, see the AWS Identity
  556. // and Access Management User Guide (https://aws.amazon.com/documentation/iam/).
  557. //
  558. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  559. // with awserr.Error's Code and Message methods to get detailed information about
  560. // the error.
  561. //
  562. // See the AWS API reference guide for AWS Elemental MediaStore's
  563. // API operation GetContainerPolicy for usage and error information.
  564. //
  565. // Returned Error Codes:
  566. // * ErrCodeContainerInUseException "ContainerInUseException"
  567. // The container that you specified in the request already exists or is being
  568. // updated.
  569. //
  570. // * ErrCodeContainerNotFoundException "ContainerNotFoundException"
  571. // The container that you specified in the request does not exist.
  572. //
  573. // * ErrCodePolicyNotFoundException "PolicyNotFoundException"
  574. // The policy that you specified in the request does not exist.
  575. //
  576. // * ErrCodeInternalServerError "InternalServerError"
  577. // The service is temporarily unavailable.
  578. //
  579. // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/GetContainerPolicy
  580. func (c *MediaStore) GetContainerPolicy(input *GetContainerPolicyInput) (*GetContainerPolicyOutput, error) {
  581. req, out := c.GetContainerPolicyRequest(input)
  582. return out, req.Send()
  583. }
  584. // GetContainerPolicyWithContext is the same as GetContainerPolicy with the addition of
  585. // the ability to pass a context and additional request options.
  586. //
  587. // See GetContainerPolicy for details on how to use this API operation.
  588. //
  589. // The context must be non-nil and will be used for request cancellation. If
  590. // the context is nil a panic will occur. In the future the SDK may create
  591. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  592. // for more information on using Contexts.
  593. func (c *MediaStore) GetContainerPolicyWithContext(ctx aws.Context, input *GetContainerPolicyInput, opts ...request.Option) (*GetContainerPolicyOutput, error) {
  594. req, out := c.GetContainerPolicyRequest(input)
  595. req.SetContext(ctx)
  596. req.ApplyOptions(opts...)
  597. return out, req.Send()
  598. }
  599. const opGetCorsPolicy = "GetCorsPolicy"
  600. // GetCorsPolicyRequest generates a "aws/request.Request" representing the
  601. // client's request for the GetCorsPolicy operation. The "output" return
  602. // value will be populated with the request's response once the request completes
  603. // successfully.
  604. //
  605. // Use "Send" method on the returned Request to send the API call to the service.
  606. // the "output" return value is not valid until after Send returns without error.
  607. //
  608. // See GetCorsPolicy for more information on using the GetCorsPolicy
  609. // API call, and error handling.
  610. //
  611. // This method is useful when you want to inject custom logic or configuration
  612. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  613. //
  614. //
  615. // // Example sending a request using the GetCorsPolicyRequest method.
  616. // req, resp := client.GetCorsPolicyRequest(params)
  617. //
  618. // err := req.Send()
  619. // if err == nil { // resp is now filled
  620. // fmt.Println(resp)
  621. // }
  622. //
  623. // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/GetCorsPolicy
  624. func (c *MediaStore) GetCorsPolicyRequest(input *GetCorsPolicyInput) (req *request.Request, output *GetCorsPolicyOutput) {
  625. op := &request.Operation{
  626. Name: opGetCorsPolicy,
  627. HTTPMethod: "POST",
  628. HTTPPath: "/",
  629. }
  630. if input == nil {
  631. input = &GetCorsPolicyInput{}
  632. }
  633. output = &GetCorsPolicyOutput{}
  634. req = c.newRequest(op, input, output)
  635. return
  636. }
  637. // GetCorsPolicy API operation for AWS Elemental MediaStore.
  638. //
  639. // Returns the cross-origin resource sharing (CORS) configuration information
  640. // that is set for the container.
  641. //
  642. // To use this operation, you must have permission to perform the MediaStore:GetCorsPolicy
  643. // action. By default, the container owner has this permission and can grant
  644. // it to others.
  645. //
  646. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  647. // with awserr.Error's Code and Message methods to get detailed information about
  648. // the error.
  649. //
  650. // See the AWS API reference guide for AWS Elemental MediaStore's
  651. // API operation GetCorsPolicy for usage and error information.
  652. //
  653. // Returned Error Codes:
  654. // * ErrCodeContainerInUseException "ContainerInUseException"
  655. // The container that you specified in the request already exists or is being
  656. // updated.
  657. //
  658. // * ErrCodeContainerNotFoundException "ContainerNotFoundException"
  659. // The container that you specified in the request does not exist.
  660. //
  661. // * ErrCodeCorsPolicyNotFoundException "CorsPolicyNotFoundException"
  662. // The CORS policy that you specified in the request does not exist.
  663. //
  664. // * ErrCodeInternalServerError "InternalServerError"
  665. // The service is temporarily unavailable.
  666. //
  667. // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/GetCorsPolicy
  668. func (c *MediaStore) GetCorsPolicy(input *GetCorsPolicyInput) (*GetCorsPolicyOutput, error) {
  669. req, out := c.GetCorsPolicyRequest(input)
  670. return out, req.Send()
  671. }
  672. // GetCorsPolicyWithContext is the same as GetCorsPolicy with the addition of
  673. // the ability to pass a context and additional request options.
  674. //
  675. // See GetCorsPolicy for details on how to use this API operation.
  676. //
  677. // The context must be non-nil and will be used for request cancellation. If
  678. // the context is nil a panic will occur. In the future the SDK may create
  679. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  680. // for more information on using Contexts.
  681. func (c *MediaStore) GetCorsPolicyWithContext(ctx aws.Context, input *GetCorsPolicyInput, opts ...request.Option) (*GetCorsPolicyOutput, error) {
  682. req, out := c.GetCorsPolicyRequest(input)
  683. req.SetContext(ctx)
  684. req.ApplyOptions(opts...)
  685. return out, req.Send()
  686. }
  687. const opGetLifecyclePolicy = "GetLifecyclePolicy"
  688. // GetLifecyclePolicyRequest generates a "aws/request.Request" representing the
  689. // client's request for the GetLifecyclePolicy operation. The "output" return
  690. // value will be populated with the request's response once the request completes
  691. // successfully.
  692. //
  693. // Use "Send" method on the returned Request to send the API call to the service.
  694. // the "output" return value is not valid until after Send returns without error.
  695. //
  696. // See GetLifecyclePolicy for more information on using the GetLifecyclePolicy
  697. // API call, and error handling.
  698. //
  699. // This method is useful when you want to inject custom logic or configuration
  700. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  701. //
  702. //
  703. // // Example sending a request using the GetLifecyclePolicyRequest method.
  704. // req, resp := client.GetLifecyclePolicyRequest(params)
  705. //
  706. // err := req.Send()
  707. // if err == nil { // resp is now filled
  708. // fmt.Println(resp)
  709. // }
  710. //
  711. // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/GetLifecyclePolicy
  712. func (c *MediaStore) GetLifecyclePolicyRequest(input *GetLifecyclePolicyInput) (req *request.Request, output *GetLifecyclePolicyOutput) {
  713. op := &request.Operation{
  714. Name: opGetLifecyclePolicy,
  715. HTTPMethod: "POST",
  716. HTTPPath: "/",
  717. }
  718. if input == nil {
  719. input = &GetLifecyclePolicyInput{}
  720. }
  721. output = &GetLifecyclePolicyOutput{}
  722. req = c.newRequest(op, input, output)
  723. return
  724. }
  725. // GetLifecyclePolicy API operation for AWS Elemental MediaStore.
  726. //
  727. // Retrieves the object lifecycle policy that is assigned to a container.
  728. //
  729. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  730. // with awserr.Error's Code and Message methods to get detailed information about
  731. // the error.
  732. //
  733. // See the AWS API reference guide for AWS Elemental MediaStore's
  734. // API operation GetLifecyclePolicy for usage and error information.
  735. //
  736. // Returned Error Codes:
  737. // * ErrCodeContainerInUseException "ContainerInUseException"
  738. // The container that you specified in the request already exists or is being
  739. // updated.
  740. //
  741. // * ErrCodeContainerNotFoundException "ContainerNotFoundException"
  742. // The container that you specified in the request does not exist.
  743. //
  744. // * ErrCodePolicyNotFoundException "PolicyNotFoundException"
  745. // The policy that you specified in the request does not exist.
  746. //
  747. // * ErrCodeInternalServerError "InternalServerError"
  748. // The service is temporarily unavailable.
  749. //
  750. // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/GetLifecyclePolicy
  751. func (c *MediaStore) GetLifecyclePolicy(input *GetLifecyclePolicyInput) (*GetLifecyclePolicyOutput, error) {
  752. req, out := c.GetLifecyclePolicyRequest(input)
  753. return out, req.Send()
  754. }
  755. // GetLifecyclePolicyWithContext is the same as GetLifecyclePolicy with the addition of
  756. // the ability to pass a context and additional request options.
  757. //
  758. // See GetLifecyclePolicy for details on how to use this API operation.
  759. //
  760. // The context must be non-nil and will be used for request cancellation. If
  761. // the context is nil a panic will occur. In the future the SDK may create
  762. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  763. // for more information on using Contexts.
  764. func (c *MediaStore) GetLifecyclePolicyWithContext(ctx aws.Context, input *GetLifecyclePolicyInput, opts ...request.Option) (*GetLifecyclePolicyOutput, error) {
  765. req, out := c.GetLifecyclePolicyRequest(input)
  766. req.SetContext(ctx)
  767. req.ApplyOptions(opts...)
  768. return out, req.Send()
  769. }
  770. const opListContainers = "ListContainers"
  771. // ListContainersRequest generates a "aws/request.Request" representing the
  772. // client's request for the ListContainers operation. The "output" return
  773. // value will be populated with the request's response once the request completes
  774. // successfully.
  775. //
  776. // Use "Send" method on the returned Request to send the API call to the service.
  777. // the "output" return value is not valid until after Send returns without error.
  778. //
  779. // See ListContainers for more information on using the ListContainers
  780. // API call, and error handling.
  781. //
  782. // This method is useful when you want to inject custom logic or configuration
  783. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  784. //
  785. //
  786. // // Example sending a request using the ListContainersRequest method.
  787. // req, resp := client.ListContainersRequest(params)
  788. //
  789. // err := req.Send()
  790. // if err == nil { // resp is now filled
  791. // fmt.Println(resp)
  792. // }
  793. //
  794. // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/ListContainers
  795. func (c *MediaStore) ListContainersRequest(input *ListContainersInput) (req *request.Request, output *ListContainersOutput) {
  796. op := &request.Operation{
  797. Name: opListContainers,
  798. HTTPMethod: "POST",
  799. HTTPPath: "/",
  800. }
  801. if input == nil {
  802. input = &ListContainersInput{}
  803. }
  804. output = &ListContainersOutput{}
  805. req = c.newRequest(op, input, output)
  806. return
  807. }
  808. // ListContainers API operation for AWS Elemental MediaStore.
  809. //
  810. // Lists the properties of all containers in AWS Elemental MediaStore.
  811. //
  812. // You can query to receive all the containers in one response. Or you can include
  813. // the MaxResults parameter to receive a limited number of containers in each
  814. // response. In this case, the response includes a token. To get the next set
  815. // of containers, send the command again, this time with the NextToken parameter
  816. // (with the returned token as its value). The next set of responses appears,
  817. // with a token if there are still more containers to receive.
  818. //
  819. // See also DescribeContainer, which gets the properties of one container.
  820. //
  821. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  822. // with awserr.Error's Code and Message methods to get detailed information about
  823. // the error.
  824. //
  825. // See the AWS API reference guide for AWS Elemental MediaStore's
  826. // API operation ListContainers for usage and error information.
  827. //
  828. // Returned Error Codes:
  829. // * ErrCodeInternalServerError "InternalServerError"
  830. // The service is temporarily unavailable.
  831. //
  832. // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/ListContainers
  833. func (c *MediaStore) ListContainers(input *ListContainersInput) (*ListContainersOutput, error) {
  834. req, out := c.ListContainersRequest(input)
  835. return out, req.Send()
  836. }
  837. // ListContainersWithContext is the same as ListContainers with the addition of
  838. // the ability to pass a context and additional request options.
  839. //
  840. // See ListContainers for details on how to use this API operation.
  841. //
  842. // The context must be non-nil and will be used for request cancellation. If
  843. // the context is nil a panic will occur. In the future the SDK may create
  844. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  845. // for more information on using Contexts.
  846. func (c *MediaStore) ListContainersWithContext(ctx aws.Context, input *ListContainersInput, opts ...request.Option) (*ListContainersOutput, error) {
  847. req, out := c.ListContainersRequest(input)
  848. req.SetContext(ctx)
  849. req.ApplyOptions(opts...)
  850. return out, req.Send()
  851. }
  852. const opPutContainerPolicy = "PutContainerPolicy"
  853. // PutContainerPolicyRequest generates a "aws/request.Request" representing the
  854. // client's request for the PutContainerPolicy operation. The "output" return
  855. // value will be populated with the request's response once the request completes
  856. // successfully.
  857. //
  858. // Use "Send" method on the returned Request to send the API call to the service.
  859. // the "output" return value is not valid until after Send returns without error.
  860. //
  861. // See PutContainerPolicy for more information on using the PutContainerPolicy
  862. // API call, and error handling.
  863. //
  864. // This method is useful when you want to inject custom logic or configuration
  865. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  866. //
  867. //
  868. // // Example sending a request using the PutContainerPolicyRequest method.
  869. // req, resp := client.PutContainerPolicyRequest(params)
  870. //
  871. // err := req.Send()
  872. // if err == nil { // resp is now filled
  873. // fmt.Println(resp)
  874. // }
  875. //
  876. // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/PutContainerPolicy
  877. func (c *MediaStore) PutContainerPolicyRequest(input *PutContainerPolicyInput) (req *request.Request, output *PutContainerPolicyOutput) {
  878. op := &request.Operation{
  879. Name: opPutContainerPolicy,
  880. HTTPMethod: "POST",
  881. HTTPPath: "/",
  882. }
  883. if input == nil {
  884. input = &PutContainerPolicyInput{}
  885. }
  886. output = &PutContainerPolicyOutput{}
  887. req = c.newRequest(op, input, output)
  888. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  889. return
  890. }
  891. // PutContainerPolicy API operation for AWS Elemental MediaStore.
  892. //
  893. // Creates an access policy for the specified container to restrict the users
  894. // and clients that can access it. For information about the data that is included
  895. // in an access policy, see the AWS Identity and Access Management User Guide
  896. // (https://aws.amazon.com/documentation/iam/).
  897. //
  898. // For this release of the REST API, you can create only one policy for a container.
  899. // If you enter PutContainerPolicy twice, the second command modifies the existing
  900. // policy.
  901. //
  902. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  903. // with awserr.Error's Code and Message methods to get detailed information about
  904. // the error.
  905. //
  906. // See the AWS API reference guide for AWS Elemental MediaStore's
  907. // API operation PutContainerPolicy for usage and error information.
  908. //
  909. // Returned Error Codes:
  910. // * ErrCodeContainerNotFoundException "ContainerNotFoundException"
  911. // The container that you specified in the request does not exist.
  912. //
  913. // * ErrCodeContainerInUseException "ContainerInUseException"
  914. // The container that you specified in the request already exists or is being
  915. // updated.
  916. //
  917. // * ErrCodeInternalServerError "InternalServerError"
  918. // The service is temporarily unavailable.
  919. //
  920. // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/PutContainerPolicy
  921. func (c *MediaStore) PutContainerPolicy(input *PutContainerPolicyInput) (*PutContainerPolicyOutput, error) {
  922. req, out := c.PutContainerPolicyRequest(input)
  923. return out, req.Send()
  924. }
  925. // PutContainerPolicyWithContext is the same as PutContainerPolicy with the addition of
  926. // the ability to pass a context and additional request options.
  927. //
  928. // See PutContainerPolicy for details on how to use this API operation.
  929. //
  930. // The context must be non-nil and will be used for request cancellation. If
  931. // the context is nil a panic will occur. In the future the SDK may create
  932. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  933. // for more information on using Contexts.
  934. func (c *MediaStore) PutContainerPolicyWithContext(ctx aws.Context, input *PutContainerPolicyInput, opts ...request.Option) (*PutContainerPolicyOutput, error) {
  935. req, out := c.PutContainerPolicyRequest(input)
  936. req.SetContext(ctx)
  937. req.ApplyOptions(opts...)
  938. return out, req.Send()
  939. }
  940. const opPutCorsPolicy = "PutCorsPolicy"
  941. // PutCorsPolicyRequest generates a "aws/request.Request" representing the
  942. // client's request for the PutCorsPolicy operation. The "output" return
  943. // value will be populated with the request's response once the request completes
  944. // successfully.
  945. //
  946. // Use "Send" method on the returned Request to send the API call to the service.
  947. // the "output" return value is not valid until after Send returns without error.
  948. //
  949. // See PutCorsPolicy for more information on using the PutCorsPolicy
  950. // API call, and error handling.
  951. //
  952. // This method is useful when you want to inject custom logic or configuration
  953. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  954. //
  955. //
  956. // // Example sending a request using the PutCorsPolicyRequest method.
  957. // req, resp := client.PutCorsPolicyRequest(params)
  958. //
  959. // err := req.Send()
  960. // if err == nil { // resp is now filled
  961. // fmt.Println(resp)
  962. // }
  963. //
  964. // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/PutCorsPolicy
  965. func (c *MediaStore) PutCorsPolicyRequest(input *PutCorsPolicyInput) (req *request.Request, output *PutCorsPolicyOutput) {
  966. op := &request.Operation{
  967. Name: opPutCorsPolicy,
  968. HTTPMethod: "POST",
  969. HTTPPath: "/",
  970. }
  971. if input == nil {
  972. input = &PutCorsPolicyInput{}
  973. }
  974. output = &PutCorsPolicyOutput{}
  975. req = c.newRequest(op, input, output)
  976. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  977. return
  978. }
  979. // PutCorsPolicy API operation for AWS Elemental MediaStore.
  980. //
  981. // Sets the cross-origin resource sharing (CORS) configuration on a container
  982. // so that the container can service cross-origin requests. For example, you
  983. // might want to enable a request whose origin is http://www.example.com to
  984. // access your AWS Elemental MediaStore container at my.example.container.com
  985. // by using the browser's XMLHttpRequest capability.
  986. //
  987. // To enable CORS on a container, you attach a CORS policy to the container.
  988. // In the CORS policy, you configure rules that identify origins and the HTTP
  989. // methods that can be executed on your container. The policy can contain up
  990. // to 398,000 characters. You can add up to 100 rules to a CORS policy. If more
  991. // than one rule applies, the service uses the first applicable rule listed.
  992. //
  993. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  994. // with awserr.Error's Code and Message methods to get detailed information about
  995. // the error.
  996. //
  997. // See the AWS API reference guide for AWS Elemental MediaStore's
  998. // API operation PutCorsPolicy for usage and error information.
  999. //
  1000. // Returned Error Codes:
  1001. // * ErrCodeContainerNotFoundException "ContainerNotFoundException"
  1002. // The container that you specified in the request does not exist.
  1003. //
  1004. // * ErrCodeContainerInUseException "ContainerInUseException"
  1005. // The container that you specified in the request already exists or is being
  1006. // updated.
  1007. //
  1008. // * ErrCodeInternalServerError "InternalServerError"
  1009. // The service is temporarily unavailable.
  1010. //
  1011. // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/PutCorsPolicy
  1012. func (c *MediaStore) PutCorsPolicy(input *PutCorsPolicyInput) (*PutCorsPolicyOutput, error) {
  1013. req, out := c.PutCorsPolicyRequest(input)
  1014. return out, req.Send()
  1015. }
  1016. // PutCorsPolicyWithContext is the same as PutCorsPolicy with the addition of
  1017. // the ability to pass a context and additional request options.
  1018. //
  1019. // See PutCorsPolicy for details on how to use this API operation.
  1020. //
  1021. // The context must be non-nil and will be used for request cancellation. If
  1022. // the context is nil a panic will occur. In the future the SDK may create
  1023. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1024. // for more information on using Contexts.
  1025. func (c *MediaStore) PutCorsPolicyWithContext(ctx aws.Context, input *PutCorsPolicyInput, opts ...request.Option) (*PutCorsPolicyOutput, error) {
  1026. req, out := c.PutCorsPolicyRequest(input)
  1027. req.SetContext(ctx)
  1028. req.ApplyOptions(opts...)
  1029. return out, req.Send()
  1030. }
  1031. const opPutLifecyclePolicy = "PutLifecyclePolicy"
  1032. // PutLifecyclePolicyRequest generates a "aws/request.Request" representing the
  1033. // client's request for the PutLifecyclePolicy operation. The "output" return
  1034. // value will be populated with the request's response once the request completes
  1035. // successfully.
  1036. //
  1037. // Use "Send" method on the returned Request to send the API call to the service.
  1038. // the "output" return value is not valid until after Send returns without error.
  1039. //
  1040. // See PutLifecyclePolicy for more information on using the PutLifecyclePolicy
  1041. // API call, and error handling.
  1042. //
  1043. // This method is useful when you want to inject custom logic or configuration
  1044. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1045. //
  1046. //
  1047. // // Example sending a request using the PutLifecyclePolicyRequest method.
  1048. // req, resp := client.PutLifecyclePolicyRequest(params)
  1049. //
  1050. // err := req.Send()
  1051. // if err == nil { // resp is now filled
  1052. // fmt.Println(resp)
  1053. // }
  1054. //
  1055. // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/PutLifecyclePolicy
  1056. func (c *MediaStore) PutLifecyclePolicyRequest(input *PutLifecyclePolicyInput) (req *request.Request, output *PutLifecyclePolicyOutput) {
  1057. op := &request.Operation{
  1058. Name: opPutLifecyclePolicy,
  1059. HTTPMethod: "POST",
  1060. HTTPPath: "/",
  1061. }
  1062. if input == nil {
  1063. input = &PutLifecyclePolicyInput{}
  1064. }
  1065. output = &PutLifecyclePolicyOutput{}
  1066. req = c.newRequest(op, input, output)
  1067. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1068. return
  1069. }
  1070. // PutLifecyclePolicy API operation for AWS Elemental MediaStore.
  1071. //
  1072. // Writes an object lifecycle policy to a container. If the container already
  1073. // has an object lifecycle policy, the service replaces the existing policy
  1074. // with the new policy.
  1075. //
  1076. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1077. // with awserr.Error's Code and Message methods to get detailed information about
  1078. // the error.
  1079. //
  1080. // See the AWS API reference guide for AWS Elemental MediaStore's
  1081. // API operation PutLifecyclePolicy for usage and error information.
  1082. //
  1083. // Returned Error Codes:
  1084. // * ErrCodeContainerInUseException "ContainerInUseException"
  1085. // The container that you specified in the request already exists or is being
  1086. // updated.
  1087. //
  1088. // * ErrCodeContainerNotFoundException "ContainerNotFoundException"
  1089. // The container that you specified in the request does not exist.
  1090. //
  1091. // * ErrCodeInternalServerError "InternalServerError"
  1092. // The service is temporarily unavailable.
  1093. //
  1094. // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/PutLifecyclePolicy
  1095. func (c *MediaStore) PutLifecyclePolicy(input *PutLifecyclePolicyInput) (*PutLifecyclePolicyOutput, error) {
  1096. req, out := c.PutLifecyclePolicyRequest(input)
  1097. return out, req.Send()
  1098. }
  1099. // PutLifecyclePolicyWithContext is the same as PutLifecyclePolicy with the addition of
  1100. // the ability to pass a context and additional request options.
  1101. //
  1102. // See PutLifecyclePolicy for details on how to use this API operation.
  1103. //
  1104. // The context must be non-nil and will be used for request cancellation. If
  1105. // the context is nil a panic will occur. In the future the SDK may create
  1106. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1107. // for more information on using Contexts.
  1108. func (c *MediaStore) PutLifecyclePolicyWithContext(ctx aws.Context, input *PutLifecyclePolicyInput, opts ...request.Option) (*PutLifecyclePolicyOutput, error) {
  1109. req, out := c.PutLifecyclePolicyRequest(input)
  1110. req.SetContext(ctx)
  1111. req.ApplyOptions(opts...)
  1112. return out, req.Send()
  1113. }
  1114. // This section describes operations that you can perform on an AWS Elemental
  1115. // MediaStore container.
  1116. type Container struct {
  1117. _ struct{} `type:"structure"`
  1118. // The Amazon Resource Name (ARN) of the container. The ARN has the following
  1119. // format:
  1120. //
  1121. // arn:aws:<region>:<account that owns this container>:container/<name of container>
  1122. //
  1123. // For example: arn:aws:mediastore:us-west-2:111122223333:container/movies
  1124. ARN *string `min:"1" type:"string"`
  1125. // Unix timestamp.
  1126. CreationTime *time.Time `type:"timestamp"`
  1127. // The DNS endpoint of the container. Use the endpoint to identify the specific
  1128. // container when sending requests to the data plane. The service assigns this
  1129. // value when the container is created. Once the value has been assigned, it
  1130. // does not change.
  1131. Endpoint *string `min:"1" type:"string"`
  1132. // The name of the container.
  1133. Name *string `min:"1" type:"string"`
  1134. // The status of container creation or deletion. The status is one of the following:
  1135. // CREATING, ACTIVE, or DELETING. While the service is creating the container,
  1136. // the status is CREATING. When the endpoint is available, the status changes
  1137. // to ACTIVE.
  1138. Status *string `min:"1" type:"string" enum:"ContainerStatus"`
  1139. }
  1140. // String returns the string representation
  1141. func (s Container) String() string {
  1142. return awsutil.Prettify(s)
  1143. }
  1144. // GoString returns the string representation
  1145. func (s Container) GoString() string {
  1146. return s.String()
  1147. }
  1148. // SetARN sets the ARN field's value.
  1149. func (s *Container) SetARN(v string) *Container {
  1150. s.ARN = &v
  1151. return s
  1152. }
  1153. // SetCreationTime sets the CreationTime field's value.
  1154. func (s *Container) SetCreationTime(v time.Time) *Container {
  1155. s.CreationTime = &v
  1156. return s
  1157. }
  1158. // SetEndpoint sets the Endpoint field's value.
  1159. func (s *Container) SetEndpoint(v string) *Container {
  1160. s.Endpoint = &v
  1161. return s
  1162. }
  1163. // SetName sets the Name field's value.
  1164. func (s *Container) SetName(v string) *Container {
  1165. s.Name = &v
  1166. return s
  1167. }
  1168. // SetStatus sets the Status field's value.
  1169. func (s *Container) SetStatus(v string) *Container {
  1170. s.Status = &v
  1171. return s
  1172. }
  1173. // A rule for a CORS policy. You can add up to 100 rules to a CORS policy. If
  1174. // more than one rule applies, the service uses the first applicable rule listed.
  1175. type CorsRule struct {
  1176. _ struct{} `type:"structure"`
  1177. // Specifies which headers are allowed in a preflight OPTIONS request through
  1178. // the Access-Control-Request-Headers header. Each header name that is specified
  1179. // in Access-Control-Request-Headers must have a corresponding entry in the
  1180. // rule. Only the headers that were requested are sent back.
  1181. //
  1182. // This element can contain only one wildcard character (*).
  1183. //
  1184. // AllowedHeaders is a required field
  1185. AllowedHeaders []*string `type:"list" required:"true"`
  1186. // Identifies an HTTP method that the origin that is specified in the rule is
  1187. // allowed to execute.
  1188. //
  1189. // Each CORS rule must contain at least one AllowedMethods and one AllowedOrigins
  1190. // element.
  1191. AllowedMethods []*string `min:"1" type:"list"`
  1192. // One or more response headers that you want users to be able to access from
  1193. // their applications (for example, from a JavaScript XMLHttpRequest object).
  1194. //
  1195. // Each CORS rule must have at least one AllowedOrigins element. The string
  1196. // value can include only one wildcard character (*), for example, http://*.example.com.
  1197. // Additionally, you can specify only one wildcard character to allow cross-origin
  1198. // access for all origins.
  1199. //
  1200. // AllowedOrigins is a required field
  1201. AllowedOrigins []*string `min:"1" type:"list" required:"true"`
  1202. // One or more headers in the response that you want users to be able to access
  1203. // from their applications (for example, from a JavaScript XMLHttpRequest object).
  1204. //
  1205. // This element is optional for each rule.
  1206. ExposeHeaders []*string `type:"list"`
  1207. // The time in seconds that your browser caches the preflight response for the
  1208. // specified resource.
  1209. //
  1210. // A CORS rule can have only one MaxAgeSeconds element.
  1211. MaxAgeSeconds *int64 `type:"integer"`
  1212. }
  1213. // String returns the string representation
  1214. func (s CorsRule) String() string {
  1215. return awsutil.Prettify(s)
  1216. }
  1217. // GoString returns the string representation
  1218. func (s CorsRule) GoString() string {
  1219. return s.String()
  1220. }
  1221. // Validate inspects the fields of the type to determine if they are valid.
  1222. func (s *CorsRule) Validate() error {
  1223. invalidParams := request.ErrInvalidParams{Context: "CorsRule"}
  1224. if s.AllowedHeaders == nil {
  1225. invalidParams.Add(request.NewErrParamRequired("AllowedHeaders"))
  1226. }
  1227. if s.AllowedMethods != nil && len(s.AllowedMethods) < 1 {
  1228. invalidParams.Add(request.NewErrParamMinLen("AllowedMethods", 1))
  1229. }
  1230. if s.AllowedOrigins == nil {
  1231. invalidParams.Add(request.NewErrParamRequired("AllowedOrigins"))
  1232. }
  1233. if s.AllowedOrigins != nil && len(s.AllowedOrigins) < 1 {
  1234. invalidParams.Add(request.NewErrParamMinLen("AllowedOrigins", 1))
  1235. }
  1236. if invalidParams.Len() > 0 {
  1237. return invalidParams
  1238. }
  1239. return nil
  1240. }
  1241. // SetAllowedHeaders sets the AllowedHeaders field's value.
  1242. func (s *CorsRule) SetAllowedHeaders(v []*string) *CorsRule {
  1243. s.AllowedHeaders = v
  1244. return s
  1245. }
  1246. // SetAllowedMethods sets the AllowedMethods field's value.
  1247. func (s *CorsRule) SetAllowedMethods(v []*string) *CorsRule {
  1248. s.AllowedMethods = v
  1249. return s
  1250. }
  1251. // SetAllowedOrigins sets the AllowedOrigins field's value.
  1252. func (s *CorsRule) SetAllowedOrigins(v []*string) *CorsRule {
  1253. s.AllowedOrigins = v
  1254. return s
  1255. }
  1256. // SetExposeHeaders sets the ExposeHeaders field's value.
  1257. func (s *CorsRule) SetExposeHeaders(v []*string) *CorsRule {
  1258. s.ExposeHeaders = v
  1259. return s
  1260. }
  1261. // SetMaxAgeSeconds sets the MaxAgeSeconds field's value.
  1262. func (s *CorsRule) SetMaxAgeSeconds(v int64) *CorsRule {
  1263. s.MaxAgeSeconds = &v
  1264. return s
  1265. }
  1266. type CreateContainerInput struct {
  1267. _ struct{} `type:"structure"`
  1268. // The name for the container. The name must be from 1 to 255 characters. Container
  1269. // names must be unique to your AWS account within a specific region. As an
  1270. // example, you could create a container named movies in every region, as long
  1271. // as you don’t have an existing container with that name.
  1272. //
  1273. // ContainerName is a required field
  1274. ContainerName *string `min:"1" type:"string" required:"true"`
  1275. }
  1276. // String returns the string representation
  1277. func (s CreateContainerInput) String() string {
  1278. return awsutil.Prettify(s)
  1279. }
  1280. // GoString returns the string representation
  1281. func (s CreateContainerInput) GoString() string {
  1282. return s.String()
  1283. }
  1284. // Validate inspects the fields of the type to determine if they are valid.
  1285. func (s *CreateContainerInput) Validate() error {
  1286. invalidParams := request.ErrInvalidParams{Context: "CreateContainerInput"}
  1287. if s.ContainerName == nil {
  1288. invalidParams.Add(request.NewErrParamRequired("ContainerName"))
  1289. }
  1290. if s.ContainerName != nil && len(*s.ContainerName) < 1 {
  1291. invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1))
  1292. }
  1293. if invalidParams.Len() > 0 {
  1294. return invalidParams
  1295. }
  1296. return nil
  1297. }
  1298. // SetContainerName sets the ContainerName field's value.
  1299. func (s *CreateContainerInput) SetContainerName(v string) *CreateContainerInput {
  1300. s.ContainerName = &v
  1301. return s
  1302. }
  1303. type CreateContainerOutput struct {
  1304. _ struct{} `type:"structure"`
  1305. // ContainerARN: The Amazon Resource Name (ARN) of the newly created container.
  1306. // The ARN has the following format: arn:aws:<region>:<account that owns this
  1307. // container>:container/<name of container>. For example: arn:aws:mediastore:us-west-2:111122223333:container/movies
  1308. //
  1309. // ContainerName: The container name as specified in the request.
  1310. //
  1311. // CreationTime: Unix time stamp.
  1312. //
  1313. // Status: The status of container creation or deletion. The status is one of
  1314. // the following: CREATING, ACTIVE, or DELETING. While the service is creating
  1315. // the container, the status is CREATING. When an endpoint is available, the
  1316. // status changes to ACTIVE.
  1317. //
  1318. // The return value does not include the container's endpoint. To make downstream
  1319. // requests, you must obtain this value by using DescribeContainer or ListContainers.
  1320. //
  1321. // Container is a required field
  1322. Container *Container `type:"structure" required:"true"`
  1323. }
  1324. // String returns the string representation
  1325. func (s CreateContainerOutput) String() string {
  1326. return awsutil.Prettify(s)
  1327. }
  1328. // GoString returns the string representation
  1329. func (s CreateContainerOutput) GoString() string {
  1330. return s.String()
  1331. }
  1332. // SetContainer sets the Container field's value.
  1333. func (s *CreateContainerOutput) SetContainer(v *Container) *CreateContainerOutput {
  1334. s.Container = v
  1335. return s
  1336. }
  1337. type DeleteContainerInput struct {
  1338. _ struct{} `type:"structure"`
  1339. // The name of the container to delete.
  1340. //
  1341. // ContainerName is a required field
  1342. ContainerName *string `min:"1" type:"string" required:"true"`
  1343. }
  1344. // String returns the string representation
  1345. func (s DeleteContainerInput) String() string {
  1346. return awsutil.Prettify(s)
  1347. }
  1348. // GoString returns the string representation
  1349. func (s DeleteContainerInput) GoString() string {
  1350. return s.String()
  1351. }
  1352. // Validate inspects the fields of the type to determine if they are valid.
  1353. func (s *DeleteContainerInput) Validate() error {
  1354. invalidParams := request.ErrInvalidParams{Context: "DeleteContainerInput"}
  1355. if s.ContainerName == nil {
  1356. invalidParams.Add(request.NewErrParamRequired("ContainerName"))
  1357. }
  1358. if s.ContainerName != nil && len(*s.ContainerName) < 1 {
  1359. invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1))
  1360. }
  1361. if invalidParams.Len() > 0 {
  1362. return invalidParams
  1363. }
  1364. return nil
  1365. }
  1366. // SetContainerName sets the ContainerName field's value.
  1367. func (s *DeleteContainerInput) SetContainerName(v string) *DeleteContainerInput {
  1368. s.ContainerName = &v
  1369. return s
  1370. }
  1371. type DeleteContainerOutput struct {
  1372. _ struct{} `type:"structure"`
  1373. }
  1374. // String returns the string representation
  1375. func (s DeleteContainerOutput) String() string {
  1376. return awsutil.Prettify(s)
  1377. }
  1378. // GoString returns the string representation
  1379. func (s DeleteContainerOutput) GoString() string {
  1380. return s.String()
  1381. }
  1382. type DeleteContainerPolicyInput struct {
  1383. _ struct{} `type:"structure"`
  1384. // The name of the container that holds the policy.
  1385. //
  1386. // ContainerName is a required field
  1387. ContainerName *string `min:"1" type:"string" required:"true"`
  1388. }
  1389. // String returns the string representation
  1390. func (s DeleteContainerPolicyInput) String() string {
  1391. return awsutil.Prettify(s)
  1392. }
  1393. // GoString returns the string representation
  1394. func (s DeleteContainerPolicyInput) GoString() string {
  1395. return s.String()
  1396. }
  1397. // Validate inspects the fields of the type to determine if they are valid.
  1398. func (s *DeleteContainerPolicyInput) Validate() error {
  1399. invalidParams := request.ErrInvalidParams{Context: "DeleteContainerPolicyInput"}
  1400. if s.ContainerName == nil {
  1401. invalidParams.Add(request.NewErrParamRequired("ContainerName"))
  1402. }
  1403. if s.ContainerName != nil && len(*s.ContainerName) < 1 {
  1404. invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1))
  1405. }
  1406. if invalidParams.Len() > 0 {
  1407. return invalidParams
  1408. }
  1409. return nil
  1410. }
  1411. // SetContainerName sets the ContainerName field's value.
  1412. func (s *DeleteContainerPolicyInput) SetContainerName(v string) *DeleteContainerPolicyInput {
  1413. s.ContainerName = &v
  1414. return s
  1415. }
  1416. type DeleteContainerPolicyOutput struct {
  1417. _ struct{} `type:"structure"`
  1418. }
  1419. // String returns the string representation
  1420. func (s DeleteContainerPolicyOutput) String() string {
  1421. return awsutil.Prettify(s)
  1422. }
  1423. // GoString returns the string representation
  1424. func (s DeleteContainerPolicyOutput) GoString() string {
  1425. return s.String()
  1426. }
  1427. type DeleteCorsPolicyInput struct {
  1428. _ struct{} `type:"structure"`
  1429. // The name of the container to remove the policy from.
  1430. //
  1431. // ContainerName is a required field
  1432. ContainerName *string `min:"1" type:"string" required:"true"`
  1433. }
  1434. // String returns the string representation
  1435. func (s DeleteCorsPolicyInput) String() string {
  1436. return awsutil.Prettify(s)
  1437. }
  1438. // GoString returns the string representation
  1439. func (s DeleteCorsPolicyInput) GoString() string {
  1440. return s.String()
  1441. }
  1442. // Validate inspects the fields of the type to determine if they are valid.
  1443. func (s *DeleteCorsPolicyInput) Validate() error {
  1444. invalidParams := request.ErrInvalidParams{Context: "DeleteCorsPolicyInput"}
  1445. if s.ContainerName == nil {
  1446. invalidParams.Add(request.NewErrParamRequired("ContainerName"))
  1447. }
  1448. if s.ContainerName != nil && len(*s.ContainerName) < 1 {
  1449. invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1))
  1450. }
  1451. if invalidParams.Len() > 0 {
  1452. return invalidParams
  1453. }
  1454. return nil
  1455. }
  1456. // SetContainerName sets the ContainerName field's value.
  1457. func (s *DeleteCorsPolicyInput) SetContainerName(v string) *DeleteCorsPolicyInput {
  1458. s.ContainerName = &v
  1459. return s
  1460. }
  1461. type DeleteCorsPolicyOutput struct {
  1462. _ struct{} `type:"structure"`
  1463. }
  1464. // String returns the string representation
  1465. func (s DeleteCorsPolicyOutput) String() string {
  1466. return awsutil.Prettify(s)
  1467. }
  1468. // GoString returns the string representation
  1469. func (s DeleteCorsPolicyOutput) GoString() string {
  1470. return s.String()
  1471. }
  1472. type DeleteLifecyclePolicyInput struct {
  1473. _ struct{} `type:"structure"`
  1474. // The name of the container that holds the object lifecycle policy.
  1475. //
  1476. // ContainerName is a required field
  1477. ContainerName *string `min:"1" type:"string" required:"true"`
  1478. }
  1479. // String returns the string representation
  1480. func (s DeleteLifecyclePolicyInput) String() string {
  1481. return awsutil.Prettify(s)
  1482. }
  1483. // GoString returns the string representation
  1484. func (s DeleteLifecyclePolicyInput) GoString() string {
  1485. return s.String()
  1486. }
  1487. // Validate inspects the fields of the type to determine if they are valid.
  1488. func (s *DeleteLifecyclePolicyInput) Validate() error {
  1489. invalidParams := request.ErrInvalidParams{Context: "DeleteLifecyclePolicyInput"}
  1490. if s.ContainerName == nil {
  1491. invalidParams.Add(request.NewErrParamRequired("ContainerName"))
  1492. }
  1493. if s.ContainerName != nil && len(*s.ContainerName) < 1 {
  1494. invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1))
  1495. }
  1496. if invalidParams.Len() > 0 {
  1497. return invalidParams
  1498. }
  1499. return nil
  1500. }
  1501. // SetContainerName sets the ContainerName field's value.
  1502. func (s *DeleteLifecyclePolicyInput) SetContainerName(v string) *DeleteLifecyclePolicyInput {
  1503. s.ContainerName = &v
  1504. return s
  1505. }
  1506. type DeleteLifecyclePolicyOutput struct {
  1507. _ struct{} `type:"structure"`
  1508. }
  1509. // String returns the string representation
  1510. func (s DeleteLifecyclePolicyOutput) String() string {
  1511. return awsutil.Prettify(s)
  1512. }
  1513. // GoString returns the string representation
  1514. func (s DeleteLifecyclePolicyOutput) GoString() string {
  1515. return s.String()
  1516. }
  1517. type DescribeContainerInput struct {
  1518. _ struct{} `type:"structure"`
  1519. // The name of the container to query.
  1520. ContainerName *string `min:"1" type:"string"`
  1521. }
  1522. // String returns the string representation
  1523. func (s DescribeContainerInput) String() string {
  1524. return awsutil.Prettify(s)
  1525. }
  1526. // GoString returns the string representation
  1527. func (s DescribeContainerInput) GoString() string {
  1528. return s.String()
  1529. }
  1530. // Validate inspects the fields of the type to determine if they are valid.
  1531. func (s *DescribeContainerInput) Validate() error {
  1532. invalidParams := request.ErrInvalidParams{Context: "DescribeContainerInput"}
  1533. if s.ContainerName != nil && len(*s.ContainerName) < 1 {
  1534. invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1))
  1535. }
  1536. if invalidParams.Len() > 0 {
  1537. return invalidParams
  1538. }
  1539. return nil
  1540. }
  1541. // SetContainerName sets the ContainerName field's value.
  1542. func (s *DescribeContainerInput) SetContainerName(v string) *DescribeContainerInput {
  1543. s.ContainerName = &v
  1544. return s
  1545. }
  1546. type DescribeContainerOutput struct {
  1547. _ struct{} `type:"structure"`
  1548. // The name of the queried container.
  1549. Container *Container `type:"structure"`
  1550. }
  1551. // String returns the string representation
  1552. func (s DescribeContainerOutput) String() string {
  1553. return awsutil.Prettify(s)
  1554. }
  1555. // GoString returns the string representation
  1556. func (s DescribeContainerOutput) GoString() string {
  1557. return s.String()
  1558. }
  1559. // SetContainer sets the Container field's value.
  1560. func (s *DescribeContainerOutput) SetContainer(v *Container) *DescribeContainerOutput {
  1561. s.Container = v
  1562. return s
  1563. }
  1564. type GetContainerPolicyInput struct {
  1565. _ struct{} `type:"structure"`
  1566. // The name of the container.
  1567. //
  1568. // ContainerName is a required field
  1569. ContainerName *string `min:"1" type:"string" required:"true"`
  1570. }
  1571. // String returns the string representation
  1572. func (s GetContainerPolicyInput) String() string {
  1573. return awsutil.Prettify(s)
  1574. }
  1575. // GoString returns the string representation
  1576. func (s GetContainerPolicyInput) GoString() string {
  1577. return s.String()
  1578. }
  1579. // Validate inspects the fields of the type to determine if they are valid.
  1580. func (s *GetContainerPolicyInput) Validate() error {
  1581. invalidParams := request.ErrInvalidParams{Context: "GetContainerPolicyInput"}
  1582. if s.ContainerName == nil {
  1583. invalidParams.Add(request.NewErrParamRequired("ContainerName"))
  1584. }
  1585. if s.ContainerName != nil && len(*s.ContainerName) < 1 {
  1586. invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1))
  1587. }
  1588. if invalidParams.Len() > 0 {
  1589. return invalidParams
  1590. }
  1591. return nil
  1592. }
  1593. // SetContainerName sets the ContainerName field's value.
  1594. func (s *GetContainerPolicyInput) SetContainerName(v string) *GetContainerPolicyInput {
  1595. s.ContainerName = &v
  1596. return s
  1597. }
  1598. type GetContainerPolicyOutput struct {
  1599. _ struct{} `type:"structure"`
  1600. // The contents of the access policy.
  1601. //
  1602. // Policy is a required field
  1603. Policy *string `min:"1" type:"string" required:"true"`
  1604. }
  1605. // String returns the string representation
  1606. func (s GetContainerPolicyOutput) String() string {
  1607. return awsutil.Prettify(s)
  1608. }
  1609. // GoString returns the string representation
  1610. func (s GetContainerPolicyOutput) GoString() string {
  1611. return s.String()
  1612. }
  1613. // SetPolicy sets the Policy field's value.
  1614. func (s *GetContainerPolicyOutput) SetPolicy(v string) *GetContainerPolicyOutput {
  1615. s.Policy = &v
  1616. return s
  1617. }
  1618. type GetCorsPolicyInput struct {
  1619. _ struct{} `type:"structure"`
  1620. // The name of the container that the policy is assigned to.
  1621. //
  1622. // ContainerName is a required field
  1623. ContainerName *string `min:"1" type:"string" required:"true"`
  1624. }
  1625. // String returns the string representation
  1626. func (s GetCorsPolicyInput) String() string {
  1627. return awsutil.Prettify(s)
  1628. }
  1629. // GoString returns the string representation
  1630. func (s GetCorsPolicyInput) GoString() string {
  1631. return s.String()
  1632. }
  1633. // Validate inspects the fields of the type to determine if they are valid.
  1634. func (s *GetCorsPolicyInput) Validate() error {
  1635. invalidParams := request.ErrInvalidParams{Context: "GetCorsPolicyInput"}
  1636. if s.ContainerName == nil {
  1637. invalidParams.Add(request.NewErrParamRequired("ContainerName"))
  1638. }
  1639. if s.ContainerName != nil && len(*s.ContainerName) < 1 {
  1640. invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1))
  1641. }
  1642. if invalidParams.Len() > 0 {
  1643. return invalidParams
  1644. }
  1645. return nil
  1646. }
  1647. // SetContainerName sets the ContainerName field's value.
  1648. func (s *GetCorsPolicyInput) SetContainerName(v string) *GetCorsPolicyInput {
  1649. s.ContainerName = &v
  1650. return s
  1651. }
  1652. type GetCorsPolicyOutput struct {
  1653. _ struct{} `type:"structure"`
  1654. // The CORS policy assigned to the container.
  1655. //
  1656. // CorsPolicy is a required field
  1657. CorsPolicy []*CorsRule `min:"1" type:"list" required:"true"`
  1658. }
  1659. // String returns the string representation
  1660. func (s GetCorsPolicyOutput) String() string {
  1661. return awsutil.Prettify(s)
  1662. }
  1663. // GoString returns the string representation
  1664. func (s GetCorsPolicyOutput) GoString() string {
  1665. return s.String()
  1666. }
  1667. // SetCorsPolicy sets the CorsPolicy field's value.
  1668. func (s *GetCorsPolicyOutput) SetCorsPolicy(v []*CorsRule) *GetCorsPolicyOutput {
  1669. s.CorsPolicy = v
  1670. return s
  1671. }
  1672. type GetLifecyclePolicyInput struct {
  1673. _ struct{} `type:"structure"`
  1674. // The name of the container that the object lifecycle policy is assigned to.
  1675. //
  1676. // ContainerName is a required field
  1677. ContainerName *string `min:"1" type:"string" required:"true"`
  1678. }
  1679. // String returns the string representation
  1680. func (s GetLifecyclePolicyInput) String() string {
  1681. return awsutil.Prettify(s)
  1682. }
  1683. // GoString returns the string representation
  1684. func (s GetLifecyclePolicyInput) GoString() string {
  1685. return s.String()
  1686. }
  1687. // Validate inspects the fields of the type to determine if they are valid.
  1688. func (s *GetLifecyclePolicyInput) Validate() error {
  1689. invalidParams := request.ErrInvalidParams{Context: "GetLifecyclePolicyInput"}
  1690. if s.ContainerName == nil {
  1691. invalidParams.Add(request.NewErrParamRequired("ContainerName"))
  1692. }
  1693. if s.ContainerName != nil && len(*s.ContainerName) < 1 {
  1694. invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1))
  1695. }
  1696. if invalidParams.Len() > 0 {
  1697. return invalidParams
  1698. }
  1699. return nil
  1700. }
  1701. // SetContainerName sets the ContainerName field's value.
  1702. func (s *GetLifecyclePolicyInput) SetContainerName(v string) *GetLifecyclePolicyInput {
  1703. s.ContainerName = &v
  1704. return s
  1705. }
  1706. type GetLifecyclePolicyOutput struct {
  1707. _ struct{} `type:"structure"`
  1708. // The object lifecycle policy that is assigned to the container.
  1709. //
  1710. // LifecyclePolicy is a required field
  1711. LifecyclePolicy *string `type:"string" required:"true"`
  1712. }
  1713. // String returns the string representation
  1714. func (s GetLifecyclePolicyOutput) String() string {
  1715. return awsutil.Prettify(s)
  1716. }
  1717. // GoString returns the string representation
  1718. func (s GetLifecyclePolicyOutput) GoString() string {
  1719. return s.String()
  1720. }
  1721. // SetLifecyclePolicy sets the LifecyclePolicy field's value.
  1722. func (s *GetLifecyclePolicyOutput) SetLifecyclePolicy(v string) *GetLifecyclePolicyOutput {
  1723. s.LifecyclePolicy = &v
  1724. return s
  1725. }
  1726. type ListContainersInput struct {
  1727. _ struct{} `type:"structure"`
  1728. // Enter the maximum number of containers in the response. Use from 1 to 255
  1729. // characters.
  1730. MaxResults *int64 `min:"1" type:"integer"`
  1731. // Only if you used MaxResults in the first command, enter the token (which
  1732. // was included in the previous response) to obtain the next set of containers.
  1733. // This token is included in a response only if there actually are more containers
  1734. // to list.
  1735. NextToken *string `min:"1" type:"string"`
  1736. }
  1737. // String returns the string representation
  1738. func (s ListContainersInput) String() string {
  1739. return awsutil.Prettify(s)
  1740. }
  1741. // GoString returns the string representation
  1742. func (s ListContainersInput) GoString() string {
  1743. return s.String()
  1744. }
  1745. // Validate inspects the fields of the type to determine if they are valid.
  1746. func (s *ListContainersInput) Validate() error {
  1747. invalidParams := request.ErrInvalidParams{Context: "ListContainersInput"}
  1748. if s.MaxResults != nil && *s.MaxResults < 1 {
  1749. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  1750. }
  1751. if s.NextToken != nil && len(*s.NextToken) < 1 {
  1752. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  1753. }
  1754. if invalidParams.Len() > 0 {
  1755. return invalidParams
  1756. }
  1757. return nil
  1758. }
  1759. // SetMaxResults sets the MaxResults field's value.
  1760. func (s *ListContainersInput) SetMaxResults(v int64) *ListContainersInput {
  1761. s.MaxResults = &v
  1762. return s
  1763. }
  1764. // SetNextToken sets the NextToken field's value.
  1765. func (s *ListContainersInput) SetNextToken(v string) *ListContainersInput {
  1766. s.NextToken = &v
  1767. return s
  1768. }
  1769. type ListContainersOutput struct {
  1770. _ struct{} `type:"structure"`
  1771. // The names of the containers.
  1772. //
  1773. // Containers is a required field
  1774. Containers []*Container `type:"list" required:"true"`
  1775. // NextToken is the token to use in the next call to ListContainers. This token
  1776. // is returned only if you included the MaxResults tag in the original command,
  1777. // and only if there are still containers to return.
  1778. NextToken *string `min:"1" type:"string"`
  1779. }
  1780. // String returns the string representation
  1781. func (s ListContainersOutput) String() string {
  1782. return awsutil.Prettify(s)
  1783. }
  1784. // GoString returns the string representation
  1785. func (s ListContainersOutput) GoString() string {
  1786. return s.String()
  1787. }
  1788. // SetContainers sets the Containers field's value.
  1789. func (s *ListContainersOutput) SetContainers(v []*Container) *ListContainersOutput {
  1790. s.Containers = v
  1791. return s
  1792. }
  1793. // SetNextToken sets the NextToken field's value.
  1794. func (s *ListContainersOutput) SetNextToken(v string) *ListContainersOutput {
  1795. s.NextToken = &v
  1796. return s
  1797. }
  1798. type PutContainerPolicyInput struct {
  1799. _ struct{} `type:"structure"`
  1800. // The name of the container.
  1801. //
  1802. // ContainerName is a required field
  1803. ContainerName *string `min:"1" type:"string" required:"true"`
  1804. // The contents of the policy, which includes the following:
  1805. //
  1806. // * One Version tag
  1807. //
  1808. // * One Statement tag that contains the standard tags for the policy.
  1809. //
  1810. // Policy is a required field
  1811. Policy *string `min:"1" type:"string" required:"true"`
  1812. }
  1813. // String returns the string representation
  1814. func (s PutContainerPolicyInput) String() string {
  1815. return awsutil.Prettify(s)
  1816. }
  1817. // GoString returns the string representation
  1818. func (s PutContainerPolicyInput) GoString() string {
  1819. return s.String()
  1820. }
  1821. // Validate inspects the fields of the type to determine if they are valid.
  1822. func (s *PutContainerPolicyInput) Validate() error {
  1823. invalidParams := request.ErrInvalidParams{Context: "PutContainerPolicyInput"}
  1824. if s.ContainerName == nil {
  1825. invalidParams.Add(request.NewErrParamRequired("ContainerName"))
  1826. }
  1827. if s.ContainerName != nil && len(*s.ContainerName) < 1 {
  1828. invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1))
  1829. }
  1830. if s.Policy == nil {
  1831. invalidParams.Add(request.NewErrParamRequired("Policy"))
  1832. }
  1833. if s.Policy != nil && len(*s.Policy) < 1 {
  1834. invalidParams.Add(request.NewErrParamMinLen("Policy", 1))
  1835. }
  1836. if invalidParams.Len() > 0 {
  1837. return invalidParams
  1838. }
  1839. return nil
  1840. }
  1841. // SetContainerName sets the ContainerName field's value.
  1842. func (s *PutContainerPolicyInput) SetContainerName(v string) *PutContainerPolicyInput {
  1843. s.ContainerName = &v
  1844. return s
  1845. }
  1846. // SetPolicy sets the Policy field's value.
  1847. func (s *PutContainerPolicyInput) SetPolicy(v string) *PutContainerPolicyInput {
  1848. s.Policy = &v
  1849. return s
  1850. }
  1851. type PutContainerPolicyOutput struct {
  1852. _ struct{} `type:"structure"`
  1853. }
  1854. // String returns the string representation
  1855. func (s PutContainerPolicyOutput) String() string {
  1856. return awsutil.Prettify(s)
  1857. }
  1858. // GoString returns the string representation
  1859. func (s PutContainerPolicyOutput) GoString() string {
  1860. return s.String()
  1861. }
  1862. type PutCorsPolicyInput struct {
  1863. _ struct{} `type:"structure"`
  1864. // The name of the container that you want to assign the CORS policy to.
  1865. //
  1866. // ContainerName is a required field
  1867. ContainerName *string `min:"1" type:"string" required:"true"`
  1868. // The CORS policy to apply to the container.
  1869. //
  1870. // CorsPolicy is a required field
  1871. CorsPolicy []*CorsRule `min:"1" type:"list" required:"true"`
  1872. }
  1873. // String returns the string representation
  1874. func (s PutCorsPolicyInput) String() string {
  1875. return awsutil.Prettify(s)
  1876. }
  1877. // GoString returns the string representation
  1878. func (s PutCorsPolicyInput) GoString() string {
  1879. return s.String()
  1880. }
  1881. // Validate inspects the fields of the type to determine if they are valid.
  1882. func (s *PutCorsPolicyInput) Validate() error {
  1883. invalidParams := request.ErrInvalidParams{Context: "PutCorsPolicyInput"}
  1884. if s.ContainerName == nil {
  1885. invalidParams.Add(request.NewErrParamRequired("ContainerName"))
  1886. }
  1887. if s.ContainerName != nil && len(*s.ContainerName) < 1 {
  1888. invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1))
  1889. }
  1890. if s.CorsPolicy == nil {
  1891. invalidParams.Add(request.NewErrParamRequired("CorsPolicy"))
  1892. }
  1893. if s.CorsPolicy != nil && len(s.CorsPolicy) < 1 {
  1894. invalidParams.Add(request.NewErrParamMinLen("CorsPolicy", 1))
  1895. }
  1896. if s.CorsPolicy != nil {
  1897. for i, v := range s.CorsPolicy {
  1898. if v == nil {
  1899. continue
  1900. }
  1901. if err := v.Validate(); err != nil {
  1902. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CorsPolicy", i), err.(request.ErrInvalidParams))
  1903. }
  1904. }
  1905. }
  1906. if invalidParams.Len() > 0 {
  1907. return invalidParams
  1908. }
  1909. return nil
  1910. }
  1911. // SetContainerName sets the ContainerName field's value.
  1912. func (s *PutCorsPolicyInput) SetContainerName(v string) *PutCorsPolicyInput {
  1913. s.ContainerName = &v
  1914. return s
  1915. }
  1916. // SetCorsPolicy sets the CorsPolicy field's value.
  1917. func (s *PutCorsPolicyInput) SetCorsPolicy(v []*CorsRule) *PutCorsPolicyInput {
  1918. s.CorsPolicy = v
  1919. return s
  1920. }
  1921. type PutCorsPolicyOutput struct {
  1922. _ struct{} `type:"structure"`
  1923. }
  1924. // String returns the string representation
  1925. func (s PutCorsPolicyOutput) String() string {
  1926. return awsutil.Prettify(s)
  1927. }
  1928. // GoString returns the string representation
  1929. func (s PutCorsPolicyOutput) GoString() string {
  1930. return s.String()
  1931. }
  1932. type PutLifecyclePolicyInput struct {
  1933. _ struct{} `type:"structure"`
  1934. // The name of the container that you want to assign the object lifecycle policy
  1935. // to.
  1936. //
  1937. // ContainerName is a required field
  1938. ContainerName *string `min:"1" type:"string" required:"true"`
  1939. // The object lifecycle policy to apply to the container.
  1940. //
  1941. // LifecyclePolicy is a required field
  1942. LifecyclePolicy *string `type:"string" required:"true"`
  1943. }
  1944. // String returns the string representation
  1945. func (s PutLifecyclePolicyInput) String() string {
  1946. return awsutil.Prettify(s)
  1947. }
  1948. // GoString returns the string representation
  1949. func (s PutLifecyclePolicyInput) GoString() string {
  1950. return s.String()
  1951. }
  1952. // Validate inspects the fields of the type to determine if they are valid.
  1953. func (s *PutLifecyclePolicyInput) Validate() error {
  1954. invalidParams := request.ErrInvalidParams{Context: "PutLifecyclePolicyInput"}
  1955. if s.ContainerName == nil {
  1956. invalidParams.Add(request.NewErrParamRequired("ContainerName"))
  1957. }
  1958. if s.ContainerName != nil && len(*s.ContainerName) < 1 {
  1959. invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1))
  1960. }
  1961. if s.LifecyclePolicy == nil {
  1962. invalidParams.Add(request.NewErrParamRequired("LifecyclePolicy"))
  1963. }
  1964. if invalidParams.Len() > 0 {
  1965. return invalidParams
  1966. }
  1967. return nil
  1968. }
  1969. // SetContainerName sets the ContainerName field's value.
  1970. func (s *PutLifecyclePolicyInput) SetContainerName(v string) *PutLifecyclePolicyInput {
  1971. s.ContainerName = &v
  1972. return s
  1973. }
  1974. // SetLifecyclePolicy sets the LifecyclePolicy field's value.
  1975. func (s *PutLifecyclePolicyInput) SetLifecyclePolicy(v string) *PutLifecyclePolicyInput {
  1976. s.LifecyclePolicy = &v
  1977. return s
  1978. }
  1979. type PutLifecyclePolicyOutput struct {
  1980. _ struct{} `type:"structure"`
  1981. }
  1982. // String returns the string representation
  1983. func (s PutLifecyclePolicyOutput) String() string {
  1984. return awsutil.Prettify(s)
  1985. }
  1986. // GoString returns the string representation
  1987. func (s PutLifecyclePolicyOutput) GoString() string {
  1988. return s.String()
  1989. }
  1990. const (
  1991. // ContainerStatusActive is a ContainerStatus enum value
  1992. ContainerStatusActive = "ACTIVE"
  1993. // ContainerStatusCreating is a ContainerStatus enum value
  1994. ContainerStatusCreating = "CREATING"
  1995. // ContainerStatusDeleting is a ContainerStatus enum value
  1996. ContainerStatusDeleting = "DELETING"
  1997. )
  1998. const (
  1999. // MethodNamePut is a MethodName enum value
  2000. MethodNamePut = "PUT"
  2001. // MethodNameGet is a MethodName enum value
  2002. MethodNameGet = "GET"
  2003. // MethodNameDelete is a MethodName enum value
  2004. MethodNameDelete = "DELETE"
  2005. // MethodNameHead is a MethodName enum value
  2006. MethodNameHead = "HEAD"
  2007. )