1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3package macie 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/jsonrpc" 13) 14 15const opAssociateMemberAccount = "AssociateMemberAccount" 16 17// AssociateMemberAccountRequest generates a "aws/request.Request" representing the 18// client's request for the AssociateMemberAccount 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 AssociateMemberAccount for more information on using the AssociateMemberAccount 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 AssociateMemberAccountRequest method. 33// req, resp := client.AssociateMemberAccountRequest(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/macie-2017-12-19/AssociateMemberAccount 41func (c *Macie) AssociateMemberAccountRequest(input *AssociateMemberAccountInput) (req *request.Request, output *AssociateMemberAccountOutput) { 42 op := &request.Operation{ 43 Name: opAssociateMemberAccount, 44 HTTPMethod: "POST", 45 HTTPPath: "/", 46 } 47 48 if input == nil { 49 input = &AssociateMemberAccountInput{} 50 } 51 52 output = &AssociateMemberAccountOutput{} 53 req = c.newRequest(op, input, output) 54 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 55 return 56} 57 58// AssociateMemberAccount API operation for Amazon Macie. 59// 60// Associates a specified AWS account with Amazon Macie Classic as a member 61// account. 62// 63// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 64// with awserr.Error's Code and Message methods to get detailed information about 65// the error. 66// 67// See the AWS API reference guide for Amazon Macie's 68// API operation AssociateMemberAccount for usage and error information. 69// 70// Returned Error Types: 71// * InvalidInputException 72// The request was rejected because an invalid or out-of-range value was supplied 73// for an input parameter. 74// 75// * LimitExceededException 76// The request was rejected because it attempted to create resources beyond 77// the current AWS account limits. The error code describes the limit exceeded. 78// 79// * InternalException 80// Internal server error. 81// 82// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/AssociateMemberAccount 83func (c *Macie) AssociateMemberAccount(input *AssociateMemberAccountInput) (*AssociateMemberAccountOutput, error) { 84 req, out := c.AssociateMemberAccountRequest(input) 85 return out, req.Send() 86} 87 88// AssociateMemberAccountWithContext is the same as AssociateMemberAccount with the addition of 89// the ability to pass a context and additional request options. 90// 91// See AssociateMemberAccount for details on how to use this API operation. 92// 93// The context must be non-nil and will be used for request cancellation. If 94// the context is nil a panic will occur. In the future the SDK may create 95// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 96// for more information on using Contexts. 97func (c *Macie) AssociateMemberAccountWithContext(ctx aws.Context, input *AssociateMemberAccountInput, opts ...request.Option) (*AssociateMemberAccountOutput, error) { 98 req, out := c.AssociateMemberAccountRequest(input) 99 req.SetContext(ctx) 100 req.ApplyOptions(opts...) 101 return out, req.Send() 102} 103 104const opAssociateS3Resources = "AssociateS3Resources" 105 106// AssociateS3ResourcesRequest generates a "aws/request.Request" representing the 107// client's request for the AssociateS3Resources operation. The "output" return 108// value will be populated with the request's response once the request completes 109// successfully. 110// 111// Use "Send" method on the returned Request to send the API call to the service. 112// the "output" return value is not valid until after Send returns without error. 113// 114// See AssociateS3Resources for more information on using the AssociateS3Resources 115// API call, and error handling. 116// 117// This method is useful when you want to inject custom logic or configuration 118// into the SDK's request lifecycle. Such as custom headers, or retry logic. 119// 120// 121// // Example sending a request using the AssociateS3ResourcesRequest method. 122// req, resp := client.AssociateS3ResourcesRequest(params) 123// 124// err := req.Send() 125// if err == nil { // resp is now filled 126// fmt.Println(resp) 127// } 128// 129// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/AssociateS3Resources 130func (c *Macie) AssociateS3ResourcesRequest(input *AssociateS3ResourcesInput) (req *request.Request, output *AssociateS3ResourcesOutput) { 131 op := &request.Operation{ 132 Name: opAssociateS3Resources, 133 HTTPMethod: "POST", 134 HTTPPath: "/", 135 } 136 137 if input == nil { 138 input = &AssociateS3ResourcesInput{} 139 } 140 141 output = &AssociateS3ResourcesOutput{} 142 req = c.newRequest(op, input, output) 143 return 144} 145 146// AssociateS3Resources API operation for Amazon Macie. 147// 148// Associates specified S3 resources with Amazon Macie Classic for monitoring 149// and data classification. If memberAccountId isn't specified, the action associates 150// specified S3 resources with Macie Classic for the current Macie Classic administrator 151// account. If memberAccountId is specified, the action associates specified 152// S3 resources with Macie Classic for the specified member account. 153// 154// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 155// with awserr.Error's Code and Message methods to get detailed information about 156// the error. 157// 158// See the AWS API reference guide for Amazon Macie's 159// API operation AssociateS3Resources for usage and error information. 160// 161// Returned Error Types: 162// * InvalidInputException 163// The request was rejected because an invalid or out-of-range value was supplied 164// for an input parameter. 165// 166// * AccessDeniedException 167// You do not have required permissions to access the requested resource. 168// 169// * LimitExceededException 170// The request was rejected because it attempted to create resources beyond 171// the current AWS account limits. The error code describes the limit exceeded. 172// 173// * InternalException 174// Internal server error. 175// 176// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/AssociateS3Resources 177func (c *Macie) AssociateS3Resources(input *AssociateS3ResourcesInput) (*AssociateS3ResourcesOutput, error) { 178 req, out := c.AssociateS3ResourcesRequest(input) 179 return out, req.Send() 180} 181 182// AssociateS3ResourcesWithContext is the same as AssociateS3Resources with the addition of 183// the ability to pass a context and additional request options. 184// 185// See AssociateS3Resources for details on how to use this API operation. 186// 187// The context must be non-nil and will be used for request cancellation. If 188// the context is nil a panic will occur. In the future the SDK may create 189// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 190// for more information on using Contexts. 191func (c *Macie) AssociateS3ResourcesWithContext(ctx aws.Context, input *AssociateS3ResourcesInput, opts ...request.Option) (*AssociateS3ResourcesOutput, error) { 192 req, out := c.AssociateS3ResourcesRequest(input) 193 req.SetContext(ctx) 194 req.ApplyOptions(opts...) 195 return out, req.Send() 196} 197 198const opDisassociateMemberAccount = "DisassociateMemberAccount" 199 200// DisassociateMemberAccountRequest generates a "aws/request.Request" representing the 201// client's request for the DisassociateMemberAccount operation. The "output" return 202// value will be populated with the request's response once the request completes 203// successfully. 204// 205// Use "Send" method on the returned Request to send the API call to the service. 206// the "output" return value is not valid until after Send returns without error. 207// 208// See DisassociateMemberAccount for more information on using the DisassociateMemberAccount 209// API call, and error handling. 210// 211// This method is useful when you want to inject custom logic or configuration 212// into the SDK's request lifecycle. Such as custom headers, or retry logic. 213// 214// 215// // Example sending a request using the DisassociateMemberAccountRequest method. 216// req, resp := client.DisassociateMemberAccountRequest(params) 217// 218// err := req.Send() 219// if err == nil { // resp is now filled 220// fmt.Println(resp) 221// } 222// 223// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/DisassociateMemberAccount 224func (c *Macie) DisassociateMemberAccountRequest(input *DisassociateMemberAccountInput) (req *request.Request, output *DisassociateMemberAccountOutput) { 225 op := &request.Operation{ 226 Name: opDisassociateMemberAccount, 227 HTTPMethod: "POST", 228 HTTPPath: "/", 229 } 230 231 if input == nil { 232 input = &DisassociateMemberAccountInput{} 233 } 234 235 output = &DisassociateMemberAccountOutput{} 236 req = c.newRequest(op, input, output) 237 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 238 return 239} 240 241// DisassociateMemberAccount API operation for Amazon Macie. 242// 243// Removes the specified member account from Amazon Macie Classic. 244// 245// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 246// with awserr.Error's Code and Message methods to get detailed information about 247// the error. 248// 249// See the AWS API reference guide for Amazon Macie's 250// API operation DisassociateMemberAccount for usage and error information. 251// 252// Returned Error Types: 253// * InvalidInputException 254// The request was rejected because an invalid or out-of-range value was supplied 255// for an input parameter. 256// 257// * InternalException 258// Internal server error. 259// 260// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/DisassociateMemberAccount 261func (c *Macie) DisassociateMemberAccount(input *DisassociateMemberAccountInput) (*DisassociateMemberAccountOutput, error) { 262 req, out := c.DisassociateMemberAccountRequest(input) 263 return out, req.Send() 264} 265 266// DisassociateMemberAccountWithContext is the same as DisassociateMemberAccount with the addition of 267// the ability to pass a context and additional request options. 268// 269// See DisassociateMemberAccount for details on how to use this API operation. 270// 271// The context must be non-nil and will be used for request cancellation. If 272// the context is nil a panic will occur. In the future the SDK may create 273// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 274// for more information on using Contexts. 275func (c *Macie) DisassociateMemberAccountWithContext(ctx aws.Context, input *DisassociateMemberAccountInput, opts ...request.Option) (*DisassociateMemberAccountOutput, error) { 276 req, out := c.DisassociateMemberAccountRequest(input) 277 req.SetContext(ctx) 278 req.ApplyOptions(opts...) 279 return out, req.Send() 280} 281 282const opDisassociateS3Resources = "DisassociateS3Resources" 283 284// DisassociateS3ResourcesRequest generates a "aws/request.Request" representing the 285// client's request for the DisassociateS3Resources operation. The "output" return 286// value will be populated with the request's response once the request completes 287// successfully. 288// 289// Use "Send" method on the returned Request to send the API call to the service. 290// the "output" return value is not valid until after Send returns without error. 291// 292// See DisassociateS3Resources for more information on using the DisassociateS3Resources 293// API call, and error handling. 294// 295// This method is useful when you want to inject custom logic or configuration 296// into the SDK's request lifecycle. Such as custom headers, or retry logic. 297// 298// 299// // Example sending a request using the DisassociateS3ResourcesRequest method. 300// req, resp := client.DisassociateS3ResourcesRequest(params) 301// 302// err := req.Send() 303// if err == nil { // resp is now filled 304// fmt.Println(resp) 305// } 306// 307// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/DisassociateS3Resources 308func (c *Macie) DisassociateS3ResourcesRequest(input *DisassociateS3ResourcesInput) (req *request.Request, output *DisassociateS3ResourcesOutput) { 309 op := &request.Operation{ 310 Name: opDisassociateS3Resources, 311 HTTPMethod: "POST", 312 HTTPPath: "/", 313 } 314 315 if input == nil { 316 input = &DisassociateS3ResourcesInput{} 317 } 318 319 output = &DisassociateS3ResourcesOutput{} 320 req = c.newRequest(op, input, output) 321 return 322} 323 324// DisassociateS3Resources API operation for Amazon Macie. 325// 326// Removes specified S3 resources from being monitored by Amazon Macie Classic. 327// If memberAccountId isn't specified, the action removes specified S3 resources 328// from Macie Classic for the current Macie Classic administrator account. If 329// memberAccountId is specified, the action removes specified S3 resources from 330// Macie Classic for the specified member account. 331// 332// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 333// with awserr.Error's Code and Message methods to get detailed information about 334// the error. 335// 336// See the AWS API reference guide for Amazon Macie's 337// API operation DisassociateS3Resources for usage and error information. 338// 339// Returned Error Types: 340// * InvalidInputException 341// The request was rejected because an invalid or out-of-range value was supplied 342// for an input parameter. 343// 344// * AccessDeniedException 345// You do not have required permissions to access the requested resource. 346// 347// * InternalException 348// Internal server error. 349// 350// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/DisassociateS3Resources 351func (c *Macie) DisassociateS3Resources(input *DisassociateS3ResourcesInput) (*DisassociateS3ResourcesOutput, error) { 352 req, out := c.DisassociateS3ResourcesRequest(input) 353 return out, req.Send() 354} 355 356// DisassociateS3ResourcesWithContext is the same as DisassociateS3Resources with the addition of 357// the ability to pass a context and additional request options. 358// 359// See DisassociateS3Resources for details on how to use this API operation. 360// 361// The context must be non-nil and will be used for request cancellation. If 362// the context is nil a panic will occur. In the future the SDK may create 363// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 364// for more information on using Contexts. 365func (c *Macie) DisassociateS3ResourcesWithContext(ctx aws.Context, input *DisassociateS3ResourcesInput, opts ...request.Option) (*DisassociateS3ResourcesOutput, error) { 366 req, out := c.DisassociateS3ResourcesRequest(input) 367 req.SetContext(ctx) 368 req.ApplyOptions(opts...) 369 return out, req.Send() 370} 371 372const opListMemberAccounts = "ListMemberAccounts" 373 374// ListMemberAccountsRequest generates a "aws/request.Request" representing the 375// client's request for the ListMemberAccounts operation. The "output" return 376// value will be populated with the request's response once the request completes 377// successfully. 378// 379// Use "Send" method on the returned Request to send the API call to the service. 380// the "output" return value is not valid until after Send returns without error. 381// 382// See ListMemberAccounts for more information on using the ListMemberAccounts 383// API call, and error handling. 384// 385// This method is useful when you want to inject custom logic or configuration 386// into the SDK's request lifecycle. Such as custom headers, or retry logic. 387// 388// 389// // Example sending a request using the ListMemberAccountsRequest method. 390// req, resp := client.ListMemberAccountsRequest(params) 391// 392// err := req.Send() 393// if err == nil { // resp is now filled 394// fmt.Println(resp) 395// } 396// 397// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/ListMemberAccounts 398func (c *Macie) ListMemberAccountsRequest(input *ListMemberAccountsInput) (req *request.Request, output *ListMemberAccountsOutput) { 399 op := &request.Operation{ 400 Name: opListMemberAccounts, 401 HTTPMethod: "POST", 402 HTTPPath: "/", 403 Paginator: &request.Paginator{ 404 InputTokens: []string{"nextToken"}, 405 OutputTokens: []string{"nextToken"}, 406 LimitToken: "maxResults", 407 TruncationToken: "", 408 }, 409 } 410 411 if input == nil { 412 input = &ListMemberAccountsInput{} 413 } 414 415 output = &ListMemberAccountsOutput{} 416 req = c.newRequest(op, input, output) 417 return 418} 419 420// ListMemberAccounts API operation for Amazon Macie. 421// 422// Lists all Amazon Macie Classic member accounts for the current Macie Classic 423// administrator account. 424// 425// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 426// with awserr.Error's Code and Message methods to get detailed information about 427// the error. 428// 429// See the AWS API reference guide for Amazon Macie's 430// API operation ListMemberAccounts for usage and error information. 431// 432// Returned Error Types: 433// * InternalException 434// Internal server error. 435// 436// * InvalidInputException 437// The request was rejected because an invalid or out-of-range value was supplied 438// for an input parameter. 439// 440// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/ListMemberAccounts 441func (c *Macie) ListMemberAccounts(input *ListMemberAccountsInput) (*ListMemberAccountsOutput, error) { 442 req, out := c.ListMemberAccountsRequest(input) 443 return out, req.Send() 444} 445 446// ListMemberAccountsWithContext is the same as ListMemberAccounts with the addition of 447// the ability to pass a context and additional request options. 448// 449// See ListMemberAccounts for details on how to use this API operation. 450// 451// The context must be non-nil and will be used for request cancellation. If 452// the context is nil a panic will occur. In the future the SDK may create 453// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 454// for more information on using Contexts. 455func (c *Macie) ListMemberAccountsWithContext(ctx aws.Context, input *ListMemberAccountsInput, opts ...request.Option) (*ListMemberAccountsOutput, error) { 456 req, out := c.ListMemberAccountsRequest(input) 457 req.SetContext(ctx) 458 req.ApplyOptions(opts...) 459 return out, req.Send() 460} 461 462// ListMemberAccountsPages iterates over the pages of a ListMemberAccounts operation, 463// calling the "fn" function with the response data for each page. To stop 464// iterating, return false from the fn function. 465// 466// See ListMemberAccounts method for more information on how to use this operation. 467// 468// Note: This operation can generate multiple requests to a service. 469// 470// // Example iterating over at most 3 pages of a ListMemberAccounts operation. 471// pageNum := 0 472// err := client.ListMemberAccountsPages(params, 473// func(page *macie.ListMemberAccountsOutput, lastPage bool) bool { 474// pageNum++ 475// fmt.Println(page) 476// return pageNum <= 3 477// }) 478// 479func (c *Macie) ListMemberAccountsPages(input *ListMemberAccountsInput, fn func(*ListMemberAccountsOutput, bool) bool) error { 480 return c.ListMemberAccountsPagesWithContext(aws.BackgroundContext(), input, fn) 481} 482 483// ListMemberAccountsPagesWithContext same as ListMemberAccountsPages except 484// it takes a Context and allows setting request options on the pages. 485// 486// The context must be non-nil and will be used for request cancellation. If 487// the context is nil a panic will occur. In the future the SDK may create 488// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 489// for more information on using Contexts. 490func (c *Macie) ListMemberAccountsPagesWithContext(ctx aws.Context, input *ListMemberAccountsInput, fn func(*ListMemberAccountsOutput, bool) bool, opts ...request.Option) error { 491 p := request.Pagination{ 492 NewRequest: func() (*request.Request, error) { 493 var inCpy *ListMemberAccountsInput 494 if input != nil { 495 tmp := *input 496 inCpy = &tmp 497 } 498 req, _ := c.ListMemberAccountsRequest(inCpy) 499 req.SetContext(ctx) 500 req.ApplyOptions(opts...) 501 return req, nil 502 }, 503 } 504 505 for p.Next() { 506 if !fn(p.Page().(*ListMemberAccountsOutput), !p.HasNextPage()) { 507 break 508 } 509 } 510 511 return p.Err() 512} 513 514const opListS3Resources = "ListS3Resources" 515 516// ListS3ResourcesRequest generates a "aws/request.Request" representing the 517// client's request for the ListS3Resources operation. The "output" return 518// value will be populated with the request's response once the request completes 519// successfully. 520// 521// Use "Send" method on the returned Request to send the API call to the service. 522// the "output" return value is not valid until after Send returns without error. 523// 524// See ListS3Resources for more information on using the ListS3Resources 525// API call, and error handling. 526// 527// This method is useful when you want to inject custom logic or configuration 528// into the SDK's request lifecycle. Such as custom headers, or retry logic. 529// 530// 531// // Example sending a request using the ListS3ResourcesRequest method. 532// req, resp := client.ListS3ResourcesRequest(params) 533// 534// err := req.Send() 535// if err == nil { // resp is now filled 536// fmt.Println(resp) 537// } 538// 539// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/ListS3Resources 540func (c *Macie) ListS3ResourcesRequest(input *ListS3ResourcesInput) (req *request.Request, output *ListS3ResourcesOutput) { 541 op := &request.Operation{ 542 Name: opListS3Resources, 543 HTTPMethod: "POST", 544 HTTPPath: "/", 545 Paginator: &request.Paginator{ 546 InputTokens: []string{"nextToken"}, 547 OutputTokens: []string{"nextToken"}, 548 LimitToken: "maxResults", 549 TruncationToken: "", 550 }, 551 } 552 553 if input == nil { 554 input = &ListS3ResourcesInput{} 555 } 556 557 output = &ListS3ResourcesOutput{} 558 req = c.newRequest(op, input, output) 559 return 560} 561 562// ListS3Resources API operation for Amazon Macie. 563// 564// Lists all the S3 resources associated with Amazon Macie Classic. If memberAccountId 565// isn't specified, the action lists the S3 resources associated with Macie 566// Classic for the current Macie Classic administrator account. If memberAccountId 567// is specified, the action lists the S3 resources associated with Macie Classic 568// for the specified member account. 569// 570// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 571// with awserr.Error's Code and Message methods to get detailed information about 572// the error. 573// 574// See the AWS API reference guide for Amazon Macie's 575// API operation ListS3Resources for usage and error information. 576// 577// Returned Error Types: 578// * InvalidInputException 579// The request was rejected because an invalid or out-of-range value was supplied 580// for an input parameter. 581// 582// * AccessDeniedException 583// You do not have required permissions to access the requested resource. 584// 585// * InternalException 586// Internal server error. 587// 588// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/ListS3Resources 589func (c *Macie) ListS3Resources(input *ListS3ResourcesInput) (*ListS3ResourcesOutput, error) { 590 req, out := c.ListS3ResourcesRequest(input) 591 return out, req.Send() 592} 593 594// ListS3ResourcesWithContext is the same as ListS3Resources with the addition of 595// the ability to pass a context and additional request options. 596// 597// See ListS3Resources for details on how to use this API operation. 598// 599// The context must be non-nil and will be used for request cancellation. If 600// the context is nil a panic will occur. In the future the SDK may create 601// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 602// for more information on using Contexts. 603func (c *Macie) ListS3ResourcesWithContext(ctx aws.Context, input *ListS3ResourcesInput, opts ...request.Option) (*ListS3ResourcesOutput, error) { 604 req, out := c.ListS3ResourcesRequest(input) 605 req.SetContext(ctx) 606 req.ApplyOptions(opts...) 607 return out, req.Send() 608} 609 610// ListS3ResourcesPages iterates over the pages of a ListS3Resources operation, 611// calling the "fn" function with the response data for each page. To stop 612// iterating, return false from the fn function. 613// 614// See ListS3Resources method for more information on how to use this operation. 615// 616// Note: This operation can generate multiple requests to a service. 617// 618// // Example iterating over at most 3 pages of a ListS3Resources operation. 619// pageNum := 0 620// err := client.ListS3ResourcesPages(params, 621// func(page *macie.ListS3ResourcesOutput, lastPage bool) bool { 622// pageNum++ 623// fmt.Println(page) 624// return pageNum <= 3 625// }) 626// 627func (c *Macie) ListS3ResourcesPages(input *ListS3ResourcesInput, fn func(*ListS3ResourcesOutput, bool) bool) error { 628 return c.ListS3ResourcesPagesWithContext(aws.BackgroundContext(), input, fn) 629} 630 631// ListS3ResourcesPagesWithContext same as ListS3ResourcesPages except 632// it takes a Context and allows setting request options on the pages. 633// 634// The context must be non-nil and will be used for request cancellation. If 635// the context is nil a panic will occur. In the future the SDK may create 636// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 637// for more information on using Contexts. 638func (c *Macie) ListS3ResourcesPagesWithContext(ctx aws.Context, input *ListS3ResourcesInput, fn func(*ListS3ResourcesOutput, bool) bool, opts ...request.Option) error { 639 p := request.Pagination{ 640 NewRequest: func() (*request.Request, error) { 641 var inCpy *ListS3ResourcesInput 642 if input != nil { 643 tmp := *input 644 inCpy = &tmp 645 } 646 req, _ := c.ListS3ResourcesRequest(inCpy) 647 req.SetContext(ctx) 648 req.ApplyOptions(opts...) 649 return req, nil 650 }, 651 } 652 653 for p.Next() { 654 if !fn(p.Page().(*ListS3ResourcesOutput), !p.HasNextPage()) { 655 break 656 } 657 } 658 659 return p.Err() 660} 661 662const opUpdateS3Resources = "UpdateS3Resources" 663 664// UpdateS3ResourcesRequest generates a "aws/request.Request" representing the 665// client's request for the UpdateS3Resources operation. The "output" return 666// value will be populated with the request's response once the request completes 667// successfully. 668// 669// Use "Send" method on the returned Request to send the API call to the service. 670// the "output" return value is not valid until after Send returns without error. 671// 672// See UpdateS3Resources for more information on using the UpdateS3Resources 673// API call, and error handling. 674// 675// This method is useful when you want to inject custom logic or configuration 676// into the SDK's request lifecycle. Such as custom headers, or retry logic. 677// 678// 679// // Example sending a request using the UpdateS3ResourcesRequest method. 680// req, resp := client.UpdateS3ResourcesRequest(params) 681// 682// err := req.Send() 683// if err == nil { // resp is now filled 684// fmt.Println(resp) 685// } 686// 687// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/UpdateS3Resources 688func (c *Macie) UpdateS3ResourcesRequest(input *UpdateS3ResourcesInput) (req *request.Request, output *UpdateS3ResourcesOutput) { 689 op := &request.Operation{ 690 Name: opUpdateS3Resources, 691 HTTPMethod: "POST", 692 HTTPPath: "/", 693 } 694 695 if input == nil { 696 input = &UpdateS3ResourcesInput{} 697 } 698 699 output = &UpdateS3ResourcesOutput{} 700 req = c.newRequest(op, input, output) 701 return 702} 703 704// UpdateS3Resources API operation for Amazon Macie. 705// 706// Updates the classification types for the specified S3 resources. If memberAccountId 707// isn't specified, the action updates the classification types of the S3 resources 708// associated with Amazon Macie Classic for the current Macie Classic administrator 709// account. If memberAccountId is specified, the action updates the classification 710// types of the S3 resources associated with Macie Classic for the specified 711// member account. 712// 713// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 714// with awserr.Error's Code and Message methods to get detailed information about 715// the error. 716// 717// See the AWS API reference guide for Amazon Macie's 718// API operation UpdateS3Resources for usage and error information. 719// 720// Returned Error Types: 721// * InvalidInputException 722// The request was rejected because an invalid or out-of-range value was supplied 723// for an input parameter. 724// 725// * AccessDeniedException 726// You do not have required permissions to access the requested resource. 727// 728// * InternalException 729// Internal server error. 730// 731// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/UpdateS3Resources 732func (c *Macie) UpdateS3Resources(input *UpdateS3ResourcesInput) (*UpdateS3ResourcesOutput, error) { 733 req, out := c.UpdateS3ResourcesRequest(input) 734 return out, req.Send() 735} 736 737// UpdateS3ResourcesWithContext is the same as UpdateS3Resources with the addition of 738// the ability to pass a context and additional request options. 739// 740// See UpdateS3Resources for details on how to use this API operation. 741// 742// The context must be non-nil and will be used for request cancellation. If 743// the context is nil a panic will occur. In the future the SDK may create 744// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 745// for more information on using Contexts. 746func (c *Macie) UpdateS3ResourcesWithContext(ctx aws.Context, input *UpdateS3ResourcesInput, opts ...request.Option) (*UpdateS3ResourcesOutput, error) { 747 req, out := c.UpdateS3ResourcesRequest(input) 748 req.SetContext(ctx) 749 req.ApplyOptions(opts...) 750 return out, req.Send() 751} 752 753// You do not have required permissions to access the requested resource. 754type AccessDeniedException struct { 755 _ struct{} `type:"structure"` 756 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 757 758 Message_ *string `locationName:"message" type:"string"` 759 760 // Resource type that caused the exception 761 ResourceType *string `locationName:"resourceType" type:"string"` 762} 763 764// String returns the string representation 765func (s AccessDeniedException) String() string { 766 return awsutil.Prettify(s) 767} 768 769// GoString returns the string representation 770func (s AccessDeniedException) GoString() string { 771 return s.String() 772} 773 774func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { 775 return &AccessDeniedException{ 776 RespMetadata: v, 777 } 778} 779 780// Code returns the exception type name. 781func (s *AccessDeniedException) Code() string { 782 return "AccessDeniedException" 783} 784 785// Message returns the exception's message. 786func (s *AccessDeniedException) Message() string { 787 if s.Message_ != nil { 788 return *s.Message_ 789 } 790 return "" 791} 792 793// OrigErr always returns nil, satisfies awserr.Error interface. 794func (s *AccessDeniedException) OrigErr() error { 795 return nil 796} 797 798func (s *AccessDeniedException) Error() string { 799 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 800} 801 802// Status code returns the HTTP status code for the request's response error. 803func (s *AccessDeniedException) StatusCode() int { 804 return s.RespMetadata.StatusCode 805} 806 807// RequestID returns the service's response RequestID for request. 808func (s *AccessDeniedException) RequestID() string { 809 return s.RespMetadata.RequestID 810} 811 812type AssociateMemberAccountInput struct { 813 _ struct{} `type:"structure"` 814 815 // The ID of the AWS account that you want to associate with Amazon Macie Classic 816 // as a member account. 817 // 818 // MemberAccountId is a required field 819 MemberAccountId *string `locationName:"memberAccountId" type:"string" required:"true"` 820} 821 822// String returns the string representation 823func (s AssociateMemberAccountInput) String() string { 824 return awsutil.Prettify(s) 825} 826 827// GoString returns the string representation 828func (s AssociateMemberAccountInput) GoString() string { 829 return s.String() 830} 831 832// Validate inspects the fields of the type to determine if they are valid. 833func (s *AssociateMemberAccountInput) Validate() error { 834 invalidParams := request.ErrInvalidParams{Context: "AssociateMemberAccountInput"} 835 if s.MemberAccountId == nil { 836 invalidParams.Add(request.NewErrParamRequired("MemberAccountId")) 837 } 838 839 if invalidParams.Len() > 0 { 840 return invalidParams 841 } 842 return nil 843} 844 845// SetMemberAccountId sets the MemberAccountId field's value. 846func (s *AssociateMemberAccountInput) SetMemberAccountId(v string) *AssociateMemberAccountInput { 847 s.MemberAccountId = &v 848 return s 849} 850 851type AssociateMemberAccountOutput struct { 852 _ struct{} `type:"structure"` 853} 854 855// String returns the string representation 856func (s AssociateMemberAccountOutput) String() string { 857 return awsutil.Prettify(s) 858} 859 860// GoString returns the string representation 861func (s AssociateMemberAccountOutput) GoString() string { 862 return s.String() 863} 864 865type AssociateS3ResourcesInput struct { 866 _ struct{} `type:"structure"` 867 868 // The ID of the Amazon Macie Classic member account whose resources you want 869 // to associate with Macie Classic. 870 MemberAccountId *string `locationName:"memberAccountId" type:"string"` 871 872 // The S3 resources that you want to associate with Amazon Macie Classic for 873 // monitoring and data classification. 874 // 875 // S3Resources is a required field 876 S3Resources []*S3ResourceClassification `locationName:"s3Resources" type:"list" required:"true"` 877} 878 879// String returns the string representation 880func (s AssociateS3ResourcesInput) String() string { 881 return awsutil.Prettify(s) 882} 883 884// GoString returns the string representation 885func (s AssociateS3ResourcesInput) GoString() string { 886 return s.String() 887} 888 889// Validate inspects the fields of the type to determine if they are valid. 890func (s *AssociateS3ResourcesInput) Validate() error { 891 invalidParams := request.ErrInvalidParams{Context: "AssociateS3ResourcesInput"} 892 if s.S3Resources == nil { 893 invalidParams.Add(request.NewErrParamRequired("S3Resources")) 894 } 895 if s.S3Resources != nil { 896 for i, v := range s.S3Resources { 897 if v == nil { 898 continue 899 } 900 if err := v.Validate(); err != nil { 901 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "S3Resources", i), err.(request.ErrInvalidParams)) 902 } 903 } 904 } 905 906 if invalidParams.Len() > 0 { 907 return invalidParams 908 } 909 return nil 910} 911 912// SetMemberAccountId sets the MemberAccountId field's value. 913func (s *AssociateS3ResourcesInput) SetMemberAccountId(v string) *AssociateS3ResourcesInput { 914 s.MemberAccountId = &v 915 return s 916} 917 918// SetS3Resources sets the S3Resources field's value. 919func (s *AssociateS3ResourcesInput) SetS3Resources(v []*S3ResourceClassification) *AssociateS3ResourcesInput { 920 s.S3Resources = v 921 return s 922} 923 924type AssociateS3ResourcesOutput struct { 925 _ struct{} `type:"structure"` 926 927 // S3 resources that couldn't be associated with Amazon Macie Classic. An error 928 // code and an error message are provided for each failed item. 929 FailedS3Resources []*FailedS3Resource `locationName:"failedS3Resources" type:"list"` 930} 931 932// String returns the string representation 933func (s AssociateS3ResourcesOutput) String() string { 934 return awsutil.Prettify(s) 935} 936 937// GoString returns the string representation 938func (s AssociateS3ResourcesOutput) GoString() string { 939 return s.String() 940} 941 942// SetFailedS3Resources sets the FailedS3Resources field's value. 943func (s *AssociateS3ResourcesOutput) SetFailedS3Resources(v []*FailedS3Resource) *AssociateS3ResourcesOutput { 944 s.FailedS3Resources = v 945 return s 946} 947 948// The classification type that Amazon Macie Classic applies to the associated 949// S3 resources. 950type ClassificationType struct { 951 _ struct{} `type:"structure"` 952 953 // A continuous classification of the objects that are added to a specified 954 // S3 bucket. Amazon Macie Classic begins performing continuous classification 955 // after a bucket is successfully associated with Macie Classic. 956 // 957 // Continuous is a required field 958 Continuous *string `locationName:"continuous" type:"string" required:"true" enum:"S3ContinuousClassificationType"` 959 960 // A one-time classification of all of the existing objects in a specified S3 961 // bucket. 962 // 963 // OneTime is a required field 964 OneTime *string `locationName:"oneTime" type:"string" required:"true" enum:"S3OneTimeClassificationType"` 965} 966 967// String returns the string representation 968func (s ClassificationType) String() string { 969 return awsutil.Prettify(s) 970} 971 972// GoString returns the string representation 973func (s ClassificationType) GoString() string { 974 return s.String() 975} 976 977// Validate inspects the fields of the type to determine if they are valid. 978func (s *ClassificationType) Validate() error { 979 invalidParams := request.ErrInvalidParams{Context: "ClassificationType"} 980 if s.Continuous == nil { 981 invalidParams.Add(request.NewErrParamRequired("Continuous")) 982 } 983 if s.OneTime == nil { 984 invalidParams.Add(request.NewErrParamRequired("OneTime")) 985 } 986 987 if invalidParams.Len() > 0 { 988 return invalidParams 989 } 990 return nil 991} 992 993// SetContinuous sets the Continuous field's value. 994func (s *ClassificationType) SetContinuous(v string) *ClassificationType { 995 s.Continuous = &v 996 return s 997} 998 999// SetOneTime sets the OneTime field's value. 1000func (s *ClassificationType) SetOneTime(v string) *ClassificationType { 1001 s.OneTime = &v 1002 return s 1003} 1004 1005// The classification type that Amazon Macie Classic applies to the associated 1006// S3 resources. At least one of the classification types (oneTime or continuous) 1007// must be specified. 1008type ClassificationTypeUpdate struct { 1009 _ struct{} `type:"structure"` 1010 1011 // A continuous classification of the objects that are added to a specified 1012 // S3 bucket. Amazon Macie Classic begins performing continuous classification 1013 // after a bucket is successfully associated with Macie Classic. 1014 Continuous *string `locationName:"continuous" type:"string" enum:"S3ContinuousClassificationType"` 1015 1016 // A one-time classification of all of the existing objects in a specified S3 1017 // bucket. 1018 OneTime *string `locationName:"oneTime" type:"string" enum:"S3OneTimeClassificationType"` 1019} 1020 1021// String returns the string representation 1022func (s ClassificationTypeUpdate) String() string { 1023 return awsutil.Prettify(s) 1024} 1025 1026// GoString returns the string representation 1027func (s ClassificationTypeUpdate) GoString() string { 1028 return s.String() 1029} 1030 1031// SetContinuous sets the Continuous field's value. 1032func (s *ClassificationTypeUpdate) SetContinuous(v string) *ClassificationTypeUpdate { 1033 s.Continuous = &v 1034 return s 1035} 1036 1037// SetOneTime sets the OneTime field's value. 1038func (s *ClassificationTypeUpdate) SetOneTime(v string) *ClassificationTypeUpdate { 1039 s.OneTime = &v 1040 return s 1041} 1042 1043type DisassociateMemberAccountInput struct { 1044 _ struct{} `type:"structure"` 1045 1046 // The ID of the member account that you want to remove from Amazon Macie Classic. 1047 // 1048 // MemberAccountId is a required field 1049 MemberAccountId *string `locationName:"memberAccountId" type:"string" required:"true"` 1050} 1051 1052// String returns the string representation 1053func (s DisassociateMemberAccountInput) String() string { 1054 return awsutil.Prettify(s) 1055} 1056 1057// GoString returns the string representation 1058func (s DisassociateMemberAccountInput) GoString() string { 1059 return s.String() 1060} 1061 1062// Validate inspects the fields of the type to determine if they are valid. 1063func (s *DisassociateMemberAccountInput) Validate() error { 1064 invalidParams := request.ErrInvalidParams{Context: "DisassociateMemberAccountInput"} 1065 if s.MemberAccountId == nil { 1066 invalidParams.Add(request.NewErrParamRequired("MemberAccountId")) 1067 } 1068 1069 if invalidParams.Len() > 0 { 1070 return invalidParams 1071 } 1072 return nil 1073} 1074 1075// SetMemberAccountId sets the MemberAccountId field's value. 1076func (s *DisassociateMemberAccountInput) SetMemberAccountId(v string) *DisassociateMemberAccountInput { 1077 s.MemberAccountId = &v 1078 return s 1079} 1080 1081type DisassociateMemberAccountOutput struct { 1082 _ struct{} `type:"structure"` 1083} 1084 1085// String returns the string representation 1086func (s DisassociateMemberAccountOutput) String() string { 1087 return awsutil.Prettify(s) 1088} 1089 1090// GoString returns the string representation 1091func (s DisassociateMemberAccountOutput) GoString() string { 1092 return s.String() 1093} 1094 1095type DisassociateS3ResourcesInput struct { 1096 _ struct{} `type:"structure"` 1097 1098 // The S3 resources (buckets or prefixes) that you want to remove from being 1099 // monitored and classified by Amazon Macie Classic. 1100 // 1101 // AssociatedS3Resources is a required field 1102 AssociatedS3Resources []*S3Resource `locationName:"associatedS3Resources" type:"list" required:"true"` 1103 1104 // The ID of the Amazon Macie Classic member account whose resources you want 1105 // to remove from being monitored by Macie Classic. 1106 MemberAccountId *string `locationName:"memberAccountId" type:"string"` 1107} 1108 1109// String returns the string representation 1110func (s DisassociateS3ResourcesInput) String() string { 1111 return awsutil.Prettify(s) 1112} 1113 1114// GoString returns the string representation 1115func (s DisassociateS3ResourcesInput) GoString() string { 1116 return s.String() 1117} 1118 1119// Validate inspects the fields of the type to determine if they are valid. 1120func (s *DisassociateS3ResourcesInput) Validate() error { 1121 invalidParams := request.ErrInvalidParams{Context: "DisassociateS3ResourcesInput"} 1122 if s.AssociatedS3Resources == nil { 1123 invalidParams.Add(request.NewErrParamRequired("AssociatedS3Resources")) 1124 } 1125 if s.AssociatedS3Resources != nil { 1126 for i, v := range s.AssociatedS3Resources { 1127 if v == nil { 1128 continue 1129 } 1130 if err := v.Validate(); err != nil { 1131 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AssociatedS3Resources", i), err.(request.ErrInvalidParams)) 1132 } 1133 } 1134 } 1135 1136 if invalidParams.Len() > 0 { 1137 return invalidParams 1138 } 1139 return nil 1140} 1141 1142// SetAssociatedS3Resources sets the AssociatedS3Resources field's value. 1143func (s *DisassociateS3ResourcesInput) SetAssociatedS3Resources(v []*S3Resource) *DisassociateS3ResourcesInput { 1144 s.AssociatedS3Resources = v 1145 return s 1146} 1147 1148// SetMemberAccountId sets the MemberAccountId field's value. 1149func (s *DisassociateS3ResourcesInput) SetMemberAccountId(v string) *DisassociateS3ResourcesInput { 1150 s.MemberAccountId = &v 1151 return s 1152} 1153 1154type DisassociateS3ResourcesOutput struct { 1155 _ struct{} `type:"structure"` 1156 1157 // S3 resources that couldn't be removed from being monitored and classified 1158 // by Amazon Macie Classic. An error code and an error message are provided 1159 // for each failed item. 1160 FailedS3Resources []*FailedS3Resource `locationName:"failedS3Resources" type:"list"` 1161} 1162 1163// String returns the string representation 1164func (s DisassociateS3ResourcesOutput) String() string { 1165 return awsutil.Prettify(s) 1166} 1167 1168// GoString returns the string representation 1169func (s DisassociateS3ResourcesOutput) GoString() string { 1170 return s.String() 1171} 1172 1173// SetFailedS3Resources sets the FailedS3Resources field's value. 1174func (s *DisassociateS3ResourcesOutput) SetFailedS3Resources(v []*FailedS3Resource) *DisassociateS3ResourcesOutput { 1175 s.FailedS3Resources = v 1176 return s 1177} 1178 1179// Includes details about the failed S3 resources. 1180type FailedS3Resource struct { 1181 _ struct{} `type:"structure"` 1182 1183 // The status code of a failed item. 1184 ErrorCode *string `locationName:"errorCode" type:"string"` 1185 1186 // The error message of a failed item. 1187 ErrorMessage *string `locationName:"errorMessage" type:"string"` 1188 1189 // The failed S3 resources. 1190 FailedItem *S3Resource `locationName:"failedItem" type:"structure"` 1191} 1192 1193// String returns the string representation 1194func (s FailedS3Resource) String() string { 1195 return awsutil.Prettify(s) 1196} 1197 1198// GoString returns the string representation 1199func (s FailedS3Resource) GoString() string { 1200 return s.String() 1201} 1202 1203// SetErrorCode sets the ErrorCode field's value. 1204func (s *FailedS3Resource) SetErrorCode(v string) *FailedS3Resource { 1205 s.ErrorCode = &v 1206 return s 1207} 1208 1209// SetErrorMessage sets the ErrorMessage field's value. 1210func (s *FailedS3Resource) SetErrorMessage(v string) *FailedS3Resource { 1211 s.ErrorMessage = &v 1212 return s 1213} 1214 1215// SetFailedItem sets the FailedItem field's value. 1216func (s *FailedS3Resource) SetFailedItem(v *S3Resource) *FailedS3Resource { 1217 s.FailedItem = v 1218 return s 1219} 1220 1221// Internal server error. 1222type InternalException struct { 1223 _ struct{} `type:"structure"` 1224 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1225 1226 // Error code for the exception 1227 ErrorCode *string `locationName:"errorCode" type:"string"` 1228 1229 Message_ *string `locationName:"message" type:"string"` 1230} 1231 1232// String returns the string representation 1233func (s InternalException) String() string { 1234 return awsutil.Prettify(s) 1235} 1236 1237// GoString returns the string representation 1238func (s InternalException) GoString() string { 1239 return s.String() 1240} 1241 1242func newErrorInternalException(v protocol.ResponseMetadata) error { 1243 return &InternalException{ 1244 RespMetadata: v, 1245 } 1246} 1247 1248// Code returns the exception type name. 1249func (s *InternalException) Code() string { 1250 return "InternalException" 1251} 1252 1253// Message returns the exception's message. 1254func (s *InternalException) Message() string { 1255 if s.Message_ != nil { 1256 return *s.Message_ 1257 } 1258 return "" 1259} 1260 1261// OrigErr always returns nil, satisfies awserr.Error interface. 1262func (s *InternalException) OrigErr() error { 1263 return nil 1264} 1265 1266func (s *InternalException) Error() string { 1267 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 1268} 1269 1270// Status code returns the HTTP status code for the request's response error. 1271func (s *InternalException) StatusCode() int { 1272 return s.RespMetadata.StatusCode 1273} 1274 1275// RequestID returns the service's response RequestID for request. 1276func (s *InternalException) RequestID() string { 1277 return s.RespMetadata.RequestID 1278} 1279 1280// The request was rejected because an invalid or out-of-range value was supplied 1281// for an input parameter. 1282type InvalidInputException struct { 1283 _ struct{} `type:"structure"` 1284 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1285 1286 // Error code for the exception 1287 ErrorCode *string `locationName:"errorCode" type:"string"` 1288 1289 // Field that has invalid input 1290 FieldName *string `locationName:"fieldName" type:"string"` 1291 1292 Message_ *string `locationName:"message" type:"string"` 1293} 1294 1295// String returns the string representation 1296func (s InvalidInputException) String() string { 1297 return awsutil.Prettify(s) 1298} 1299 1300// GoString returns the string representation 1301func (s InvalidInputException) GoString() string { 1302 return s.String() 1303} 1304 1305func newErrorInvalidInputException(v protocol.ResponseMetadata) error { 1306 return &InvalidInputException{ 1307 RespMetadata: v, 1308 } 1309} 1310 1311// Code returns the exception type name. 1312func (s *InvalidInputException) Code() string { 1313 return "InvalidInputException" 1314} 1315 1316// Message returns the exception's message. 1317func (s *InvalidInputException) Message() string { 1318 if s.Message_ != nil { 1319 return *s.Message_ 1320 } 1321 return "" 1322} 1323 1324// OrigErr always returns nil, satisfies awserr.Error interface. 1325func (s *InvalidInputException) OrigErr() error { 1326 return nil 1327} 1328 1329func (s *InvalidInputException) Error() string { 1330 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 1331} 1332 1333// Status code returns the HTTP status code for the request's response error. 1334func (s *InvalidInputException) StatusCode() int { 1335 return s.RespMetadata.StatusCode 1336} 1337 1338// RequestID returns the service's response RequestID for request. 1339func (s *InvalidInputException) RequestID() string { 1340 return s.RespMetadata.RequestID 1341} 1342 1343// The request was rejected because it attempted to create resources beyond 1344// the current AWS account limits. The error code describes the limit exceeded. 1345type LimitExceededException struct { 1346 _ struct{} `type:"structure"` 1347 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1348 1349 // Error code for the exception 1350 ErrorCode *string `locationName:"errorCode" type:"string"` 1351 1352 Message_ *string `locationName:"message" type:"string"` 1353 1354 // Resource type that caused the exception 1355 ResourceType *string `locationName:"resourceType" type:"string"` 1356} 1357 1358// String returns the string representation 1359func (s LimitExceededException) String() string { 1360 return awsutil.Prettify(s) 1361} 1362 1363// GoString returns the string representation 1364func (s LimitExceededException) GoString() string { 1365 return s.String() 1366} 1367 1368func newErrorLimitExceededException(v protocol.ResponseMetadata) error { 1369 return &LimitExceededException{ 1370 RespMetadata: v, 1371 } 1372} 1373 1374// Code returns the exception type name. 1375func (s *LimitExceededException) Code() string { 1376 return "LimitExceededException" 1377} 1378 1379// Message returns the exception's message. 1380func (s *LimitExceededException) Message() string { 1381 if s.Message_ != nil { 1382 return *s.Message_ 1383 } 1384 return "" 1385} 1386 1387// OrigErr always returns nil, satisfies awserr.Error interface. 1388func (s *LimitExceededException) OrigErr() error { 1389 return nil 1390} 1391 1392func (s *LimitExceededException) Error() string { 1393 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 1394} 1395 1396// Status code returns the HTTP status code for the request's response error. 1397func (s *LimitExceededException) StatusCode() int { 1398 return s.RespMetadata.StatusCode 1399} 1400 1401// RequestID returns the service's response RequestID for request. 1402func (s *LimitExceededException) RequestID() string { 1403 return s.RespMetadata.RequestID 1404} 1405 1406type ListMemberAccountsInput struct { 1407 _ struct{} `type:"structure"` 1408 1409 // Use this parameter to indicate the maximum number of items that you want 1410 // in the response. The default value is 250. 1411 MaxResults *int64 `locationName:"maxResults" type:"integer"` 1412 1413 // Use this parameter when paginating results. Set the value of this parameter 1414 // to null on your first call to the ListMemberAccounts action. Subsequent calls 1415 // to the action fill nextToken in the request with the value of nextToken from 1416 // the previous response to continue listing data. 1417 NextToken *string `locationName:"nextToken" type:"string"` 1418} 1419 1420// String returns the string representation 1421func (s ListMemberAccountsInput) String() string { 1422 return awsutil.Prettify(s) 1423} 1424 1425// GoString returns the string representation 1426func (s ListMemberAccountsInput) GoString() string { 1427 return s.String() 1428} 1429 1430// SetMaxResults sets the MaxResults field's value. 1431func (s *ListMemberAccountsInput) SetMaxResults(v int64) *ListMemberAccountsInput { 1432 s.MaxResults = &v 1433 return s 1434} 1435 1436// SetNextToken sets the NextToken field's value. 1437func (s *ListMemberAccountsInput) SetNextToken(v string) *ListMemberAccountsInput { 1438 s.NextToken = &v 1439 return s 1440} 1441 1442type ListMemberAccountsOutput struct { 1443 _ struct{} `type:"structure"` 1444 1445 // A list of the Amazon Macie Classic member accounts returned by the action. 1446 // The current Macie Classic administrator account is also included in this 1447 // list. 1448 MemberAccounts []*MemberAccount `locationName:"memberAccounts" type:"list"` 1449 1450 // When a response is generated, if there is more data to be listed, this parameter 1451 // is present in the response and contains the value to use for the nextToken 1452 // parameter in a subsequent pagination request. If there is no more data to 1453 // be listed, this parameter is set to null. 1454 NextToken *string `locationName:"nextToken" type:"string"` 1455} 1456 1457// String returns the string representation 1458func (s ListMemberAccountsOutput) String() string { 1459 return awsutil.Prettify(s) 1460} 1461 1462// GoString returns the string representation 1463func (s ListMemberAccountsOutput) GoString() string { 1464 return s.String() 1465} 1466 1467// SetMemberAccounts sets the MemberAccounts field's value. 1468func (s *ListMemberAccountsOutput) SetMemberAccounts(v []*MemberAccount) *ListMemberAccountsOutput { 1469 s.MemberAccounts = v 1470 return s 1471} 1472 1473// SetNextToken sets the NextToken field's value. 1474func (s *ListMemberAccountsOutput) SetNextToken(v string) *ListMemberAccountsOutput { 1475 s.NextToken = &v 1476 return s 1477} 1478 1479type ListS3ResourcesInput struct { 1480 _ struct{} `type:"structure"` 1481 1482 // Use this parameter to indicate the maximum number of items that you want 1483 // in the response. The default value is 250. 1484 MaxResults *int64 `locationName:"maxResults" type:"integer"` 1485 1486 // The Amazon Macie Classic member account ID whose associated S3 resources 1487 // you want to list. 1488 MemberAccountId *string `locationName:"memberAccountId" type:"string"` 1489 1490 // Use this parameter when paginating results. Set its value to null on your 1491 // first call to the ListS3Resources action. Subsequent calls to the action 1492 // fill nextToken in the request with the value of nextToken from the previous 1493 // response to continue listing data. 1494 NextToken *string `locationName:"nextToken" type:"string"` 1495} 1496 1497// String returns the string representation 1498func (s ListS3ResourcesInput) String() string { 1499 return awsutil.Prettify(s) 1500} 1501 1502// GoString returns the string representation 1503func (s ListS3ResourcesInput) GoString() string { 1504 return s.String() 1505} 1506 1507// SetMaxResults sets the MaxResults field's value. 1508func (s *ListS3ResourcesInput) SetMaxResults(v int64) *ListS3ResourcesInput { 1509 s.MaxResults = &v 1510 return s 1511} 1512 1513// SetMemberAccountId sets the MemberAccountId field's value. 1514func (s *ListS3ResourcesInput) SetMemberAccountId(v string) *ListS3ResourcesInput { 1515 s.MemberAccountId = &v 1516 return s 1517} 1518 1519// SetNextToken sets the NextToken field's value. 1520func (s *ListS3ResourcesInput) SetNextToken(v string) *ListS3ResourcesInput { 1521 s.NextToken = &v 1522 return s 1523} 1524 1525type ListS3ResourcesOutput struct { 1526 _ struct{} `type:"structure"` 1527 1528 // When a response is generated, if there is more data to be listed, this parameter 1529 // is present in the response and contains the value to use for the nextToken 1530 // parameter in a subsequent pagination request. If there is no more data to 1531 // be listed, this parameter is set to null. 1532 NextToken *string `locationName:"nextToken" type:"string"` 1533 1534 // A list of the associated S3 resources returned by the action. 1535 S3Resources []*S3ResourceClassification `locationName:"s3Resources" type:"list"` 1536} 1537 1538// String returns the string representation 1539func (s ListS3ResourcesOutput) String() string { 1540 return awsutil.Prettify(s) 1541} 1542 1543// GoString returns the string representation 1544func (s ListS3ResourcesOutput) GoString() string { 1545 return s.String() 1546} 1547 1548// SetNextToken sets the NextToken field's value. 1549func (s *ListS3ResourcesOutput) SetNextToken(v string) *ListS3ResourcesOutput { 1550 s.NextToken = &v 1551 return s 1552} 1553 1554// SetS3Resources sets the S3Resources field's value. 1555func (s *ListS3ResourcesOutput) SetS3Resources(v []*S3ResourceClassification) *ListS3ResourcesOutput { 1556 s.S3Resources = v 1557 return s 1558} 1559 1560// Contains information about the Amazon Macie Classic member account. 1561type MemberAccount struct { 1562 _ struct{} `type:"structure"` 1563 1564 // The AWS account ID of the Amazon Macie Classic member account. 1565 AccountId *string `locationName:"accountId" type:"string"` 1566} 1567 1568// String returns the string representation 1569func (s MemberAccount) String() string { 1570 return awsutil.Prettify(s) 1571} 1572 1573// GoString returns the string representation 1574func (s MemberAccount) GoString() string { 1575 return s.String() 1576} 1577 1578// SetAccountId sets the AccountId field's value. 1579func (s *MemberAccount) SetAccountId(v string) *MemberAccount { 1580 s.AccountId = &v 1581 return s 1582} 1583 1584// Contains information about the S3 resource. This data type is used as a request 1585// parameter in the DisassociateS3Resources action and can be used as a response 1586// parameter in the AssociateS3Resources and UpdateS3Resources actions. 1587type S3Resource struct { 1588 _ struct{} `type:"structure"` 1589 1590 // The name of the S3 bucket. 1591 // 1592 // BucketName is a required field 1593 BucketName *string `locationName:"bucketName" type:"string" required:"true"` 1594 1595 // The prefix of the S3 bucket. 1596 Prefix *string `locationName:"prefix" type:"string"` 1597} 1598 1599// String returns the string representation 1600func (s S3Resource) String() string { 1601 return awsutil.Prettify(s) 1602} 1603 1604// GoString returns the string representation 1605func (s S3Resource) GoString() string { 1606 return s.String() 1607} 1608 1609// Validate inspects the fields of the type to determine if they are valid. 1610func (s *S3Resource) Validate() error { 1611 invalidParams := request.ErrInvalidParams{Context: "S3Resource"} 1612 if s.BucketName == nil { 1613 invalidParams.Add(request.NewErrParamRequired("BucketName")) 1614 } 1615 1616 if invalidParams.Len() > 0 { 1617 return invalidParams 1618 } 1619 return nil 1620} 1621 1622// SetBucketName sets the BucketName field's value. 1623func (s *S3Resource) SetBucketName(v string) *S3Resource { 1624 s.BucketName = &v 1625 return s 1626} 1627 1628// SetPrefix sets the Prefix field's value. 1629func (s *S3Resource) SetPrefix(v string) *S3Resource { 1630 s.Prefix = &v 1631 return s 1632} 1633 1634// The S3 resources that you want to associate with Amazon Macie Classic for 1635// monitoring and data classification. This data type is used as a request parameter 1636// in the AssociateS3Resources action and a response parameter in the ListS3Resources 1637// action. 1638type S3ResourceClassification struct { 1639 _ struct{} `type:"structure"` 1640 1641 // The name of the S3 bucket that you want to associate with Amazon Macie Classic. 1642 // 1643 // BucketName is a required field 1644 BucketName *string `locationName:"bucketName" type:"string" required:"true"` 1645 1646 // The classification type that you want to specify for the resource associated 1647 // with Amazon Macie Classic. 1648 // 1649 // ClassificationType is a required field 1650 ClassificationType *ClassificationType `locationName:"classificationType" type:"structure" required:"true"` 1651 1652 // The prefix of the S3 bucket that you want to associate with Amazon Macie 1653 // Classic. 1654 Prefix *string `locationName:"prefix" type:"string"` 1655} 1656 1657// String returns the string representation 1658func (s S3ResourceClassification) String() string { 1659 return awsutil.Prettify(s) 1660} 1661 1662// GoString returns the string representation 1663func (s S3ResourceClassification) GoString() string { 1664 return s.String() 1665} 1666 1667// Validate inspects the fields of the type to determine if they are valid. 1668func (s *S3ResourceClassification) Validate() error { 1669 invalidParams := request.ErrInvalidParams{Context: "S3ResourceClassification"} 1670 if s.BucketName == nil { 1671 invalidParams.Add(request.NewErrParamRequired("BucketName")) 1672 } 1673 if s.ClassificationType == nil { 1674 invalidParams.Add(request.NewErrParamRequired("ClassificationType")) 1675 } 1676 if s.ClassificationType != nil { 1677 if err := s.ClassificationType.Validate(); err != nil { 1678 invalidParams.AddNested("ClassificationType", err.(request.ErrInvalidParams)) 1679 } 1680 } 1681 1682 if invalidParams.Len() > 0 { 1683 return invalidParams 1684 } 1685 return nil 1686} 1687 1688// SetBucketName sets the BucketName field's value. 1689func (s *S3ResourceClassification) SetBucketName(v string) *S3ResourceClassification { 1690 s.BucketName = &v 1691 return s 1692} 1693 1694// SetClassificationType sets the ClassificationType field's value. 1695func (s *S3ResourceClassification) SetClassificationType(v *ClassificationType) *S3ResourceClassification { 1696 s.ClassificationType = v 1697 return s 1698} 1699 1700// SetPrefix sets the Prefix field's value. 1701func (s *S3ResourceClassification) SetPrefix(v string) *S3ResourceClassification { 1702 s.Prefix = &v 1703 return s 1704} 1705 1706// The S3 resources whose classification types you want to update. This data 1707// type is used as a request parameter in the UpdateS3Resources action. 1708type S3ResourceClassificationUpdate struct { 1709 _ struct{} `type:"structure"` 1710 1711 // The name of the S3 bucket whose classification types you want to update. 1712 // 1713 // BucketName is a required field 1714 BucketName *string `locationName:"bucketName" type:"string" required:"true"` 1715 1716 // The classification type that you want to update for the resource associated 1717 // with Amazon Macie Classic. 1718 // 1719 // ClassificationTypeUpdate is a required field 1720 ClassificationTypeUpdate *ClassificationTypeUpdate `locationName:"classificationTypeUpdate" type:"structure" required:"true"` 1721 1722 // The prefix of the S3 bucket whose classification types you want to update. 1723 Prefix *string `locationName:"prefix" type:"string"` 1724} 1725 1726// String returns the string representation 1727func (s S3ResourceClassificationUpdate) String() string { 1728 return awsutil.Prettify(s) 1729} 1730 1731// GoString returns the string representation 1732func (s S3ResourceClassificationUpdate) GoString() string { 1733 return s.String() 1734} 1735 1736// Validate inspects the fields of the type to determine if they are valid. 1737func (s *S3ResourceClassificationUpdate) Validate() error { 1738 invalidParams := request.ErrInvalidParams{Context: "S3ResourceClassificationUpdate"} 1739 if s.BucketName == nil { 1740 invalidParams.Add(request.NewErrParamRequired("BucketName")) 1741 } 1742 if s.ClassificationTypeUpdate == nil { 1743 invalidParams.Add(request.NewErrParamRequired("ClassificationTypeUpdate")) 1744 } 1745 1746 if invalidParams.Len() > 0 { 1747 return invalidParams 1748 } 1749 return nil 1750} 1751 1752// SetBucketName sets the BucketName field's value. 1753func (s *S3ResourceClassificationUpdate) SetBucketName(v string) *S3ResourceClassificationUpdate { 1754 s.BucketName = &v 1755 return s 1756} 1757 1758// SetClassificationTypeUpdate sets the ClassificationTypeUpdate field's value. 1759func (s *S3ResourceClassificationUpdate) SetClassificationTypeUpdate(v *ClassificationTypeUpdate) *S3ResourceClassificationUpdate { 1760 s.ClassificationTypeUpdate = v 1761 return s 1762} 1763 1764// SetPrefix sets the Prefix field's value. 1765func (s *S3ResourceClassificationUpdate) SetPrefix(v string) *S3ResourceClassificationUpdate { 1766 s.Prefix = &v 1767 return s 1768} 1769 1770type UpdateS3ResourcesInput struct { 1771 _ struct{} `type:"structure"` 1772 1773 // The AWS ID of the Amazon Macie Classic member account whose S3 resources' 1774 // classification types you want to update. 1775 MemberAccountId *string `locationName:"memberAccountId" type:"string"` 1776 1777 // The S3 resources whose classification types you want to update. 1778 // 1779 // S3ResourcesUpdate is a required field 1780 S3ResourcesUpdate []*S3ResourceClassificationUpdate `locationName:"s3ResourcesUpdate" type:"list" required:"true"` 1781} 1782 1783// String returns the string representation 1784func (s UpdateS3ResourcesInput) String() string { 1785 return awsutil.Prettify(s) 1786} 1787 1788// GoString returns the string representation 1789func (s UpdateS3ResourcesInput) GoString() string { 1790 return s.String() 1791} 1792 1793// Validate inspects the fields of the type to determine if they are valid. 1794func (s *UpdateS3ResourcesInput) Validate() error { 1795 invalidParams := request.ErrInvalidParams{Context: "UpdateS3ResourcesInput"} 1796 if s.S3ResourcesUpdate == nil { 1797 invalidParams.Add(request.NewErrParamRequired("S3ResourcesUpdate")) 1798 } 1799 if s.S3ResourcesUpdate != nil { 1800 for i, v := range s.S3ResourcesUpdate { 1801 if v == nil { 1802 continue 1803 } 1804 if err := v.Validate(); err != nil { 1805 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "S3ResourcesUpdate", i), err.(request.ErrInvalidParams)) 1806 } 1807 } 1808 } 1809 1810 if invalidParams.Len() > 0 { 1811 return invalidParams 1812 } 1813 return nil 1814} 1815 1816// SetMemberAccountId sets the MemberAccountId field's value. 1817func (s *UpdateS3ResourcesInput) SetMemberAccountId(v string) *UpdateS3ResourcesInput { 1818 s.MemberAccountId = &v 1819 return s 1820} 1821 1822// SetS3ResourcesUpdate sets the S3ResourcesUpdate field's value. 1823func (s *UpdateS3ResourcesInput) SetS3ResourcesUpdate(v []*S3ResourceClassificationUpdate) *UpdateS3ResourcesInput { 1824 s.S3ResourcesUpdate = v 1825 return s 1826} 1827 1828type UpdateS3ResourcesOutput struct { 1829 _ struct{} `type:"structure"` 1830 1831 // The S3 resources whose classification types can't be updated. An error code 1832 // and an error message are provided for each failed item. 1833 FailedS3Resources []*FailedS3Resource `locationName:"failedS3Resources" type:"list"` 1834} 1835 1836// String returns the string representation 1837func (s UpdateS3ResourcesOutput) String() string { 1838 return awsutil.Prettify(s) 1839} 1840 1841// GoString returns the string representation 1842func (s UpdateS3ResourcesOutput) GoString() string { 1843 return s.String() 1844} 1845 1846// SetFailedS3Resources sets the FailedS3Resources field's value. 1847func (s *UpdateS3ResourcesOutput) SetFailedS3Resources(v []*FailedS3Resource) *UpdateS3ResourcesOutput { 1848 s.FailedS3Resources = v 1849 return s 1850} 1851 1852const ( 1853 // S3ContinuousClassificationTypeFull is a S3ContinuousClassificationType enum value 1854 S3ContinuousClassificationTypeFull = "FULL" 1855) 1856 1857// S3ContinuousClassificationType_Values returns all elements of the S3ContinuousClassificationType enum 1858func S3ContinuousClassificationType_Values() []string { 1859 return []string{ 1860 S3ContinuousClassificationTypeFull, 1861 } 1862} 1863 1864const ( 1865 // S3OneTimeClassificationTypeFull is a S3OneTimeClassificationType enum value 1866 S3OneTimeClassificationTypeFull = "FULL" 1867 1868 // S3OneTimeClassificationTypeNone is a S3OneTimeClassificationType enum value 1869 S3OneTimeClassificationTypeNone = "NONE" 1870) 1871 1872// S3OneTimeClassificationType_Values returns all elements of the S3OneTimeClassificationType enum 1873func S3OneTimeClassificationType_Values() []string { 1874 return []string{ 1875 S3OneTimeClassificationTypeFull, 1876 S3OneTimeClassificationTypeNone, 1877 } 1878} 1879