1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275 |
- // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
- package mediastore
- import (
- "fmt"
- "time"
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awsutil"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/private/protocol"
- "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
- )
- const opCreateContainer = "CreateContainer"
- // CreateContainerRequest generates a "aws/request.Request" representing the
- // client's request for the CreateContainer operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See CreateContainer for more information on using the CreateContainer
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the CreateContainerRequest method.
- // req, resp := client.CreateContainerRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/CreateContainer
- func (c *MediaStore) CreateContainerRequest(input *CreateContainerInput) (req *request.Request, output *CreateContainerOutput) {
- op := &request.Operation{
- Name: opCreateContainer,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &CreateContainerInput{}
- }
- output = &CreateContainerOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // CreateContainer API operation for AWS Elemental MediaStore.
- //
- // Creates a storage container to hold objects. A container is similar to a
- // bucket in the Amazon S3 service.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Elemental MediaStore's
- // API operation CreateContainer for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeContainerInUseException "ContainerInUseException"
- // The container that you specified in the request already exists or is being
- // updated.
- //
- // * ErrCodeLimitExceededException "LimitExceededException"
- // A service limit has been exceeded.
- //
- // * ErrCodeInternalServerError "InternalServerError"
- // The service is temporarily unavailable.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/CreateContainer
- func (c *MediaStore) CreateContainer(input *CreateContainerInput) (*CreateContainerOutput, error) {
- req, out := c.CreateContainerRequest(input)
- return out, req.Send()
- }
- // CreateContainerWithContext is the same as CreateContainer with the addition of
- // the ability to pass a context and additional request options.
- //
- // See CreateContainer for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *MediaStore) CreateContainerWithContext(ctx aws.Context, input *CreateContainerInput, opts ...request.Option) (*CreateContainerOutput, error) {
- req, out := c.CreateContainerRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDeleteContainer = "DeleteContainer"
- // DeleteContainerRequest generates a "aws/request.Request" representing the
- // client's request for the DeleteContainer operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DeleteContainer for more information on using the DeleteContainer
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DeleteContainerRequest method.
- // req, resp := client.DeleteContainerRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteContainer
- func (c *MediaStore) DeleteContainerRequest(input *DeleteContainerInput) (req *request.Request, output *DeleteContainerOutput) {
- op := &request.Operation{
- Name: opDeleteContainer,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DeleteContainerInput{}
- }
- output = &DeleteContainerOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // DeleteContainer API operation for AWS Elemental MediaStore.
- //
- // Deletes the specified container. Before you make a DeleteContainer request,
- // delete any objects in the container or in any folders in the container. You
- // can delete only empty containers.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Elemental MediaStore's
- // API operation DeleteContainer for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeContainerInUseException "ContainerInUseException"
- // The container that you specified in the request already exists or is being
- // updated.
- //
- // * ErrCodeContainerNotFoundException "ContainerNotFoundException"
- // The container that you specified in the request does not exist.
- //
- // * ErrCodeInternalServerError "InternalServerError"
- // The service is temporarily unavailable.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteContainer
- func (c *MediaStore) DeleteContainer(input *DeleteContainerInput) (*DeleteContainerOutput, error) {
- req, out := c.DeleteContainerRequest(input)
- return out, req.Send()
- }
- // DeleteContainerWithContext is the same as DeleteContainer with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DeleteContainer for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *MediaStore) DeleteContainerWithContext(ctx aws.Context, input *DeleteContainerInput, opts ...request.Option) (*DeleteContainerOutput, error) {
- req, out := c.DeleteContainerRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDeleteContainerPolicy = "DeleteContainerPolicy"
- // DeleteContainerPolicyRequest generates a "aws/request.Request" representing the
- // client's request for the DeleteContainerPolicy operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DeleteContainerPolicy for more information on using the DeleteContainerPolicy
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DeleteContainerPolicyRequest method.
- // req, resp := client.DeleteContainerPolicyRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteContainerPolicy
- func (c *MediaStore) DeleteContainerPolicyRequest(input *DeleteContainerPolicyInput) (req *request.Request, output *DeleteContainerPolicyOutput) {
- op := &request.Operation{
- Name: opDeleteContainerPolicy,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DeleteContainerPolicyInput{}
- }
- output = &DeleteContainerPolicyOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // DeleteContainerPolicy API operation for AWS Elemental MediaStore.
- //
- // Deletes the access policy that is associated with the specified container.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Elemental MediaStore's
- // API operation DeleteContainerPolicy for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeContainerInUseException "ContainerInUseException"
- // The container that you specified in the request already exists or is being
- // updated.
- //
- // * ErrCodeContainerNotFoundException "ContainerNotFoundException"
- // The container that you specified in the request does not exist.
- //
- // * ErrCodePolicyNotFoundException "PolicyNotFoundException"
- // The policy that you specified in the request does not exist.
- //
- // * ErrCodeInternalServerError "InternalServerError"
- // The service is temporarily unavailable.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteContainerPolicy
- func (c *MediaStore) DeleteContainerPolicy(input *DeleteContainerPolicyInput) (*DeleteContainerPolicyOutput, error) {
- req, out := c.DeleteContainerPolicyRequest(input)
- return out, req.Send()
- }
- // DeleteContainerPolicyWithContext is the same as DeleteContainerPolicy with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DeleteContainerPolicy for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *MediaStore) DeleteContainerPolicyWithContext(ctx aws.Context, input *DeleteContainerPolicyInput, opts ...request.Option) (*DeleteContainerPolicyOutput, error) {
- req, out := c.DeleteContainerPolicyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDeleteCorsPolicy = "DeleteCorsPolicy"
- // DeleteCorsPolicyRequest generates a "aws/request.Request" representing the
- // client's request for the DeleteCorsPolicy operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DeleteCorsPolicy for more information on using the DeleteCorsPolicy
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DeleteCorsPolicyRequest method.
- // req, resp := client.DeleteCorsPolicyRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteCorsPolicy
- func (c *MediaStore) DeleteCorsPolicyRequest(input *DeleteCorsPolicyInput) (req *request.Request, output *DeleteCorsPolicyOutput) {
- op := &request.Operation{
- Name: opDeleteCorsPolicy,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DeleteCorsPolicyInput{}
- }
- output = &DeleteCorsPolicyOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // DeleteCorsPolicy API operation for AWS Elemental MediaStore.
- //
- // Deletes the cross-origin resource sharing (CORS) configuration information
- // that is set for the container.
- //
- // To use this operation, you must have permission to perform the MediaStore:DeleteCorsPolicy
- // action. The container owner has this permission by default and can grant
- // this permission to others.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Elemental MediaStore's
- // API operation DeleteCorsPolicy for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeContainerInUseException "ContainerInUseException"
- // The container that you specified in the request already exists or is being
- // updated.
- //
- // * ErrCodeContainerNotFoundException "ContainerNotFoundException"
- // The container that you specified in the request does not exist.
- //
- // * ErrCodeCorsPolicyNotFoundException "CorsPolicyNotFoundException"
- // The CORS policy that you specified in the request does not exist.
- //
- // * ErrCodeInternalServerError "InternalServerError"
- // The service is temporarily unavailable.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteCorsPolicy
- func (c *MediaStore) DeleteCorsPolicy(input *DeleteCorsPolicyInput) (*DeleteCorsPolicyOutput, error) {
- req, out := c.DeleteCorsPolicyRequest(input)
- return out, req.Send()
- }
- // DeleteCorsPolicyWithContext is the same as DeleteCorsPolicy with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DeleteCorsPolicy for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *MediaStore) DeleteCorsPolicyWithContext(ctx aws.Context, input *DeleteCorsPolicyInput, opts ...request.Option) (*DeleteCorsPolicyOutput, error) {
- req, out := c.DeleteCorsPolicyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDeleteLifecyclePolicy = "DeleteLifecyclePolicy"
- // DeleteLifecyclePolicyRequest generates a "aws/request.Request" representing the
- // client's request for the DeleteLifecyclePolicy operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DeleteLifecyclePolicy for more information on using the DeleteLifecyclePolicy
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DeleteLifecyclePolicyRequest method.
- // req, resp := client.DeleteLifecyclePolicyRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteLifecyclePolicy
- func (c *MediaStore) DeleteLifecyclePolicyRequest(input *DeleteLifecyclePolicyInput) (req *request.Request, output *DeleteLifecyclePolicyOutput) {
- op := &request.Operation{
- Name: opDeleteLifecyclePolicy,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DeleteLifecyclePolicyInput{}
- }
- output = &DeleteLifecyclePolicyOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // DeleteLifecyclePolicy API operation for AWS Elemental MediaStore.
- //
- // Removes an object lifecycle policy from a container.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Elemental MediaStore's
- // API operation DeleteLifecyclePolicy for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeContainerInUseException "ContainerInUseException"
- // The container that you specified in the request already exists or is being
- // updated.
- //
- // * ErrCodeContainerNotFoundException "ContainerNotFoundException"
- // The container that you specified in the request does not exist.
- //
- // * ErrCodePolicyNotFoundException "PolicyNotFoundException"
- // The policy that you specified in the request does not exist.
- //
- // * ErrCodeInternalServerError "InternalServerError"
- // The service is temporarily unavailable.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteLifecyclePolicy
- func (c *MediaStore) DeleteLifecyclePolicy(input *DeleteLifecyclePolicyInput) (*DeleteLifecyclePolicyOutput, error) {
- req, out := c.DeleteLifecyclePolicyRequest(input)
- return out, req.Send()
- }
- // DeleteLifecyclePolicyWithContext is the same as DeleteLifecyclePolicy with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DeleteLifecyclePolicy for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *MediaStore) DeleteLifecyclePolicyWithContext(ctx aws.Context, input *DeleteLifecyclePolicyInput, opts ...request.Option) (*DeleteLifecyclePolicyOutput, error) {
- req, out := c.DeleteLifecyclePolicyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDescribeContainer = "DescribeContainer"
- // DescribeContainerRequest generates a "aws/request.Request" representing the
- // client's request for the DescribeContainer operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DescribeContainer for more information on using the DescribeContainer
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DescribeContainerRequest method.
- // req, resp := client.DescribeContainerRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DescribeContainer
- func (c *MediaStore) DescribeContainerRequest(input *DescribeContainerInput) (req *request.Request, output *DescribeContainerOutput) {
- op := &request.Operation{
- Name: opDescribeContainer,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DescribeContainerInput{}
- }
- output = &DescribeContainerOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // DescribeContainer API operation for AWS Elemental MediaStore.
- //
- // Retrieves the properties of the requested container. This request is commonly
- // used to retrieve the endpoint of a container. An endpoint is a value assigned
- // by the service when a new container is created. A container's endpoint does
- // not change after it has been assigned. The DescribeContainer request returns
- // a single Container object based on ContainerName. To return all Container
- // objects that are associated with a specified AWS account, use ListContainers.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Elemental MediaStore's
- // API operation DescribeContainer for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeContainerNotFoundException "ContainerNotFoundException"
- // The container that you specified in the request does not exist.
- //
- // * ErrCodeInternalServerError "InternalServerError"
- // The service is temporarily unavailable.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DescribeContainer
- func (c *MediaStore) DescribeContainer(input *DescribeContainerInput) (*DescribeContainerOutput, error) {
- req, out := c.DescribeContainerRequest(input)
- return out, req.Send()
- }
- // DescribeContainerWithContext is the same as DescribeContainer with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DescribeContainer for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *MediaStore) DescribeContainerWithContext(ctx aws.Context, input *DescribeContainerInput, opts ...request.Option) (*DescribeContainerOutput, error) {
- req, out := c.DescribeContainerRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opGetContainerPolicy = "GetContainerPolicy"
- // GetContainerPolicyRequest generates a "aws/request.Request" representing the
- // client's request for the GetContainerPolicy operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See GetContainerPolicy for more information on using the GetContainerPolicy
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the GetContainerPolicyRequest method.
- // req, resp := client.GetContainerPolicyRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/GetContainerPolicy
- func (c *MediaStore) GetContainerPolicyRequest(input *GetContainerPolicyInput) (req *request.Request, output *GetContainerPolicyOutput) {
- op := &request.Operation{
- Name: opGetContainerPolicy,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &GetContainerPolicyInput{}
- }
- output = &GetContainerPolicyOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // GetContainerPolicy API operation for AWS Elemental MediaStore.
- //
- // Retrieves the access policy for the specified container. For information
- // about the data that is included in an access policy, see the AWS Identity
- // and Access Management User Guide (https://aws.amazon.com/documentation/iam/).
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Elemental MediaStore's
- // API operation GetContainerPolicy for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeContainerInUseException "ContainerInUseException"
- // The container that you specified in the request already exists or is being
- // updated.
- //
- // * ErrCodeContainerNotFoundException "ContainerNotFoundException"
- // The container that you specified in the request does not exist.
- //
- // * ErrCodePolicyNotFoundException "PolicyNotFoundException"
- // The policy that you specified in the request does not exist.
- //
- // * ErrCodeInternalServerError "InternalServerError"
- // The service is temporarily unavailable.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/GetContainerPolicy
- func (c *MediaStore) GetContainerPolicy(input *GetContainerPolicyInput) (*GetContainerPolicyOutput, error) {
- req, out := c.GetContainerPolicyRequest(input)
- return out, req.Send()
- }
- // GetContainerPolicyWithContext is the same as GetContainerPolicy with the addition of
- // the ability to pass a context and additional request options.
- //
- // See GetContainerPolicy for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *MediaStore) GetContainerPolicyWithContext(ctx aws.Context, input *GetContainerPolicyInput, opts ...request.Option) (*GetContainerPolicyOutput, error) {
- req, out := c.GetContainerPolicyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opGetCorsPolicy = "GetCorsPolicy"
- // GetCorsPolicyRequest generates a "aws/request.Request" representing the
- // client's request for the GetCorsPolicy operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See GetCorsPolicy for more information on using the GetCorsPolicy
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the GetCorsPolicyRequest method.
- // req, resp := client.GetCorsPolicyRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/GetCorsPolicy
- func (c *MediaStore) GetCorsPolicyRequest(input *GetCorsPolicyInput) (req *request.Request, output *GetCorsPolicyOutput) {
- op := &request.Operation{
- Name: opGetCorsPolicy,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &GetCorsPolicyInput{}
- }
- output = &GetCorsPolicyOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // GetCorsPolicy API operation for AWS Elemental MediaStore.
- //
- // Returns the cross-origin resource sharing (CORS) configuration information
- // that is set for the container.
- //
- // To use this operation, you must have permission to perform the MediaStore:GetCorsPolicy
- // action. By default, the container owner has this permission and can grant
- // it to others.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Elemental MediaStore's
- // API operation GetCorsPolicy for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeContainerInUseException "ContainerInUseException"
- // The container that you specified in the request already exists or is being
- // updated.
- //
- // * ErrCodeContainerNotFoundException "ContainerNotFoundException"
- // The container that you specified in the request does not exist.
- //
- // * ErrCodeCorsPolicyNotFoundException "CorsPolicyNotFoundException"
- // The CORS policy that you specified in the request does not exist.
- //
- // * ErrCodeInternalServerError "InternalServerError"
- // The service is temporarily unavailable.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/GetCorsPolicy
- func (c *MediaStore) GetCorsPolicy(input *GetCorsPolicyInput) (*GetCorsPolicyOutput, error) {
- req, out := c.GetCorsPolicyRequest(input)
- return out, req.Send()
- }
- // GetCorsPolicyWithContext is the same as GetCorsPolicy with the addition of
- // the ability to pass a context and additional request options.
- //
- // See GetCorsPolicy for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *MediaStore) GetCorsPolicyWithContext(ctx aws.Context, input *GetCorsPolicyInput, opts ...request.Option) (*GetCorsPolicyOutput, error) {
- req, out := c.GetCorsPolicyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opGetLifecyclePolicy = "GetLifecyclePolicy"
- // GetLifecyclePolicyRequest generates a "aws/request.Request" representing the
- // client's request for the GetLifecyclePolicy operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See GetLifecyclePolicy for more information on using the GetLifecyclePolicy
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the GetLifecyclePolicyRequest method.
- // req, resp := client.GetLifecyclePolicyRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/GetLifecyclePolicy
- func (c *MediaStore) GetLifecyclePolicyRequest(input *GetLifecyclePolicyInput) (req *request.Request, output *GetLifecyclePolicyOutput) {
- op := &request.Operation{
- Name: opGetLifecyclePolicy,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &GetLifecyclePolicyInput{}
- }
- output = &GetLifecyclePolicyOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // GetLifecyclePolicy API operation for AWS Elemental MediaStore.
- //
- // Retrieves the object lifecycle policy that is assigned to a container.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Elemental MediaStore's
- // API operation GetLifecyclePolicy for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeContainerInUseException "ContainerInUseException"
- // The container that you specified in the request already exists or is being
- // updated.
- //
- // * ErrCodeContainerNotFoundException "ContainerNotFoundException"
- // The container that you specified in the request does not exist.
- //
- // * ErrCodePolicyNotFoundException "PolicyNotFoundException"
- // The policy that you specified in the request does not exist.
- //
- // * ErrCodeInternalServerError "InternalServerError"
- // The service is temporarily unavailable.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/GetLifecyclePolicy
- func (c *MediaStore) GetLifecyclePolicy(input *GetLifecyclePolicyInput) (*GetLifecyclePolicyOutput, error) {
- req, out := c.GetLifecyclePolicyRequest(input)
- return out, req.Send()
- }
- // GetLifecyclePolicyWithContext is the same as GetLifecyclePolicy with the addition of
- // the ability to pass a context and additional request options.
- //
- // See GetLifecyclePolicy for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *MediaStore) GetLifecyclePolicyWithContext(ctx aws.Context, input *GetLifecyclePolicyInput, opts ...request.Option) (*GetLifecyclePolicyOutput, error) {
- req, out := c.GetLifecyclePolicyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opListContainers = "ListContainers"
- // ListContainersRequest generates a "aws/request.Request" representing the
- // client's request for the ListContainers operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See ListContainers for more information on using the ListContainers
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the ListContainersRequest method.
- // req, resp := client.ListContainersRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/ListContainers
- func (c *MediaStore) ListContainersRequest(input *ListContainersInput) (req *request.Request, output *ListContainersOutput) {
- op := &request.Operation{
- Name: opListContainers,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &ListContainersInput{}
- }
- output = &ListContainersOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // ListContainers API operation for AWS Elemental MediaStore.
- //
- // Lists the properties of all containers in AWS Elemental MediaStore.
- //
- // You can query to receive all the containers in one response. Or you can include
- // the MaxResults parameter to receive a limited number of containers in each
- // response. In this case, the response includes a token. To get the next set
- // of containers, send the command again, this time with the NextToken parameter
- // (with the returned token as its value). The next set of responses appears,
- // with a token if there are still more containers to receive.
- //
- // See also DescribeContainer, which gets the properties of one container.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Elemental MediaStore's
- // API operation ListContainers for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInternalServerError "InternalServerError"
- // The service is temporarily unavailable.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/ListContainers
- func (c *MediaStore) ListContainers(input *ListContainersInput) (*ListContainersOutput, error) {
- req, out := c.ListContainersRequest(input)
- return out, req.Send()
- }
- // ListContainersWithContext is the same as ListContainers with the addition of
- // the ability to pass a context and additional request options.
- //
- // See ListContainers for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *MediaStore) ListContainersWithContext(ctx aws.Context, input *ListContainersInput, opts ...request.Option) (*ListContainersOutput, error) {
- req, out := c.ListContainersRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opPutContainerPolicy = "PutContainerPolicy"
- // PutContainerPolicyRequest generates a "aws/request.Request" representing the
- // client's request for the PutContainerPolicy operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See PutContainerPolicy for more information on using the PutContainerPolicy
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the PutContainerPolicyRequest method.
- // req, resp := client.PutContainerPolicyRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/PutContainerPolicy
- func (c *MediaStore) PutContainerPolicyRequest(input *PutContainerPolicyInput) (req *request.Request, output *PutContainerPolicyOutput) {
- op := &request.Operation{
- Name: opPutContainerPolicy,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &PutContainerPolicyInput{}
- }
- output = &PutContainerPolicyOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // PutContainerPolicy API operation for AWS Elemental MediaStore.
- //
- // Creates an access policy for the specified container to restrict the users
- // and clients that can access it. For information about the data that is included
- // in an access policy, see the AWS Identity and Access Management User Guide
- // (https://aws.amazon.com/documentation/iam/).
- //
- // For this release of the REST API, you can create only one policy for a container.
- // If you enter PutContainerPolicy twice, the second command modifies the existing
- // policy.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Elemental MediaStore's
- // API operation PutContainerPolicy for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeContainerNotFoundException "ContainerNotFoundException"
- // The container that you specified in the request does not exist.
- //
- // * ErrCodeContainerInUseException "ContainerInUseException"
- // The container that you specified in the request already exists or is being
- // updated.
- //
- // * ErrCodeInternalServerError "InternalServerError"
- // The service is temporarily unavailable.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/PutContainerPolicy
- func (c *MediaStore) PutContainerPolicy(input *PutContainerPolicyInput) (*PutContainerPolicyOutput, error) {
- req, out := c.PutContainerPolicyRequest(input)
- return out, req.Send()
- }
- // PutContainerPolicyWithContext is the same as PutContainerPolicy with the addition of
- // the ability to pass a context and additional request options.
- //
- // See PutContainerPolicy for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *MediaStore) PutContainerPolicyWithContext(ctx aws.Context, input *PutContainerPolicyInput, opts ...request.Option) (*PutContainerPolicyOutput, error) {
- req, out := c.PutContainerPolicyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opPutCorsPolicy = "PutCorsPolicy"
- // PutCorsPolicyRequest generates a "aws/request.Request" representing the
- // client's request for the PutCorsPolicy operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See PutCorsPolicy for more information on using the PutCorsPolicy
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the PutCorsPolicyRequest method.
- // req, resp := client.PutCorsPolicyRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/PutCorsPolicy
- func (c *MediaStore) PutCorsPolicyRequest(input *PutCorsPolicyInput) (req *request.Request, output *PutCorsPolicyOutput) {
- op := &request.Operation{
- Name: opPutCorsPolicy,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &PutCorsPolicyInput{}
- }
- output = &PutCorsPolicyOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // PutCorsPolicy API operation for AWS Elemental MediaStore.
- //
- // Sets the cross-origin resource sharing (CORS) configuration on a container
- // so that the container can service cross-origin requests. For example, you
- // might want to enable a request whose origin is http://www.example.com to
- // access your AWS Elemental MediaStore container at my.example.container.com
- // by using the browser's XMLHttpRequest capability.
- //
- // To enable CORS on a container, you attach a CORS policy to the container.
- // In the CORS policy, you configure rules that identify origins and the HTTP
- // methods that can be executed on your container. The policy can contain up
- // to 398,000 characters. You can add up to 100 rules to a CORS policy. If more
- // than one rule applies, the service uses the first applicable rule listed.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Elemental MediaStore's
- // API operation PutCorsPolicy for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeContainerNotFoundException "ContainerNotFoundException"
- // The container that you specified in the request does not exist.
- //
- // * ErrCodeContainerInUseException "ContainerInUseException"
- // The container that you specified in the request already exists or is being
- // updated.
- //
- // * ErrCodeInternalServerError "InternalServerError"
- // The service is temporarily unavailable.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/PutCorsPolicy
- func (c *MediaStore) PutCorsPolicy(input *PutCorsPolicyInput) (*PutCorsPolicyOutput, error) {
- req, out := c.PutCorsPolicyRequest(input)
- return out, req.Send()
- }
- // PutCorsPolicyWithContext is the same as PutCorsPolicy with the addition of
- // the ability to pass a context and additional request options.
- //
- // See PutCorsPolicy for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *MediaStore) PutCorsPolicyWithContext(ctx aws.Context, input *PutCorsPolicyInput, opts ...request.Option) (*PutCorsPolicyOutput, error) {
- req, out := c.PutCorsPolicyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opPutLifecyclePolicy = "PutLifecyclePolicy"
- // PutLifecyclePolicyRequest generates a "aws/request.Request" representing the
- // client's request for the PutLifecyclePolicy operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See PutLifecyclePolicy for more information on using the PutLifecyclePolicy
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the PutLifecyclePolicyRequest method.
- // req, resp := client.PutLifecyclePolicyRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/PutLifecyclePolicy
- func (c *MediaStore) PutLifecyclePolicyRequest(input *PutLifecyclePolicyInput) (req *request.Request, output *PutLifecyclePolicyOutput) {
- op := &request.Operation{
- Name: opPutLifecyclePolicy,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &PutLifecyclePolicyInput{}
- }
- output = &PutLifecyclePolicyOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // PutLifecyclePolicy API operation for AWS Elemental MediaStore.
- //
- // Writes an object lifecycle policy to a container. If the container already
- // has an object lifecycle policy, the service replaces the existing policy
- // with the new policy.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS Elemental MediaStore's
- // API operation PutLifecyclePolicy for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeContainerInUseException "ContainerInUseException"
- // The container that you specified in the request already exists or is being
- // updated.
- //
- // * ErrCodeContainerNotFoundException "ContainerNotFoundException"
- // The container that you specified in the request does not exist.
- //
- // * ErrCodeInternalServerError "InternalServerError"
- // The service is temporarily unavailable.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/PutLifecyclePolicy
- func (c *MediaStore) PutLifecyclePolicy(input *PutLifecyclePolicyInput) (*PutLifecyclePolicyOutput, error) {
- req, out := c.PutLifecyclePolicyRequest(input)
- return out, req.Send()
- }
- // PutLifecyclePolicyWithContext is the same as PutLifecyclePolicy with the addition of
- // the ability to pass a context and additional request options.
- //
- // See PutLifecyclePolicy for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *MediaStore) PutLifecyclePolicyWithContext(ctx aws.Context, input *PutLifecyclePolicyInput, opts ...request.Option) (*PutLifecyclePolicyOutput, error) {
- req, out := c.PutLifecyclePolicyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- // This section describes operations that you can perform on an AWS Elemental
- // MediaStore container.
- type Container struct {
- _ struct{} `type:"structure"`
- // The Amazon Resource Name (ARN) of the container. The ARN has the following
- // format:
- //
- // arn:aws:<region>:<account that owns this container>:container/<name of container>
- //
- // For example: arn:aws:mediastore:us-west-2:111122223333:container/movies
- ARN *string `min:"1" type:"string"`
- // Unix timestamp.
- CreationTime *time.Time `type:"timestamp"`
- // The DNS endpoint of the container. Use the endpoint to identify the specific
- // container when sending requests to the data plane. The service assigns this
- // value when the container is created. Once the value has been assigned, it
- // does not change.
- Endpoint *string `min:"1" type:"string"`
- // The name of the container.
- Name *string `min:"1" type:"string"`
- // The status of container creation or deletion. The status is one of the following:
- // CREATING, ACTIVE, or DELETING. While the service is creating the container,
- // the status is CREATING. When the endpoint is available, the status changes
- // to ACTIVE.
- Status *string `min:"1" type:"string" enum:"ContainerStatus"`
- }
- // String returns the string representation
- func (s Container) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s Container) GoString() string {
- return s.String()
- }
- // SetARN sets the ARN field's value.
- func (s *Container) SetARN(v string) *Container {
- s.ARN = &v
- return s
- }
- // SetCreationTime sets the CreationTime field's value.
- func (s *Container) SetCreationTime(v time.Time) *Container {
- s.CreationTime = &v
- return s
- }
- // SetEndpoint sets the Endpoint field's value.
- func (s *Container) SetEndpoint(v string) *Container {
- s.Endpoint = &v
- return s
- }
- // SetName sets the Name field's value.
- func (s *Container) SetName(v string) *Container {
- s.Name = &v
- return s
- }
- // SetStatus sets the Status field's value.
- func (s *Container) SetStatus(v string) *Container {
- s.Status = &v
- return s
- }
- // A rule for a CORS policy. You can add up to 100 rules to a CORS policy. If
- // more than one rule applies, the service uses the first applicable rule listed.
- type CorsRule struct {
- _ struct{} `type:"structure"`
- // Specifies which headers are allowed in a preflight OPTIONS request through
- // the Access-Control-Request-Headers header. Each header name that is specified
- // in Access-Control-Request-Headers must have a corresponding entry in the
- // rule. Only the headers that were requested are sent back.
- //
- // This element can contain only one wildcard character (*).
- //
- // AllowedHeaders is a required field
- AllowedHeaders []*string `type:"list" required:"true"`
- // Identifies an HTTP method that the origin that is specified in the rule is
- // allowed to execute.
- //
- // Each CORS rule must contain at least one AllowedMethods and one AllowedOrigins
- // element.
- AllowedMethods []*string `min:"1" type:"list"`
- // One or more response headers that you want users to be able to access from
- // their applications (for example, from a JavaScript XMLHttpRequest object).
- //
- // Each CORS rule must have at least one AllowedOrigins element. The string
- // value can include only one wildcard character (*), for example, http://*.example.com.
- // Additionally, you can specify only one wildcard character to allow cross-origin
- // access for all origins.
- //
- // AllowedOrigins is a required field
- AllowedOrigins []*string `min:"1" type:"list" required:"true"`
- // One or more headers in the response that you want users to be able to access
- // from their applications (for example, from a JavaScript XMLHttpRequest object).
- //
- // This element is optional for each rule.
- ExposeHeaders []*string `type:"list"`
- // The time in seconds that your browser caches the preflight response for the
- // specified resource.
- //
- // A CORS rule can have only one MaxAgeSeconds element.
- MaxAgeSeconds *int64 `type:"integer"`
- }
- // String returns the string representation
- func (s CorsRule) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CorsRule) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *CorsRule) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CorsRule"}
- if s.AllowedHeaders == nil {
- invalidParams.Add(request.NewErrParamRequired("AllowedHeaders"))
- }
- if s.AllowedMethods != nil && len(s.AllowedMethods) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("AllowedMethods", 1))
- }
- if s.AllowedOrigins == nil {
- invalidParams.Add(request.NewErrParamRequired("AllowedOrigins"))
- }
- if s.AllowedOrigins != nil && len(s.AllowedOrigins) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("AllowedOrigins", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetAllowedHeaders sets the AllowedHeaders field's value.
- func (s *CorsRule) SetAllowedHeaders(v []*string) *CorsRule {
- s.AllowedHeaders = v
- return s
- }
- // SetAllowedMethods sets the AllowedMethods field's value.
- func (s *CorsRule) SetAllowedMethods(v []*string) *CorsRule {
- s.AllowedMethods = v
- return s
- }
- // SetAllowedOrigins sets the AllowedOrigins field's value.
- func (s *CorsRule) SetAllowedOrigins(v []*string) *CorsRule {
- s.AllowedOrigins = v
- return s
- }
- // SetExposeHeaders sets the ExposeHeaders field's value.
- func (s *CorsRule) SetExposeHeaders(v []*string) *CorsRule {
- s.ExposeHeaders = v
- return s
- }
- // SetMaxAgeSeconds sets the MaxAgeSeconds field's value.
- func (s *CorsRule) SetMaxAgeSeconds(v int64) *CorsRule {
- s.MaxAgeSeconds = &v
- return s
- }
- type CreateContainerInput struct {
- _ struct{} `type:"structure"`
- // The name for the container. The name must be from 1 to 255 characters. Container
- // names must be unique to your AWS account within a specific region. As an
- // example, you could create a container named movies in every region, as long
- // as you don’t have an existing container with that name.
- //
- // ContainerName is a required field
- ContainerName *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s CreateContainerInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateContainerInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *CreateContainerInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateContainerInput"}
- if s.ContainerName == nil {
- invalidParams.Add(request.NewErrParamRequired("ContainerName"))
- }
- if s.ContainerName != nil && len(*s.ContainerName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetContainerName sets the ContainerName field's value.
- func (s *CreateContainerInput) SetContainerName(v string) *CreateContainerInput {
- s.ContainerName = &v
- return s
- }
- type CreateContainerOutput struct {
- _ struct{} `type:"structure"`
- // ContainerARN: The Amazon Resource Name (ARN) of the newly created container.
- // The ARN has the following format: arn:aws:<region>:<account that owns this
- // container>:container/<name of container>. For example: arn:aws:mediastore:us-west-2:111122223333:container/movies
- //
- // ContainerName: The container name as specified in the request.
- //
- // CreationTime: Unix time stamp.
- //
- // Status: The status of container creation or deletion. The status is one of
- // the following: CREATING, ACTIVE, or DELETING. While the service is creating
- // the container, the status is CREATING. When an endpoint is available, the
- // status changes to ACTIVE.
- //
- // The return value does not include the container's endpoint. To make downstream
- // requests, you must obtain this value by using DescribeContainer or ListContainers.
- //
- // Container is a required field
- Container *Container `type:"structure" required:"true"`
- }
- // String returns the string representation
- func (s CreateContainerOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateContainerOutput) GoString() string {
- return s.String()
- }
- // SetContainer sets the Container field's value.
- func (s *CreateContainerOutput) SetContainer(v *Container) *CreateContainerOutput {
- s.Container = v
- return s
- }
- type DeleteContainerInput struct {
- _ struct{} `type:"structure"`
- // The name of the container to delete.
- //
- // ContainerName is a required field
- ContainerName *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DeleteContainerInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteContainerInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DeleteContainerInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteContainerInput"}
- if s.ContainerName == nil {
- invalidParams.Add(request.NewErrParamRequired("ContainerName"))
- }
- if s.ContainerName != nil && len(*s.ContainerName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetContainerName sets the ContainerName field's value.
- func (s *DeleteContainerInput) SetContainerName(v string) *DeleteContainerInput {
- s.ContainerName = &v
- return s
- }
- type DeleteContainerOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s DeleteContainerOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteContainerOutput) GoString() string {
- return s.String()
- }
- type DeleteContainerPolicyInput struct {
- _ struct{} `type:"structure"`
- // The name of the container that holds the policy.
- //
- // ContainerName is a required field
- ContainerName *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DeleteContainerPolicyInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteContainerPolicyInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DeleteContainerPolicyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteContainerPolicyInput"}
- if s.ContainerName == nil {
- invalidParams.Add(request.NewErrParamRequired("ContainerName"))
- }
- if s.ContainerName != nil && len(*s.ContainerName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetContainerName sets the ContainerName field's value.
- func (s *DeleteContainerPolicyInput) SetContainerName(v string) *DeleteContainerPolicyInput {
- s.ContainerName = &v
- return s
- }
- type DeleteContainerPolicyOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s DeleteContainerPolicyOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteContainerPolicyOutput) GoString() string {
- return s.String()
- }
- type DeleteCorsPolicyInput struct {
- _ struct{} `type:"structure"`
- // The name of the container to remove the policy from.
- //
- // ContainerName is a required field
- ContainerName *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DeleteCorsPolicyInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteCorsPolicyInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DeleteCorsPolicyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteCorsPolicyInput"}
- if s.ContainerName == nil {
- invalidParams.Add(request.NewErrParamRequired("ContainerName"))
- }
- if s.ContainerName != nil && len(*s.ContainerName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetContainerName sets the ContainerName field's value.
- func (s *DeleteCorsPolicyInput) SetContainerName(v string) *DeleteCorsPolicyInput {
- s.ContainerName = &v
- return s
- }
- type DeleteCorsPolicyOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s DeleteCorsPolicyOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteCorsPolicyOutput) GoString() string {
- return s.String()
- }
- type DeleteLifecyclePolicyInput struct {
- _ struct{} `type:"structure"`
- // The name of the container that holds the object lifecycle policy.
- //
- // ContainerName is a required field
- ContainerName *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DeleteLifecyclePolicyInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteLifecyclePolicyInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DeleteLifecyclePolicyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteLifecyclePolicyInput"}
- if s.ContainerName == nil {
- invalidParams.Add(request.NewErrParamRequired("ContainerName"))
- }
- if s.ContainerName != nil && len(*s.ContainerName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetContainerName sets the ContainerName field's value.
- func (s *DeleteLifecyclePolicyInput) SetContainerName(v string) *DeleteLifecyclePolicyInput {
- s.ContainerName = &v
- return s
- }
- type DeleteLifecyclePolicyOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s DeleteLifecyclePolicyOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteLifecyclePolicyOutput) GoString() string {
- return s.String()
- }
- type DescribeContainerInput struct {
- _ struct{} `type:"structure"`
- // The name of the container to query.
- ContainerName *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s DescribeContainerInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeContainerInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DescribeContainerInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribeContainerInput"}
- if s.ContainerName != nil && len(*s.ContainerName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetContainerName sets the ContainerName field's value.
- func (s *DescribeContainerInput) SetContainerName(v string) *DescribeContainerInput {
- s.ContainerName = &v
- return s
- }
- type DescribeContainerOutput struct {
- _ struct{} `type:"structure"`
- // The name of the queried container.
- Container *Container `type:"structure"`
- }
- // String returns the string representation
- func (s DescribeContainerOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeContainerOutput) GoString() string {
- return s.String()
- }
- // SetContainer sets the Container field's value.
- func (s *DescribeContainerOutput) SetContainer(v *Container) *DescribeContainerOutput {
- s.Container = v
- return s
- }
- type GetContainerPolicyInput struct {
- _ struct{} `type:"structure"`
- // The name of the container.
- //
- // ContainerName is a required field
- ContainerName *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s GetContainerPolicyInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetContainerPolicyInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetContainerPolicyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetContainerPolicyInput"}
- if s.ContainerName == nil {
- invalidParams.Add(request.NewErrParamRequired("ContainerName"))
- }
- if s.ContainerName != nil && len(*s.ContainerName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetContainerName sets the ContainerName field's value.
- func (s *GetContainerPolicyInput) SetContainerName(v string) *GetContainerPolicyInput {
- s.ContainerName = &v
- return s
- }
- type GetContainerPolicyOutput struct {
- _ struct{} `type:"structure"`
- // The contents of the access policy.
- //
- // Policy is a required field
- Policy *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s GetContainerPolicyOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetContainerPolicyOutput) GoString() string {
- return s.String()
- }
- // SetPolicy sets the Policy field's value.
- func (s *GetContainerPolicyOutput) SetPolicy(v string) *GetContainerPolicyOutput {
- s.Policy = &v
- return s
- }
- type GetCorsPolicyInput struct {
- _ struct{} `type:"structure"`
- // The name of the container that the policy is assigned to.
- //
- // ContainerName is a required field
- ContainerName *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s GetCorsPolicyInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetCorsPolicyInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetCorsPolicyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetCorsPolicyInput"}
- if s.ContainerName == nil {
- invalidParams.Add(request.NewErrParamRequired("ContainerName"))
- }
- if s.ContainerName != nil && len(*s.ContainerName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetContainerName sets the ContainerName field's value.
- func (s *GetCorsPolicyInput) SetContainerName(v string) *GetCorsPolicyInput {
- s.ContainerName = &v
- return s
- }
- type GetCorsPolicyOutput struct {
- _ struct{} `type:"structure"`
- // The CORS policy assigned to the container.
- //
- // CorsPolicy is a required field
- CorsPolicy []*CorsRule `min:"1" type:"list" required:"true"`
- }
- // String returns the string representation
- func (s GetCorsPolicyOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetCorsPolicyOutput) GoString() string {
- return s.String()
- }
- // SetCorsPolicy sets the CorsPolicy field's value.
- func (s *GetCorsPolicyOutput) SetCorsPolicy(v []*CorsRule) *GetCorsPolicyOutput {
- s.CorsPolicy = v
- return s
- }
- type GetLifecyclePolicyInput struct {
- _ struct{} `type:"structure"`
- // The name of the container that the object lifecycle policy is assigned to.
- //
- // ContainerName is a required field
- ContainerName *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s GetLifecyclePolicyInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetLifecyclePolicyInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetLifecyclePolicyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetLifecyclePolicyInput"}
- if s.ContainerName == nil {
- invalidParams.Add(request.NewErrParamRequired("ContainerName"))
- }
- if s.ContainerName != nil && len(*s.ContainerName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetContainerName sets the ContainerName field's value.
- func (s *GetLifecyclePolicyInput) SetContainerName(v string) *GetLifecyclePolicyInput {
- s.ContainerName = &v
- return s
- }
- type GetLifecyclePolicyOutput struct {
- _ struct{} `type:"structure"`
- // The object lifecycle policy that is assigned to the container.
- //
- // LifecyclePolicy is a required field
- LifecyclePolicy *string `type:"string" required:"true"`
- }
- // String returns the string representation
- func (s GetLifecyclePolicyOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetLifecyclePolicyOutput) GoString() string {
- return s.String()
- }
- // SetLifecyclePolicy sets the LifecyclePolicy field's value.
- func (s *GetLifecyclePolicyOutput) SetLifecyclePolicy(v string) *GetLifecyclePolicyOutput {
- s.LifecyclePolicy = &v
- return s
- }
- type ListContainersInput struct {
- _ struct{} `type:"structure"`
- // Enter the maximum number of containers in the response. Use from 1 to 255
- // characters.
- MaxResults *int64 `min:"1" type:"integer"`
- // Only if you used MaxResults in the first command, enter the token (which
- // was included in the previous response) to obtain the next set of containers.
- // This token is included in a response only if there actually are more containers
- // to list.
- NextToken *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s ListContainersInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListContainersInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ListContainersInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListContainersInput"}
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
- if s.NextToken != nil && len(*s.NextToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetMaxResults sets the MaxResults field's value.
- func (s *ListContainersInput) SetMaxResults(v int64) *ListContainersInput {
- s.MaxResults = &v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListContainersInput) SetNextToken(v string) *ListContainersInput {
- s.NextToken = &v
- return s
- }
- type ListContainersOutput struct {
- _ struct{} `type:"structure"`
- // The names of the containers.
- //
- // Containers is a required field
- Containers []*Container `type:"list" required:"true"`
- // NextToken is the token to use in the next call to ListContainers. This token
- // is returned only if you included the MaxResults tag in the original command,
- // and only if there are still containers to return.
- NextToken *string `min:"1" type:"string"`
- }
- // String returns the string representation
- func (s ListContainersOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListContainersOutput) GoString() string {
- return s.String()
- }
- // SetContainers sets the Containers field's value.
- func (s *ListContainersOutput) SetContainers(v []*Container) *ListContainersOutput {
- s.Containers = v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListContainersOutput) SetNextToken(v string) *ListContainersOutput {
- s.NextToken = &v
- return s
- }
- type PutContainerPolicyInput struct {
- _ struct{} `type:"structure"`
- // The name of the container.
- //
- // ContainerName is a required field
- ContainerName *string `min:"1" type:"string" required:"true"`
- // The contents of the policy, which includes the following:
- //
- // * One Version tag
- //
- // * One Statement tag that contains the standard tags for the policy.
- //
- // Policy is a required field
- Policy *string `min:"1" type:"string" required:"true"`
- }
- // String returns the string representation
- func (s PutContainerPolicyInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s PutContainerPolicyInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *PutContainerPolicyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutContainerPolicyInput"}
- if s.ContainerName == nil {
- invalidParams.Add(request.NewErrParamRequired("ContainerName"))
- }
- if s.ContainerName != nil && len(*s.ContainerName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1))
- }
- if s.Policy == nil {
- invalidParams.Add(request.NewErrParamRequired("Policy"))
- }
- if s.Policy != nil && len(*s.Policy) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Policy", 1))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetContainerName sets the ContainerName field's value.
- func (s *PutContainerPolicyInput) SetContainerName(v string) *PutContainerPolicyInput {
- s.ContainerName = &v
- return s
- }
- // SetPolicy sets the Policy field's value.
- func (s *PutContainerPolicyInput) SetPolicy(v string) *PutContainerPolicyInput {
- s.Policy = &v
- return s
- }
- type PutContainerPolicyOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s PutContainerPolicyOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s PutContainerPolicyOutput) GoString() string {
- return s.String()
- }
- type PutCorsPolicyInput struct {
- _ struct{} `type:"structure"`
- // The name of the container that you want to assign the CORS policy to.
- //
- // ContainerName is a required field
- ContainerName *string `min:"1" type:"string" required:"true"`
- // The CORS policy to apply to the container.
- //
- // CorsPolicy is a required field
- CorsPolicy []*CorsRule `min:"1" type:"list" required:"true"`
- }
- // String returns the string representation
- func (s PutCorsPolicyInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s PutCorsPolicyInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *PutCorsPolicyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutCorsPolicyInput"}
- if s.ContainerName == nil {
- invalidParams.Add(request.NewErrParamRequired("ContainerName"))
- }
- if s.ContainerName != nil && len(*s.ContainerName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1))
- }
- if s.CorsPolicy == nil {
- invalidParams.Add(request.NewErrParamRequired("CorsPolicy"))
- }
- if s.CorsPolicy != nil && len(s.CorsPolicy) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("CorsPolicy", 1))
- }
- if s.CorsPolicy != nil {
- for i, v := range s.CorsPolicy {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CorsPolicy", i), err.(request.ErrInvalidParams))
- }
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetContainerName sets the ContainerName field's value.
- func (s *PutCorsPolicyInput) SetContainerName(v string) *PutCorsPolicyInput {
- s.ContainerName = &v
- return s
- }
- // SetCorsPolicy sets the CorsPolicy field's value.
- func (s *PutCorsPolicyInput) SetCorsPolicy(v []*CorsRule) *PutCorsPolicyInput {
- s.CorsPolicy = v
- return s
- }
- type PutCorsPolicyOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s PutCorsPolicyOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s PutCorsPolicyOutput) GoString() string {
- return s.String()
- }
- type PutLifecyclePolicyInput struct {
- _ struct{} `type:"structure"`
- // The name of the container that you want to assign the object lifecycle policy
- // to.
- //
- // ContainerName is a required field
- ContainerName *string `min:"1" type:"string" required:"true"`
- // The object lifecycle policy to apply to the container.
- //
- // LifecyclePolicy is a required field
- LifecyclePolicy *string `type:"string" required:"true"`
- }
- // String returns the string representation
- func (s PutLifecyclePolicyInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s PutLifecyclePolicyInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *PutLifecyclePolicyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutLifecyclePolicyInput"}
- if s.ContainerName == nil {
- invalidParams.Add(request.NewErrParamRequired("ContainerName"))
- }
- if s.ContainerName != nil && len(*s.ContainerName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1))
- }
- if s.LifecyclePolicy == nil {
- invalidParams.Add(request.NewErrParamRequired("LifecyclePolicy"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetContainerName sets the ContainerName field's value.
- func (s *PutLifecyclePolicyInput) SetContainerName(v string) *PutLifecyclePolicyInput {
- s.ContainerName = &v
- return s
- }
- // SetLifecyclePolicy sets the LifecyclePolicy field's value.
- func (s *PutLifecyclePolicyInput) SetLifecyclePolicy(v string) *PutLifecyclePolicyInput {
- s.LifecyclePolicy = &v
- return s
- }
- type PutLifecyclePolicyOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s PutLifecyclePolicyOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s PutLifecyclePolicyOutput) GoString() string {
- return s.String()
- }
- const (
- // ContainerStatusActive is a ContainerStatus enum value
- ContainerStatusActive = "ACTIVE"
- // ContainerStatusCreating is a ContainerStatus enum value
- ContainerStatusCreating = "CREATING"
- // ContainerStatusDeleting is a ContainerStatus enum value
- ContainerStatusDeleting = "DELETING"
- )
- const (
- // MethodNamePut is a MethodName enum value
- MethodNamePut = "PUT"
- // MethodNameGet is a MethodName enum value
- MethodNameGet = "GET"
- // MethodNameDelete is a MethodName enum value
- MethodNameDelete = "DELETE"
- // MethodNameHead is a MethodName enum value
- MethodNameHead = "HEAD"
- )
|