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