3 Star 1 Fork 0

Gitee 极速下载 / aws-sdk-go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/aws/aws-sdk-go
克隆/下载
api.go 80.98 KB
一键复制 编辑 原始数据 按行查看 历史
awssdkgo 提交于 2018-04-03 20:44 . Release v1.13.27
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package resourcegroups
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
)
const opCreateGroup = "CreateGroup"
// CreateGroupRequest generates a "aws/request.Request" representing the
// client's request for the CreateGroup operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// 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 CreateGroup for more information on using the CreateGroup
// 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 CreateGroupRequest method.
// req, resp := client.CreateGroupRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/CreateGroup
func (c *ResourceGroups) CreateGroupRequest(input *CreateGroupInput) (req *request.Request, output *CreateGroupOutput) {
op := &request.Operation{
Name: opCreateGroup,
HTTPMethod: "POST",
HTTPPath: "/groups",
}
if input == nil {
input = &CreateGroupInput{}
}
output = &CreateGroupOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateGroup API operation for AWS Resource Groups.
//
// Creates a group with a specified name, description, and resource query.
//
// 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 Resource Groups's
// API operation CreateGroup for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// The request does not comply with validation rules that are defined for the
// request parameters.
//
// * ErrCodeForbiddenException "ForbiddenException"
// The caller is not authorized to make the request.
//
// * ErrCodeMethodNotAllowedException "MethodNotAllowedException"
// The request uses an HTTP method which is not allowed for the specified resource.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// The caller has exceeded throttling limits.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// An internal error occurred while processing the request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/CreateGroup
func (c *ResourceGroups) CreateGroup(input *CreateGroupInput) (*CreateGroupOutput, error) {
req, out := c.CreateGroupRequest(input)
return out, req.Send()
}
// CreateGroupWithContext is the same as CreateGroup with the addition of
// the ability to pass a context and additional request options.
//
// See CreateGroup 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 *ResourceGroups) CreateGroupWithContext(ctx aws.Context, input *CreateGroupInput, opts ...request.Option) (*CreateGroupOutput, error) {
req, out := c.CreateGroupRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteGroup = "DeleteGroup"
// DeleteGroupRequest generates a "aws/request.Request" representing the
// client's request for the DeleteGroup operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// 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 DeleteGroup for more information on using the DeleteGroup
// 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 DeleteGroupRequest method.
// req, resp := client.DeleteGroupRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/DeleteGroup
func (c *ResourceGroups) DeleteGroupRequest(input *DeleteGroupInput) (req *request.Request, output *DeleteGroupOutput) {
op := &request.Operation{
Name: opDeleteGroup,
HTTPMethod: "DELETE",
HTTPPath: "/groups/{GroupName}",
}
if input == nil {
input = &DeleteGroupInput{}
}
output = &DeleteGroupOutput{}
req = c.newRequest(op, input, output)
return
}
// DeleteGroup API operation for AWS Resource Groups.
//
// Deletes a specified resource group. Deleting a resource group does not delete
// resources that are members of the group; it only deletes the group structure.
//
// 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 Resource Groups's
// API operation DeleteGroup for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// The request does not comply with validation rules that are defined for the
// request parameters.
//
// * ErrCodeForbiddenException "ForbiddenException"
// The caller is not authorized to make the request.
//
// * ErrCodeNotFoundException "NotFoundException"
// One or more resources specified in the request do not exist.
//
// * ErrCodeMethodNotAllowedException "MethodNotAllowedException"
// The request uses an HTTP method which is not allowed for the specified resource.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// The caller has exceeded throttling limits.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// An internal error occurred while processing the request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/DeleteGroup
func (c *ResourceGroups) DeleteGroup(input *DeleteGroupInput) (*DeleteGroupOutput, error) {
req, out := c.DeleteGroupRequest(input)
return out, req.Send()
}
// DeleteGroupWithContext is the same as DeleteGroup with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteGroup 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 *ResourceGroups) DeleteGroupWithContext(ctx aws.Context, input *DeleteGroupInput, opts ...request.Option) (*DeleteGroupOutput, error) {
req, out := c.DeleteGroupRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetGroup = "GetGroup"
// GetGroupRequest generates a "aws/request.Request" representing the
// client's request for the GetGroup operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// 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 GetGroup for more information on using the GetGroup
// 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 GetGroupRequest method.
// req, resp := client.GetGroupRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/GetGroup
func (c *ResourceGroups) GetGroupRequest(input *GetGroupInput) (req *request.Request, output *GetGroupOutput) {
op := &request.Operation{
Name: opGetGroup,
HTTPMethod: "GET",
HTTPPath: "/groups/{GroupName}",
}
if input == nil {
input = &GetGroupInput{}
}
output = &GetGroupOutput{}
req = c.newRequest(op, input, output)
return
}
// GetGroup API operation for AWS Resource Groups.
//
// Returns information about a specified resource group.
//
// 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 Resource Groups's
// API operation GetGroup for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// The request does not comply with validation rules that are defined for the
// request parameters.
//
// * ErrCodeForbiddenException "ForbiddenException"
// The caller is not authorized to make the request.
//
// * ErrCodeNotFoundException "NotFoundException"
// One or more resources specified in the request do not exist.
//
// * ErrCodeMethodNotAllowedException "MethodNotAllowedException"
// The request uses an HTTP method which is not allowed for the specified resource.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// The caller has exceeded throttling limits.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// An internal error occurred while processing the request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/GetGroup
func (c *ResourceGroups) GetGroup(input *GetGroupInput) (*GetGroupOutput, error) {
req, out := c.GetGroupRequest(input)
return out, req.Send()
}
// GetGroupWithContext is the same as GetGroup with the addition of
// the ability to pass a context and additional request options.
//
// See GetGroup 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 *ResourceGroups) GetGroupWithContext(ctx aws.Context, input *GetGroupInput, opts ...request.Option) (*GetGroupOutput, error) {
req, out := c.GetGroupRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetGroupQuery = "GetGroupQuery"
// GetGroupQueryRequest generates a "aws/request.Request" representing the
// client's request for the GetGroupQuery operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// 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 GetGroupQuery for more information on using the GetGroupQuery
// 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 GetGroupQueryRequest method.
// req, resp := client.GetGroupQueryRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/GetGroupQuery
func (c *ResourceGroups) GetGroupQueryRequest(input *GetGroupQueryInput) (req *request.Request, output *GetGroupQueryOutput) {
op := &request.Operation{
Name: opGetGroupQuery,
HTTPMethod: "GET",
HTTPPath: "/groups/{GroupName}/query",
}
if input == nil {
input = &GetGroupQueryInput{}
}
output = &GetGroupQueryOutput{}
req = c.newRequest(op, input, output)
return
}
// GetGroupQuery API operation for AWS Resource Groups.
//
// Returns the resource query associated with the specified resource group.
//
// 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 Resource Groups's
// API operation GetGroupQuery for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// The request does not comply with validation rules that are defined for the
// request parameters.
//
// * ErrCodeForbiddenException "ForbiddenException"
// The caller is not authorized to make the request.
//
// * ErrCodeNotFoundException "NotFoundException"
// One or more resources specified in the request do not exist.
//
// * ErrCodeMethodNotAllowedException "MethodNotAllowedException"
// The request uses an HTTP method which is not allowed for the specified resource.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// The caller has exceeded throttling limits.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// An internal error occurred while processing the request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/GetGroupQuery
func (c *ResourceGroups) GetGroupQuery(input *GetGroupQueryInput) (*GetGroupQueryOutput, error) {
req, out := c.GetGroupQueryRequest(input)
return out, req.Send()
}
// GetGroupQueryWithContext is the same as GetGroupQuery with the addition of
// the ability to pass a context and additional request options.
//
// See GetGroupQuery 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 *ResourceGroups) GetGroupQueryWithContext(ctx aws.Context, input *GetGroupQueryInput, opts ...request.Option) (*GetGroupQueryOutput, error) {
req, out := c.GetGroupQueryRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetTags = "GetTags"
// GetTagsRequest generates a "aws/request.Request" representing the
// client's request for the GetTags operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// 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 GetTags for more information on using the GetTags
// 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 GetTagsRequest method.
// req, resp := client.GetTagsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/GetTags
func (c *ResourceGroups) GetTagsRequest(input *GetTagsInput) (req *request.Request, output *GetTagsOutput) {
op := &request.Operation{
Name: opGetTags,
HTTPMethod: "GET",
HTTPPath: "/resources/{Arn}/tags",
}
if input == nil {
input = &GetTagsInput{}
}
output = &GetTagsOutput{}
req = c.newRequest(op, input, output)
return
}
// GetTags API operation for AWS Resource Groups.
//
// Returns a list of tags that are associated with a resource, specified by
// an ARN.
//
// 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 Resource Groups's
// API operation GetTags for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// The request does not comply with validation rules that are defined for the
// request parameters.
//
// * ErrCodeForbiddenException "ForbiddenException"
// The caller is not authorized to make the request.
//
// * ErrCodeNotFoundException "NotFoundException"
// One or more resources specified in the request do not exist.
//
// * ErrCodeMethodNotAllowedException "MethodNotAllowedException"
// The request uses an HTTP method which is not allowed for the specified resource.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// The caller has exceeded throttling limits.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// An internal error occurred while processing the request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/GetTags
func (c *ResourceGroups) GetTags(input *GetTagsInput) (*GetTagsOutput, error) {
req, out := c.GetTagsRequest(input)
return out, req.Send()
}
// GetTagsWithContext is the same as GetTags with the addition of
// the ability to pass a context and additional request options.
//
// See GetTags 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 *ResourceGroups) GetTagsWithContext(ctx aws.Context, input *GetTagsInput, opts ...request.Option) (*GetTagsOutput, error) {
req, out := c.GetTagsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opListGroupResources = "ListGroupResources"
// ListGroupResourcesRequest generates a "aws/request.Request" representing the
// client's request for the ListGroupResources operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// 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 ListGroupResources for more information on using the ListGroupResources
// 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 ListGroupResourcesRequest method.
// req, resp := client.ListGroupResourcesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/ListGroupResources
func (c *ResourceGroups) ListGroupResourcesRequest(input *ListGroupResourcesInput) (req *request.Request, output *ListGroupResourcesOutput) {
op := &request.Operation{
Name: opListGroupResources,
HTTPMethod: "GET",
HTTPPath: "/groups/{GroupName}/resource-identifiers",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListGroupResourcesInput{}
}
output = &ListGroupResourcesOutput{}
req = c.newRequest(op, input, output)
return
}
// ListGroupResources API operation for AWS Resource Groups.
//
// Returns a list of ARNs of resources that are members of a specified resource
// group.
//
// 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 Resource Groups's
// API operation ListGroupResources for usage and error information.
//
// Returned Error Codes:
// * ErrCodeUnauthorizedException "UnauthorizedException"
// The request has not been applied because it lacks valid authentication credentials
// for the target resource.
//
// * ErrCodeBadRequestException "BadRequestException"
// The request does not comply with validation rules that are defined for the
// request parameters.
//
// * ErrCodeForbiddenException "ForbiddenException"
// The caller is not authorized to make the request.
//
// * ErrCodeNotFoundException "NotFoundException"
// One or more resources specified in the request do not exist.
//
// * ErrCodeMethodNotAllowedException "MethodNotAllowedException"
// The request uses an HTTP method which is not allowed for the specified resource.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// The caller has exceeded throttling limits.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// An internal error occurred while processing the request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/ListGroupResources
func (c *ResourceGroups) ListGroupResources(input *ListGroupResourcesInput) (*ListGroupResourcesOutput, error) {
req, out := c.ListGroupResourcesRequest(input)
return out, req.Send()
}
// ListGroupResourcesWithContext is the same as ListGroupResources with the addition of
// the ability to pass a context and additional request options.
//
// See ListGroupResources 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 *ResourceGroups) ListGroupResourcesWithContext(ctx aws.Context, input *ListGroupResourcesInput, opts ...request.Option) (*ListGroupResourcesOutput, error) {
req, out := c.ListGroupResourcesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListGroupResourcesPages iterates over the pages of a ListGroupResources operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListGroupResources method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListGroupResources operation.
// pageNum := 0
// err := client.ListGroupResourcesPages(params,
// func(page *ListGroupResourcesOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *ResourceGroups) ListGroupResourcesPages(input *ListGroupResourcesInput, fn func(*ListGroupResourcesOutput, bool) bool) error {
return c.ListGroupResourcesPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListGroupResourcesPagesWithContext same as ListGroupResourcesPages except
// it takes a Context and allows setting request options on the pages.
//
// 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 *ResourceGroups) ListGroupResourcesPagesWithContext(ctx aws.Context, input *ListGroupResourcesInput, fn func(*ListGroupResourcesOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListGroupResourcesInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListGroupResourcesRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*ListGroupResourcesOutput), !p.HasNextPage())
}
return p.Err()
}
const opListGroups = "ListGroups"
// ListGroupsRequest generates a "aws/request.Request" representing the
// client's request for the ListGroups operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// 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 ListGroups for more information on using the ListGroups
// 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 ListGroupsRequest method.
// req, resp := client.ListGroupsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/ListGroups
func (c *ResourceGroups) ListGroupsRequest(input *ListGroupsInput) (req *request.Request, output *ListGroupsOutput) {
op := &request.Operation{
Name: opListGroups,
HTTPMethod: "GET",
HTTPPath: "/groups",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListGroupsInput{}
}
output = &ListGroupsOutput{}
req = c.newRequest(op, input, output)
return
}
// ListGroups API operation for AWS Resource Groups.
//
// Returns a list of existing resource groups in your account.
//
// 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 Resource Groups's
// API operation ListGroups for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// The request does not comply with validation rules that are defined for the
// request parameters.
//
// * ErrCodeForbiddenException "ForbiddenException"
// The caller is not authorized to make the request.
//
// * ErrCodeMethodNotAllowedException "MethodNotAllowedException"
// The request uses an HTTP method which is not allowed for the specified resource.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// The caller has exceeded throttling limits.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// An internal error occurred while processing the request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/ListGroups
func (c *ResourceGroups) ListGroups(input *ListGroupsInput) (*ListGroupsOutput, error) {
req, out := c.ListGroupsRequest(input)
return out, req.Send()
}
// ListGroupsWithContext is the same as ListGroups with the addition of
// the ability to pass a context and additional request options.
//
// See ListGroups 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 *ResourceGroups) ListGroupsWithContext(ctx aws.Context, input *ListGroupsInput, opts ...request.Option) (*ListGroupsOutput, error) {
req, out := c.ListGroupsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListGroupsPages iterates over the pages of a ListGroups operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListGroups method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListGroups operation.
// pageNum := 0
// err := client.ListGroupsPages(params,
// func(page *ListGroupsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *ResourceGroups) ListGroupsPages(input *ListGroupsInput, fn func(*ListGroupsOutput, bool) bool) error {
return c.ListGroupsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListGroupsPagesWithContext same as ListGroupsPages except
// it takes a Context and allows setting request options on the pages.
//
// 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 *ResourceGroups) ListGroupsPagesWithContext(ctx aws.Context, input *ListGroupsInput, fn func(*ListGroupsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListGroupsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListGroupsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*ListGroupsOutput), !p.HasNextPage())
}
return p.Err()
}
const opSearchResources = "SearchResources"
// SearchResourcesRequest generates a "aws/request.Request" representing the
// client's request for the SearchResources operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// 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 SearchResources for more information on using the SearchResources
// 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 SearchResourcesRequest method.
// req, resp := client.SearchResourcesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/SearchResources
func (c *ResourceGroups) SearchResourcesRequest(input *SearchResourcesInput) (req *request.Request, output *SearchResourcesOutput) {
op := &request.Operation{
Name: opSearchResources,
HTTPMethod: "POST",
HTTPPath: "/resources/search",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &SearchResourcesInput{}
}
output = &SearchResourcesOutput{}
req = c.newRequest(op, input, output)
return
}
// SearchResources API operation for AWS Resource Groups.
//
// Returns a list of AWS resource identifiers that matches a specified query.
// The query uses the same format as a resource query in a CreateGroup or UpdateGroupQuery
// operation.
//
// 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 Resource Groups's
// API operation SearchResources for usage and error information.
//
// Returned Error Codes:
// * ErrCodeUnauthorizedException "UnauthorizedException"
// The request has not been applied because it lacks valid authentication credentials
// for the target resource.
//
// * ErrCodeBadRequestException "BadRequestException"
// The request does not comply with validation rules that are defined for the
// request parameters.
//
// * ErrCodeForbiddenException "ForbiddenException"
// The caller is not authorized to make the request.
//
// * ErrCodeMethodNotAllowedException "MethodNotAllowedException"
// The request uses an HTTP method which is not allowed for the specified resource.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// The caller has exceeded throttling limits.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// An internal error occurred while processing the request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/SearchResources
func (c *ResourceGroups) SearchResources(input *SearchResourcesInput) (*SearchResourcesOutput, error) {
req, out := c.SearchResourcesRequest(input)
return out, req.Send()
}
// SearchResourcesWithContext is the same as SearchResources with the addition of
// the ability to pass a context and additional request options.
//
// See SearchResources 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 *ResourceGroups) SearchResourcesWithContext(ctx aws.Context, input *SearchResourcesInput, opts ...request.Option) (*SearchResourcesOutput, error) {
req, out := c.SearchResourcesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// SearchResourcesPages iterates over the pages of a SearchResources operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See SearchResources method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a SearchResources operation.
// pageNum := 0
// err := client.SearchResourcesPages(params,
// func(page *SearchResourcesOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *ResourceGroups) SearchResourcesPages(input *SearchResourcesInput, fn func(*SearchResourcesOutput, bool) bool) error {
return c.SearchResourcesPagesWithContext(aws.BackgroundContext(), input, fn)
}
// SearchResourcesPagesWithContext same as SearchResourcesPages except
// it takes a Context and allows setting request options on the pages.
//
// 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 *ResourceGroups) SearchResourcesPagesWithContext(ctx aws.Context, input *SearchResourcesInput, fn func(*SearchResourcesOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *SearchResourcesInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.SearchResourcesRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*SearchResourcesOutput), !p.HasNextPage())
}
return p.Err()
}
const opTag = "Tag"
// TagRequest generates a "aws/request.Request" representing the
// client's request for the Tag operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// 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 Tag for more information on using the Tag
// 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 TagRequest method.
// req, resp := client.TagRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/Tag
func (c *ResourceGroups) TagRequest(input *TagInput) (req *request.Request, output *TagOutput) {
op := &request.Operation{
Name: opTag,
HTTPMethod: "PUT",
HTTPPath: "/resources/{Arn}/tags",
}
if input == nil {
input = &TagInput{}
}
output = &TagOutput{}
req = c.newRequest(op, input, output)
return
}
// Tag API operation for AWS Resource Groups.
//
// Adds specified tags to a resource with the specified ARN. Existing tags on
// a resource are not changed if they are not specified in the request parameters.
//
// 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 Resource Groups's
// API operation Tag for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// The request does not comply with validation rules that are defined for the
// request parameters.
//
// * ErrCodeForbiddenException "ForbiddenException"
// The caller is not authorized to make the request.
//
// * ErrCodeNotFoundException "NotFoundException"
// One or more resources specified in the request do not exist.
//
// * ErrCodeMethodNotAllowedException "MethodNotAllowedException"
// The request uses an HTTP method which is not allowed for the specified resource.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// The caller has exceeded throttling limits.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// An internal error occurred while processing the request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/Tag
func (c *ResourceGroups) Tag(input *TagInput) (*TagOutput, error) {
req, out := c.TagRequest(input)
return out, req.Send()
}
// TagWithContext is the same as Tag with the addition of
// the ability to pass a context and additional request options.
//
// See Tag 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 *ResourceGroups) TagWithContext(ctx aws.Context, input *TagInput, opts ...request.Option) (*TagOutput, error) {
req, out := c.TagRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opUntag = "Untag"
// UntagRequest generates a "aws/request.Request" representing the
// client's request for the Untag operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// 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 Untag for more information on using the Untag
// 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 UntagRequest method.
// req, resp := client.UntagRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/Untag
func (c *ResourceGroups) UntagRequest(input *UntagInput) (req *request.Request, output *UntagOutput) {
op := &request.Operation{
Name: opUntag,
HTTPMethod: "PATCH",
HTTPPath: "/resources/{Arn}/tags",
}
if input == nil {
input = &UntagInput{}
}
output = &UntagOutput{}
req = c.newRequest(op, input, output)
return
}
// Untag API operation for AWS Resource Groups.
//
// Deletes specified tags from a specified resource.
//
// 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 Resource Groups's
// API operation Untag for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// The request does not comply with validation rules that are defined for the
// request parameters.
//
// * ErrCodeForbiddenException "ForbiddenException"
// The caller is not authorized to make the request.
//
// * ErrCodeNotFoundException "NotFoundException"
// One or more resources specified in the request do not exist.
//
// * ErrCodeMethodNotAllowedException "MethodNotAllowedException"
// The request uses an HTTP method which is not allowed for the specified resource.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// The caller has exceeded throttling limits.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// An internal error occurred while processing the request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/Untag
func (c *ResourceGroups) Untag(input *UntagInput) (*UntagOutput, error) {
req, out := c.UntagRequest(input)
return out, req.Send()
}
// UntagWithContext is the same as Untag with the addition of
// the ability to pass a context and additional request options.
//
// See Untag 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 *ResourceGroups) UntagWithContext(ctx aws.Context, input *UntagInput, opts ...request.Option) (*UntagOutput, error) {
req, out := c.UntagRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opUpdateGroup = "UpdateGroup"
// UpdateGroupRequest generates a "aws/request.Request" representing the
// client's request for the UpdateGroup operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// 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 UpdateGroup for more information on using the UpdateGroup
// 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 UpdateGroupRequest method.
// req, resp := client.UpdateGroupRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/UpdateGroup
func (c *ResourceGroups) UpdateGroupRequest(input *UpdateGroupInput) (req *request.Request, output *UpdateGroupOutput) {
op := &request.Operation{
Name: opUpdateGroup,
HTTPMethod: "PUT",
HTTPPath: "/groups/{GroupName}",
}
if input == nil {
input = &UpdateGroupInput{}
}
output = &UpdateGroupOutput{}
req = c.newRequest(op, input, output)
return
}
// UpdateGroup API operation for AWS Resource Groups.
//
// Updates an existing group with a new or changed description. You cannot update
// the name of a resource group.
//
// 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 Resource Groups's
// API operation UpdateGroup for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// The request does not comply with validation rules that are defined for the
// request parameters.
//
// * ErrCodeForbiddenException "ForbiddenException"
// The caller is not authorized to make the request.
//
// * ErrCodeNotFoundException "NotFoundException"
// One or more resources specified in the request do not exist.
//
// * ErrCodeMethodNotAllowedException "MethodNotAllowedException"
// The request uses an HTTP method which is not allowed for the specified resource.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// The caller has exceeded throttling limits.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// An internal error occurred while processing the request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/UpdateGroup
func (c *ResourceGroups) UpdateGroup(input *UpdateGroupInput) (*UpdateGroupOutput, error) {
req, out := c.UpdateGroupRequest(input)
return out, req.Send()
}
// UpdateGroupWithContext is the same as UpdateGroup with the addition of
// the ability to pass a context and additional request options.
//
// See UpdateGroup 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 *ResourceGroups) UpdateGroupWithContext(ctx aws.Context, input *UpdateGroupInput, opts ...request.Option) (*UpdateGroupOutput, error) {
req, out := c.UpdateGroupRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opUpdateGroupQuery = "UpdateGroupQuery"
// UpdateGroupQueryRequest generates a "aws/request.Request" representing the
// client's request for the UpdateGroupQuery operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// 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 UpdateGroupQuery for more information on using the UpdateGroupQuery
// 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 UpdateGroupQueryRequest method.
// req, resp := client.UpdateGroupQueryRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/UpdateGroupQuery
func (c *ResourceGroups) UpdateGroupQueryRequest(input *UpdateGroupQueryInput) (req *request.Request, output *UpdateGroupQueryOutput) {
op := &request.Operation{
Name: opUpdateGroupQuery,
HTTPMethod: "PUT",
HTTPPath: "/groups/{GroupName}/query",
}
if input == nil {
input = &UpdateGroupQueryInput{}
}
output = &UpdateGroupQueryOutput{}
req = c.newRequest(op, input, output)
return
}
// UpdateGroupQuery API operation for AWS Resource Groups.
//
// Updates the resource query of a group.
//
// 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 Resource Groups's
// API operation UpdateGroupQuery for usage and error information.
//
// Returned Error Codes:
// * ErrCodeBadRequestException "BadRequestException"
// The request does not comply with validation rules that are defined for the
// request parameters.
//
// * ErrCodeForbiddenException "ForbiddenException"
// The caller is not authorized to make the request.
//
// * ErrCodeNotFoundException "NotFoundException"
// One or more resources specified in the request do not exist.
//
// * ErrCodeMethodNotAllowedException "MethodNotAllowedException"
// The request uses an HTTP method which is not allowed for the specified resource.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// The caller has exceeded throttling limits.
//
// * ErrCodeInternalServerErrorException "InternalServerErrorException"
// An internal error occurred while processing the request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/UpdateGroupQuery
func (c *ResourceGroups) UpdateGroupQuery(input *UpdateGroupQueryInput) (*UpdateGroupQueryOutput, error) {
req, out := c.UpdateGroupQueryRequest(input)
return out, req.Send()
}
// UpdateGroupQueryWithContext is the same as UpdateGroupQuery with the addition of
// the ability to pass a context and additional request options.
//
// See UpdateGroupQuery 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 *ResourceGroups) UpdateGroupQueryWithContext(ctx aws.Context, input *UpdateGroupQueryInput, opts ...request.Option) (*UpdateGroupQueryOutput, error) {
req, out := c.UpdateGroupQueryRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
type CreateGroupInput struct {
_ struct{} `type:"structure"`
// The description of the resource group. Descriptions can have a maximum of
// 511 characters, including letters, numbers, hyphens, underscores, punctuation,
// and spaces.
Description *string `type:"string"`
// The name of the group, which is the identifier of the group in other operations.
// A resource group name cannot be updated after it is created. A resource group
// name can have a maximum of 127 characters, including letters, numbers, hyphens,
// dots, and underscores. The name cannot start with AWS or aws; these are reserved.
// A resource group name must be unique within your account.
//
// Name is a required field
Name *string `min:"1" type:"string" required:"true"`
// The resource query that determines which AWS resources are members of this
// group.
//
// ResourceQuery is a required field
ResourceQuery *ResourceQuery `type:"structure" required:"true"`
// The tags to add to the group. A tag is a string-to-string map of key-value
// pairs. Tag keys can have a maximum character length of 127 characters, and
// tag values can have a maximum length of 255 characters.
Tags map[string]*string `type:"map"`
}
// String returns the string representation
func (s CreateGroupInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateGroupInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *CreateGroupInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "CreateGroupInput"}
if s.Name == nil {
invalidParams.Add(request.NewErrParamRequired("Name"))
}
if s.Name != nil && len(*s.Name) < 1 {
invalidParams.Add(request.NewErrParamMinLen("Name", 1))
}
if s.ResourceQuery == nil {
invalidParams.Add(request.NewErrParamRequired("ResourceQuery"))
}
if s.ResourceQuery != nil {
if err := s.ResourceQuery.Validate(); err != nil {
invalidParams.AddNested("ResourceQuery", err.(request.ErrInvalidParams))
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDescription sets the Description field's value.
func (s *CreateGroupInput) SetDescription(v string) *CreateGroupInput {
s.Description = &v
return s
}
// SetName sets the Name field's value.
func (s *CreateGroupInput) SetName(v string) *CreateGroupInput {
s.Name = &v
return s
}
// SetResourceQuery sets the ResourceQuery field's value.
func (s *CreateGroupInput) SetResourceQuery(v *ResourceQuery) *CreateGroupInput {
s.ResourceQuery = v
return s
}
// SetTags sets the Tags field's value.
func (s *CreateGroupInput) SetTags(v map[string]*string) *CreateGroupInput {
s.Tags = v
return s
}
type CreateGroupOutput struct {
_ struct{} `type:"structure"`
// A full description of the resource group after it is created.
Group *Group `type:"structure"`
// The resource query associated with the group.
ResourceQuery *ResourceQuery `type:"structure"`
// The tags associated with the group.
Tags map[string]*string `type:"map"`
}
// String returns the string representation
func (s CreateGroupOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateGroupOutput) GoString() string {
return s.String()
}
// SetGroup sets the Group field's value.
func (s *CreateGroupOutput) SetGroup(v *Group) *CreateGroupOutput {
s.Group = v
return s
}
// SetResourceQuery sets the ResourceQuery field's value.
func (s *CreateGroupOutput) SetResourceQuery(v *ResourceQuery) *CreateGroupOutput {
s.ResourceQuery = v
return s
}
// SetTags sets the Tags field's value.
func (s *CreateGroupOutput) SetTags(v map[string]*string) *CreateGroupOutput {
s.Tags = v
return s
}
type DeleteGroupInput struct {
_ struct{} `type:"structure"`
// The name of the resource group to delete.
//
// GroupName is a required field
GroupName *string `location:"uri" locationName:"GroupName" min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s DeleteGroupInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteGroupInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteGroupInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DeleteGroupInput"}
if s.GroupName == nil {
invalidParams.Add(request.NewErrParamRequired("GroupName"))
}
if s.GroupName != nil && len(*s.GroupName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("GroupName", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetGroupName sets the GroupName field's value.
func (s *DeleteGroupInput) SetGroupName(v string) *DeleteGroupInput {
s.GroupName = &v
return s
}
type DeleteGroupOutput struct {
_ struct{} `type:"structure"`
// A full description of the deleted resource group.
Group *Group `type:"structure"`
}
// String returns the string representation
func (s DeleteGroupOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteGroupOutput) GoString() string {
return s.String()
}
// SetGroup sets the Group field's value.
func (s *DeleteGroupOutput) SetGroup(v *Group) *DeleteGroupOutput {
s.Group = v
return s
}
type GetGroupInput struct {
_ struct{} `type:"structure"`
// The name of the resource group.
//
// GroupName is a required field
GroupName *string `location:"uri" locationName:"GroupName" min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s GetGroupInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetGroupInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *GetGroupInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "GetGroupInput"}
if s.GroupName == nil {
invalidParams.Add(request.NewErrParamRequired("GroupName"))
}
if s.GroupName != nil && len(*s.GroupName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("GroupName", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetGroupName sets the GroupName field's value.
func (s *GetGroupInput) SetGroupName(v string) *GetGroupInput {
s.GroupName = &v
return s
}
type GetGroupOutput struct {
_ struct{} `type:"structure"`
// A full description of the resource group.
Group *Group `type:"structure"`
}
// String returns the string representation
func (s GetGroupOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetGroupOutput) GoString() string {
return s.String()
}
// SetGroup sets the Group field's value.
func (s *GetGroupOutput) SetGroup(v *Group) *GetGroupOutput {
s.Group = v
return s
}
type GetGroupQueryInput struct {
_ struct{} `type:"structure"`
// The name of the resource group.
//
// GroupName is a required field
GroupName *string `location:"uri" locationName:"GroupName" min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s GetGroupQueryInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetGroupQueryInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *GetGroupQueryInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "GetGroupQueryInput"}
if s.GroupName == nil {
invalidParams.Add(request.NewErrParamRequired("GroupName"))
}
if s.GroupName != nil && len(*s.GroupName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("GroupName", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetGroupName sets the GroupName field's value.
func (s *GetGroupQueryInput) SetGroupName(v string) *GetGroupQueryInput {
s.GroupName = &v
return s
}
type GetGroupQueryOutput struct {
_ struct{} `type:"structure"`
// The resource query associated with the specified group.
GroupQuery *GroupQuery `type:"structure"`
}
// String returns the string representation
func (s GetGroupQueryOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetGroupQueryOutput) GoString() string {
return s.String()
}
// SetGroupQuery sets the GroupQuery field's value.
func (s *GetGroupQueryOutput) SetGroupQuery(v *GroupQuery) *GetGroupQueryOutput {
s.GroupQuery = v
return s
}
type GetTagsInput struct {
_ struct{} `type:"structure"`
// The ARN of the resource for which you want a list of tags. The resource must
// exist within the account you are using.
//
// Arn is a required field
Arn *string `location:"uri" locationName:"Arn" type:"string" required:"true"`
}
// String returns the string representation
func (s GetTagsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetTagsInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *GetTagsInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "GetTagsInput"}
if s.Arn == nil {
invalidParams.Add(request.NewErrParamRequired("Arn"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetArn sets the Arn field's value.
func (s *GetTagsInput) SetArn(v string) *GetTagsInput {
s.Arn = &v
return s
}
type GetTagsOutput struct {
_ struct{} `type:"structure"`
// The ARN of the tagged resource.
Arn *string `type:"string"`
// The tags associated with the specified resource.
Tags map[string]*string `type:"map"`
}
// String returns the string representation
func (s GetTagsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetTagsOutput) GoString() string {
return s.String()
}
// SetArn sets the Arn field's value.
func (s *GetTagsOutput) SetArn(v string) *GetTagsOutput {
s.Arn = &v
return s
}
// SetTags sets the Tags field's value.
func (s *GetTagsOutput) SetTags(v map[string]*string) *GetTagsOutput {
s.Tags = v
return s
}
// A resource group.
type Group struct {
_ struct{} `type:"structure"`
// The description of the resource group.
Description *string `type:"string"`
// The ARN of a resource group.
//
// GroupArn is a required field
GroupArn *string `type:"string" required:"true"`
// The name of a resource group.
//
// Name is a required field
Name *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s Group) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s Group) GoString() string {
return s.String()
}
// SetDescription sets the Description field's value.
func (s *Group) SetDescription(v string) *Group {
s.Description = &v
return s
}
// SetGroupArn sets the GroupArn field's value.
func (s *Group) SetGroupArn(v string) *Group {
s.GroupArn = &v
return s
}
// SetName sets the Name field's value.
func (s *Group) SetName(v string) *Group {
s.Name = &v
return s
}
// The underlying resource query of a resource group. Resources that match query
// results are part of the group.
type GroupQuery struct {
_ struct{} `type:"structure"`
// The name of a resource group that is associated with a specific resource
// query.
//
// GroupName is a required field
GroupName *string `min:"1" type:"string" required:"true"`
// The resource query which determines which AWS resources are members of the
// associated resource group.
//
// ResourceQuery is a required field
ResourceQuery *ResourceQuery `type:"structure" required:"true"`
}
// String returns the string representation
func (s GroupQuery) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GroupQuery) GoString() string {
return s.String()
}
// SetGroupName sets the GroupName field's value.
func (s *GroupQuery) SetGroupName(v string) *GroupQuery {
s.GroupName = &v
return s
}
// SetResourceQuery sets the ResourceQuery field's value.
func (s *GroupQuery) SetResourceQuery(v *ResourceQuery) *GroupQuery {
s.ResourceQuery = v
return s
}
type ListGroupResourcesInput struct {
_ struct{} `type:"structure"`
// The name of the resource group.
//
// GroupName is a required field
GroupName *string `location:"uri" locationName:"GroupName" min:"1" type:"string" required:"true"`
// The maximum number of group member ARNs that are returned in a single call
// by ListGroupResources, in paginated output. By default, this number is 50.
MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"`
// The NextToken value that is returned in a paginated ListGroupResources request.
// To get the next page of results, run the call again, add the NextToken parameter,
// and specify the NextToken value.
NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
}
// String returns the string representation
func (s ListGroupResourcesInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListGroupResourcesInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ListGroupResourcesInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ListGroupResourcesInput"}
if s.GroupName == nil {
invalidParams.Add(request.NewErrParamRequired("GroupName"))
}
if s.GroupName != nil && len(*s.GroupName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("GroupName", 1))
}
if s.MaxResults != nil && *s.MaxResults < 1 {
invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetGroupName sets the GroupName field's value.
func (s *ListGroupResourcesInput) SetGroupName(v string) *ListGroupResourcesInput {
s.GroupName = &v
return s
}
// SetMaxResults sets the MaxResults field's value.
func (s *ListGroupResourcesInput) SetMaxResults(v int64) *ListGroupResourcesInput {
s.MaxResults = &v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *ListGroupResourcesInput) SetNextToken(v string) *ListGroupResourcesInput {
s.NextToken = &v
return s
}
type ListGroupResourcesOutput struct {
_ struct{} `type:"structure"`
// The NextToken value to include in a subsequent ListGroupResources request,
// to get more results.
NextToken *string `type:"string"`
// The ARNs and resource types of resources that are members of the group that
// you specified.
ResourceIdentifiers []*ResourceIdentifier `type:"list"`
}
// String returns the string representation
func (s ListGroupResourcesOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListGroupResourcesOutput) GoString() string {
return s.String()
}
// SetNextToken sets the NextToken field's value.
func (s *ListGroupResourcesOutput) SetNextToken(v string) *ListGroupResourcesOutput {
s.NextToken = &v
return s
}
// SetResourceIdentifiers sets the ResourceIdentifiers field's value.
func (s *ListGroupResourcesOutput) SetResourceIdentifiers(v []*ResourceIdentifier) *ListGroupResourcesOutput {
s.ResourceIdentifiers = v
return s
}
type ListGroupsInput struct {
_ struct{} `type:"structure"`
// The maximum number of resource group results that are returned by ListGroups
// in paginated output. By default, this number is 50.
MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"`
// The NextToken value that is returned in a paginated ListGroups request. To
// get the next page of results, run the call again, add the NextToken parameter,
// and specify the NextToken value.
NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
}
// String returns the string representation
func (s ListGroupsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListGroupsInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ListGroupsInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ListGroupsInput"}
if s.MaxResults != nil && *s.MaxResults < 1 {
invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetMaxResults sets the MaxResults field's value.
func (s *ListGroupsInput) SetMaxResults(v int64) *ListGroupsInput {
s.MaxResults = &v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *ListGroupsInput) SetNextToken(v string) *ListGroupsInput {
s.NextToken = &v
return s
}
type ListGroupsOutput struct {
_ struct{} `type:"structure"`
// A list of resource groups.
Groups []*Group `type:"list"`
// The NextToken value to include in a subsequent ListGroups request, to get
// more results.
NextToken *string `type:"string"`
}
// String returns the string representation
func (s ListGroupsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListGroupsOutput) GoString() string {
return s.String()
}
// SetGroups sets the Groups field's value.
func (s *ListGroupsOutput) SetGroups(v []*Group) *ListGroupsOutput {
s.Groups = v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *ListGroupsOutput) SetNextToken(v string) *ListGroupsOutput {
s.NextToken = &v
return s
}
// The ARN of a resource, and its resource type.
type ResourceIdentifier struct {
_ struct{} `type:"structure"`
// The ARN of a resource.
ResourceArn *string `type:"string"`
// The resource type of a resource, such as AWS::EC2::Instance.
ResourceType *string `type:"string"`
}
// String returns the string representation
func (s ResourceIdentifier) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ResourceIdentifier) GoString() string {
return s.String()
}
// SetResourceArn sets the ResourceArn field's value.
func (s *ResourceIdentifier) SetResourceArn(v string) *ResourceIdentifier {
s.ResourceArn = &v
return s
}
// SetResourceType sets the ResourceType field's value.
func (s *ResourceIdentifier) SetResourceType(v string) *ResourceIdentifier {
s.ResourceType = &v
return s
}
// The query that is used to define a resource group or a search for resources.
type ResourceQuery struct {
_ struct{} `type:"structure"`
// The query that defines a group or a search.
//
// Query is a required field
Query *string `type:"string" required:"true"`
// The type of the query. The valid value in this release is TAG_FILTERS_1_0.
//
// TAG_FILTERS_1_0: A JSON syntax that lets you specify a collection of simple
// tag filters for resource types and tags, as supported by the AWS Tagging
// API GetResources operation. When more than one element is present, only resources
// that match all filters are part of the result. If a filter specifies more
// than one value for a key, a resource matches the filter if its tag value
// matches any of the specified values.
//
// Type is a required field
Type *string `type:"string" required:"true" enum:"QueryType"`
}
// String returns the string representation
func (s ResourceQuery) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ResourceQuery) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ResourceQuery) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ResourceQuery"}
if s.Query == nil {
invalidParams.Add(request.NewErrParamRequired("Query"))
}
if s.Type == nil {
invalidParams.Add(request.NewErrParamRequired("Type"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetQuery sets the Query field's value.
func (s *ResourceQuery) SetQuery(v string) *ResourceQuery {
s.Query = &v
return s
}
// SetType sets the Type field's value.
func (s *ResourceQuery) SetType(v string) *ResourceQuery {
s.Type = &v
return s
}
type SearchResourcesInput struct {
_ struct{} `type:"structure"`
// The maximum number of group member ARNs returned by SearchResources in paginated
// output. By default, this number is 50.
MaxResults *int64 `min:"1" type:"integer"`
// The NextToken value that is returned in a paginated SearchResources request.
// To get the next page of results, run the call again, add the NextToken parameter,
// and specify the NextToken value.
NextToken *string `type:"string"`
// The search query, using the same formats that are supported for resource
// group definition.
//
// ResourceQuery is a required field
ResourceQuery *ResourceQuery `type:"structure" required:"true"`
}
// String returns the string representation
func (s SearchResourcesInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s SearchResourcesInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *SearchResourcesInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "SearchResourcesInput"}
if s.MaxResults != nil && *s.MaxResults < 1 {
invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
}
if s.ResourceQuery == nil {
invalidParams.Add(request.NewErrParamRequired("ResourceQuery"))
}
if s.ResourceQuery != nil {
if err := s.ResourceQuery.Validate(); err != nil {
invalidParams.AddNested("ResourceQuery", err.(request.ErrInvalidParams))
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetMaxResults sets the MaxResults field's value.
func (s *SearchResourcesInput) SetMaxResults(v int64) *SearchResourcesInput {
s.MaxResults = &v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *SearchResourcesInput) SetNextToken(v string) *SearchResourcesInput {
s.NextToken = &v
return s
}
// SetResourceQuery sets the ResourceQuery field's value.
func (s *SearchResourcesInput) SetResourceQuery(v *ResourceQuery) *SearchResourcesInput {
s.ResourceQuery = v
return s
}
type SearchResourcesOutput struct {
_ struct{} `type:"structure"`
// The NextToken value to include in a subsequent SearchResources request, to
// get more results.
NextToken *string `type:"string"`
// The ARNs and resource types of resources that are members of the group that
// you specified.
ResourceIdentifiers []*ResourceIdentifier `type:"list"`
}
// String returns the string representation
func (s SearchResourcesOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s SearchResourcesOutput) GoString() string {
return s.String()
}
// SetNextToken sets the NextToken field's value.
func (s *SearchResourcesOutput) SetNextToken(v string) *SearchResourcesOutput {
s.NextToken = &v
return s
}
// SetResourceIdentifiers sets the ResourceIdentifiers field's value.
func (s *SearchResourcesOutput) SetResourceIdentifiers(v []*ResourceIdentifier) *SearchResourcesOutput {
s.ResourceIdentifiers = v
return s
}
type TagInput struct {
_ struct{} `type:"structure"`
// The ARN of the resource to which to add tags.
//
// Arn is a required field
Arn *string `location:"uri" locationName:"Arn" type:"string" required:"true"`
// The tags to add to the specified resource. A tag is a string-to-string map
// of key-value pairs. Tag keys can have a maximum character length of 127 characters,
// and tag values can have a maximum length of 255 characters.
//
// Tags is a required field
Tags map[string]*string `type:"map" required:"true"`
}
// String returns the string representation
func (s TagInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s TagInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *TagInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "TagInput"}
if s.Arn == nil {
invalidParams.Add(request.NewErrParamRequired("Arn"))
}
if s.Tags == nil {
invalidParams.Add(request.NewErrParamRequired("Tags"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetArn sets the Arn field's value.
func (s *TagInput) SetArn(v string) *TagInput {
s.Arn = &v
return s
}
// SetTags sets the Tags field's value.
func (s *TagInput) SetTags(v map[string]*string) *TagInput {
s.Tags = v
return s
}
type TagOutput struct {
_ struct{} `type:"structure"`
// The ARN of the tagged resource.
Arn *string `type:"string"`
// The tags that have been added to the specified resource.
Tags map[string]*string `type:"map"`
}
// String returns the string representation
func (s TagOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s TagOutput) GoString() string {
return s.String()
}
// SetArn sets the Arn field's value.
func (s *TagOutput) SetArn(v string) *TagOutput {
s.Arn = &v
return s
}
// SetTags sets the Tags field's value.
func (s *TagOutput) SetTags(v map[string]*string) *TagOutput {
s.Tags = v
return s
}
type UntagInput struct {
_ struct{} `type:"structure"`
// The ARN of the resource from which to remove tags.
//
// Arn is a required field
Arn *string `location:"uri" locationName:"Arn" type:"string" required:"true"`
// The keys of the tags to be removed.
//
// Keys is a required field
Keys []*string `type:"list" required:"true"`
}
// String returns the string representation
func (s UntagInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UntagInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *UntagInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "UntagInput"}
if s.Arn == nil {
invalidParams.Add(request.NewErrParamRequired("Arn"))
}
if s.Keys == nil {
invalidParams.Add(request.NewErrParamRequired("Keys"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetArn sets the Arn field's value.
func (s *UntagInput) SetArn(v string) *UntagInput {
s.Arn = &v
return s
}
// SetKeys sets the Keys field's value.
func (s *UntagInput) SetKeys(v []*string) *UntagInput {
s.Keys = v
return s
}
type UntagOutput struct {
_ struct{} `type:"structure"`
// The ARN of the resource from which tags have been removed.
Arn *string `type:"string"`
// The keys of tags that have been removed.
Keys []*string `type:"list"`
}
// String returns the string representation
func (s UntagOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UntagOutput) GoString() string {
return s.String()
}
// SetArn sets the Arn field's value.
func (s *UntagOutput) SetArn(v string) *UntagOutput {
s.Arn = &v
return s
}
// SetKeys sets the Keys field's value.
func (s *UntagOutput) SetKeys(v []*string) *UntagOutput {
s.Keys = v
return s
}
type UpdateGroupInput struct {
_ struct{} `type:"structure"`
// The description of the resource group. Descriptions can have a maximum of
// 511 characters, including letters, numbers, hyphens, underscores, punctuation,
// and spaces.
Description *string `type:"string"`
// The name of the resource group for which you want to update its description.
//
// GroupName is a required field
GroupName *string `location:"uri" locationName:"GroupName" min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s UpdateGroupInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UpdateGroupInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *UpdateGroupInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "UpdateGroupInput"}
if s.GroupName == nil {
invalidParams.Add(request.NewErrParamRequired("GroupName"))
}
if s.GroupName != nil && len(*s.GroupName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("GroupName", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDescription sets the Description field's value.
func (s *UpdateGroupInput) SetDescription(v string) *UpdateGroupInput {
s.Description = &v
return s
}
// SetGroupName sets the GroupName field's value.
func (s *UpdateGroupInput) SetGroupName(v string) *UpdateGroupInput {
s.GroupName = &v
return s
}
type UpdateGroupOutput struct {
_ struct{} `type:"structure"`
// The full description of the resource group after it has been updated.
Group *Group `type:"structure"`
}
// String returns the string representation
func (s UpdateGroupOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UpdateGroupOutput) GoString() string {
return s.String()
}
// SetGroup sets the Group field's value.
func (s *UpdateGroupOutput) SetGroup(v *Group) *UpdateGroupOutput {
s.Group = v
return s
}
type UpdateGroupQueryInput struct {
_ struct{} `type:"structure"`
// The name of the resource group for which you want to edit the query.
//
// GroupName is a required field
GroupName *string `location:"uri" locationName:"GroupName" min:"1" type:"string" required:"true"`
// The resource query that determines which AWS resources are members of the
// resource group.
//
// ResourceQuery is a required field
ResourceQuery *ResourceQuery `type:"structure" required:"true"`
}
// String returns the string representation
func (s UpdateGroupQueryInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UpdateGroupQueryInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *UpdateGroupQueryInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "UpdateGroupQueryInput"}
if s.GroupName == nil {
invalidParams.Add(request.NewErrParamRequired("GroupName"))
}
if s.GroupName != nil && len(*s.GroupName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("GroupName", 1))
}
if s.ResourceQuery == nil {
invalidParams.Add(request.NewErrParamRequired("ResourceQuery"))
}
if s.ResourceQuery != nil {
if err := s.ResourceQuery.Validate(); err != nil {
invalidParams.AddNested("ResourceQuery", err.(request.ErrInvalidParams))
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetGroupName sets the GroupName field's value.
func (s *UpdateGroupQueryInput) SetGroupName(v string) *UpdateGroupQueryInput {
s.GroupName = &v
return s
}
// SetResourceQuery sets the ResourceQuery field's value.
func (s *UpdateGroupQueryInput) SetResourceQuery(v *ResourceQuery) *UpdateGroupQueryInput {
s.ResourceQuery = v
return s
}
type UpdateGroupQueryOutput struct {
_ struct{} `type:"structure"`
// The resource query associated with the resource group after the update.
GroupQuery *GroupQuery `type:"structure"`
}
// String returns the string representation
func (s UpdateGroupQueryOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UpdateGroupQueryOutput) GoString() string {
return s.String()
}
// SetGroupQuery sets the GroupQuery field's value.
func (s *UpdateGroupQueryOutput) SetGroupQuery(v *GroupQuery) *UpdateGroupQueryOutput {
s.GroupQuery = v
return s
}
const (
// QueryTypeTagFilters10 is a QueryType enum value
QueryTypeTagFilters10 = "TAG_FILTERS_1_0"
)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors/aws-sdk-go.git
git@gitee.com:mirrors/aws-sdk-go.git
mirrors
aws-sdk-go
aws-sdk-go
v1.14.1

搜索帮助

344bd9b3 5694891 D2dac590 5694891