1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3package resourcegroups 4 5import ( 6 "fmt" 7 8 "github.com/aws/aws-sdk-go/aws" 9 "github.com/aws/aws-sdk-go/aws/awsutil" 10 "github.com/aws/aws-sdk-go/aws/request" 11 "github.com/aws/aws-sdk-go/private/protocol" 12 "github.com/aws/aws-sdk-go/private/protocol/restjson" 13) 14 15const opCreateGroup = "CreateGroup" 16 17// CreateGroupRequest generates a "aws/request.Request" representing the 18// client's request for the CreateGroup operation. The "output" return 19// value will be populated with the request's response once the request completes 20// successfully. 21// 22// Use "Send" method on the returned Request to send the API call to the service. 23// the "output" return value is not valid until after Send returns without error. 24// 25// See CreateGroup for more information on using the CreateGroup 26// API call, and error handling. 27// 28// This method is useful when you want to inject custom logic or configuration 29// into the SDK's request lifecycle. Such as custom headers, or retry logic. 30// 31// 32// // Example sending a request using the CreateGroupRequest method. 33// req, resp := client.CreateGroupRequest(params) 34// 35// err := req.Send() 36// if err == nil { // resp is now filled 37// fmt.Println(resp) 38// } 39// 40// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/CreateGroup 41func (c *ResourceGroups) CreateGroupRequest(input *CreateGroupInput) (req *request.Request, output *CreateGroupOutput) { 42 op := &request.Operation{ 43 Name: opCreateGroup, 44 HTTPMethod: "POST", 45 HTTPPath: "/groups", 46 } 47 48 if input == nil { 49 input = &CreateGroupInput{} 50 } 51 52 output = &CreateGroupOutput{} 53 req = c.newRequest(op, input, output) 54 return 55} 56 57// CreateGroup API operation for AWS Resource Groups. 58// 59// Creates a resource group with the specified name and description. You can 60// optionally include a resource query, or a service configuration. For more 61// information about constructing a resource query, see Create a tag-based group 62// in Resource Groups (https://docs.aws.amazon.com/ARG/latest/userguide/gettingstarted-query.html#gettingstarted-query-cli-tag). 63// For more information about service configurations, see Service configurations 64// for resource groups (https://docs.aws.amazon.com/ARG/latest/APIReference/about-slg.html). 65// 66// Minimum permissions 67// 68// To run this command, you must have the following permissions: 69// 70// * resource-groups:CreateGroup 71// 72// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 73// with awserr.Error's Code and Message methods to get detailed information about 74// the error. 75// 76// See the AWS API reference guide for AWS Resource Groups's 77// API operation CreateGroup for usage and error information. 78// 79// Returned Error Types: 80// * BadRequestException 81// The request includes one or more parameters that violate validation rules. 82// 83// * ForbiddenException 84// The caller isn't authorized to make the request. Check permissions. 85// 86// * MethodNotAllowedException 87// The request uses an HTTP method that isn't allowed for the specified resource. 88// 89// * TooManyRequestsException 90// You've exceeded throttling limits by making too many requests in a period 91// of time. 92// 93// * InternalServerErrorException 94// An internal error occurred while processing the request. Try again later. 95// 96// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/CreateGroup 97func (c *ResourceGroups) CreateGroup(input *CreateGroupInput) (*CreateGroupOutput, error) { 98 req, out := c.CreateGroupRequest(input) 99 return out, req.Send() 100} 101 102// CreateGroupWithContext is the same as CreateGroup with the addition of 103// the ability to pass a context and additional request options. 104// 105// See CreateGroup for details on how to use this API operation. 106// 107// The context must be non-nil and will be used for request cancellation. If 108// the context is nil a panic will occur. In the future the SDK may create 109// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 110// for more information on using Contexts. 111func (c *ResourceGroups) CreateGroupWithContext(ctx aws.Context, input *CreateGroupInput, opts ...request.Option) (*CreateGroupOutput, error) { 112 req, out := c.CreateGroupRequest(input) 113 req.SetContext(ctx) 114 req.ApplyOptions(opts...) 115 return out, req.Send() 116} 117 118const opDeleteGroup = "DeleteGroup" 119 120// DeleteGroupRequest generates a "aws/request.Request" representing the 121// client's request for the DeleteGroup operation. The "output" return 122// value will be populated with the request's response once the request completes 123// successfully. 124// 125// Use "Send" method on the returned Request to send the API call to the service. 126// the "output" return value is not valid until after Send returns without error. 127// 128// See DeleteGroup for more information on using the DeleteGroup 129// API call, and error handling. 130// 131// This method is useful when you want to inject custom logic or configuration 132// into the SDK's request lifecycle. Such as custom headers, or retry logic. 133// 134// 135// // Example sending a request using the DeleteGroupRequest method. 136// req, resp := client.DeleteGroupRequest(params) 137// 138// err := req.Send() 139// if err == nil { // resp is now filled 140// fmt.Println(resp) 141// } 142// 143// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/DeleteGroup 144func (c *ResourceGroups) DeleteGroupRequest(input *DeleteGroupInput) (req *request.Request, output *DeleteGroupOutput) { 145 op := &request.Operation{ 146 Name: opDeleteGroup, 147 HTTPMethod: "POST", 148 HTTPPath: "/delete-group", 149 } 150 151 if input == nil { 152 input = &DeleteGroupInput{} 153 } 154 155 output = &DeleteGroupOutput{} 156 req = c.newRequest(op, input, output) 157 return 158} 159 160// DeleteGroup API operation for AWS Resource Groups. 161// 162// Deletes the specified resource group. Deleting a resource group does not 163// delete any resources that are members of the group; it only deletes the group 164// structure. 165// 166// Minimum permissions 167// 168// To run this command, you must have the following permissions: 169// 170// * resource-groups:DeleteGroup 171// 172// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 173// with awserr.Error's Code and Message methods to get detailed information about 174// the error. 175// 176// See the AWS API reference guide for AWS Resource Groups's 177// API operation DeleteGroup for usage and error information. 178// 179// Returned Error Types: 180// * BadRequestException 181// The request includes one or more parameters that violate validation rules. 182// 183// * ForbiddenException 184// The caller isn't authorized to make the request. Check permissions. 185// 186// * NotFoundException 187// One or more of the specified resources don't exist. 188// 189// * MethodNotAllowedException 190// The request uses an HTTP method that isn't allowed for the specified resource. 191// 192// * TooManyRequestsException 193// You've exceeded throttling limits by making too many requests in a period 194// of time. 195// 196// * InternalServerErrorException 197// An internal error occurred while processing the request. Try again later. 198// 199// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/DeleteGroup 200func (c *ResourceGroups) DeleteGroup(input *DeleteGroupInput) (*DeleteGroupOutput, error) { 201 req, out := c.DeleteGroupRequest(input) 202 return out, req.Send() 203} 204 205// DeleteGroupWithContext is the same as DeleteGroup with the addition of 206// the ability to pass a context and additional request options. 207// 208// See DeleteGroup for details on how to use this API operation. 209// 210// The context must be non-nil and will be used for request cancellation. If 211// the context is nil a panic will occur. In the future the SDK may create 212// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 213// for more information on using Contexts. 214func (c *ResourceGroups) DeleteGroupWithContext(ctx aws.Context, input *DeleteGroupInput, opts ...request.Option) (*DeleteGroupOutput, error) { 215 req, out := c.DeleteGroupRequest(input) 216 req.SetContext(ctx) 217 req.ApplyOptions(opts...) 218 return out, req.Send() 219} 220 221const opGetGroup = "GetGroup" 222 223// GetGroupRequest generates a "aws/request.Request" representing the 224// client's request for the GetGroup operation. The "output" return 225// value will be populated with the request's response once the request completes 226// successfully. 227// 228// Use "Send" method on the returned Request to send the API call to the service. 229// the "output" return value is not valid until after Send returns without error. 230// 231// See GetGroup for more information on using the GetGroup 232// API call, and error handling. 233// 234// This method is useful when you want to inject custom logic or configuration 235// into the SDK's request lifecycle. Such as custom headers, or retry logic. 236// 237// 238// // Example sending a request using the GetGroupRequest method. 239// req, resp := client.GetGroupRequest(params) 240// 241// err := req.Send() 242// if err == nil { // resp is now filled 243// fmt.Println(resp) 244// } 245// 246// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/GetGroup 247func (c *ResourceGroups) GetGroupRequest(input *GetGroupInput) (req *request.Request, output *GetGroupOutput) { 248 op := &request.Operation{ 249 Name: opGetGroup, 250 HTTPMethod: "POST", 251 HTTPPath: "/get-group", 252 } 253 254 if input == nil { 255 input = &GetGroupInput{} 256 } 257 258 output = &GetGroupOutput{} 259 req = c.newRequest(op, input, output) 260 return 261} 262 263// GetGroup API operation for AWS Resource Groups. 264// 265// Returns information about a specified resource group. 266// 267// Minimum permissions 268// 269// To run this command, you must have the following permissions: 270// 271// * resource-groups:GetGroup 272// 273// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 274// with awserr.Error's Code and Message methods to get detailed information about 275// the error. 276// 277// See the AWS API reference guide for AWS Resource Groups's 278// API operation GetGroup for usage and error information. 279// 280// Returned Error Types: 281// * BadRequestException 282// The request includes one or more parameters that violate validation rules. 283// 284// * ForbiddenException 285// The caller isn't authorized to make the request. Check permissions. 286// 287// * NotFoundException 288// One or more of the specified resources don't exist. 289// 290// * MethodNotAllowedException 291// The request uses an HTTP method that isn't allowed for the specified resource. 292// 293// * TooManyRequestsException 294// You've exceeded throttling limits by making too many requests in a period 295// of time. 296// 297// * InternalServerErrorException 298// An internal error occurred while processing the request. Try again later. 299// 300// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/GetGroup 301func (c *ResourceGroups) GetGroup(input *GetGroupInput) (*GetGroupOutput, error) { 302 req, out := c.GetGroupRequest(input) 303 return out, req.Send() 304} 305 306// GetGroupWithContext is the same as GetGroup with the addition of 307// the ability to pass a context and additional request options. 308// 309// See GetGroup for details on how to use this API operation. 310// 311// The context must be non-nil and will be used for request cancellation. If 312// the context is nil a panic will occur. In the future the SDK may create 313// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 314// for more information on using Contexts. 315func (c *ResourceGroups) GetGroupWithContext(ctx aws.Context, input *GetGroupInput, opts ...request.Option) (*GetGroupOutput, error) { 316 req, out := c.GetGroupRequest(input) 317 req.SetContext(ctx) 318 req.ApplyOptions(opts...) 319 return out, req.Send() 320} 321 322const opGetGroupConfiguration = "GetGroupConfiguration" 323 324// GetGroupConfigurationRequest generates a "aws/request.Request" representing the 325// client's request for the GetGroupConfiguration operation. The "output" return 326// value will be populated with the request's response once the request completes 327// successfully. 328// 329// Use "Send" method on the returned Request to send the API call to the service. 330// the "output" return value is not valid until after Send returns without error. 331// 332// See GetGroupConfiguration for more information on using the GetGroupConfiguration 333// API call, and error handling. 334// 335// This method is useful when you want to inject custom logic or configuration 336// into the SDK's request lifecycle. Such as custom headers, or retry logic. 337// 338// 339// // Example sending a request using the GetGroupConfigurationRequest method. 340// req, resp := client.GetGroupConfigurationRequest(params) 341// 342// err := req.Send() 343// if err == nil { // resp is now filled 344// fmt.Println(resp) 345// } 346// 347// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/GetGroupConfiguration 348func (c *ResourceGroups) GetGroupConfigurationRequest(input *GetGroupConfigurationInput) (req *request.Request, output *GetGroupConfigurationOutput) { 349 op := &request.Operation{ 350 Name: opGetGroupConfiguration, 351 HTTPMethod: "POST", 352 HTTPPath: "/get-group-configuration", 353 } 354 355 if input == nil { 356 input = &GetGroupConfigurationInput{} 357 } 358 359 output = &GetGroupConfigurationOutput{} 360 req = c.newRequest(op, input, output) 361 return 362} 363 364// GetGroupConfiguration API operation for AWS Resource Groups. 365// 366// Returns the service configuration associated with the specified resource 367// group. For details about the service configuration syntax, see Service configurations 368// for resource groups (https://docs.aws.amazon.com/ARG/latest/APIReference/about-slg.html). 369// 370// Minimum permissions 371// 372// To run this command, you must have the following permissions: 373// 374// * resource-groups:GetGroupConfiguration 375// 376// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 377// with awserr.Error's Code and Message methods to get detailed information about 378// the error. 379// 380// See the AWS API reference guide for AWS Resource Groups's 381// API operation GetGroupConfiguration for usage and error information. 382// 383// Returned Error Types: 384// * BadRequestException 385// The request includes one or more parameters that violate validation rules. 386// 387// * ForbiddenException 388// The caller isn't authorized to make the request. Check permissions. 389// 390// * NotFoundException 391// One or more of the specified resources don't exist. 392// 393// * MethodNotAllowedException 394// The request uses an HTTP method that isn't allowed for the specified resource. 395// 396// * TooManyRequestsException 397// You've exceeded throttling limits by making too many requests in a period 398// of time. 399// 400// * InternalServerErrorException 401// An internal error occurred while processing the request. Try again later. 402// 403// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/GetGroupConfiguration 404func (c *ResourceGroups) GetGroupConfiguration(input *GetGroupConfigurationInput) (*GetGroupConfigurationOutput, error) { 405 req, out := c.GetGroupConfigurationRequest(input) 406 return out, req.Send() 407} 408 409// GetGroupConfigurationWithContext is the same as GetGroupConfiguration with the addition of 410// the ability to pass a context and additional request options. 411// 412// See GetGroupConfiguration for details on how to use this API operation. 413// 414// The context must be non-nil and will be used for request cancellation. If 415// the context is nil a panic will occur. In the future the SDK may create 416// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 417// for more information on using Contexts. 418func (c *ResourceGroups) GetGroupConfigurationWithContext(ctx aws.Context, input *GetGroupConfigurationInput, opts ...request.Option) (*GetGroupConfigurationOutput, error) { 419 req, out := c.GetGroupConfigurationRequest(input) 420 req.SetContext(ctx) 421 req.ApplyOptions(opts...) 422 return out, req.Send() 423} 424 425const opGetGroupQuery = "GetGroupQuery" 426 427// GetGroupQueryRequest generates a "aws/request.Request" representing the 428// client's request for the GetGroupQuery operation. The "output" return 429// value will be populated with the request's response once the request completes 430// successfully. 431// 432// Use "Send" method on the returned Request to send the API call to the service. 433// the "output" return value is not valid until after Send returns without error. 434// 435// See GetGroupQuery for more information on using the GetGroupQuery 436// API call, and error handling. 437// 438// This method is useful when you want to inject custom logic or configuration 439// into the SDK's request lifecycle. Such as custom headers, or retry logic. 440// 441// 442// // Example sending a request using the GetGroupQueryRequest method. 443// req, resp := client.GetGroupQueryRequest(params) 444// 445// err := req.Send() 446// if err == nil { // resp is now filled 447// fmt.Println(resp) 448// } 449// 450// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/GetGroupQuery 451func (c *ResourceGroups) GetGroupQueryRequest(input *GetGroupQueryInput) (req *request.Request, output *GetGroupQueryOutput) { 452 op := &request.Operation{ 453 Name: opGetGroupQuery, 454 HTTPMethod: "POST", 455 HTTPPath: "/get-group-query", 456 } 457 458 if input == nil { 459 input = &GetGroupQueryInput{} 460 } 461 462 output = &GetGroupQueryOutput{} 463 req = c.newRequest(op, input, output) 464 return 465} 466 467// GetGroupQuery API operation for AWS Resource Groups. 468// 469// Retrieves the resource query associated with the specified resource group. 470// For more information about resource queries, see Create a tag-based group 471// in Resource Groups (https://docs.aws.amazon.com/ARG/latest/userguide/gettingstarted-query.html#gettingstarted-query-cli-tag). 472// 473// Minimum permissions 474// 475// To run this command, you must have the following permissions: 476// 477// * resource-groups:GetGroupQuery 478// 479// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 480// with awserr.Error's Code and Message methods to get detailed information about 481// the error. 482// 483// See the AWS API reference guide for AWS Resource Groups's 484// API operation GetGroupQuery for usage and error information. 485// 486// Returned Error Types: 487// * BadRequestException 488// The request includes one or more parameters that violate validation rules. 489// 490// * ForbiddenException 491// The caller isn't authorized to make the request. Check permissions. 492// 493// * NotFoundException 494// One or more of the specified resources don't exist. 495// 496// * MethodNotAllowedException 497// The request uses an HTTP method that isn't allowed for the specified resource. 498// 499// * TooManyRequestsException 500// You've exceeded throttling limits by making too many requests in a period 501// of time. 502// 503// * InternalServerErrorException 504// An internal error occurred while processing the request. Try again later. 505// 506// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/GetGroupQuery 507func (c *ResourceGroups) GetGroupQuery(input *GetGroupQueryInput) (*GetGroupQueryOutput, error) { 508 req, out := c.GetGroupQueryRequest(input) 509 return out, req.Send() 510} 511 512// GetGroupQueryWithContext is the same as GetGroupQuery with the addition of 513// the ability to pass a context and additional request options. 514// 515// See GetGroupQuery for details on how to use this API operation. 516// 517// The context must be non-nil and will be used for request cancellation. If 518// the context is nil a panic will occur. In the future the SDK may create 519// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 520// for more information on using Contexts. 521func (c *ResourceGroups) GetGroupQueryWithContext(ctx aws.Context, input *GetGroupQueryInput, opts ...request.Option) (*GetGroupQueryOutput, error) { 522 req, out := c.GetGroupQueryRequest(input) 523 req.SetContext(ctx) 524 req.ApplyOptions(opts...) 525 return out, req.Send() 526} 527 528const opGetTags = "GetTags" 529 530// GetTagsRequest generates a "aws/request.Request" representing the 531// client's request for the GetTags operation. The "output" return 532// value will be populated with the request's response once the request completes 533// successfully. 534// 535// Use "Send" method on the returned Request to send the API call to the service. 536// the "output" return value is not valid until after Send returns without error. 537// 538// See GetTags for more information on using the GetTags 539// API call, and error handling. 540// 541// This method is useful when you want to inject custom logic or configuration 542// into the SDK's request lifecycle. Such as custom headers, or retry logic. 543// 544// 545// // Example sending a request using the GetTagsRequest method. 546// req, resp := client.GetTagsRequest(params) 547// 548// err := req.Send() 549// if err == nil { // resp is now filled 550// fmt.Println(resp) 551// } 552// 553// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/GetTags 554func (c *ResourceGroups) GetTagsRequest(input *GetTagsInput) (req *request.Request, output *GetTagsOutput) { 555 op := &request.Operation{ 556 Name: opGetTags, 557 HTTPMethod: "GET", 558 HTTPPath: "/resources/{Arn}/tags", 559 } 560 561 if input == nil { 562 input = &GetTagsInput{} 563 } 564 565 output = &GetTagsOutput{} 566 req = c.newRequest(op, input, output) 567 return 568} 569 570// GetTags API operation for AWS Resource Groups. 571// 572// Returns a list of tags that are associated with a resource group, specified 573// by an ARN. 574// 575// Minimum permissions 576// 577// To run this command, you must have the following permissions: 578// 579// * resource-groups:GetTags 580// 581// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 582// with awserr.Error's Code and Message methods to get detailed information about 583// the error. 584// 585// See the AWS API reference guide for AWS Resource Groups's 586// API operation GetTags for usage and error information. 587// 588// Returned Error Types: 589// * BadRequestException 590// The request includes one or more parameters that violate validation rules. 591// 592// * ForbiddenException 593// The caller isn't authorized to make the request. Check permissions. 594// 595// * NotFoundException 596// One or more of the specified resources don't exist. 597// 598// * MethodNotAllowedException 599// The request uses an HTTP method that isn't allowed for the specified resource. 600// 601// * TooManyRequestsException 602// You've exceeded throttling limits by making too many requests in a period 603// of time. 604// 605// * InternalServerErrorException 606// An internal error occurred while processing the request. Try again later. 607// 608// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/GetTags 609func (c *ResourceGroups) GetTags(input *GetTagsInput) (*GetTagsOutput, error) { 610 req, out := c.GetTagsRequest(input) 611 return out, req.Send() 612} 613 614// GetTagsWithContext is the same as GetTags with the addition of 615// the ability to pass a context and additional request options. 616// 617// See GetTags for details on how to use this API operation. 618// 619// The context must be non-nil and will be used for request cancellation. If 620// the context is nil a panic will occur. In the future the SDK may create 621// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 622// for more information on using Contexts. 623func (c *ResourceGroups) GetTagsWithContext(ctx aws.Context, input *GetTagsInput, opts ...request.Option) (*GetTagsOutput, error) { 624 req, out := c.GetTagsRequest(input) 625 req.SetContext(ctx) 626 req.ApplyOptions(opts...) 627 return out, req.Send() 628} 629 630const opGroupResources = "GroupResources" 631 632// GroupResourcesRequest generates a "aws/request.Request" representing the 633// client's request for the GroupResources operation. The "output" return 634// value will be populated with the request's response once the request completes 635// successfully. 636// 637// Use "Send" method on the returned Request to send the API call to the service. 638// the "output" return value is not valid until after Send returns without error. 639// 640// See GroupResources for more information on using the GroupResources 641// API call, and error handling. 642// 643// This method is useful when you want to inject custom logic or configuration 644// into the SDK's request lifecycle. Such as custom headers, or retry logic. 645// 646// 647// // Example sending a request using the GroupResourcesRequest method. 648// req, resp := client.GroupResourcesRequest(params) 649// 650// err := req.Send() 651// if err == nil { // resp is now filled 652// fmt.Println(resp) 653// } 654// 655// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/GroupResources 656func (c *ResourceGroups) GroupResourcesRequest(input *GroupResourcesInput) (req *request.Request, output *GroupResourcesOutput) { 657 op := &request.Operation{ 658 Name: opGroupResources, 659 HTTPMethod: "POST", 660 HTTPPath: "/group-resources", 661 } 662 663 if input == nil { 664 input = &GroupResourcesInput{} 665 } 666 667 output = &GroupResourcesOutput{} 668 req = c.newRequest(op, input, output) 669 return 670} 671 672// GroupResources API operation for AWS Resource Groups. 673// 674// Adds the specified resources to the specified group. 675// 676// Minimum permissions 677// 678// To run this command, you must have the following permissions: 679// 680// * resource-groups:GroupResources 681// 682// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 683// with awserr.Error's Code and Message methods to get detailed information about 684// the error. 685// 686// See the AWS API reference guide for AWS Resource Groups's 687// API operation GroupResources for usage and error information. 688// 689// Returned Error Types: 690// * BadRequestException 691// The request includes one or more parameters that violate validation rules. 692// 693// * ForbiddenException 694// The caller isn't authorized to make the request. Check permissions. 695// 696// * NotFoundException 697// One or more of the specified resources don't exist. 698// 699// * MethodNotAllowedException 700// The request uses an HTTP method that isn't allowed for the specified resource. 701// 702// * TooManyRequestsException 703// You've exceeded throttling limits by making too many requests in a period 704// of time. 705// 706// * InternalServerErrorException 707// An internal error occurred while processing the request. Try again later. 708// 709// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/GroupResources 710func (c *ResourceGroups) GroupResources(input *GroupResourcesInput) (*GroupResourcesOutput, error) { 711 req, out := c.GroupResourcesRequest(input) 712 return out, req.Send() 713} 714 715// GroupResourcesWithContext is the same as GroupResources with the addition of 716// the ability to pass a context and additional request options. 717// 718// See GroupResources for details on how to use this API operation. 719// 720// The context must be non-nil and will be used for request cancellation. If 721// the context is nil a panic will occur. In the future the SDK may create 722// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 723// for more information on using Contexts. 724func (c *ResourceGroups) GroupResourcesWithContext(ctx aws.Context, input *GroupResourcesInput, opts ...request.Option) (*GroupResourcesOutput, error) { 725 req, out := c.GroupResourcesRequest(input) 726 req.SetContext(ctx) 727 req.ApplyOptions(opts...) 728 return out, req.Send() 729} 730 731const opListGroupResources = "ListGroupResources" 732 733// ListGroupResourcesRequest generates a "aws/request.Request" representing the 734// client's request for the ListGroupResources operation. The "output" return 735// value will be populated with the request's response once the request completes 736// successfully. 737// 738// Use "Send" method on the returned Request to send the API call to the service. 739// the "output" return value is not valid until after Send returns without error. 740// 741// See ListGroupResources for more information on using the ListGroupResources 742// API call, and error handling. 743// 744// This method is useful when you want to inject custom logic or configuration 745// into the SDK's request lifecycle. Such as custom headers, or retry logic. 746// 747// 748// // Example sending a request using the ListGroupResourcesRequest method. 749// req, resp := client.ListGroupResourcesRequest(params) 750// 751// err := req.Send() 752// if err == nil { // resp is now filled 753// fmt.Println(resp) 754// } 755// 756// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/ListGroupResources 757func (c *ResourceGroups) ListGroupResourcesRequest(input *ListGroupResourcesInput) (req *request.Request, output *ListGroupResourcesOutput) { 758 op := &request.Operation{ 759 Name: opListGroupResources, 760 HTTPMethod: "POST", 761 HTTPPath: "/list-group-resources", 762 Paginator: &request.Paginator{ 763 InputTokens: []string{"NextToken"}, 764 OutputTokens: []string{"NextToken"}, 765 LimitToken: "MaxResults", 766 TruncationToken: "", 767 }, 768 } 769 770 if input == nil { 771 input = &ListGroupResourcesInput{} 772 } 773 774 output = &ListGroupResourcesOutput{} 775 req = c.newRequest(op, input, output) 776 return 777} 778 779// ListGroupResources API operation for AWS Resource Groups. 780// 781// Returns a list of ARNs of the resources that are members of a specified resource 782// group. 783// 784// Minimum permissions 785// 786// To run this command, you must have the following permissions: 787// 788// * resource-groups:ListGroupResources 789// 790// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 791// with awserr.Error's Code and Message methods to get detailed information about 792// the error. 793// 794// See the AWS API reference guide for AWS Resource Groups's 795// API operation ListGroupResources for usage and error information. 796// 797// Returned Error Types: 798// * UnauthorizedException 799// The request was rejected because it doesn't have valid credentials for the 800// target resource. 801// 802// * BadRequestException 803// The request includes one or more parameters that violate validation rules. 804// 805// * ForbiddenException 806// The caller isn't authorized to make the request. Check permissions. 807// 808// * NotFoundException 809// One or more of the specified resources don't exist. 810// 811// * MethodNotAllowedException 812// The request uses an HTTP method that isn't allowed for the specified resource. 813// 814// * TooManyRequestsException 815// You've exceeded throttling limits by making too many requests in a period 816// of time. 817// 818// * InternalServerErrorException 819// An internal error occurred while processing the request. Try again later. 820// 821// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/ListGroupResources 822func (c *ResourceGroups) ListGroupResources(input *ListGroupResourcesInput) (*ListGroupResourcesOutput, error) { 823 req, out := c.ListGroupResourcesRequest(input) 824 return out, req.Send() 825} 826 827// ListGroupResourcesWithContext is the same as ListGroupResources with the addition of 828// the ability to pass a context and additional request options. 829// 830// See ListGroupResources for details on how to use this API operation. 831// 832// The context must be non-nil and will be used for request cancellation. If 833// the context is nil a panic will occur. In the future the SDK may create 834// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 835// for more information on using Contexts. 836func (c *ResourceGroups) ListGroupResourcesWithContext(ctx aws.Context, input *ListGroupResourcesInput, opts ...request.Option) (*ListGroupResourcesOutput, error) { 837 req, out := c.ListGroupResourcesRequest(input) 838 req.SetContext(ctx) 839 req.ApplyOptions(opts...) 840 return out, req.Send() 841} 842 843// ListGroupResourcesPages iterates over the pages of a ListGroupResources operation, 844// calling the "fn" function with the response data for each page. To stop 845// iterating, return false from the fn function. 846// 847// See ListGroupResources method for more information on how to use this operation. 848// 849// Note: This operation can generate multiple requests to a service. 850// 851// // Example iterating over at most 3 pages of a ListGroupResources operation. 852// pageNum := 0 853// err := client.ListGroupResourcesPages(params, 854// func(page *resourcegroups.ListGroupResourcesOutput, lastPage bool) bool { 855// pageNum++ 856// fmt.Println(page) 857// return pageNum <= 3 858// }) 859// 860func (c *ResourceGroups) ListGroupResourcesPages(input *ListGroupResourcesInput, fn func(*ListGroupResourcesOutput, bool) bool) error { 861 return c.ListGroupResourcesPagesWithContext(aws.BackgroundContext(), input, fn) 862} 863 864// ListGroupResourcesPagesWithContext same as ListGroupResourcesPages except 865// it takes a Context and allows setting request options on the pages. 866// 867// The context must be non-nil and will be used for request cancellation. If 868// the context is nil a panic will occur. In the future the SDK may create 869// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 870// for more information on using Contexts. 871func (c *ResourceGroups) ListGroupResourcesPagesWithContext(ctx aws.Context, input *ListGroupResourcesInput, fn func(*ListGroupResourcesOutput, bool) bool, opts ...request.Option) error { 872 p := request.Pagination{ 873 NewRequest: func() (*request.Request, error) { 874 var inCpy *ListGroupResourcesInput 875 if input != nil { 876 tmp := *input 877 inCpy = &tmp 878 } 879 req, _ := c.ListGroupResourcesRequest(inCpy) 880 req.SetContext(ctx) 881 req.ApplyOptions(opts...) 882 return req, nil 883 }, 884 } 885 886 for p.Next() { 887 if !fn(p.Page().(*ListGroupResourcesOutput), !p.HasNextPage()) { 888 break 889 } 890 } 891 892 return p.Err() 893} 894 895const opListGroups = "ListGroups" 896 897// ListGroupsRequest generates a "aws/request.Request" representing the 898// client's request for the ListGroups operation. The "output" return 899// value will be populated with the request's response once the request completes 900// successfully. 901// 902// Use "Send" method on the returned Request to send the API call to the service. 903// the "output" return value is not valid until after Send returns without error. 904// 905// See ListGroups for more information on using the ListGroups 906// API call, and error handling. 907// 908// This method is useful when you want to inject custom logic or configuration 909// into the SDK's request lifecycle. Such as custom headers, or retry logic. 910// 911// 912// // Example sending a request using the ListGroupsRequest method. 913// req, resp := client.ListGroupsRequest(params) 914// 915// err := req.Send() 916// if err == nil { // resp is now filled 917// fmt.Println(resp) 918// } 919// 920// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/ListGroups 921func (c *ResourceGroups) ListGroupsRequest(input *ListGroupsInput) (req *request.Request, output *ListGroupsOutput) { 922 op := &request.Operation{ 923 Name: opListGroups, 924 HTTPMethod: "POST", 925 HTTPPath: "/groups-list", 926 Paginator: &request.Paginator{ 927 InputTokens: []string{"NextToken"}, 928 OutputTokens: []string{"NextToken"}, 929 LimitToken: "MaxResults", 930 TruncationToken: "", 931 }, 932 } 933 934 if input == nil { 935 input = &ListGroupsInput{} 936 } 937 938 output = &ListGroupsOutput{} 939 req = c.newRequest(op, input, output) 940 return 941} 942 943// ListGroups API operation for AWS Resource Groups. 944// 945// Returns a list of existing resource groups in your account. 946// 947// Minimum permissions 948// 949// To run this command, you must have the following permissions: 950// 951// * resource-groups:ListGroups 952// 953// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 954// with awserr.Error's Code and Message methods to get detailed information about 955// the error. 956// 957// See the AWS API reference guide for AWS Resource Groups's 958// API operation ListGroups for usage and error information. 959// 960// Returned Error Types: 961// * BadRequestException 962// The request includes one or more parameters that violate validation rules. 963// 964// * ForbiddenException 965// The caller isn't authorized to make the request. Check permissions. 966// 967// * MethodNotAllowedException 968// The request uses an HTTP method that isn't allowed for the specified resource. 969// 970// * TooManyRequestsException 971// You've exceeded throttling limits by making too many requests in a period 972// of time. 973// 974// * InternalServerErrorException 975// An internal error occurred while processing the request. Try again later. 976// 977// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/ListGroups 978func (c *ResourceGroups) ListGroups(input *ListGroupsInput) (*ListGroupsOutput, error) { 979 req, out := c.ListGroupsRequest(input) 980 return out, req.Send() 981} 982 983// ListGroupsWithContext is the same as ListGroups with the addition of 984// the ability to pass a context and additional request options. 985// 986// See ListGroups for details on how to use this API operation. 987// 988// The context must be non-nil and will be used for request cancellation. If 989// the context is nil a panic will occur. In the future the SDK may create 990// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 991// for more information on using Contexts. 992func (c *ResourceGroups) ListGroupsWithContext(ctx aws.Context, input *ListGroupsInput, opts ...request.Option) (*ListGroupsOutput, error) { 993 req, out := c.ListGroupsRequest(input) 994 req.SetContext(ctx) 995 req.ApplyOptions(opts...) 996 return out, req.Send() 997} 998 999// ListGroupsPages iterates over the pages of a ListGroups operation, 1000// calling the "fn" function with the response data for each page. To stop 1001// iterating, return false from the fn function. 1002// 1003// See ListGroups method for more information on how to use this operation. 1004// 1005// Note: This operation can generate multiple requests to a service. 1006// 1007// // Example iterating over at most 3 pages of a ListGroups operation. 1008// pageNum := 0 1009// err := client.ListGroupsPages(params, 1010// func(page *resourcegroups.ListGroupsOutput, lastPage bool) bool { 1011// pageNum++ 1012// fmt.Println(page) 1013// return pageNum <= 3 1014// }) 1015// 1016func (c *ResourceGroups) ListGroupsPages(input *ListGroupsInput, fn func(*ListGroupsOutput, bool) bool) error { 1017 return c.ListGroupsPagesWithContext(aws.BackgroundContext(), input, fn) 1018} 1019 1020// ListGroupsPagesWithContext same as ListGroupsPages except 1021// it takes a Context and allows setting request options on the pages. 1022// 1023// The context must be non-nil and will be used for request cancellation. If 1024// the context is nil a panic will occur. In the future the SDK may create 1025// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1026// for more information on using Contexts. 1027func (c *ResourceGroups) ListGroupsPagesWithContext(ctx aws.Context, input *ListGroupsInput, fn func(*ListGroupsOutput, bool) bool, opts ...request.Option) error { 1028 p := request.Pagination{ 1029 NewRequest: func() (*request.Request, error) { 1030 var inCpy *ListGroupsInput 1031 if input != nil { 1032 tmp := *input 1033 inCpy = &tmp 1034 } 1035 req, _ := c.ListGroupsRequest(inCpy) 1036 req.SetContext(ctx) 1037 req.ApplyOptions(opts...) 1038 return req, nil 1039 }, 1040 } 1041 1042 for p.Next() { 1043 if !fn(p.Page().(*ListGroupsOutput), !p.HasNextPage()) { 1044 break 1045 } 1046 } 1047 1048 return p.Err() 1049} 1050 1051const opPutGroupConfiguration = "PutGroupConfiguration" 1052 1053// PutGroupConfigurationRequest generates a "aws/request.Request" representing the 1054// client's request for the PutGroupConfiguration operation. The "output" return 1055// value will be populated with the request's response once the request completes 1056// successfully. 1057// 1058// Use "Send" method on the returned Request to send the API call to the service. 1059// the "output" return value is not valid until after Send returns without error. 1060// 1061// See PutGroupConfiguration for more information on using the PutGroupConfiguration 1062// API call, and error handling. 1063// 1064// This method is useful when you want to inject custom logic or configuration 1065// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1066// 1067// 1068// // Example sending a request using the PutGroupConfigurationRequest method. 1069// req, resp := client.PutGroupConfigurationRequest(params) 1070// 1071// err := req.Send() 1072// if err == nil { // resp is now filled 1073// fmt.Println(resp) 1074// } 1075// 1076// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/PutGroupConfiguration 1077func (c *ResourceGroups) PutGroupConfigurationRequest(input *PutGroupConfigurationInput) (req *request.Request, output *PutGroupConfigurationOutput) { 1078 op := &request.Operation{ 1079 Name: opPutGroupConfiguration, 1080 HTTPMethod: "POST", 1081 HTTPPath: "/put-group-configuration", 1082 } 1083 1084 if input == nil { 1085 input = &PutGroupConfigurationInput{} 1086 } 1087 1088 output = &PutGroupConfigurationOutput{} 1089 req = c.newRequest(op, input, output) 1090 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1091 return 1092} 1093 1094// PutGroupConfiguration API operation for AWS Resource Groups. 1095// 1096// Attaches a service configuration to the specified group. This occurs asynchronously, 1097// and can take time to complete. You can use GetGroupConfiguration to check 1098// the status of the update. 1099// 1100// Minimum permissions 1101// 1102// To run this command, you must have the following permissions: 1103// 1104// * resource-groups:PutGroupConfiguration 1105// 1106// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1107// with awserr.Error's Code and Message methods to get detailed information about 1108// the error. 1109// 1110// See the AWS API reference guide for AWS Resource Groups's 1111// API operation PutGroupConfiguration for usage and error information. 1112// 1113// Returned Error Types: 1114// * BadRequestException 1115// The request includes one or more parameters that violate validation rules. 1116// 1117// * ForbiddenException 1118// The caller isn't authorized to make the request. Check permissions. 1119// 1120// * NotFoundException 1121// One or more of the specified resources don't exist. 1122// 1123// * MethodNotAllowedException 1124// The request uses an HTTP method that isn't allowed for the specified resource. 1125// 1126// * TooManyRequestsException 1127// You've exceeded throttling limits by making too many requests in a period 1128// of time. 1129// 1130// * InternalServerErrorException 1131// An internal error occurred while processing the request. Try again later. 1132// 1133// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/PutGroupConfiguration 1134func (c *ResourceGroups) PutGroupConfiguration(input *PutGroupConfigurationInput) (*PutGroupConfigurationOutput, error) { 1135 req, out := c.PutGroupConfigurationRequest(input) 1136 return out, req.Send() 1137} 1138 1139// PutGroupConfigurationWithContext is the same as PutGroupConfiguration with the addition of 1140// the ability to pass a context and additional request options. 1141// 1142// See PutGroupConfiguration for details on how to use this API operation. 1143// 1144// The context must be non-nil and will be used for request cancellation. If 1145// the context is nil a panic will occur. In the future the SDK may create 1146// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1147// for more information on using Contexts. 1148func (c *ResourceGroups) PutGroupConfigurationWithContext(ctx aws.Context, input *PutGroupConfigurationInput, opts ...request.Option) (*PutGroupConfigurationOutput, error) { 1149 req, out := c.PutGroupConfigurationRequest(input) 1150 req.SetContext(ctx) 1151 req.ApplyOptions(opts...) 1152 return out, req.Send() 1153} 1154 1155const opSearchResources = "SearchResources" 1156 1157// SearchResourcesRequest generates a "aws/request.Request" representing the 1158// client's request for the SearchResources operation. The "output" return 1159// value will be populated with the request's response once the request completes 1160// successfully. 1161// 1162// Use "Send" method on the returned Request to send the API call to the service. 1163// the "output" return value is not valid until after Send returns without error. 1164// 1165// See SearchResources for more information on using the SearchResources 1166// API call, and error handling. 1167// 1168// This method is useful when you want to inject custom logic or configuration 1169// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1170// 1171// 1172// // Example sending a request using the SearchResourcesRequest method. 1173// req, resp := client.SearchResourcesRequest(params) 1174// 1175// err := req.Send() 1176// if err == nil { // resp is now filled 1177// fmt.Println(resp) 1178// } 1179// 1180// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/SearchResources 1181func (c *ResourceGroups) SearchResourcesRequest(input *SearchResourcesInput) (req *request.Request, output *SearchResourcesOutput) { 1182 op := &request.Operation{ 1183 Name: opSearchResources, 1184 HTTPMethod: "POST", 1185 HTTPPath: "/resources/search", 1186 Paginator: &request.Paginator{ 1187 InputTokens: []string{"NextToken"}, 1188 OutputTokens: []string{"NextToken"}, 1189 LimitToken: "MaxResults", 1190 TruncationToken: "", 1191 }, 1192 } 1193 1194 if input == nil { 1195 input = &SearchResourcesInput{} 1196 } 1197 1198 output = &SearchResourcesOutput{} 1199 req = c.newRequest(op, input, output) 1200 return 1201} 1202 1203// SearchResources API operation for AWS Resource Groups. 1204// 1205// Returns a list of AWS resource identifiers that matches the specified query. 1206// The query uses the same format as a resource query in a CreateGroup or UpdateGroupQuery 1207// operation. 1208// 1209// Minimum permissions 1210// 1211// To run this command, you must have the following permissions: 1212// 1213// * resource-groups:SearchResources 1214// 1215// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1216// with awserr.Error's Code and Message methods to get detailed information about 1217// the error. 1218// 1219// See the AWS API reference guide for AWS Resource Groups's 1220// API operation SearchResources for usage and error information. 1221// 1222// Returned Error Types: 1223// * UnauthorizedException 1224// The request was rejected because it doesn't have valid credentials for the 1225// target resource. 1226// 1227// * BadRequestException 1228// The request includes one or more parameters that violate validation rules. 1229// 1230// * ForbiddenException 1231// The caller isn't authorized to make the request. Check permissions. 1232// 1233// * MethodNotAllowedException 1234// The request uses an HTTP method that isn't allowed for the specified resource. 1235// 1236// * TooManyRequestsException 1237// You've exceeded throttling limits by making too many requests in a period 1238// of time. 1239// 1240// * InternalServerErrorException 1241// An internal error occurred while processing the request. Try again later. 1242// 1243// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/SearchResources 1244func (c *ResourceGroups) SearchResources(input *SearchResourcesInput) (*SearchResourcesOutput, error) { 1245 req, out := c.SearchResourcesRequest(input) 1246 return out, req.Send() 1247} 1248 1249// SearchResourcesWithContext is the same as SearchResources with the addition of 1250// the ability to pass a context and additional request options. 1251// 1252// See SearchResources for details on how to use this API operation. 1253// 1254// The context must be non-nil and will be used for request cancellation. If 1255// the context is nil a panic will occur. In the future the SDK may create 1256// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1257// for more information on using Contexts. 1258func (c *ResourceGroups) SearchResourcesWithContext(ctx aws.Context, input *SearchResourcesInput, opts ...request.Option) (*SearchResourcesOutput, error) { 1259 req, out := c.SearchResourcesRequest(input) 1260 req.SetContext(ctx) 1261 req.ApplyOptions(opts...) 1262 return out, req.Send() 1263} 1264 1265// SearchResourcesPages iterates over the pages of a SearchResources operation, 1266// calling the "fn" function with the response data for each page. To stop 1267// iterating, return false from the fn function. 1268// 1269// See SearchResources method for more information on how to use this operation. 1270// 1271// Note: This operation can generate multiple requests to a service. 1272// 1273// // Example iterating over at most 3 pages of a SearchResources operation. 1274// pageNum := 0 1275// err := client.SearchResourcesPages(params, 1276// func(page *resourcegroups.SearchResourcesOutput, lastPage bool) bool { 1277// pageNum++ 1278// fmt.Println(page) 1279// return pageNum <= 3 1280// }) 1281// 1282func (c *ResourceGroups) SearchResourcesPages(input *SearchResourcesInput, fn func(*SearchResourcesOutput, bool) bool) error { 1283 return c.SearchResourcesPagesWithContext(aws.BackgroundContext(), input, fn) 1284} 1285 1286// SearchResourcesPagesWithContext same as SearchResourcesPages except 1287// it takes a Context and allows setting request options on the pages. 1288// 1289// The context must be non-nil and will be used for request cancellation. If 1290// the context is nil a panic will occur. In the future the SDK may create 1291// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1292// for more information on using Contexts. 1293func (c *ResourceGroups) SearchResourcesPagesWithContext(ctx aws.Context, input *SearchResourcesInput, fn func(*SearchResourcesOutput, bool) bool, opts ...request.Option) error { 1294 p := request.Pagination{ 1295 NewRequest: func() (*request.Request, error) { 1296 var inCpy *SearchResourcesInput 1297 if input != nil { 1298 tmp := *input 1299 inCpy = &tmp 1300 } 1301 req, _ := c.SearchResourcesRequest(inCpy) 1302 req.SetContext(ctx) 1303 req.ApplyOptions(opts...) 1304 return req, nil 1305 }, 1306 } 1307 1308 for p.Next() { 1309 if !fn(p.Page().(*SearchResourcesOutput), !p.HasNextPage()) { 1310 break 1311 } 1312 } 1313 1314 return p.Err() 1315} 1316 1317const opTag = "Tag" 1318 1319// TagRequest generates a "aws/request.Request" representing the 1320// client's request for the Tag operation. The "output" return 1321// value will be populated with the request's response once the request completes 1322// successfully. 1323// 1324// Use "Send" method on the returned Request to send the API call to the service. 1325// the "output" return value is not valid until after Send returns without error. 1326// 1327// See Tag for more information on using the Tag 1328// API call, and error handling. 1329// 1330// This method is useful when you want to inject custom logic or configuration 1331// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1332// 1333// 1334// // Example sending a request using the TagRequest method. 1335// req, resp := client.TagRequest(params) 1336// 1337// err := req.Send() 1338// if err == nil { // resp is now filled 1339// fmt.Println(resp) 1340// } 1341// 1342// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/Tag 1343func (c *ResourceGroups) TagRequest(input *TagInput) (req *request.Request, output *TagOutput) { 1344 op := &request.Operation{ 1345 Name: opTag, 1346 HTTPMethod: "PUT", 1347 HTTPPath: "/resources/{Arn}/tags", 1348 } 1349 1350 if input == nil { 1351 input = &TagInput{} 1352 } 1353 1354 output = &TagOutput{} 1355 req = c.newRequest(op, input, output) 1356 return 1357} 1358 1359// Tag API operation for AWS Resource Groups. 1360// 1361// Adds tags to a resource group with the specified ARN. Existing tags on a 1362// resource group are not changed if they are not specified in the request parameters. 1363// 1364// Do not store personally identifiable information (PII) or other confidential 1365// or sensitive information in tags. We use tags to provide you with billing 1366// and administration services. Tags are not intended to be used for private 1367// or sensitive data. 1368// 1369// Minimum permissions 1370// 1371// To run this command, you must have the following permissions: 1372// 1373// * resource-groups:Tag 1374// 1375// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1376// with awserr.Error's Code and Message methods to get detailed information about 1377// the error. 1378// 1379// See the AWS API reference guide for AWS Resource Groups's 1380// API operation Tag for usage and error information. 1381// 1382// Returned Error Types: 1383// * BadRequestException 1384// The request includes one or more parameters that violate validation rules. 1385// 1386// * ForbiddenException 1387// The caller isn't authorized to make the request. Check permissions. 1388// 1389// * NotFoundException 1390// One or more of the specified resources don't exist. 1391// 1392// * MethodNotAllowedException 1393// The request uses an HTTP method that isn't allowed for the specified resource. 1394// 1395// * TooManyRequestsException 1396// You've exceeded throttling limits by making too many requests in a period 1397// of time. 1398// 1399// * InternalServerErrorException 1400// An internal error occurred while processing the request. Try again later. 1401// 1402// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/Tag 1403func (c *ResourceGroups) Tag(input *TagInput) (*TagOutput, error) { 1404 req, out := c.TagRequest(input) 1405 return out, req.Send() 1406} 1407 1408// TagWithContext is the same as Tag with the addition of 1409// the ability to pass a context and additional request options. 1410// 1411// See Tag for details on how to use this API operation. 1412// 1413// The context must be non-nil and will be used for request cancellation. If 1414// the context is nil a panic will occur. In the future the SDK may create 1415// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1416// for more information on using Contexts. 1417func (c *ResourceGroups) TagWithContext(ctx aws.Context, input *TagInput, opts ...request.Option) (*TagOutput, error) { 1418 req, out := c.TagRequest(input) 1419 req.SetContext(ctx) 1420 req.ApplyOptions(opts...) 1421 return out, req.Send() 1422} 1423 1424const opUngroupResources = "UngroupResources" 1425 1426// UngroupResourcesRequest generates a "aws/request.Request" representing the 1427// client's request for the UngroupResources operation. The "output" return 1428// value will be populated with the request's response once the request completes 1429// successfully. 1430// 1431// Use "Send" method on the returned Request to send the API call to the service. 1432// the "output" return value is not valid until after Send returns without error. 1433// 1434// See UngroupResources for more information on using the UngroupResources 1435// API call, and error handling. 1436// 1437// This method is useful when you want to inject custom logic or configuration 1438// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1439// 1440// 1441// // Example sending a request using the UngroupResourcesRequest method. 1442// req, resp := client.UngroupResourcesRequest(params) 1443// 1444// err := req.Send() 1445// if err == nil { // resp is now filled 1446// fmt.Println(resp) 1447// } 1448// 1449// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/UngroupResources 1450func (c *ResourceGroups) UngroupResourcesRequest(input *UngroupResourcesInput) (req *request.Request, output *UngroupResourcesOutput) { 1451 op := &request.Operation{ 1452 Name: opUngroupResources, 1453 HTTPMethod: "POST", 1454 HTTPPath: "/ungroup-resources", 1455 } 1456 1457 if input == nil { 1458 input = &UngroupResourcesInput{} 1459 } 1460 1461 output = &UngroupResourcesOutput{} 1462 req = c.newRequest(op, input, output) 1463 return 1464} 1465 1466// UngroupResources API operation for AWS Resource Groups. 1467// 1468// Removes the specified resources from the specified group. 1469// 1470// Minimum permissions 1471// 1472// To run this command, you must have the following permissions: 1473// 1474// * resource-groups:UngroupResources 1475// 1476// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1477// with awserr.Error's Code and Message methods to get detailed information about 1478// the error. 1479// 1480// See the AWS API reference guide for AWS Resource Groups's 1481// API operation UngroupResources for usage and error information. 1482// 1483// Returned Error Types: 1484// * BadRequestException 1485// The request includes one or more parameters that violate validation rules. 1486// 1487// * ForbiddenException 1488// The caller isn't authorized to make the request. Check permissions. 1489// 1490// * NotFoundException 1491// One or more of the specified resources don't exist. 1492// 1493// * MethodNotAllowedException 1494// The request uses an HTTP method that isn't allowed for the specified resource. 1495// 1496// * TooManyRequestsException 1497// You've exceeded throttling limits by making too many requests in a period 1498// of time. 1499// 1500// * InternalServerErrorException 1501// An internal error occurred while processing the request. Try again later. 1502// 1503// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/UngroupResources 1504func (c *ResourceGroups) UngroupResources(input *UngroupResourcesInput) (*UngroupResourcesOutput, error) { 1505 req, out := c.UngroupResourcesRequest(input) 1506 return out, req.Send() 1507} 1508 1509// UngroupResourcesWithContext is the same as UngroupResources with the addition of 1510// the ability to pass a context and additional request options. 1511// 1512// See UngroupResources for details on how to use this API operation. 1513// 1514// The context must be non-nil and will be used for request cancellation. If 1515// the context is nil a panic will occur. In the future the SDK may create 1516// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1517// for more information on using Contexts. 1518func (c *ResourceGroups) UngroupResourcesWithContext(ctx aws.Context, input *UngroupResourcesInput, opts ...request.Option) (*UngroupResourcesOutput, error) { 1519 req, out := c.UngroupResourcesRequest(input) 1520 req.SetContext(ctx) 1521 req.ApplyOptions(opts...) 1522 return out, req.Send() 1523} 1524 1525const opUntag = "Untag" 1526 1527// UntagRequest generates a "aws/request.Request" representing the 1528// client's request for the Untag operation. The "output" return 1529// value will be populated with the request's response once the request completes 1530// successfully. 1531// 1532// Use "Send" method on the returned Request to send the API call to the service. 1533// the "output" return value is not valid until after Send returns without error. 1534// 1535// See Untag for more information on using the Untag 1536// API call, and error handling. 1537// 1538// This method is useful when you want to inject custom logic or configuration 1539// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1540// 1541// 1542// // Example sending a request using the UntagRequest method. 1543// req, resp := client.UntagRequest(params) 1544// 1545// err := req.Send() 1546// if err == nil { // resp is now filled 1547// fmt.Println(resp) 1548// } 1549// 1550// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/Untag 1551func (c *ResourceGroups) UntagRequest(input *UntagInput) (req *request.Request, output *UntagOutput) { 1552 op := &request.Operation{ 1553 Name: opUntag, 1554 HTTPMethod: "PATCH", 1555 HTTPPath: "/resources/{Arn}/tags", 1556 } 1557 1558 if input == nil { 1559 input = &UntagInput{} 1560 } 1561 1562 output = &UntagOutput{} 1563 req = c.newRequest(op, input, output) 1564 return 1565} 1566 1567// Untag API operation for AWS Resource Groups. 1568// 1569// Deletes tags from a specified resource group. 1570// 1571// Minimum permissions 1572// 1573// To run this command, you must have the following permissions: 1574// 1575// * resource-groups:Untag 1576// 1577// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1578// with awserr.Error's Code and Message methods to get detailed information about 1579// the error. 1580// 1581// See the AWS API reference guide for AWS Resource Groups's 1582// API operation Untag for usage and error information. 1583// 1584// Returned Error Types: 1585// * BadRequestException 1586// The request includes one or more parameters that violate validation rules. 1587// 1588// * ForbiddenException 1589// The caller isn't authorized to make the request. Check permissions. 1590// 1591// * NotFoundException 1592// One or more of the specified resources don't exist. 1593// 1594// * MethodNotAllowedException 1595// The request uses an HTTP method that isn't allowed for the specified resource. 1596// 1597// * TooManyRequestsException 1598// You've exceeded throttling limits by making too many requests in a period 1599// of time. 1600// 1601// * InternalServerErrorException 1602// An internal error occurred while processing the request. Try again later. 1603// 1604// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/Untag 1605func (c *ResourceGroups) Untag(input *UntagInput) (*UntagOutput, error) { 1606 req, out := c.UntagRequest(input) 1607 return out, req.Send() 1608} 1609 1610// UntagWithContext is the same as Untag with the addition of 1611// the ability to pass a context and additional request options. 1612// 1613// See Untag for details on how to use this API operation. 1614// 1615// The context must be non-nil and will be used for request cancellation. If 1616// the context is nil a panic will occur. In the future the SDK may create 1617// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1618// for more information on using Contexts. 1619func (c *ResourceGroups) UntagWithContext(ctx aws.Context, input *UntagInput, opts ...request.Option) (*UntagOutput, error) { 1620 req, out := c.UntagRequest(input) 1621 req.SetContext(ctx) 1622 req.ApplyOptions(opts...) 1623 return out, req.Send() 1624} 1625 1626const opUpdateGroup = "UpdateGroup" 1627 1628// UpdateGroupRequest generates a "aws/request.Request" representing the 1629// client's request for the UpdateGroup operation. The "output" return 1630// value will be populated with the request's response once the request completes 1631// successfully. 1632// 1633// Use "Send" method on the returned Request to send the API call to the service. 1634// the "output" return value is not valid until after Send returns without error. 1635// 1636// See UpdateGroup for more information on using the UpdateGroup 1637// API call, and error handling. 1638// 1639// This method is useful when you want to inject custom logic or configuration 1640// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1641// 1642// 1643// // Example sending a request using the UpdateGroupRequest method. 1644// req, resp := client.UpdateGroupRequest(params) 1645// 1646// err := req.Send() 1647// if err == nil { // resp is now filled 1648// fmt.Println(resp) 1649// } 1650// 1651// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/UpdateGroup 1652func (c *ResourceGroups) UpdateGroupRequest(input *UpdateGroupInput) (req *request.Request, output *UpdateGroupOutput) { 1653 op := &request.Operation{ 1654 Name: opUpdateGroup, 1655 HTTPMethod: "POST", 1656 HTTPPath: "/update-group", 1657 } 1658 1659 if input == nil { 1660 input = &UpdateGroupInput{} 1661 } 1662 1663 output = &UpdateGroupOutput{} 1664 req = c.newRequest(op, input, output) 1665 return 1666} 1667 1668// UpdateGroup API operation for AWS Resource Groups. 1669// 1670// Updates the description for an existing group. You cannot update the name 1671// of a resource group. 1672// 1673// Minimum permissions 1674// 1675// To run this command, you must have the following permissions: 1676// 1677// * resource-groups:UpdateGroup 1678// 1679// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1680// with awserr.Error's Code and Message methods to get detailed information about 1681// the error. 1682// 1683// See the AWS API reference guide for AWS Resource Groups's 1684// API operation UpdateGroup for usage and error information. 1685// 1686// Returned Error Types: 1687// * BadRequestException 1688// The request includes one or more parameters that violate validation rules. 1689// 1690// * ForbiddenException 1691// The caller isn't authorized to make the request. Check permissions. 1692// 1693// * NotFoundException 1694// One or more of the specified resources don't exist. 1695// 1696// * MethodNotAllowedException 1697// The request uses an HTTP method that isn't allowed for the specified resource. 1698// 1699// * TooManyRequestsException 1700// You've exceeded throttling limits by making too many requests in a period 1701// of time. 1702// 1703// * InternalServerErrorException 1704// An internal error occurred while processing the request. Try again later. 1705// 1706// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/UpdateGroup 1707func (c *ResourceGroups) UpdateGroup(input *UpdateGroupInput) (*UpdateGroupOutput, error) { 1708 req, out := c.UpdateGroupRequest(input) 1709 return out, req.Send() 1710} 1711 1712// UpdateGroupWithContext is the same as UpdateGroup with the addition of 1713// the ability to pass a context and additional request options. 1714// 1715// See UpdateGroup for details on how to use this API operation. 1716// 1717// The context must be non-nil and will be used for request cancellation. If 1718// the context is nil a panic will occur. In the future the SDK may create 1719// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1720// for more information on using Contexts. 1721func (c *ResourceGroups) UpdateGroupWithContext(ctx aws.Context, input *UpdateGroupInput, opts ...request.Option) (*UpdateGroupOutput, error) { 1722 req, out := c.UpdateGroupRequest(input) 1723 req.SetContext(ctx) 1724 req.ApplyOptions(opts...) 1725 return out, req.Send() 1726} 1727 1728const opUpdateGroupQuery = "UpdateGroupQuery" 1729 1730// UpdateGroupQueryRequest generates a "aws/request.Request" representing the 1731// client's request for the UpdateGroupQuery operation. The "output" return 1732// value will be populated with the request's response once the request completes 1733// successfully. 1734// 1735// Use "Send" method on the returned Request to send the API call to the service. 1736// the "output" return value is not valid until after Send returns without error. 1737// 1738// See UpdateGroupQuery for more information on using the UpdateGroupQuery 1739// API call, and error handling. 1740// 1741// This method is useful when you want to inject custom logic or configuration 1742// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1743// 1744// 1745// // Example sending a request using the UpdateGroupQueryRequest method. 1746// req, resp := client.UpdateGroupQueryRequest(params) 1747// 1748// err := req.Send() 1749// if err == nil { // resp is now filled 1750// fmt.Println(resp) 1751// } 1752// 1753// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/UpdateGroupQuery 1754func (c *ResourceGroups) UpdateGroupQueryRequest(input *UpdateGroupQueryInput) (req *request.Request, output *UpdateGroupQueryOutput) { 1755 op := &request.Operation{ 1756 Name: opUpdateGroupQuery, 1757 HTTPMethod: "POST", 1758 HTTPPath: "/update-group-query", 1759 } 1760 1761 if input == nil { 1762 input = &UpdateGroupQueryInput{} 1763 } 1764 1765 output = &UpdateGroupQueryOutput{} 1766 req = c.newRequest(op, input, output) 1767 return 1768} 1769 1770// UpdateGroupQuery API operation for AWS Resource Groups. 1771// 1772// Updates the resource query of a group. For more information about resource 1773// queries, see Create a tag-based group in Resource Groups (https://docs.aws.amazon.com/ARG/latest/userguide/gettingstarted-query.html#gettingstarted-query-cli-tag). 1774// 1775// Minimum permissions 1776// 1777// To run this command, you must have the following permissions: 1778// 1779// * resource-groups:UpdateGroupQuery 1780// 1781// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1782// with awserr.Error's Code and Message methods to get detailed information about 1783// the error. 1784// 1785// See the AWS API reference guide for AWS Resource Groups's 1786// API operation UpdateGroupQuery for usage and error information. 1787// 1788// Returned Error Types: 1789// * BadRequestException 1790// The request includes one or more parameters that violate validation rules. 1791// 1792// * ForbiddenException 1793// The caller isn't authorized to make the request. Check permissions. 1794// 1795// * NotFoundException 1796// One or more of the specified resources don't exist. 1797// 1798// * MethodNotAllowedException 1799// The request uses an HTTP method that isn't allowed for the specified resource. 1800// 1801// * TooManyRequestsException 1802// You've exceeded throttling limits by making too many requests in a period 1803// of time. 1804// 1805// * InternalServerErrorException 1806// An internal error occurred while processing the request. Try again later. 1807// 1808// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/UpdateGroupQuery 1809func (c *ResourceGroups) UpdateGroupQuery(input *UpdateGroupQueryInput) (*UpdateGroupQueryOutput, error) { 1810 req, out := c.UpdateGroupQueryRequest(input) 1811 return out, req.Send() 1812} 1813 1814// UpdateGroupQueryWithContext is the same as UpdateGroupQuery with the addition of 1815// the ability to pass a context and additional request options. 1816// 1817// See UpdateGroupQuery for details on how to use this API operation. 1818// 1819// The context must be non-nil and will be used for request cancellation. If 1820// the context is nil a panic will occur. In the future the SDK may create 1821// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1822// for more information on using Contexts. 1823func (c *ResourceGroups) UpdateGroupQueryWithContext(ctx aws.Context, input *UpdateGroupQueryInput, opts ...request.Option) (*UpdateGroupQueryOutput, error) { 1824 req, out := c.UpdateGroupQueryRequest(input) 1825 req.SetContext(ctx) 1826 req.ApplyOptions(opts...) 1827 return out, req.Send() 1828} 1829 1830// The request includes one or more parameters that violate validation rules. 1831type BadRequestException struct { 1832 _ struct{} `type:"structure"` 1833 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1834 1835 Message_ *string `locationName:"Message" min:"1" type:"string"` 1836} 1837 1838// String returns the string representation 1839func (s BadRequestException) String() string { 1840 return awsutil.Prettify(s) 1841} 1842 1843// GoString returns the string representation 1844func (s BadRequestException) GoString() string { 1845 return s.String() 1846} 1847 1848func newErrorBadRequestException(v protocol.ResponseMetadata) error { 1849 return &BadRequestException{ 1850 RespMetadata: v, 1851 } 1852} 1853 1854// Code returns the exception type name. 1855func (s *BadRequestException) Code() string { 1856 return "BadRequestException" 1857} 1858 1859// Message returns the exception's message. 1860func (s *BadRequestException) Message() string { 1861 if s.Message_ != nil { 1862 return *s.Message_ 1863 } 1864 return "" 1865} 1866 1867// OrigErr always returns nil, satisfies awserr.Error interface. 1868func (s *BadRequestException) OrigErr() error { 1869 return nil 1870} 1871 1872func (s *BadRequestException) Error() string { 1873 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1874} 1875 1876// Status code returns the HTTP status code for the request's response error. 1877func (s *BadRequestException) StatusCode() int { 1878 return s.RespMetadata.StatusCode 1879} 1880 1881// RequestID returns the service's response RequestID for request. 1882func (s *BadRequestException) RequestID() string { 1883 return s.RespMetadata.RequestID 1884} 1885 1886type CreateGroupInput struct { 1887 _ struct{} `type:"structure"` 1888 1889 // A configuration associates the resource group with an AWS service and specifies 1890 // how the service can interact with the resources in the group. A configuration 1891 // is an array of GroupConfigurationItem elements. For details about the syntax 1892 // of service configurations, see Service configurations for resource groups 1893 // (https://docs.aws.amazon.com/ARG/latest/APIReference/about-slg.html). 1894 // 1895 // A resource group can contain either a Configuration or a ResourceQuery, but 1896 // not both. 1897 Configuration []*GroupConfigurationItem `type:"list"` 1898 1899 // The description of the resource group. Descriptions can consist of letters, 1900 // numbers, hyphens, underscores, periods, and spaces. 1901 Description *string `type:"string"` 1902 1903 // The name of the group, which is the identifier of the group in other operations. 1904 // You can't change the name of a resource group after you create it. A resource 1905 // group name can consist of letters, numbers, hyphens, periods, and underscores. 1906 // The name cannot start with AWS or aws; these are reserved. A resource group 1907 // name must be unique within each AWS Region in your AWS account. 1908 // 1909 // Name is a required field 1910 Name *string `min:"1" type:"string" required:"true"` 1911 1912 // The resource query that determines which AWS resources are members of this 1913 // group. For more information about resource queries, see Create a tag-based 1914 // group in Resource Groups (https://docs.aws.amazon.com/ARG/latest/userguide/gettingstarted-query.html#gettingstarted-query-cli-tag). 1915 // 1916 // A resource group can contain either a ResourceQuery or a Configuration, but 1917 // not both. 1918 ResourceQuery *ResourceQuery `type:"structure"` 1919 1920 // The tags to add to the group. A tag is key-value pair string. 1921 Tags map[string]*string `type:"map"` 1922} 1923 1924// String returns the string representation 1925func (s CreateGroupInput) String() string { 1926 return awsutil.Prettify(s) 1927} 1928 1929// GoString returns the string representation 1930func (s CreateGroupInput) GoString() string { 1931 return s.String() 1932} 1933 1934// Validate inspects the fields of the type to determine if they are valid. 1935func (s *CreateGroupInput) Validate() error { 1936 invalidParams := request.ErrInvalidParams{Context: "CreateGroupInput"} 1937 if s.Name == nil { 1938 invalidParams.Add(request.NewErrParamRequired("Name")) 1939 } 1940 if s.Name != nil && len(*s.Name) < 1 { 1941 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 1942 } 1943 if s.Configuration != nil { 1944 for i, v := range s.Configuration { 1945 if v == nil { 1946 continue 1947 } 1948 if err := v.Validate(); err != nil { 1949 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Configuration", i), err.(request.ErrInvalidParams)) 1950 } 1951 } 1952 } 1953 if s.ResourceQuery != nil { 1954 if err := s.ResourceQuery.Validate(); err != nil { 1955 invalidParams.AddNested("ResourceQuery", err.(request.ErrInvalidParams)) 1956 } 1957 } 1958 1959 if invalidParams.Len() > 0 { 1960 return invalidParams 1961 } 1962 return nil 1963} 1964 1965// SetConfiguration sets the Configuration field's value. 1966func (s *CreateGroupInput) SetConfiguration(v []*GroupConfigurationItem) *CreateGroupInput { 1967 s.Configuration = v 1968 return s 1969} 1970 1971// SetDescription sets the Description field's value. 1972func (s *CreateGroupInput) SetDescription(v string) *CreateGroupInput { 1973 s.Description = &v 1974 return s 1975} 1976 1977// SetName sets the Name field's value. 1978func (s *CreateGroupInput) SetName(v string) *CreateGroupInput { 1979 s.Name = &v 1980 return s 1981} 1982 1983// SetResourceQuery sets the ResourceQuery field's value. 1984func (s *CreateGroupInput) SetResourceQuery(v *ResourceQuery) *CreateGroupInput { 1985 s.ResourceQuery = v 1986 return s 1987} 1988 1989// SetTags sets the Tags field's value. 1990func (s *CreateGroupInput) SetTags(v map[string]*string) *CreateGroupInput { 1991 s.Tags = v 1992 return s 1993} 1994 1995type CreateGroupOutput struct { 1996 _ struct{} `type:"structure"` 1997 1998 // The description of the resource group. 1999 Group *Group `type:"structure"` 2000 2001 // The service configuration associated with the resource group. For details 2002 // about the syntax of a service configuration, see Service configurations for 2003 // resource groups (https://docs.aws.amazon.com/ARG/latest/APIReference/about-slg.html). 2004 GroupConfiguration *GroupConfiguration `type:"structure"` 2005 2006 // The resource query associated with the group. For more information about 2007 // resource queries, see Create a tag-based group in Resource Groups (https://docs.aws.amazon.com/ARG/latest/userguide/gettingstarted-query.html#gettingstarted-query-cli-tag). 2008 ResourceQuery *ResourceQuery `type:"structure"` 2009 2010 // The tags associated with the group. 2011 Tags map[string]*string `type:"map"` 2012} 2013 2014// String returns the string representation 2015func (s CreateGroupOutput) String() string { 2016 return awsutil.Prettify(s) 2017} 2018 2019// GoString returns the string representation 2020func (s CreateGroupOutput) GoString() string { 2021 return s.String() 2022} 2023 2024// SetGroup sets the Group field's value. 2025func (s *CreateGroupOutput) SetGroup(v *Group) *CreateGroupOutput { 2026 s.Group = v 2027 return s 2028} 2029 2030// SetGroupConfiguration sets the GroupConfiguration field's value. 2031func (s *CreateGroupOutput) SetGroupConfiguration(v *GroupConfiguration) *CreateGroupOutput { 2032 s.GroupConfiguration = v 2033 return s 2034} 2035 2036// SetResourceQuery sets the ResourceQuery field's value. 2037func (s *CreateGroupOutput) SetResourceQuery(v *ResourceQuery) *CreateGroupOutput { 2038 s.ResourceQuery = v 2039 return s 2040} 2041 2042// SetTags sets the Tags field's value. 2043func (s *CreateGroupOutput) SetTags(v map[string]*string) *CreateGroupOutput { 2044 s.Tags = v 2045 return s 2046} 2047 2048type DeleteGroupInput struct { 2049 _ struct{} `type:"structure"` 2050 2051 // The name or the ARN of the resource group to delete. 2052 Group *string `min:"1" type:"string"` 2053 2054 // Deprecated - don't use this parameter. Use Group instead. 2055 // 2056 // Deprecated: This field is deprecated, use Group instead. 2057 GroupName *string `min:"1" deprecated:"true" type:"string"` 2058} 2059 2060// String returns the string representation 2061func (s DeleteGroupInput) String() string { 2062 return awsutil.Prettify(s) 2063} 2064 2065// GoString returns the string representation 2066func (s DeleteGroupInput) GoString() string { 2067 return s.String() 2068} 2069 2070// Validate inspects the fields of the type to determine if they are valid. 2071func (s *DeleteGroupInput) Validate() error { 2072 invalidParams := request.ErrInvalidParams{Context: "DeleteGroupInput"} 2073 if s.Group != nil && len(*s.Group) < 1 { 2074 invalidParams.Add(request.NewErrParamMinLen("Group", 1)) 2075 } 2076 if s.GroupName != nil && len(*s.GroupName) < 1 { 2077 invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) 2078 } 2079 2080 if invalidParams.Len() > 0 { 2081 return invalidParams 2082 } 2083 return nil 2084} 2085 2086// SetGroup sets the Group field's value. 2087func (s *DeleteGroupInput) SetGroup(v string) *DeleteGroupInput { 2088 s.Group = &v 2089 return s 2090} 2091 2092// SetGroupName sets the GroupName field's value. 2093func (s *DeleteGroupInput) SetGroupName(v string) *DeleteGroupInput { 2094 s.GroupName = &v 2095 return s 2096} 2097 2098type DeleteGroupOutput struct { 2099 _ struct{} `type:"structure"` 2100 2101 // A full description of the deleted resource group. 2102 Group *Group `type:"structure"` 2103} 2104 2105// String returns the string representation 2106func (s DeleteGroupOutput) String() string { 2107 return awsutil.Prettify(s) 2108} 2109 2110// GoString returns the string representation 2111func (s DeleteGroupOutput) GoString() string { 2112 return s.String() 2113} 2114 2115// SetGroup sets the Group field's value. 2116func (s *DeleteGroupOutput) SetGroup(v *Group) *DeleteGroupOutput { 2117 s.Group = v 2118 return s 2119} 2120 2121// A resource that failed to be added to or removed from a group. 2122type FailedResource struct { 2123 _ struct{} `type:"structure"` 2124 2125 // The error code associated with the failure. 2126 ErrorCode *string `min:"1" type:"string"` 2127 2128 // The error message text associated with the failure. 2129 ErrorMessage *string `min:"1" type:"string"` 2130 2131 // The ARN of the resource that failed to be added or removed. 2132 ResourceArn *string `type:"string"` 2133} 2134 2135// String returns the string representation 2136func (s FailedResource) String() string { 2137 return awsutil.Prettify(s) 2138} 2139 2140// GoString returns the string representation 2141func (s FailedResource) GoString() string { 2142 return s.String() 2143} 2144 2145// SetErrorCode sets the ErrorCode field's value. 2146func (s *FailedResource) SetErrorCode(v string) *FailedResource { 2147 s.ErrorCode = &v 2148 return s 2149} 2150 2151// SetErrorMessage sets the ErrorMessage field's value. 2152func (s *FailedResource) SetErrorMessage(v string) *FailedResource { 2153 s.ErrorMessage = &v 2154 return s 2155} 2156 2157// SetResourceArn sets the ResourceArn field's value. 2158func (s *FailedResource) SetResourceArn(v string) *FailedResource { 2159 s.ResourceArn = &v 2160 return s 2161} 2162 2163// The caller isn't authorized to make the request. Check permissions. 2164type ForbiddenException struct { 2165 _ struct{} `type:"structure"` 2166 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2167 2168 Message_ *string `locationName:"Message" min:"1" type:"string"` 2169} 2170 2171// String returns the string representation 2172func (s ForbiddenException) String() string { 2173 return awsutil.Prettify(s) 2174} 2175 2176// GoString returns the string representation 2177func (s ForbiddenException) GoString() string { 2178 return s.String() 2179} 2180 2181func newErrorForbiddenException(v protocol.ResponseMetadata) error { 2182 return &ForbiddenException{ 2183 RespMetadata: v, 2184 } 2185} 2186 2187// Code returns the exception type name. 2188func (s *ForbiddenException) Code() string { 2189 return "ForbiddenException" 2190} 2191 2192// Message returns the exception's message. 2193func (s *ForbiddenException) Message() string { 2194 if s.Message_ != nil { 2195 return *s.Message_ 2196 } 2197 return "" 2198} 2199 2200// OrigErr always returns nil, satisfies awserr.Error interface. 2201func (s *ForbiddenException) OrigErr() error { 2202 return nil 2203} 2204 2205func (s *ForbiddenException) Error() string { 2206 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2207} 2208 2209// Status code returns the HTTP status code for the request's response error. 2210func (s *ForbiddenException) StatusCode() int { 2211 return s.RespMetadata.StatusCode 2212} 2213 2214// RequestID returns the service's response RequestID for request. 2215func (s *ForbiddenException) RequestID() string { 2216 return s.RespMetadata.RequestID 2217} 2218 2219type GetGroupConfigurationInput struct { 2220 _ struct{} `type:"structure"` 2221 2222 // The name or the ARN of the resource group. 2223 Group *string `min:"1" type:"string"` 2224} 2225 2226// String returns the string representation 2227func (s GetGroupConfigurationInput) String() string { 2228 return awsutil.Prettify(s) 2229} 2230 2231// GoString returns the string representation 2232func (s GetGroupConfigurationInput) GoString() string { 2233 return s.String() 2234} 2235 2236// Validate inspects the fields of the type to determine if they are valid. 2237func (s *GetGroupConfigurationInput) Validate() error { 2238 invalidParams := request.ErrInvalidParams{Context: "GetGroupConfigurationInput"} 2239 if s.Group != nil && len(*s.Group) < 1 { 2240 invalidParams.Add(request.NewErrParamMinLen("Group", 1)) 2241 } 2242 2243 if invalidParams.Len() > 0 { 2244 return invalidParams 2245 } 2246 return nil 2247} 2248 2249// SetGroup sets the Group field's value. 2250func (s *GetGroupConfigurationInput) SetGroup(v string) *GetGroupConfigurationInput { 2251 s.Group = &v 2252 return s 2253} 2254 2255type GetGroupConfigurationOutput struct { 2256 _ struct{} `type:"structure"` 2257 2258 // The service configuration associated with the specified group. For details 2259 // about the service configuration syntax, see Service configurations for resource 2260 // groups (https://docs.aws.amazon.com/ARG/latest/APIReference/about-slg.html). 2261 GroupConfiguration *GroupConfiguration `type:"structure"` 2262} 2263 2264// String returns the string representation 2265func (s GetGroupConfigurationOutput) String() string { 2266 return awsutil.Prettify(s) 2267} 2268 2269// GoString returns the string representation 2270func (s GetGroupConfigurationOutput) GoString() string { 2271 return s.String() 2272} 2273 2274// SetGroupConfiguration sets the GroupConfiguration field's value. 2275func (s *GetGroupConfigurationOutput) SetGroupConfiguration(v *GroupConfiguration) *GetGroupConfigurationOutput { 2276 s.GroupConfiguration = v 2277 return s 2278} 2279 2280type GetGroupInput struct { 2281 _ struct{} `type:"structure"` 2282 2283 // The name or the ARN of the resource group to retrieve. 2284 Group *string `min:"1" type:"string"` 2285 2286 // Deprecated - don't use this parameter. Use Group instead. 2287 // 2288 // Deprecated: This field is deprecated, use Group instead. 2289 GroupName *string `min:"1" deprecated:"true" type:"string"` 2290} 2291 2292// String returns the string representation 2293func (s GetGroupInput) String() string { 2294 return awsutil.Prettify(s) 2295} 2296 2297// GoString returns the string representation 2298func (s GetGroupInput) GoString() string { 2299 return s.String() 2300} 2301 2302// Validate inspects the fields of the type to determine if they are valid. 2303func (s *GetGroupInput) Validate() error { 2304 invalidParams := request.ErrInvalidParams{Context: "GetGroupInput"} 2305 if s.Group != nil && len(*s.Group) < 1 { 2306 invalidParams.Add(request.NewErrParamMinLen("Group", 1)) 2307 } 2308 if s.GroupName != nil && len(*s.GroupName) < 1 { 2309 invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) 2310 } 2311 2312 if invalidParams.Len() > 0 { 2313 return invalidParams 2314 } 2315 return nil 2316} 2317 2318// SetGroup sets the Group field's value. 2319func (s *GetGroupInput) SetGroup(v string) *GetGroupInput { 2320 s.Group = &v 2321 return s 2322} 2323 2324// SetGroupName sets the GroupName field's value. 2325func (s *GetGroupInput) SetGroupName(v string) *GetGroupInput { 2326 s.GroupName = &v 2327 return s 2328} 2329 2330type GetGroupOutput struct { 2331 _ struct{} `type:"structure"` 2332 2333 // A full description of the resource group. 2334 Group *Group `type:"structure"` 2335} 2336 2337// String returns the string representation 2338func (s GetGroupOutput) String() string { 2339 return awsutil.Prettify(s) 2340} 2341 2342// GoString returns the string representation 2343func (s GetGroupOutput) GoString() string { 2344 return s.String() 2345} 2346 2347// SetGroup sets the Group field's value. 2348func (s *GetGroupOutput) SetGroup(v *Group) *GetGroupOutput { 2349 s.Group = v 2350 return s 2351} 2352 2353type GetGroupQueryInput struct { 2354 _ struct{} `type:"structure"` 2355 2356 // The name or the ARN of the resource group to query. 2357 Group *string `min:"1" type:"string"` 2358 2359 // Don't use this parameter. Use Group instead. 2360 // 2361 // Deprecated: This field is deprecated, use Group instead. 2362 GroupName *string `min:"1" deprecated:"true" type:"string"` 2363} 2364 2365// String returns the string representation 2366func (s GetGroupQueryInput) String() string { 2367 return awsutil.Prettify(s) 2368} 2369 2370// GoString returns the string representation 2371func (s GetGroupQueryInput) GoString() string { 2372 return s.String() 2373} 2374 2375// Validate inspects the fields of the type to determine if they are valid. 2376func (s *GetGroupQueryInput) Validate() error { 2377 invalidParams := request.ErrInvalidParams{Context: "GetGroupQueryInput"} 2378 if s.Group != nil && len(*s.Group) < 1 { 2379 invalidParams.Add(request.NewErrParamMinLen("Group", 1)) 2380 } 2381 if s.GroupName != nil && len(*s.GroupName) < 1 { 2382 invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) 2383 } 2384 2385 if invalidParams.Len() > 0 { 2386 return invalidParams 2387 } 2388 return nil 2389} 2390 2391// SetGroup sets the Group field's value. 2392func (s *GetGroupQueryInput) SetGroup(v string) *GetGroupQueryInput { 2393 s.Group = &v 2394 return s 2395} 2396 2397// SetGroupName sets the GroupName field's value. 2398func (s *GetGroupQueryInput) SetGroupName(v string) *GetGroupQueryInput { 2399 s.GroupName = &v 2400 return s 2401} 2402 2403type GetGroupQueryOutput struct { 2404 _ struct{} `type:"structure"` 2405 2406 // The resource query associated with the specified group. For more information 2407 // about resource queries, see Create a tag-based group in Resource Groups (https://docs.aws.amazon.com/ARG/latest/userguide/gettingstarted-query.html#gettingstarted-query-cli-tag). 2408 GroupQuery *GroupQuery `type:"structure"` 2409} 2410 2411// String returns the string representation 2412func (s GetGroupQueryOutput) String() string { 2413 return awsutil.Prettify(s) 2414} 2415 2416// GoString returns the string representation 2417func (s GetGroupQueryOutput) GoString() string { 2418 return s.String() 2419} 2420 2421// SetGroupQuery sets the GroupQuery field's value. 2422func (s *GetGroupQueryOutput) SetGroupQuery(v *GroupQuery) *GetGroupQueryOutput { 2423 s.GroupQuery = v 2424 return s 2425} 2426 2427type GetTagsInput struct { 2428 _ struct{} `type:"structure"` 2429 2430 // The ARN of the resource group whose tags you want to retrieve. 2431 // 2432 // Arn is a required field 2433 Arn *string `location:"uri" locationName:"Arn" min:"12" type:"string" required:"true"` 2434} 2435 2436// String returns the string representation 2437func (s GetTagsInput) String() string { 2438 return awsutil.Prettify(s) 2439} 2440 2441// GoString returns the string representation 2442func (s GetTagsInput) GoString() string { 2443 return s.String() 2444} 2445 2446// Validate inspects the fields of the type to determine if they are valid. 2447func (s *GetTagsInput) Validate() error { 2448 invalidParams := request.ErrInvalidParams{Context: "GetTagsInput"} 2449 if s.Arn == nil { 2450 invalidParams.Add(request.NewErrParamRequired("Arn")) 2451 } 2452 if s.Arn != nil && len(*s.Arn) < 12 { 2453 invalidParams.Add(request.NewErrParamMinLen("Arn", 12)) 2454 } 2455 2456 if invalidParams.Len() > 0 { 2457 return invalidParams 2458 } 2459 return nil 2460} 2461 2462// SetArn sets the Arn field's value. 2463func (s *GetTagsInput) SetArn(v string) *GetTagsInput { 2464 s.Arn = &v 2465 return s 2466} 2467 2468type GetTagsOutput struct { 2469 _ struct{} `type:"structure"` 2470 2471 // The ARN of the tagged resource group. 2472 Arn *string `min:"12" type:"string"` 2473 2474 // The tags associated with the specified resource group. 2475 Tags map[string]*string `type:"map"` 2476} 2477 2478// String returns the string representation 2479func (s GetTagsOutput) String() string { 2480 return awsutil.Prettify(s) 2481} 2482 2483// GoString returns the string representation 2484func (s GetTagsOutput) GoString() string { 2485 return s.String() 2486} 2487 2488// SetArn sets the Arn field's value. 2489func (s *GetTagsOutput) SetArn(v string) *GetTagsOutput { 2490 s.Arn = &v 2491 return s 2492} 2493 2494// SetTags sets the Tags field's value. 2495func (s *GetTagsOutput) SetTags(v map[string]*string) *GetTagsOutput { 2496 s.Tags = v 2497 return s 2498} 2499 2500// A resource group that contains AWS resources. You can assign resources to 2501// the group by associating either of the following elements with the group: 2502// 2503// * ResourceQuery - Use a resource query to specify a set of tag keys and 2504// values. All resources in the same AWS Region and AWS account that have 2505// those keys with the same values are included in the group. You can add 2506// a resource query when you create the group, or later by using the PutGroupConfiguration 2507// operation. 2508// 2509// * GroupConfiguration - Use a service configuration to associate the group 2510// with an AWS service. The configuration specifies which resource types 2511// can be included in the group. 2512type Group struct { 2513 _ struct{} `type:"structure"` 2514 2515 // The description of the resource group. 2516 Description *string `type:"string"` 2517 2518 // The ARN of the resource group. 2519 // 2520 // GroupArn is a required field 2521 GroupArn *string `min:"12" type:"string" required:"true"` 2522 2523 // The name of the resource group. 2524 // 2525 // Name is a required field 2526 Name *string `min:"1" type:"string" required:"true"` 2527} 2528 2529// String returns the string representation 2530func (s Group) String() string { 2531 return awsutil.Prettify(s) 2532} 2533 2534// GoString returns the string representation 2535func (s Group) GoString() string { 2536 return s.String() 2537} 2538 2539// SetDescription sets the Description field's value. 2540func (s *Group) SetDescription(v string) *Group { 2541 s.Description = &v 2542 return s 2543} 2544 2545// SetGroupArn sets the GroupArn field's value. 2546func (s *Group) SetGroupArn(v string) *Group { 2547 s.GroupArn = &v 2548 return s 2549} 2550 2551// SetName sets the Name field's value. 2552func (s *Group) SetName(v string) *Group { 2553 s.Name = &v 2554 return s 2555} 2556 2557// A service configuration associated with a resource group. The configuration 2558// options are determined by the AWS service that defines the Type, and specifies 2559// which resources can be included in the group. You can add a service configuration 2560// when you create the group by using CreateGroup, or later by using the PutGroupConfiguration 2561// operation. For details about group service configuration syntax, see Service 2562// configurations for resource groups (https://docs.aws.amazon.com/ARG/latest/APIReference/about-slg.html). 2563type GroupConfiguration struct { 2564 _ struct{} `type:"structure"` 2565 2566 // The configuration currently associated with the group and in effect. 2567 Configuration []*GroupConfigurationItem `type:"list"` 2568 2569 // If present, the reason why a request to update the group configuration failed. 2570 FailureReason *string `type:"string"` 2571 2572 // If present, the new configuration that is in the process of being applied 2573 // to the group. 2574 ProposedConfiguration []*GroupConfigurationItem `type:"list"` 2575 2576 // The current status of an attempt to update the group configuration. 2577 Status *string `type:"string" enum:"GroupConfigurationStatus"` 2578} 2579 2580// String returns the string representation 2581func (s GroupConfiguration) String() string { 2582 return awsutil.Prettify(s) 2583} 2584 2585// GoString returns the string representation 2586func (s GroupConfiguration) GoString() string { 2587 return s.String() 2588} 2589 2590// SetConfiguration sets the Configuration field's value. 2591func (s *GroupConfiguration) SetConfiguration(v []*GroupConfigurationItem) *GroupConfiguration { 2592 s.Configuration = v 2593 return s 2594} 2595 2596// SetFailureReason sets the FailureReason field's value. 2597func (s *GroupConfiguration) SetFailureReason(v string) *GroupConfiguration { 2598 s.FailureReason = &v 2599 return s 2600} 2601 2602// SetProposedConfiguration sets the ProposedConfiguration field's value. 2603func (s *GroupConfiguration) SetProposedConfiguration(v []*GroupConfigurationItem) *GroupConfiguration { 2604 s.ProposedConfiguration = v 2605 return s 2606} 2607 2608// SetStatus sets the Status field's value. 2609func (s *GroupConfiguration) SetStatus(v string) *GroupConfiguration { 2610 s.Status = &v 2611 return s 2612} 2613 2614// An item in a group configuration. A group service configuration can have 2615// one or more items. For details about group service configuration syntax, 2616// see Service configurations for resource groups (https://docs.aws.amazon.com/ARG/latest/APIReference/about-slg.html). 2617type GroupConfigurationItem struct { 2618 _ struct{} `type:"structure"` 2619 2620 // A collection of parameters for this group configuration item. For the list 2621 // of parameters that you can use with each configuration item type, see Supported 2622 // resource types and parameters (https://docs.aws.amazon.com/ARG/latest/APIReference/about-slg.html#about-slg-types). 2623 Parameters []*GroupConfigurationParameter `type:"list"` 2624 2625 // Specifies the type of group configuration item. Each item must have a unique 2626 // value for type. For the list of types that you can specify for a configuration 2627 // item, see Supported resource types and parameters (https://docs.aws.amazon.com/ARG/latest/APIReference/about-slg.html#about-slg-types). 2628 // 2629 // Type is a required field 2630 Type *string `type:"string" required:"true"` 2631} 2632 2633// String returns the string representation 2634func (s GroupConfigurationItem) String() string { 2635 return awsutil.Prettify(s) 2636} 2637 2638// GoString returns the string representation 2639func (s GroupConfigurationItem) GoString() string { 2640 return s.String() 2641} 2642 2643// Validate inspects the fields of the type to determine if they are valid. 2644func (s *GroupConfigurationItem) Validate() error { 2645 invalidParams := request.ErrInvalidParams{Context: "GroupConfigurationItem"} 2646 if s.Type == nil { 2647 invalidParams.Add(request.NewErrParamRequired("Type")) 2648 } 2649 if s.Parameters != nil { 2650 for i, v := range s.Parameters { 2651 if v == nil { 2652 continue 2653 } 2654 if err := v.Validate(); err != nil { 2655 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Parameters", i), err.(request.ErrInvalidParams)) 2656 } 2657 } 2658 } 2659 2660 if invalidParams.Len() > 0 { 2661 return invalidParams 2662 } 2663 return nil 2664} 2665 2666// SetParameters sets the Parameters field's value. 2667func (s *GroupConfigurationItem) SetParameters(v []*GroupConfigurationParameter) *GroupConfigurationItem { 2668 s.Parameters = v 2669 return s 2670} 2671 2672// SetType sets the Type field's value. 2673func (s *GroupConfigurationItem) SetType(v string) *GroupConfigurationItem { 2674 s.Type = &v 2675 return s 2676} 2677 2678// A parameter for a group configuration item. For details about group service 2679// configuration syntax, see Service configurations for resource groups (https://docs.aws.amazon.com/ARG/latest/APIReference/about-slg.html). 2680type GroupConfigurationParameter struct { 2681 _ struct{} `type:"structure"` 2682 2683 // The name of the group configuration parameter. For the list of parameters 2684 // that you can use with each configuration item type, see Supported resource 2685 // types and parameters (https://docs.aws.amazon.com/ARG/latest/APIReference/about-slg.html#about-slg-types). 2686 // 2687 // Name is a required field 2688 Name *string `min:"1" type:"string" required:"true"` 2689 2690 // The value or values to be used for the specified parameter. For the list 2691 // of values you can use with each parameter, see Supported resource types and 2692 // parameters (https://docs.aws.amazon.com/ARG/latest/APIReference/about-slg.html#about-slg-types). 2693 Values []*string `type:"list"` 2694} 2695 2696// String returns the string representation 2697func (s GroupConfigurationParameter) String() string { 2698 return awsutil.Prettify(s) 2699} 2700 2701// GoString returns the string representation 2702func (s GroupConfigurationParameter) GoString() string { 2703 return s.String() 2704} 2705 2706// Validate inspects the fields of the type to determine if they are valid. 2707func (s *GroupConfigurationParameter) Validate() error { 2708 invalidParams := request.ErrInvalidParams{Context: "GroupConfigurationParameter"} 2709 if s.Name == nil { 2710 invalidParams.Add(request.NewErrParamRequired("Name")) 2711 } 2712 if s.Name != nil && len(*s.Name) < 1 { 2713 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 2714 } 2715 2716 if invalidParams.Len() > 0 { 2717 return invalidParams 2718 } 2719 return nil 2720} 2721 2722// SetName sets the Name field's value. 2723func (s *GroupConfigurationParameter) SetName(v string) *GroupConfigurationParameter { 2724 s.Name = &v 2725 return s 2726} 2727 2728// SetValues sets the Values field's value. 2729func (s *GroupConfigurationParameter) SetValues(v []*string) *GroupConfigurationParameter { 2730 s.Values = v 2731 return s 2732} 2733 2734// A filter collection that you can use to restrict the results from a List 2735// operation to only those you want to include. 2736type GroupFilter struct { 2737 _ struct{} `type:"structure"` 2738 2739 // The name of the filter. Filter names are case-sensitive. 2740 // 2741 // Name is a required field 2742 Name *string `type:"string" required:"true" enum:"GroupFilterName"` 2743 2744 // One or more filter values. Allowed filter values vary by group filter name, 2745 // and are case-sensitive. 2746 // 2747 // Values is a required field 2748 Values []*string `min:"1" type:"list" required:"true"` 2749} 2750 2751// String returns the string representation 2752func (s GroupFilter) String() string { 2753 return awsutil.Prettify(s) 2754} 2755 2756// GoString returns the string representation 2757func (s GroupFilter) GoString() string { 2758 return s.String() 2759} 2760 2761// Validate inspects the fields of the type to determine if they are valid. 2762func (s *GroupFilter) Validate() error { 2763 invalidParams := request.ErrInvalidParams{Context: "GroupFilter"} 2764 if s.Name == nil { 2765 invalidParams.Add(request.NewErrParamRequired("Name")) 2766 } 2767 if s.Values == nil { 2768 invalidParams.Add(request.NewErrParamRequired("Values")) 2769 } 2770 if s.Values != nil && len(s.Values) < 1 { 2771 invalidParams.Add(request.NewErrParamMinLen("Values", 1)) 2772 } 2773 2774 if invalidParams.Len() > 0 { 2775 return invalidParams 2776 } 2777 return nil 2778} 2779 2780// SetName sets the Name field's value. 2781func (s *GroupFilter) SetName(v string) *GroupFilter { 2782 s.Name = &v 2783 return s 2784} 2785 2786// SetValues sets the Values field's value. 2787func (s *GroupFilter) SetValues(v []*string) *GroupFilter { 2788 s.Values = v 2789 return s 2790} 2791 2792// The unique identifiers for a resource group. 2793type GroupIdentifier struct { 2794 _ struct{} `type:"structure"` 2795 2796 // The ARN of the resource group. 2797 GroupArn *string `min:"12" type:"string"` 2798 2799 // The name of the resource group. 2800 GroupName *string `min:"1" type:"string"` 2801} 2802 2803// String returns the string representation 2804func (s GroupIdentifier) String() string { 2805 return awsutil.Prettify(s) 2806} 2807 2808// GoString returns the string representation 2809func (s GroupIdentifier) GoString() string { 2810 return s.String() 2811} 2812 2813// SetGroupArn sets the GroupArn field's value. 2814func (s *GroupIdentifier) SetGroupArn(v string) *GroupIdentifier { 2815 s.GroupArn = &v 2816 return s 2817} 2818 2819// SetGroupName sets the GroupName field's value. 2820func (s *GroupIdentifier) SetGroupName(v string) *GroupIdentifier { 2821 s.GroupName = &v 2822 return s 2823} 2824 2825// A mapping of a query attached to a resource group that determines the AWS 2826// resources that are members of the group. 2827type GroupQuery struct { 2828 _ struct{} `type:"structure"` 2829 2830 // The name of the resource group that is associated with the specified resource 2831 // query. 2832 // 2833 // GroupName is a required field 2834 GroupName *string `min:"1" type:"string" required:"true"` 2835 2836 // The resource query that determines which AWS resources are members of the 2837 // associated resource group. 2838 // 2839 // ResourceQuery is a required field 2840 ResourceQuery *ResourceQuery `type:"structure" required:"true"` 2841} 2842 2843// String returns the string representation 2844func (s GroupQuery) String() string { 2845 return awsutil.Prettify(s) 2846} 2847 2848// GoString returns the string representation 2849func (s GroupQuery) GoString() string { 2850 return s.String() 2851} 2852 2853// SetGroupName sets the GroupName field's value. 2854func (s *GroupQuery) SetGroupName(v string) *GroupQuery { 2855 s.GroupName = &v 2856 return s 2857} 2858 2859// SetResourceQuery sets the ResourceQuery field's value. 2860func (s *GroupQuery) SetResourceQuery(v *ResourceQuery) *GroupQuery { 2861 s.ResourceQuery = v 2862 return s 2863} 2864 2865type GroupResourcesInput struct { 2866 _ struct{} `type:"structure"` 2867 2868 // The name or the ARN of the resource group to add resources to. 2869 // 2870 // Group is a required field 2871 Group *string `min:"1" type:"string" required:"true"` 2872 2873 // The list of ARNs for resources to be added to the group. 2874 // 2875 // ResourceArns is a required field 2876 ResourceArns []*string `min:"1" type:"list" required:"true"` 2877} 2878 2879// String returns the string representation 2880func (s GroupResourcesInput) String() string { 2881 return awsutil.Prettify(s) 2882} 2883 2884// GoString returns the string representation 2885func (s GroupResourcesInput) GoString() string { 2886 return s.String() 2887} 2888 2889// Validate inspects the fields of the type to determine if they are valid. 2890func (s *GroupResourcesInput) Validate() error { 2891 invalidParams := request.ErrInvalidParams{Context: "GroupResourcesInput"} 2892 if s.Group == nil { 2893 invalidParams.Add(request.NewErrParamRequired("Group")) 2894 } 2895 if s.Group != nil && len(*s.Group) < 1 { 2896 invalidParams.Add(request.NewErrParamMinLen("Group", 1)) 2897 } 2898 if s.ResourceArns == nil { 2899 invalidParams.Add(request.NewErrParamRequired("ResourceArns")) 2900 } 2901 if s.ResourceArns != nil && len(s.ResourceArns) < 1 { 2902 invalidParams.Add(request.NewErrParamMinLen("ResourceArns", 1)) 2903 } 2904 2905 if invalidParams.Len() > 0 { 2906 return invalidParams 2907 } 2908 return nil 2909} 2910 2911// SetGroup sets the Group field's value. 2912func (s *GroupResourcesInput) SetGroup(v string) *GroupResourcesInput { 2913 s.Group = &v 2914 return s 2915} 2916 2917// SetResourceArns sets the ResourceArns field's value. 2918func (s *GroupResourcesInput) SetResourceArns(v []*string) *GroupResourcesInput { 2919 s.ResourceArns = v 2920 return s 2921} 2922 2923type GroupResourcesOutput struct { 2924 _ struct{} `type:"structure"` 2925 2926 // A list of ARNs of any resources that failed to be added to the group by this 2927 // operation. 2928 Failed []*FailedResource `type:"list"` 2929 2930 // A list of ARNs of any resources that are still in the process of being added 2931 // to the group by this operation. These pending additions continue asynchronously. 2932 // You can check the status of pending additions by using the ListGroupResources 2933 // operation, and checking the Resources array in the response and the Status 2934 // field of each object in that array. 2935 Pending []*PendingResource `type:"list"` 2936 2937 // A list of ARNs of resources that were successfully added to the group by 2938 // this operation. 2939 Succeeded []*string `min:"1" type:"list"` 2940} 2941 2942// String returns the string representation 2943func (s GroupResourcesOutput) String() string { 2944 return awsutil.Prettify(s) 2945} 2946 2947// GoString returns the string representation 2948func (s GroupResourcesOutput) GoString() string { 2949 return s.String() 2950} 2951 2952// SetFailed sets the Failed field's value. 2953func (s *GroupResourcesOutput) SetFailed(v []*FailedResource) *GroupResourcesOutput { 2954 s.Failed = v 2955 return s 2956} 2957 2958// SetPending sets the Pending field's value. 2959func (s *GroupResourcesOutput) SetPending(v []*PendingResource) *GroupResourcesOutput { 2960 s.Pending = v 2961 return s 2962} 2963 2964// SetSucceeded sets the Succeeded field's value. 2965func (s *GroupResourcesOutput) SetSucceeded(v []*string) *GroupResourcesOutput { 2966 s.Succeeded = v 2967 return s 2968} 2969 2970// An internal error occurred while processing the request. Try again later. 2971type InternalServerErrorException struct { 2972 _ struct{} `type:"structure"` 2973 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2974 2975 Message_ *string `locationName:"Message" min:"1" type:"string"` 2976} 2977 2978// String returns the string representation 2979func (s InternalServerErrorException) String() string { 2980 return awsutil.Prettify(s) 2981} 2982 2983// GoString returns the string representation 2984func (s InternalServerErrorException) GoString() string { 2985 return s.String() 2986} 2987 2988func newErrorInternalServerErrorException(v protocol.ResponseMetadata) error { 2989 return &InternalServerErrorException{ 2990 RespMetadata: v, 2991 } 2992} 2993 2994// Code returns the exception type name. 2995func (s *InternalServerErrorException) Code() string { 2996 return "InternalServerErrorException" 2997} 2998 2999// Message returns the exception's message. 3000func (s *InternalServerErrorException) Message() string { 3001 if s.Message_ != nil { 3002 return *s.Message_ 3003 } 3004 return "" 3005} 3006 3007// OrigErr always returns nil, satisfies awserr.Error interface. 3008func (s *InternalServerErrorException) OrigErr() error { 3009 return nil 3010} 3011 3012func (s *InternalServerErrorException) Error() string { 3013 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3014} 3015 3016// Status code returns the HTTP status code for the request's response error. 3017func (s *InternalServerErrorException) StatusCode() int { 3018 return s.RespMetadata.StatusCode 3019} 3020 3021// RequestID returns the service's response RequestID for request. 3022func (s *InternalServerErrorException) RequestID() string { 3023 return s.RespMetadata.RequestID 3024} 3025 3026type ListGroupResourcesInput struct { 3027 _ struct{} `type:"structure"` 3028 3029 // Filters, formatted as ResourceFilter objects, that you want to apply to a 3030 // ListGroupResources operation. Filters the results to include only those of 3031 // the specified resource types. 3032 // 3033 // * resource-type - Filter resources by their type. Specify up to five resource 3034 // types in the format AWS::ServiceCode::ResourceType. For example, AWS::EC2::Instance, 3035 // or AWS::S3::Bucket. 3036 // 3037 // When you specify a resource-type filter for ListGroupResources, AWS Resource 3038 // Groups validates your filter resource types against the types that are defined 3039 // in the query associated with the group. For example, if a group contains 3040 // only S3 buckets because its query specifies only that resource type, but 3041 // your resource-type filter includes EC2 instances, AWS Resource Groups does 3042 // not filter for EC2 instances. In this case, a ListGroupResources request 3043 // returns a BadRequestException error with a message similar to the following: 3044 // 3045 // The resource types specified as filters in the request are not valid. 3046 // 3047 // The error includes a list of resource types that failed the validation because 3048 // they are not part of the query associated with the group. This validation 3049 // doesn't occur when the group query specifies AWS::AllSupported, because a 3050 // group based on such a query can contain any of the allowed resource types 3051 // for the query type (tag-based or AWS CloudFormation stack-based queries). 3052 Filters []*ResourceFilter `type:"list"` 3053 3054 // The name or the ARN of the resource group 3055 Group *string `min:"1" type:"string"` 3056 3057 // 3058 // Deprecated - don't use this parameter. Use the Group request field instead. 3059 // 3060 // Deprecated: This field is deprecated, use Group instead. 3061 GroupName *string `min:"1" deprecated:"true" type:"string"` 3062 3063 // The total number of results that you want included on each page of the response. 3064 // If you do not include this parameter, it defaults to a value that is specific 3065 // to the operation. If additional items exist beyond the maximum you specify, 3066 // the NextToken response element is present and has a value (is not null). 3067 // Include that value as the NextToken request parameter in the next call to 3068 // the operation to get the next part of the results. Note that the service 3069 // might return fewer results than the maximum even when there are more results 3070 // available. You should check NextToken after every operation to ensure that 3071 // you receive all of the results. 3072 MaxResults *int64 `min:"1" type:"integer"` 3073 3074 // The parameter for receiving additional results if you receive a NextToken 3075 // response in a previous request. A NextToken response indicates that more 3076 // output is available. Set this parameter to the value provided by a previous 3077 // call's NextToken response to indicate where the output should continue from. 3078 NextToken *string `type:"string"` 3079} 3080 3081// String returns the string representation 3082func (s ListGroupResourcesInput) String() string { 3083 return awsutil.Prettify(s) 3084} 3085 3086// GoString returns the string representation 3087func (s ListGroupResourcesInput) GoString() string { 3088 return s.String() 3089} 3090 3091// Validate inspects the fields of the type to determine if they are valid. 3092func (s *ListGroupResourcesInput) Validate() error { 3093 invalidParams := request.ErrInvalidParams{Context: "ListGroupResourcesInput"} 3094 if s.Group != nil && len(*s.Group) < 1 { 3095 invalidParams.Add(request.NewErrParamMinLen("Group", 1)) 3096 } 3097 if s.GroupName != nil && len(*s.GroupName) < 1 { 3098 invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) 3099 } 3100 if s.MaxResults != nil && *s.MaxResults < 1 { 3101 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 3102 } 3103 if s.Filters != nil { 3104 for i, v := range s.Filters { 3105 if v == nil { 3106 continue 3107 } 3108 if err := v.Validate(); err != nil { 3109 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) 3110 } 3111 } 3112 } 3113 3114 if invalidParams.Len() > 0 { 3115 return invalidParams 3116 } 3117 return nil 3118} 3119 3120// SetFilters sets the Filters field's value. 3121func (s *ListGroupResourcesInput) SetFilters(v []*ResourceFilter) *ListGroupResourcesInput { 3122 s.Filters = v 3123 return s 3124} 3125 3126// SetGroup sets the Group field's value. 3127func (s *ListGroupResourcesInput) SetGroup(v string) *ListGroupResourcesInput { 3128 s.Group = &v 3129 return s 3130} 3131 3132// SetGroupName sets the GroupName field's value. 3133func (s *ListGroupResourcesInput) SetGroupName(v string) *ListGroupResourcesInput { 3134 s.GroupName = &v 3135 return s 3136} 3137 3138// SetMaxResults sets the MaxResults field's value. 3139func (s *ListGroupResourcesInput) SetMaxResults(v int64) *ListGroupResourcesInput { 3140 s.MaxResults = &v 3141 return s 3142} 3143 3144// SetNextToken sets the NextToken field's value. 3145func (s *ListGroupResourcesInput) SetNextToken(v string) *ListGroupResourcesInput { 3146 s.NextToken = &v 3147 return s 3148} 3149 3150// A structure returned by the ListGroupResources operation that contains identity 3151// and group membership status information for one of the resources in the group. 3152type ListGroupResourcesItem struct { 3153 _ struct{} `type:"structure"` 3154 3155 // A structure that contains the ARN of a resource and its resource type. 3156 Identifier *ResourceIdentifier `type:"structure"` 3157 3158 // A structure that contains the status of this resource's membership in the 3159 // group. 3160 // 3161 // This field is present in the response only if the group is of type AWS::EC2::HostManagement. 3162 Status *ResourceStatus `type:"structure"` 3163} 3164 3165// String returns the string representation 3166func (s ListGroupResourcesItem) String() string { 3167 return awsutil.Prettify(s) 3168} 3169 3170// GoString returns the string representation 3171func (s ListGroupResourcesItem) GoString() string { 3172 return s.String() 3173} 3174 3175// SetIdentifier sets the Identifier field's value. 3176func (s *ListGroupResourcesItem) SetIdentifier(v *ResourceIdentifier) *ListGroupResourcesItem { 3177 s.Identifier = v 3178 return s 3179} 3180 3181// SetStatus sets the Status field's value. 3182func (s *ListGroupResourcesItem) SetStatus(v *ResourceStatus) *ListGroupResourcesItem { 3183 s.Status = v 3184 return s 3185} 3186 3187type ListGroupResourcesOutput struct { 3188 _ struct{} `type:"structure"` 3189 3190 // If present, indicates that more output is available than is included in the 3191 // current response. Use this value in the NextToken request parameter in a 3192 // subsequent call to the operation to get the next part of the output. You 3193 // should repeat this until the NextToken response element comes back as null. 3194 NextToken *string `type:"string"` 3195 3196 // A list of QueryError objects. Each error is an object that contains ErrorCode 3197 // and Message structures. Possible values for ErrorCode are CLOUDFORMATION_STACK_INACTIVE 3198 // and CLOUDFORMATION_STACK_NOT_EXISTING. 3199 QueryErrors []*QueryError `type:"list"` 3200 3201 // 3202 // Deprecated - don't use this parameter. Use the Resources response field 3203 // instead. 3204 // 3205 // Deprecated: This field is deprecated, use Resources instead. 3206 ResourceIdentifiers []*ResourceIdentifier `deprecated:"true" type:"list"` 3207 3208 // An array of resources from which you can determine each resource's identity, 3209 // type, and group membership status. 3210 Resources []*ListGroupResourcesItem `type:"list"` 3211} 3212 3213// String returns the string representation 3214func (s ListGroupResourcesOutput) String() string { 3215 return awsutil.Prettify(s) 3216} 3217 3218// GoString returns the string representation 3219func (s ListGroupResourcesOutput) GoString() string { 3220 return s.String() 3221} 3222 3223// SetNextToken sets the NextToken field's value. 3224func (s *ListGroupResourcesOutput) SetNextToken(v string) *ListGroupResourcesOutput { 3225 s.NextToken = &v 3226 return s 3227} 3228 3229// SetQueryErrors sets the QueryErrors field's value. 3230func (s *ListGroupResourcesOutput) SetQueryErrors(v []*QueryError) *ListGroupResourcesOutput { 3231 s.QueryErrors = v 3232 return s 3233} 3234 3235// SetResourceIdentifiers sets the ResourceIdentifiers field's value. 3236func (s *ListGroupResourcesOutput) SetResourceIdentifiers(v []*ResourceIdentifier) *ListGroupResourcesOutput { 3237 s.ResourceIdentifiers = v 3238 return s 3239} 3240 3241// SetResources sets the Resources field's value. 3242func (s *ListGroupResourcesOutput) SetResources(v []*ListGroupResourcesItem) *ListGroupResourcesOutput { 3243 s.Resources = v 3244 return s 3245} 3246 3247type ListGroupsInput struct { 3248 _ struct{} `type:"structure"` 3249 3250 // Filters, formatted as GroupFilter objects, that you want to apply to a ListGroups 3251 // operation. 3252 // 3253 // * resource-type - Filter the results to include only those of the specified 3254 // resource types. Specify up to five resource types in the format AWS::ServiceCode::ResourceType 3255 // . For example, AWS::EC2::Instance, or AWS::S3::Bucket. 3256 // 3257 // * configuration-type - Filter the results to include only those groups 3258 // that have the specified configuration types attached. The current supported 3259 // values are: AWS:EC2::CapacityReservationPool AWS:EC2::HostManagement 3260 Filters []*GroupFilter `type:"list"` 3261 3262 // The total number of results that you want included on each page of the response. 3263 // If you do not include this parameter, it defaults to a value that is specific 3264 // to the operation. If additional items exist beyond the maximum you specify, 3265 // the NextToken response element is present and has a value (is not null). 3266 // Include that value as the NextToken request parameter in the next call to 3267 // the operation to get the next part of the results. Note that the service 3268 // might return fewer results than the maximum even when there are more results 3269 // available. You should check NextToken after every operation to ensure that 3270 // you receive all of the results. 3271 MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` 3272 3273 // The parameter for receiving additional results if you receive a NextToken 3274 // response in a previous request. A NextToken response indicates that more 3275 // output is available. Set this parameter to the value provided by a previous 3276 // call's NextToken response to indicate where the output should continue from. 3277 NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` 3278} 3279 3280// String returns the string representation 3281func (s ListGroupsInput) String() string { 3282 return awsutil.Prettify(s) 3283} 3284 3285// GoString returns the string representation 3286func (s ListGroupsInput) GoString() string { 3287 return s.String() 3288} 3289 3290// Validate inspects the fields of the type to determine if they are valid. 3291func (s *ListGroupsInput) Validate() error { 3292 invalidParams := request.ErrInvalidParams{Context: "ListGroupsInput"} 3293 if s.MaxResults != nil && *s.MaxResults < 1 { 3294 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 3295 } 3296 if s.Filters != nil { 3297 for i, v := range s.Filters { 3298 if v == nil { 3299 continue 3300 } 3301 if err := v.Validate(); err != nil { 3302 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) 3303 } 3304 } 3305 } 3306 3307 if invalidParams.Len() > 0 { 3308 return invalidParams 3309 } 3310 return nil 3311} 3312 3313// SetFilters sets the Filters field's value. 3314func (s *ListGroupsInput) SetFilters(v []*GroupFilter) *ListGroupsInput { 3315 s.Filters = v 3316 return s 3317} 3318 3319// SetMaxResults sets the MaxResults field's value. 3320func (s *ListGroupsInput) SetMaxResults(v int64) *ListGroupsInput { 3321 s.MaxResults = &v 3322 return s 3323} 3324 3325// SetNextToken sets the NextToken field's value. 3326func (s *ListGroupsInput) SetNextToken(v string) *ListGroupsInput { 3327 s.NextToken = &v 3328 return s 3329} 3330 3331type ListGroupsOutput struct { 3332 _ struct{} `type:"structure"` 3333 3334 // A list of GroupIdentifier objects. Each identifier is an object that contains 3335 // both the Name and the GroupArn. 3336 GroupIdentifiers []*GroupIdentifier `type:"list"` 3337 3338 // 3339 // Deprecated - don't use this field. Use the GroupIdentifiers response field 3340 // instead. 3341 // 3342 // Deprecated: This field is deprecated, use GroupIdentifiers instead. 3343 Groups []*Group `deprecated:"true" type:"list"` 3344 3345 // If present, indicates that more output is available than is included in the 3346 // current response. Use this value in the NextToken request parameter in a 3347 // subsequent call to the operation to get the next part of the output. You 3348 // should repeat this until the NextToken response element comes back as null. 3349 NextToken *string `type:"string"` 3350} 3351 3352// String returns the string representation 3353func (s ListGroupsOutput) String() string { 3354 return awsutil.Prettify(s) 3355} 3356 3357// GoString returns the string representation 3358func (s ListGroupsOutput) GoString() string { 3359 return s.String() 3360} 3361 3362// SetGroupIdentifiers sets the GroupIdentifiers field's value. 3363func (s *ListGroupsOutput) SetGroupIdentifiers(v []*GroupIdentifier) *ListGroupsOutput { 3364 s.GroupIdentifiers = v 3365 return s 3366} 3367 3368// SetGroups sets the Groups field's value. 3369func (s *ListGroupsOutput) SetGroups(v []*Group) *ListGroupsOutput { 3370 s.Groups = v 3371 return s 3372} 3373 3374// SetNextToken sets the NextToken field's value. 3375func (s *ListGroupsOutput) SetNextToken(v string) *ListGroupsOutput { 3376 s.NextToken = &v 3377 return s 3378} 3379 3380// The request uses an HTTP method that isn't allowed for the specified resource. 3381type MethodNotAllowedException struct { 3382 _ struct{} `type:"structure"` 3383 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3384 3385 Message_ *string `locationName:"Message" min:"1" type:"string"` 3386} 3387 3388// String returns the string representation 3389func (s MethodNotAllowedException) String() string { 3390 return awsutil.Prettify(s) 3391} 3392 3393// GoString returns the string representation 3394func (s MethodNotAllowedException) GoString() string { 3395 return s.String() 3396} 3397 3398func newErrorMethodNotAllowedException(v protocol.ResponseMetadata) error { 3399 return &MethodNotAllowedException{ 3400 RespMetadata: v, 3401 } 3402} 3403 3404// Code returns the exception type name. 3405func (s *MethodNotAllowedException) Code() string { 3406 return "MethodNotAllowedException" 3407} 3408 3409// Message returns the exception's message. 3410func (s *MethodNotAllowedException) Message() string { 3411 if s.Message_ != nil { 3412 return *s.Message_ 3413 } 3414 return "" 3415} 3416 3417// OrigErr always returns nil, satisfies awserr.Error interface. 3418func (s *MethodNotAllowedException) OrigErr() error { 3419 return nil 3420} 3421 3422func (s *MethodNotAllowedException) Error() string { 3423 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3424} 3425 3426// Status code returns the HTTP status code for the request's response error. 3427func (s *MethodNotAllowedException) StatusCode() int { 3428 return s.RespMetadata.StatusCode 3429} 3430 3431// RequestID returns the service's response RequestID for request. 3432func (s *MethodNotAllowedException) RequestID() string { 3433 return s.RespMetadata.RequestID 3434} 3435 3436// One or more of the specified resources don't exist. 3437type NotFoundException struct { 3438 _ struct{} `type:"structure"` 3439 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3440 3441 Message_ *string `locationName:"Message" min:"1" type:"string"` 3442} 3443 3444// String returns the string representation 3445func (s NotFoundException) String() string { 3446 return awsutil.Prettify(s) 3447} 3448 3449// GoString returns the string representation 3450func (s NotFoundException) GoString() string { 3451 return s.String() 3452} 3453 3454func newErrorNotFoundException(v protocol.ResponseMetadata) error { 3455 return &NotFoundException{ 3456 RespMetadata: v, 3457 } 3458} 3459 3460// Code returns the exception type name. 3461func (s *NotFoundException) Code() string { 3462 return "NotFoundException" 3463} 3464 3465// Message returns the exception's message. 3466func (s *NotFoundException) Message() string { 3467 if s.Message_ != nil { 3468 return *s.Message_ 3469 } 3470 return "" 3471} 3472 3473// OrigErr always returns nil, satisfies awserr.Error interface. 3474func (s *NotFoundException) OrigErr() error { 3475 return nil 3476} 3477 3478func (s *NotFoundException) Error() string { 3479 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3480} 3481 3482// Status code returns the HTTP status code for the request's response error. 3483func (s *NotFoundException) StatusCode() int { 3484 return s.RespMetadata.StatusCode 3485} 3486 3487// RequestID returns the service's response RequestID for request. 3488func (s *NotFoundException) RequestID() string { 3489 return s.RespMetadata.RequestID 3490} 3491 3492// A structure that identifies a resource that is currently pending addition 3493// to the group as a member. Adding a resource to a resource group happens asynchronously 3494// as a background task and this one isn't completed yet. 3495type PendingResource struct { 3496 _ struct{} `type:"structure"` 3497 3498 // The Amazon resource name (ARN) of the resource that's in a pending state. 3499 ResourceArn *string `type:"string"` 3500} 3501 3502// String returns the string representation 3503func (s PendingResource) String() string { 3504 return awsutil.Prettify(s) 3505} 3506 3507// GoString returns the string representation 3508func (s PendingResource) GoString() string { 3509 return s.String() 3510} 3511 3512// SetResourceArn sets the ResourceArn field's value. 3513func (s *PendingResource) SetResourceArn(v string) *PendingResource { 3514 s.ResourceArn = &v 3515 return s 3516} 3517 3518type PutGroupConfigurationInput struct { 3519 _ struct{} `type:"structure"` 3520 3521 // The new configuration to associate with the specified group. A configuration 3522 // associates the resource group with an AWS service and specifies how the service 3523 // can interact with the resources in the group. A configuration is an array 3524 // of GroupConfigurationItem elements. 3525 // 3526 // For information about the syntax of a service configuration, see Service 3527 // configurations for resource groups (https://docs.aws.amazon.com/ARG/latest/APIReference/about-slg.html). 3528 // 3529 // A resource group can contain either a Configuration or a ResourceQuery, but 3530 // not both. 3531 Configuration []*GroupConfigurationItem `type:"list"` 3532 3533 // The name or ARN of the resource group with the configuration that you want 3534 // to update. 3535 Group *string `min:"1" type:"string"` 3536} 3537 3538// String returns the string representation 3539func (s PutGroupConfigurationInput) String() string { 3540 return awsutil.Prettify(s) 3541} 3542 3543// GoString returns the string representation 3544func (s PutGroupConfigurationInput) GoString() string { 3545 return s.String() 3546} 3547 3548// Validate inspects the fields of the type to determine if they are valid. 3549func (s *PutGroupConfigurationInput) Validate() error { 3550 invalidParams := request.ErrInvalidParams{Context: "PutGroupConfigurationInput"} 3551 if s.Group != nil && len(*s.Group) < 1 { 3552 invalidParams.Add(request.NewErrParamMinLen("Group", 1)) 3553 } 3554 if s.Configuration != nil { 3555 for i, v := range s.Configuration { 3556 if v == nil { 3557 continue 3558 } 3559 if err := v.Validate(); err != nil { 3560 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Configuration", i), err.(request.ErrInvalidParams)) 3561 } 3562 } 3563 } 3564 3565 if invalidParams.Len() > 0 { 3566 return invalidParams 3567 } 3568 return nil 3569} 3570 3571// SetConfiguration sets the Configuration field's value. 3572func (s *PutGroupConfigurationInput) SetConfiguration(v []*GroupConfigurationItem) *PutGroupConfigurationInput { 3573 s.Configuration = v 3574 return s 3575} 3576 3577// SetGroup sets the Group field's value. 3578func (s *PutGroupConfigurationInput) SetGroup(v string) *PutGroupConfigurationInput { 3579 s.Group = &v 3580 return s 3581} 3582 3583type PutGroupConfigurationOutput struct { 3584 _ struct{} `type:"structure"` 3585} 3586 3587// String returns the string representation 3588func (s PutGroupConfigurationOutput) String() string { 3589 return awsutil.Prettify(s) 3590} 3591 3592// GoString returns the string representation 3593func (s PutGroupConfigurationOutput) GoString() string { 3594 return s.String() 3595} 3596 3597// A two-part error structure that can occur in ListGroupResources or SearchResources 3598// operations on CloudFormation stack-based queries. The error occurs if the 3599// CloudFormation stack on which the query is based either does not exist, or 3600// has a status that renders the stack inactive. A QueryError occurrence does 3601// not necessarily mean that AWS Resource Groups could not complete the operation, 3602// but the resulting group might have no member resources. 3603type QueryError struct { 3604 _ struct{} `type:"structure"` 3605 3606 // Possible values are CLOUDFORMATION_STACK_INACTIVE and CLOUDFORMATION_STACK_NOT_EXISTING. 3607 ErrorCode *string `type:"string" enum:"QueryErrorCode"` 3608 3609 // A message that explains the ErrorCode value. Messages might state that the 3610 // specified CloudFormation stack does not exist (or no longer exists). For 3611 // CLOUDFORMATION_STACK_INACTIVE, the message typically states that the CloudFormation 3612 // stack has a status that is not (or no longer) active, such as CREATE_FAILED. 3613 Message *string `type:"string"` 3614} 3615 3616// String returns the string representation 3617func (s QueryError) String() string { 3618 return awsutil.Prettify(s) 3619} 3620 3621// GoString returns the string representation 3622func (s QueryError) GoString() string { 3623 return s.String() 3624} 3625 3626// SetErrorCode sets the ErrorCode field's value. 3627func (s *QueryError) SetErrorCode(v string) *QueryError { 3628 s.ErrorCode = &v 3629 return s 3630} 3631 3632// SetMessage sets the Message field's value. 3633func (s *QueryError) SetMessage(v string) *QueryError { 3634 s.Message = &v 3635 return s 3636} 3637 3638// A filter name and value pair that is used to obtain more specific results 3639// from a list of resources. 3640type ResourceFilter struct { 3641 _ struct{} `type:"structure"` 3642 3643 // The name of the filter. Filter names are case-sensitive. 3644 // 3645 // Name is a required field 3646 Name *string `type:"string" required:"true" enum:"ResourceFilterName"` 3647 3648 // One or more filter values. Allowed filter values vary by resource filter 3649 // name, and are case-sensitive. 3650 // 3651 // Values is a required field 3652 Values []*string `min:"1" type:"list" required:"true"` 3653} 3654 3655// String returns the string representation 3656func (s ResourceFilter) String() string { 3657 return awsutil.Prettify(s) 3658} 3659 3660// GoString returns the string representation 3661func (s ResourceFilter) GoString() string { 3662 return s.String() 3663} 3664 3665// Validate inspects the fields of the type to determine if they are valid. 3666func (s *ResourceFilter) Validate() error { 3667 invalidParams := request.ErrInvalidParams{Context: "ResourceFilter"} 3668 if s.Name == nil { 3669 invalidParams.Add(request.NewErrParamRequired("Name")) 3670 } 3671 if s.Values == nil { 3672 invalidParams.Add(request.NewErrParamRequired("Values")) 3673 } 3674 if s.Values != nil && len(s.Values) < 1 { 3675 invalidParams.Add(request.NewErrParamMinLen("Values", 1)) 3676 } 3677 3678 if invalidParams.Len() > 0 { 3679 return invalidParams 3680 } 3681 return nil 3682} 3683 3684// SetName sets the Name field's value. 3685func (s *ResourceFilter) SetName(v string) *ResourceFilter { 3686 s.Name = &v 3687 return s 3688} 3689 3690// SetValues sets the Values field's value. 3691func (s *ResourceFilter) SetValues(v []*string) *ResourceFilter { 3692 s.Values = v 3693 return s 3694} 3695 3696// A structure that contains the ARN of a resource and its resource type. 3697type ResourceIdentifier struct { 3698 _ struct{} `type:"structure"` 3699 3700 // The ARN of a resource. 3701 ResourceArn *string `type:"string"` 3702 3703 // The resource type of a resource, such as AWS::EC2::Instance. 3704 ResourceType *string `type:"string"` 3705} 3706 3707// String returns the string representation 3708func (s ResourceIdentifier) String() string { 3709 return awsutil.Prettify(s) 3710} 3711 3712// GoString returns the string representation 3713func (s ResourceIdentifier) GoString() string { 3714 return s.String() 3715} 3716 3717// SetResourceArn sets the ResourceArn field's value. 3718func (s *ResourceIdentifier) SetResourceArn(v string) *ResourceIdentifier { 3719 s.ResourceArn = &v 3720 return s 3721} 3722 3723// SetResourceType sets the ResourceType field's value. 3724func (s *ResourceIdentifier) SetResourceType(v string) *ResourceIdentifier { 3725 s.ResourceType = &v 3726 return s 3727} 3728 3729// The query that is used to define a resource group or a search for resources. 3730// A query specifies both a query type and a query string as a JSON object. 3731// See the examples section for example JSON strings. 3732// 3733// The examples that follow are shown as standard JSON strings. If you include 3734// such a string as a parameter to the AWS CLI or an SDK API, you might need 3735// to 'escape' the string into a single line. For example, see the Quoting strings 3736// (https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-parameters-quoting-strings.html) 3737// in the AWS CLI User Guide. 3738// 3739// Example 1 3740// 3741// The following generic example shows a resource query JSON string that includes 3742// only resources that meet the following criteria: 3743// 3744// * The resource type must be either resource_type1 or resource_type2. 3745// 3746// * The resource must have a tag Key1 with a value of either ValueA or ValueB. 3747// 3748// * The resource must have a tag Key2 with a value of either ValueC or ValueD. 3749// 3750// { "Type": "TAG_FILTERS_1_0", "Query": { "ResourceTypeFilters": [ "resource_type1", 3751// "resource_type2"], "TagFilters": [ { "Key": "Key1", "Values": ["ValueA","ValueB"] 3752// }, { "Key":"Key2", "Values":["ValueC","ValueD"] } ] } } 3753// 3754// This has the equivalent "shortcut" syntax of the following: 3755// 3756// { "Type": "TAG_FILTERS_1_0", "Query": { "ResourceTypeFilters": [ "resource_type1", 3757// "resource_type2"], "TagFilters": [ { "Key1": ["ValueA","ValueB"] }, { "Key2": 3758// ["ValueC","ValueD"] } ] } } 3759// 3760// Example 2 3761// 3762// The following example shows a resource query JSON string that includes only 3763// Amazon EC2 instances that are tagged Stage with a value of Test. 3764// 3765// { "Type": "TAG_FILTERS_1_0", "Query": "{ "ResourceTypeFilters": "AWS::EC2::Instance", 3766// "TagFilters": { "Stage": "Test" } } } 3767// 3768// Example 3 3769// 3770// The following example shows a resource query JSON string that includes resource 3771// of any supported type as long as it is tagged Stage with a value of Prod. 3772// 3773// { "Type": "TAG_FILTERS_1_0", "Query": { "ResourceTypeFilters": "AWS::AllSupported", 3774// "TagFilters": { "Stage": "Prod" } } } 3775// 3776// Example 4 3777// 3778// The following example shows a resource query JSON string that includes only 3779// Amazon EC2 instances and Amazon S3 buckets that are part of the specified 3780// AWS CloudFormation stack. 3781// 3782// { "Type": "CLOUDFORMATION_STACK_1_0", "Query": { "ResourceTypeFilters": [ 3783// "AWS::EC2::Instance", "AWS::S3::Bucket" ], "StackIdentifier": "arn:aws:cloudformation:us-west-2:123456789012:stack/AWStestuseraccount/fb0d5000-aba8-00e8-aa9e-50d5cEXAMPLE" 3784// } } 3785type ResourceQuery struct { 3786 _ struct{} `type:"structure"` 3787 3788 // The query that defines a group or a search. 3789 // 3790 // Query is a required field 3791 Query *string `type:"string" required:"true"` 3792 3793 // The type of the query. You can use the following values: 3794 // 3795 // * CLOUDFORMATION_STACK_1_0: Specifies that the Query contains an ARN for 3796 // a CloudFormation stack. 3797 // 3798 // * TAG_FILTERS_1_0: Specifies that the Query parameter contains a JSON 3799 // string that represents a collection of simple tag filters for resource 3800 // types and tags. The JSON string uses a syntax similar to the GetResources 3801 // (https://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/API_GetResources.html) 3802 // operation, but uses only the ResourceTypeFilters (https://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/API_GetResources.html#resourcegrouptagging-GetResources-request-ResourceTypeFilters) 3803 // and TagFilters (https://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/API_GetResources.html#resourcegrouptagging-GetResources-request-TagFiltersTagFilters) 3804 // fields. If you specify more than one tag key, only resources that match 3805 // all tag keys, and at least one value of each specified tag key, are returned 3806 // in your query. If you specify more than one value for a tag key, a resource 3807 // matches the filter if it has a tag key value that matches any of the specified 3808 // values. For example, consider the following sample query for resources 3809 // that have two tags, Stage and Version, with two values each: [{"Stage":["Test","Deploy"]},{"Version":["1","2"]}] 3810 // The results of this query could include the following. An EC2 instance 3811 // that has the following two tags: {"Stage":"Deploy"}, and {"Version":"2"} 3812 // An S3 bucket that has the following two tags: {"Stage":"Test"}, and {"Version":"1"} 3813 // The query would not include the following items in the results, however. 3814 // An EC2 instance that has only the following tag: {"Stage":"Deploy"}. The 3815 // instance does not have all of the tag keys specified in the filter, so 3816 // it is excluded from the results. An RDS database that has the following 3817 // two tags: {"Stage":"Archived"} and {"Version":"4"} The database has all 3818 // of the tag keys, but none of those keys has an associated value that matches 3819 // at least one of the specified values in the filter. 3820 // 3821 // Type is a required field 3822 Type *string `min:"1" type:"string" required:"true" enum:"QueryType"` 3823} 3824 3825// String returns the string representation 3826func (s ResourceQuery) String() string { 3827 return awsutil.Prettify(s) 3828} 3829 3830// GoString returns the string representation 3831func (s ResourceQuery) GoString() string { 3832 return s.String() 3833} 3834 3835// Validate inspects the fields of the type to determine if they are valid. 3836func (s *ResourceQuery) Validate() error { 3837 invalidParams := request.ErrInvalidParams{Context: "ResourceQuery"} 3838 if s.Query == nil { 3839 invalidParams.Add(request.NewErrParamRequired("Query")) 3840 } 3841 if s.Type == nil { 3842 invalidParams.Add(request.NewErrParamRequired("Type")) 3843 } 3844 if s.Type != nil && len(*s.Type) < 1 { 3845 invalidParams.Add(request.NewErrParamMinLen("Type", 1)) 3846 } 3847 3848 if invalidParams.Len() > 0 { 3849 return invalidParams 3850 } 3851 return nil 3852} 3853 3854// SetQuery sets the Query field's value. 3855func (s *ResourceQuery) SetQuery(v string) *ResourceQuery { 3856 s.Query = &v 3857 return s 3858} 3859 3860// SetType sets the Type field's value. 3861func (s *ResourceQuery) SetType(v string) *ResourceQuery { 3862 s.Type = &v 3863 return s 3864} 3865 3866// A structure that identifies the current group membership status for a resource. 3867// Adding a resource to a resource group is performed asynchronously as a background 3868// task. A PENDING status indicates, for this resource, that the process isn't 3869// completed yet. 3870type ResourceStatus struct { 3871 _ struct{} `type:"structure"` 3872 3873 // The current status. 3874 Name *string `type:"string" enum:"ResourceStatusValue"` 3875} 3876 3877// String returns the string representation 3878func (s ResourceStatus) String() string { 3879 return awsutil.Prettify(s) 3880} 3881 3882// GoString returns the string representation 3883func (s ResourceStatus) GoString() string { 3884 return s.String() 3885} 3886 3887// SetName sets the Name field's value. 3888func (s *ResourceStatus) SetName(v string) *ResourceStatus { 3889 s.Name = &v 3890 return s 3891} 3892 3893type SearchResourcesInput struct { 3894 _ struct{} `type:"structure"` 3895 3896 // The total number of results that you want included on each page of the response. 3897 // If you do not include this parameter, it defaults to a value that is specific 3898 // to the operation. If additional items exist beyond the maximum you specify, 3899 // the NextToken response element is present and has a value (is not null). 3900 // Include that value as the NextToken request parameter in the next call to 3901 // the operation to get the next part of the results. Note that the service 3902 // might return fewer results than the maximum even when there are more results 3903 // available. You should check NextToken after every operation to ensure that 3904 // you receive all of the results. 3905 MaxResults *int64 `min:"1" type:"integer"` 3906 3907 // The parameter for receiving additional results if you receive a NextToken 3908 // response in a previous request. A NextToken response indicates that more 3909 // output is available. Set this parameter to the value provided by a previous 3910 // call's NextToken response to indicate where the output should continue from. 3911 NextToken *string `type:"string"` 3912 3913 // The search query, using the same formats that are supported for resource 3914 // group definition. For more information, see CreateGroup. 3915 // 3916 // ResourceQuery is a required field 3917 ResourceQuery *ResourceQuery `type:"structure" required:"true"` 3918} 3919 3920// String returns the string representation 3921func (s SearchResourcesInput) String() string { 3922 return awsutil.Prettify(s) 3923} 3924 3925// GoString returns the string representation 3926func (s SearchResourcesInput) GoString() string { 3927 return s.String() 3928} 3929 3930// Validate inspects the fields of the type to determine if they are valid. 3931func (s *SearchResourcesInput) Validate() error { 3932 invalidParams := request.ErrInvalidParams{Context: "SearchResourcesInput"} 3933 if s.MaxResults != nil && *s.MaxResults < 1 { 3934 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 3935 } 3936 if s.ResourceQuery == nil { 3937 invalidParams.Add(request.NewErrParamRequired("ResourceQuery")) 3938 } 3939 if s.ResourceQuery != nil { 3940 if err := s.ResourceQuery.Validate(); err != nil { 3941 invalidParams.AddNested("ResourceQuery", err.(request.ErrInvalidParams)) 3942 } 3943 } 3944 3945 if invalidParams.Len() > 0 { 3946 return invalidParams 3947 } 3948 return nil 3949} 3950 3951// SetMaxResults sets the MaxResults field's value. 3952func (s *SearchResourcesInput) SetMaxResults(v int64) *SearchResourcesInput { 3953 s.MaxResults = &v 3954 return s 3955} 3956 3957// SetNextToken sets the NextToken field's value. 3958func (s *SearchResourcesInput) SetNextToken(v string) *SearchResourcesInput { 3959 s.NextToken = &v 3960 return s 3961} 3962 3963// SetResourceQuery sets the ResourceQuery field's value. 3964func (s *SearchResourcesInput) SetResourceQuery(v *ResourceQuery) *SearchResourcesInput { 3965 s.ResourceQuery = v 3966 return s 3967} 3968 3969type SearchResourcesOutput struct { 3970 _ struct{} `type:"structure"` 3971 3972 // If present, indicates that more output is available than is included in the 3973 // current response. Use this value in the NextToken request parameter in a 3974 // subsequent call to the operation to get the next part of the output. You 3975 // should repeat this until the NextToken response element comes back as null. 3976 NextToken *string `type:"string"` 3977 3978 // A list of QueryError objects. Each error is an object that contains ErrorCode 3979 // and Message structures. Possible values for ErrorCode are CLOUDFORMATION_STACK_INACTIVE 3980 // and CLOUDFORMATION_STACK_NOT_EXISTING. 3981 QueryErrors []*QueryError `type:"list"` 3982 3983 // The ARNs and resource types of resources that are members of the group that 3984 // you specified. 3985 ResourceIdentifiers []*ResourceIdentifier `type:"list"` 3986} 3987 3988// String returns the string representation 3989func (s SearchResourcesOutput) String() string { 3990 return awsutil.Prettify(s) 3991} 3992 3993// GoString returns the string representation 3994func (s SearchResourcesOutput) GoString() string { 3995 return s.String() 3996} 3997 3998// SetNextToken sets the NextToken field's value. 3999func (s *SearchResourcesOutput) SetNextToken(v string) *SearchResourcesOutput { 4000 s.NextToken = &v 4001 return s 4002} 4003 4004// SetQueryErrors sets the QueryErrors field's value. 4005func (s *SearchResourcesOutput) SetQueryErrors(v []*QueryError) *SearchResourcesOutput { 4006 s.QueryErrors = v 4007 return s 4008} 4009 4010// SetResourceIdentifiers sets the ResourceIdentifiers field's value. 4011func (s *SearchResourcesOutput) SetResourceIdentifiers(v []*ResourceIdentifier) *SearchResourcesOutput { 4012 s.ResourceIdentifiers = v 4013 return s 4014} 4015 4016type TagInput struct { 4017 _ struct{} `type:"structure"` 4018 4019 // The ARN of the resource group to which to add tags. 4020 // 4021 // Arn is a required field 4022 Arn *string `location:"uri" locationName:"Arn" min:"12" type:"string" required:"true"` 4023 4024 // The tags to add to the specified resource group. A tag is a string-to-string 4025 // map of key-value pairs. 4026 // 4027 // Tags is a required field 4028 Tags map[string]*string `type:"map" required:"true"` 4029} 4030 4031// String returns the string representation 4032func (s TagInput) String() string { 4033 return awsutil.Prettify(s) 4034} 4035 4036// GoString returns the string representation 4037func (s TagInput) GoString() string { 4038 return s.String() 4039} 4040 4041// Validate inspects the fields of the type to determine if they are valid. 4042func (s *TagInput) Validate() error { 4043 invalidParams := request.ErrInvalidParams{Context: "TagInput"} 4044 if s.Arn == nil { 4045 invalidParams.Add(request.NewErrParamRequired("Arn")) 4046 } 4047 if s.Arn != nil && len(*s.Arn) < 12 { 4048 invalidParams.Add(request.NewErrParamMinLen("Arn", 12)) 4049 } 4050 if s.Tags == nil { 4051 invalidParams.Add(request.NewErrParamRequired("Tags")) 4052 } 4053 4054 if invalidParams.Len() > 0 { 4055 return invalidParams 4056 } 4057 return nil 4058} 4059 4060// SetArn sets the Arn field's value. 4061func (s *TagInput) SetArn(v string) *TagInput { 4062 s.Arn = &v 4063 return s 4064} 4065 4066// SetTags sets the Tags field's value. 4067func (s *TagInput) SetTags(v map[string]*string) *TagInput { 4068 s.Tags = v 4069 return s 4070} 4071 4072type TagOutput struct { 4073 _ struct{} `type:"structure"` 4074 4075 // The ARN of the tagged resource. 4076 Arn *string `min:"12" type:"string"` 4077 4078 // The tags that have been added to the specified resource group. 4079 Tags map[string]*string `type:"map"` 4080} 4081 4082// String returns the string representation 4083func (s TagOutput) String() string { 4084 return awsutil.Prettify(s) 4085} 4086 4087// GoString returns the string representation 4088func (s TagOutput) GoString() string { 4089 return s.String() 4090} 4091 4092// SetArn sets the Arn field's value. 4093func (s *TagOutput) SetArn(v string) *TagOutput { 4094 s.Arn = &v 4095 return s 4096} 4097 4098// SetTags sets the Tags field's value. 4099func (s *TagOutput) SetTags(v map[string]*string) *TagOutput { 4100 s.Tags = v 4101 return s 4102} 4103 4104// You've exceeded throttling limits by making too many requests in a period 4105// of time. 4106type TooManyRequestsException struct { 4107 _ struct{} `type:"structure"` 4108 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4109 4110 Message_ *string `locationName:"Message" min:"1" type:"string"` 4111} 4112 4113// String returns the string representation 4114func (s TooManyRequestsException) String() string { 4115 return awsutil.Prettify(s) 4116} 4117 4118// GoString returns the string representation 4119func (s TooManyRequestsException) GoString() string { 4120 return s.String() 4121} 4122 4123func newErrorTooManyRequestsException(v protocol.ResponseMetadata) error { 4124 return &TooManyRequestsException{ 4125 RespMetadata: v, 4126 } 4127} 4128 4129// Code returns the exception type name. 4130func (s *TooManyRequestsException) Code() string { 4131 return "TooManyRequestsException" 4132} 4133 4134// Message returns the exception's message. 4135func (s *TooManyRequestsException) Message() string { 4136 if s.Message_ != nil { 4137 return *s.Message_ 4138 } 4139 return "" 4140} 4141 4142// OrigErr always returns nil, satisfies awserr.Error interface. 4143func (s *TooManyRequestsException) OrigErr() error { 4144 return nil 4145} 4146 4147func (s *TooManyRequestsException) Error() string { 4148 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 4149} 4150 4151// Status code returns the HTTP status code for the request's response error. 4152func (s *TooManyRequestsException) StatusCode() int { 4153 return s.RespMetadata.StatusCode 4154} 4155 4156// RequestID returns the service's response RequestID for request. 4157func (s *TooManyRequestsException) RequestID() string { 4158 return s.RespMetadata.RequestID 4159} 4160 4161// The request was rejected because it doesn't have valid credentials for the 4162// target resource. 4163type UnauthorizedException struct { 4164 _ struct{} `type:"structure"` 4165 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4166 4167 Message_ *string `locationName:"Message" min:"1" type:"string"` 4168} 4169 4170// String returns the string representation 4171func (s UnauthorizedException) String() string { 4172 return awsutil.Prettify(s) 4173} 4174 4175// GoString returns the string representation 4176func (s UnauthorizedException) GoString() string { 4177 return s.String() 4178} 4179 4180func newErrorUnauthorizedException(v protocol.ResponseMetadata) error { 4181 return &UnauthorizedException{ 4182 RespMetadata: v, 4183 } 4184} 4185 4186// Code returns the exception type name. 4187func (s *UnauthorizedException) Code() string { 4188 return "UnauthorizedException" 4189} 4190 4191// Message returns the exception's message. 4192func (s *UnauthorizedException) Message() string { 4193 if s.Message_ != nil { 4194 return *s.Message_ 4195 } 4196 return "" 4197} 4198 4199// OrigErr always returns nil, satisfies awserr.Error interface. 4200func (s *UnauthorizedException) OrigErr() error { 4201 return nil 4202} 4203 4204func (s *UnauthorizedException) Error() string { 4205 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 4206} 4207 4208// Status code returns the HTTP status code for the request's response error. 4209func (s *UnauthorizedException) StatusCode() int { 4210 return s.RespMetadata.StatusCode 4211} 4212 4213// RequestID returns the service's response RequestID for request. 4214func (s *UnauthorizedException) RequestID() string { 4215 return s.RespMetadata.RequestID 4216} 4217 4218type UngroupResourcesInput struct { 4219 _ struct{} `type:"structure"` 4220 4221 // The name or the ARN of the resource group from which to remove the resources. 4222 // 4223 // Group is a required field 4224 Group *string `min:"1" type:"string" required:"true"` 4225 4226 // The ARNs of the resources to be removed from the group. 4227 // 4228 // ResourceArns is a required field 4229 ResourceArns []*string `min:"1" type:"list" required:"true"` 4230} 4231 4232// String returns the string representation 4233func (s UngroupResourcesInput) String() string { 4234 return awsutil.Prettify(s) 4235} 4236 4237// GoString returns the string representation 4238func (s UngroupResourcesInput) GoString() string { 4239 return s.String() 4240} 4241 4242// Validate inspects the fields of the type to determine if they are valid. 4243func (s *UngroupResourcesInput) Validate() error { 4244 invalidParams := request.ErrInvalidParams{Context: "UngroupResourcesInput"} 4245 if s.Group == nil { 4246 invalidParams.Add(request.NewErrParamRequired("Group")) 4247 } 4248 if s.Group != nil && len(*s.Group) < 1 { 4249 invalidParams.Add(request.NewErrParamMinLen("Group", 1)) 4250 } 4251 if s.ResourceArns == nil { 4252 invalidParams.Add(request.NewErrParamRequired("ResourceArns")) 4253 } 4254 if s.ResourceArns != nil && len(s.ResourceArns) < 1 { 4255 invalidParams.Add(request.NewErrParamMinLen("ResourceArns", 1)) 4256 } 4257 4258 if invalidParams.Len() > 0 { 4259 return invalidParams 4260 } 4261 return nil 4262} 4263 4264// SetGroup sets the Group field's value. 4265func (s *UngroupResourcesInput) SetGroup(v string) *UngroupResourcesInput { 4266 s.Group = &v 4267 return s 4268} 4269 4270// SetResourceArns sets the ResourceArns field's value. 4271func (s *UngroupResourcesInput) SetResourceArns(v []*string) *UngroupResourcesInput { 4272 s.ResourceArns = v 4273 return s 4274} 4275 4276type UngroupResourcesOutput struct { 4277 _ struct{} `type:"structure"` 4278 4279 // A list of any resources that failed to be removed from the group by this 4280 // operation. 4281 Failed []*FailedResource `type:"list"` 4282 4283 // A list of any resources that are still in the process of being removed from 4284 // the group by this operation. These pending removals continue asynchronously. 4285 // You can check the status of pending removals by using the ListGroupResources 4286 // operation. After the resource is successfully removed, it no longer appears 4287 // in the response. 4288 Pending []*PendingResource `type:"list"` 4289 4290 // A list of resources that were successfully removed from the group by this 4291 // operation. 4292 Succeeded []*string `min:"1" type:"list"` 4293} 4294 4295// String returns the string representation 4296func (s UngroupResourcesOutput) String() string { 4297 return awsutil.Prettify(s) 4298} 4299 4300// GoString returns the string representation 4301func (s UngroupResourcesOutput) GoString() string { 4302 return s.String() 4303} 4304 4305// SetFailed sets the Failed field's value. 4306func (s *UngroupResourcesOutput) SetFailed(v []*FailedResource) *UngroupResourcesOutput { 4307 s.Failed = v 4308 return s 4309} 4310 4311// SetPending sets the Pending field's value. 4312func (s *UngroupResourcesOutput) SetPending(v []*PendingResource) *UngroupResourcesOutput { 4313 s.Pending = v 4314 return s 4315} 4316 4317// SetSucceeded sets the Succeeded field's value. 4318func (s *UngroupResourcesOutput) SetSucceeded(v []*string) *UngroupResourcesOutput { 4319 s.Succeeded = v 4320 return s 4321} 4322 4323type UntagInput struct { 4324 _ struct{} `type:"structure"` 4325 4326 // The ARN of the resource group from which to remove tags. The command removed 4327 // both the specified keys and any values associated with those keys. 4328 // 4329 // Arn is a required field 4330 Arn *string `location:"uri" locationName:"Arn" min:"12" type:"string" required:"true"` 4331 4332 // The keys of the tags to be removed. 4333 // 4334 // Keys is a required field 4335 Keys []*string `type:"list" required:"true"` 4336} 4337 4338// String returns the string representation 4339func (s UntagInput) String() string { 4340 return awsutil.Prettify(s) 4341} 4342 4343// GoString returns the string representation 4344func (s UntagInput) GoString() string { 4345 return s.String() 4346} 4347 4348// Validate inspects the fields of the type to determine if they are valid. 4349func (s *UntagInput) Validate() error { 4350 invalidParams := request.ErrInvalidParams{Context: "UntagInput"} 4351 if s.Arn == nil { 4352 invalidParams.Add(request.NewErrParamRequired("Arn")) 4353 } 4354 if s.Arn != nil && len(*s.Arn) < 12 { 4355 invalidParams.Add(request.NewErrParamMinLen("Arn", 12)) 4356 } 4357 if s.Keys == nil { 4358 invalidParams.Add(request.NewErrParamRequired("Keys")) 4359 } 4360 4361 if invalidParams.Len() > 0 { 4362 return invalidParams 4363 } 4364 return nil 4365} 4366 4367// SetArn sets the Arn field's value. 4368func (s *UntagInput) SetArn(v string) *UntagInput { 4369 s.Arn = &v 4370 return s 4371} 4372 4373// SetKeys sets the Keys field's value. 4374func (s *UntagInput) SetKeys(v []*string) *UntagInput { 4375 s.Keys = v 4376 return s 4377} 4378 4379type UntagOutput struct { 4380 _ struct{} `type:"structure"` 4381 4382 // The ARN of the resource group from which tags have been removed. 4383 Arn *string `min:"12" type:"string"` 4384 4385 // The keys of the tags that were removed. 4386 Keys []*string `type:"list"` 4387} 4388 4389// String returns the string representation 4390func (s UntagOutput) String() string { 4391 return awsutil.Prettify(s) 4392} 4393 4394// GoString returns the string representation 4395func (s UntagOutput) GoString() string { 4396 return s.String() 4397} 4398 4399// SetArn sets the Arn field's value. 4400func (s *UntagOutput) SetArn(v string) *UntagOutput { 4401 s.Arn = &v 4402 return s 4403} 4404 4405// SetKeys sets the Keys field's value. 4406func (s *UntagOutput) SetKeys(v []*string) *UntagOutput { 4407 s.Keys = v 4408 return s 4409} 4410 4411type UpdateGroupInput struct { 4412 _ struct{} `type:"structure"` 4413 4414 // The new description that you want to update the resource group with. Descriptions 4415 // can contain letters, numbers, hyphens, underscores, periods, and spaces. 4416 Description *string `type:"string"` 4417 4418 // The name or the ARN of the resource group to modify. 4419 Group *string `min:"1" type:"string"` 4420 4421 // Don't use this parameter. Use Group instead. 4422 // 4423 // Deprecated: This field is deprecated, use Group instead. 4424 GroupName *string `min:"1" deprecated:"true" type:"string"` 4425} 4426 4427// String returns the string representation 4428func (s UpdateGroupInput) String() string { 4429 return awsutil.Prettify(s) 4430} 4431 4432// GoString returns the string representation 4433func (s UpdateGroupInput) GoString() string { 4434 return s.String() 4435} 4436 4437// Validate inspects the fields of the type to determine if they are valid. 4438func (s *UpdateGroupInput) Validate() error { 4439 invalidParams := request.ErrInvalidParams{Context: "UpdateGroupInput"} 4440 if s.Group != nil && len(*s.Group) < 1 { 4441 invalidParams.Add(request.NewErrParamMinLen("Group", 1)) 4442 } 4443 if s.GroupName != nil && len(*s.GroupName) < 1 { 4444 invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) 4445 } 4446 4447 if invalidParams.Len() > 0 { 4448 return invalidParams 4449 } 4450 return nil 4451} 4452 4453// SetDescription sets the Description field's value. 4454func (s *UpdateGroupInput) SetDescription(v string) *UpdateGroupInput { 4455 s.Description = &v 4456 return s 4457} 4458 4459// SetGroup sets the Group field's value. 4460func (s *UpdateGroupInput) SetGroup(v string) *UpdateGroupInput { 4461 s.Group = &v 4462 return s 4463} 4464 4465// SetGroupName sets the GroupName field's value. 4466func (s *UpdateGroupInput) SetGroupName(v string) *UpdateGroupInput { 4467 s.GroupName = &v 4468 return s 4469} 4470 4471type UpdateGroupOutput struct { 4472 _ struct{} `type:"structure"` 4473 4474 // The update description of the resource group. 4475 Group *Group `type:"structure"` 4476} 4477 4478// String returns the string representation 4479func (s UpdateGroupOutput) String() string { 4480 return awsutil.Prettify(s) 4481} 4482 4483// GoString returns the string representation 4484func (s UpdateGroupOutput) GoString() string { 4485 return s.String() 4486} 4487 4488// SetGroup sets the Group field's value. 4489func (s *UpdateGroupOutput) SetGroup(v *Group) *UpdateGroupOutput { 4490 s.Group = v 4491 return s 4492} 4493 4494type UpdateGroupQueryInput struct { 4495 _ struct{} `type:"structure"` 4496 4497 // The name or the ARN of the resource group to query. 4498 Group *string `min:"1" type:"string"` 4499 4500 // Don't use this parameter. Use Group instead. 4501 // 4502 // Deprecated: This field is deprecated, use Group instead. 4503 GroupName *string `min:"1" deprecated:"true" type:"string"` 4504 4505 // The resource query to determine which AWS resources are members of this resource 4506 // group. 4507 // 4508 // A resource group can contain either a Configuration or a ResourceQuery, but 4509 // not both. 4510 // 4511 // ResourceQuery is a required field 4512 ResourceQuery *ResourceQuery `type:"structure" required:"true"` 4513} 4514 4515// String returns the string representation 4516func (s UpdateGroupQueryInput) String() string { 4517 return awsutil.Prettify(s) 4518} 4519 4520// GoString returns the string representation 4521func (s UpdateGroupQueryInput) GoString() string { 4522 return s.String() 4523} 4524 4525// Validate inspects the fields of the type to determine if they are valid. 4526func (s *UpdateGroupQueryInput) Validate() error { 4527 invalidParams := request.ErrInvalidParams{Context: "UpdateGroupQueryInput"} 4528 if s.Group != nil && len(*s.Group) < 1 { 4529 invalidParams.Add(request.NewErrParamMinLen("Group", 1)) 4530 } 4531 if s.GroupName != nil && len(*s.GroupName) < 1 { 4532 invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) 4533 } 4534 if s.ResourceQuery == nil { 4535 invalidParams.Add(request.NewErrParamRequired("ResourceQuery")) 4536 } 4537 if s.ResourceQuery != nil { 4538 if err := s.ResourceQuery.Validate(); err != nil { 4539 invalidParams.AddNested("ResourceQuery", err.(request.ErrInvalidParams)) 4540 } 4541 } 4542 4543 if invalidParams.Len() > 0 { 4544 return invalidParams 4545 } 4546 return nil 4547} 4548 4549// SetGroup sets the Group field's value. 4550func (s *UpdateGroupQueryInput) SetGroup(v string) *UpdateGroupQueryInput { 4551 s.Group = &v 4552 return s 4553} 4554 4555// SetGroupName sets the GroupName field's value. 4556func (s *UpdateGroupQueryInput) SetGroupName(v string) *UpdateGroupQueryInput { 4557 s.GroupName = &v 4558 return s 4559} 4560 4561// SetResourceQuery sets the ResourceQuery field's value. 4562func (s *UpdateGroupQueryInput) SetResourceQuery(v *ResourceQuery) *UpdateGroupQueryInput { 4563 s.ResourceQuery = v 4564 return s 4565} 4566 4567type UpdateGroupQueryOutput struct { 4568 _ struct{} `type:"structure"` 4569 4570 // The updated resource query associated with the resource group after the update. 4571 GroupQuery *GroupQuery `type:"structure"` 4572} 4573 4574// String returns the string representation 4575func (s UpdateGroupQueryOutput) String() string { 4576 return awsutil.Prettify(s) 4577} 4578 4579// GoString returns the string representation 4580func (s UpdateGroupQueryOutput) GoString() string { 4581 return s.String() 4582} 4583 4584// SetGroupQuery sets the GroupQuery field's value. 4585func (s *UpdateGroupQueryOutput) SetGroupQuery(v *GroupQuery) *UpdateGroupQueryOutput { 4586 s.GroupQuery = v 4587 return s 4588} 4589 4590const ( 4591 // GroupConfigurationStatusUpdating is a GroupConfigurationStatus enum value 4592 GroupConfigurationStatusUpdating = "UPDATING" 4593 4594 // GroupConfigurationStatusUpdateComplete is a GroupConfigurationStatus enum value 4595 GroupConfigurationStatusUpdateComplete = "UPDATE_COMPLETE" 4596 4597 // GroupConfigurationStatusUpdateFailed is a GroupConfigurationStatus enum value 4598 GroupConfigurationStatusUpdateFailed = "UPDATE_FAILED" 4599) 4600 4601// GroupConfigurationStatus_Values returns all elements of the GroupConfigurationStatus enum 4602func GroupConfigurationStatus_Values() []string { 4603 return []string{ 4604 GroupConfigurationStatusUpdating, 4605 GroupConfigurationStatusUpdateComplete, 4606 GroupConfigurationStatusUpdateFailed, 4607 } 4608} 4609 4610const ( 4611 // GroupFilterNameResourceType is a GroupFilterName enum value 4612 GroupFilterNameResourceType = "resource-type" 4613 4614 // GroupFilterNameConfigurationType is a GroupFilterName enum value 4615 GroupFilterNameConfigurationType = "configuration-type" 4616) 4617 4618// GroupFilterName_Values returns all elements of the GroupFilterName enum 4619func GroupFilterName_Values() []string { 4620 return []string{ 4621 GroupFilterNameResourceType, 4622 GroupFilterNameConfigurationType, 4623 } 4624} 4625 4626const ( 4627 // QueryErrorCodeCloudformationStackInactive is a QueryErrorCode enum value 4628 QueryErrorCodeCloudformationStackInactive = "CLOUDFORMATION_STACK_INACTIVE" 4629 4630 // QueryErrorCodeCloudformationStackNotExisting is a QueryErrorCode enum value 4631 QueryErrorCodeCloudformationStackNotExisting = "CLOUDFORMATION_STACK_NOT_EXISTING" 4632) 4633 4634// QueryErrorCode_Values returns all elements of the QueryErrorCode enum 4635func QueryErrorCode_Values() []string { 4636 return []string{ 4637 QueryErrorCodeCloudformationStackInactive, 4638 QueryErrorCodeCloudformationStackNotExisting, 4639 } 4640} 4641 4642const ( 4643 // QueryTypeTagFilters10 is a QueryType enum value 4644 QueryTypeTagFilters10 = "TAG_FILTERS_1_0" 4645 4646 // QueryTypeCloudformationStack10 is a QueryType enum value 4647 QueryTypeCloudformationStack10 = "CLOUDFORMATION_STACK_1_0" 4648) 4649 4650// QueryType_Values returns all elements of the QueryType enum 4651func QueryType_Values() []string { 4652 return []string{ 4653 QueryTypeTagFilters10, 4654 QueryTypeCloudformationStack10, 4655 } 4656} 4657 4658const ( 4659 // ResourceFilterNameResourceType is a ResourceFilterName enum value 4660 ResourceFilterNameResourceType = "resource-type" 4661) 4662 4663// ResourceFilterName_Values returns all elements of the ResourceFilterName enum 4664func ResourceFilterName_Values() []string { 4665 return []string{ 4666 ResourceFilterNameResourceType, 4667 } 4668} 4669 4670const ( 4671 // ResourceStatusValuePending is a ResourceStatusValue enum value 4672 ResourceStatusValuePending = "PENDING" 4673) 4674 4675// ResourceStatusValue_Values returns all elements of the ResourceStatusValue enum 4676func ResourceStatusValue_Values() []string { 4677 return []string{ 4678 ResourceStatusValuePending, 4679 } 4680} 4681