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