Update vendored deps, including AWS SDK, openpgp, ftp, ...

This commit is contained in:
Andrey Smirnov
2018-04-05 17:46:45 +03:00
parent cef4fefc40
commit 0e6ee35942
1497 changed files with 450721 additions and 68034 deletions
+379 -69
View File
@@ -14,7 +14,7 @@ const opCreateProtection = "CreateProtection"
// CreateProtectionRequest generates a "aws/request.Request" representing the
// client's request for the CreateProtection operation. The "output" return
// value will be populated with the request's response once the request complets
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
@@ -35,7 +35,7 @@ const opCreateProtection = "CreateProtection"
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/CreateProtection
// See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/CreateProtection
func (c *Shield) CreateProtectionRequest(input *CreateProtectionInput) (req *request.Request, output *CreateProtectionOutput) {
op := &request.Operation{
Name: opCreateProtection,
@@ -56,7 +56,7 @@ func (c *Shield) CreateProtectionRequest(input *CreateProtectionInput) (req *req
//
// Enables AWS Shield Advanced for a specific AWS resource. The resource can
// be an Amazon CloudFront distribution, Elastic Load Balancing load balancer,
// or an Amazon Route 53 hosted zone.
// Elastic IP Address, or an Amazon Route 53 hosted zone.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -81,6 +81,10 @@ func (c *Shield) CreateProtectionRequest(input *CreateProtectionInput) (req *req
// * ErrCodeLimitsExceededException "LimitsExceededException"
// Exception that indicates that the operation would exceed a limit.
//
// Type is the type of limit that would be exceeded.
//
// Limit is the threshold that would be exceeded.
//
// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException"
// Exception indicating the specified resource already exists.
//
@@ -91,7 +95,7 @@ func (c *Shield) CreateProtectionRequest(input *CreateProtectionInput) (req *req
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// Exception indicating the specified resource does not exist.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/CreateProtection
// See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/CreateProtection
func (c *Shield) CreateProtection(input *CreateProtectionInput) (*CreateProtectionOutput, error) {
req, out := c.CreateProtectionRequest(input)
return out, req.Send()
@@ -117,7 +121,7 @@ const opCreateSubscription = "CreateSubscription"
// CreateSubscriptionRequest generates a "aws/request.Request" representing the
// client's request for the CreateSubscription operation. The "output" return
// value will be populated with the request's response once the request complets
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
@@ -138,7 +142,7 @@ const opCreateSubscription = "CreateSubscription"
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/CreateSubscription
// See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/CreateSubscription
func (c *Shield) CreateSubscriptionRequest(input *CreateSubscriptionInput) (req *request.Request, output *CreateSubscriptionOutput) {
op := &request.Operation{
Name: opCreateSubscription,
@@ -174,7 +178,7 @@ func (c *Shield) CreateSubscriptionRequest(input *CreateSubscriptionInput) (req
// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException"
// Exception indicating the specified resource already exists.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/CreateSubscription
// See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/CreateSubscription
func (c *Shield) CreateSubscription(input *CreateSubscriptionInput) (*CreateSubscriptionOutput, error) {
req, out := c.CreateSubscriptionRequest(input)
return out, req.Send()
@@ -200,7 +204,7 @@ const opDeleteProtection = "DeleteProtection"
// DeleteProtectionRequest generates a "aws/request.Request" representing the
// client's request for the DeleteProtection operation. The "output" return
// value will be populated with the request's response once the request complets
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
@@ -221,7 +225,7 @@ const opDeleteProtection = "DeleteProtection"
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DeleteProtection
// See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DeleteProtection
func (c *Shield) DeleteProtectionRequest(input *DeleteProtectionInput) (req *request.Request, output *DeleteProtectionOutput) {
op := &request.Operation{
Name: opDeleteProtection,
@@ -261,7 +265,7 @@ func (c *Shield) DeleteProtectionRequest(input *DeleteProtectionInput) (req *req
// Exception that indicates that the protection state has been modified by another
// client. You can retry the request.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DeleteProtection
// See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DeleteProtection
func (c *Shield) DeleteProtection(input *DeleteProtectionInput) (*DeleteProtectionOutput, error) {
req, out := c.DeleteProtectionRequest(input)
return out, req.Send()
@@ -287,7 +291,7 @@ const opDeleteSubscription = "DeleteSubscription"
// DeleteSubscriptionRequest generates a "aws/request.Request" representing the
// client's request for the DeleteSubscription operation. The "output" return
// value will be populated with the request's response once the request complets
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
@@ -308,7 +312,7 @@ const opDeleteSubscription = "DeleteSubscription"
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DeleteSubscription
// See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DeleteSubscription
func (c *Shield) DeleteSubscriptionRequest(input *DeleteSubscriptionInput) (req *request.Request, output *DeleteSubscriptionOutput) {
op := &request.Operation{
Name: opDeleteSubscription,
@@ -327,7 +331,9 @@ func (c *Shield) DeleteSubscriptionRequest(input *DeleteSubscriptionInput) (req
// DeleteSubscription API operation for AWS Shield.
//
// Removes AWS Shield Advanced from an account.
// Removes AWS Shield Advanced from an account. AWS Shield Advanced requires
// a 1-year subscription commitment. You cannot delete a subscription prior
// to the completion of that commitment.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -342,13 +348,13 @@ func (c *Shield) DeleteSubscriptionRequest(input *DeleteSubscriptionInput) (req
// You can retry the request.
//
// * ErrCodeLockedSubscriptionException "LockedSubscriptionException"
// Exception that indicates that the subscription has been modified by another
// client. You can retry the request.
// Exception that indicates that the subscription you are trying to delete has
// not yet completed the 1-year commitment. You cannot delete this subscription.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// Exception indicating the specified resource does not exist.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DeleteSubscription
// See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DeleteSubscription
func (c *Shield) DeleteSubscription(input *DeleteSubscriptionInput) (*DeleteSubscriptionOutput, error) {
req, out := c.DeleteSubscriptionRequest(input)
return out, req.Send()
@@ -374,7 +380,7 @@ const opDescribeAttack = "DescribeAttack"
// DescribeAttackRequest generates a "aws/request.Request" representing the
// client's request for the DescribeAttack operation. The "output" return
// value will be populated with the request's response once the request complets
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
@@ -395,7 +401,7 @@ const opDescribeAttack = "DescribeAttack"
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DescribeAttack
// See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DescribeAttack
func (c *Shield) DescribeAttackRequest(input *DescribeAttackInput) (req *request.Request, output *DescribeAttackOutput) {
op := &request.Operation{
Name: opDescribeAttack,
@@ -431,7 +437,7 @@ func (c *Shield) DescribeAttackRequest(input *DescribeAttackInput) (req *request
// * ErrCodeInvalidParameterException "InvalidParameterException"
// Exception that indicates that the parameters passed to the API are invalid.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DescribeAttack
// See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DescribeAttack
func (c *Shield) DescribeAttack(input *DescribeAttackInput) (*DescribeAttackOutput, error) {
req, out := c.DescribeAttackRequest(input)
return out, req.Send()
@@ -457,7 +463,7 @@ const opDescribeProtection = "DescribeProtection"
// DescribeProtectionRequest generates a "aws/request.Request" representing the
// client's request for the DescribeProtection operation. The "output" return
// value will be populated with the request's response once the request complets
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
@@ -478,7 +484,7 @@ const opDescribeProtection = "DescribeProtection"
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DescribeProtection
// See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DescribeProtection
func (c *Shield) DescribeProtectionRequest(input *DescribeProtectionInput) (req *request.Request, output *DescribeProtectionOutput) {
op := &request.Operation{
Name: opDescribeProtection,
@@ -514,7 +520,7 @@ func (c *Shield) DescribeProtectionRequest(input *DescribeProtectionInput) (req
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// Exception indicating the specified resource does not exist.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DescribeProtection
// See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DescribeProtection
func (c *Shield) DescribeProtection(input *DescribeProtectionInput) (*DescribeProtectionOutput, error) {
req, out := c.DescribeProtectionRequest(input)
return out, req.Send()
@@ -540,7 +546,7 @@ const opDescribeSubscription = "DescribeSubscription"
// DescribeSubscriptionRequest generates a "aws/request.Request" representing the
// client's request for the DescribeSubscription operation. The "output" return
// value will be populated with the request's response once the request complets
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
@@ -561,7 +567,7 @@ const opDescribeSubscription = "DescribeSubscription"
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DescribeSubscription
// See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DescribeSubscription
func (c *Shield) DescribeSubscriptionRequest(input *DescribeSubscriptionInput) (req *request.Request, output *DescribeSubscriptionOutput) {
op := &request.Operation{
Name: opDescribeSubscription,
@@ -597,7 +603,7 @@ func (c *Shield) DescribeSubscriptionRequest(input *DescribeSubscriptionInput) (
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// Exception indicating the specified resource does not exist.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DescribeSubscription
// See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DescribeSubscription
func (c *Shield) DescribeSubscription(input *DescribeSubscriptionInput) (*DescribeSubscriptionOutput, error) {
req, out := c.DescribeSubscriptionRequest(input)
return out, req.Send()
@@ -619,11 +625,91 @@ func (c *Shield) DescribeSubscriptionWithContext(ctx aws.Context, input *Describ
return out, req.Send()
}
const opGetSubscriptionState = "GetSubscriptionState"
// GetSubscriptionStateRequest generates a "aws/request.Request" representing the
// client's request for the GetSubscriptionState operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetSubscriptionState for more information on using the GetSubscriptionState
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetSubscriptionStateRequest method.
// req, resp := client.GetSubscriptionStateRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/GetSubscriptionState
func (c *Shield) GetSubscriptionStateRequest(input *GetSubscriptionStateInput) (req *request.Request, output *GetSubscriptionStateOutput) {
op := &request.Operation{
Name: opGetSubscriptionState,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GetSubscriptionStateInput{}
}
output = &GetSubscriptionStateOutput{}
req = c.newRequest(op, input, output)
return
}
// GetSubscriptionState API operation for AWS Shield.
//
// Returns the SubscriptionState, either Active or Inactive.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Shield's
// API operation GetSubscriptionState for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInternalErrorException "InternalErrorException"
// Exception that indicates that a problem occurred with the service infrastructure.
// You can retry the request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/GetSubscriptionState
func (c *Shield) GetSubscriptionState(input *GetSubscriptionStateInput) (*GetSubscriptionStateOutput, error) {
req, out := c.GetSubscriptionStateRequest(input)
return out, req.Send()
}
// GetSubscriptionStateWithContext is the same as GetSubscriptionState with the addition of
// the ability to pass a context and additional request options.
//
// See GetSubscriptionState for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *Shield) GetSubscriptionStateWithContext(ctx aws.Context, input *GetSubscriptionStateInput, opts ...request.Option) (*GetSubscriptionStateOutput, error) {
req, out := c.GetSubscriptionStateRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opListAttacks = "ListAttacks"
// ListAttacksRequest generates a "aws/request.Request" representing the
// client's request for the ListAttacks operation. The "output" return
// value will be populated with the request's response once the request complets
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
@@ -644,7 +730,7 @@ const opListAttacks = "ListAttacks"
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/ListAttacks
// See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/ListAttacks
func (c *Shield) ListAttacksRequest(input *ListAttacksInput) (req *request.Request, output *ListAttacksOutput) {
op := &request.Operation{
Name: opListAttacks,
@@ -685,7 +771,7 @@ func (c *Shield) ListAttacksRequest(input *ListAttacksInput) (req *request.Reque
// Exception that indicates that the operation would not cause any change to
// occur.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/ListAttacks
// See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/ListAttacks
func (c *Shield) ListAttacks(input *ListAttacksInput) (*ListAttacksOutput, error) {
req, out := c.ListAttacksRequest(input)
return out, req.Send()
@@ -711,7 +797,7 @@ const opListProtections = "ListProtections"
// ListProtectionsRequest generates a "aws/request.Request" representing the
// client's request for the ListProtections operation. The "output" return
// value will be populated with the request's response once the request complets
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
@@ -732,7 +818,7 @@ const opListProtections = "ListProtections"
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/ListProtections
// See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/ListProtections
func (c *Shield) ListProtectionsRequest(input *ListProtectionsInput) (req *request.Request, output *ListProtectionsOutput) {
op := &request.Operation{
Name: opListProtections,
@@ -768,7 +854,7 @@ func (c *Shield) ListProtectionsRequest(input *ListProtectionsInput) (req *reque
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// Exception indicating the specified resource does not exist.
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/ListProtections
// See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/ListProtections
func (c *Shield) ListProtections(input *ListProtectionsInput) (*ListProtectionsOutput, error) {
req, out := c.ListProtectionsRequest(input)
return out, req.Send()
@@ -791,7 +877,6 @@ func (c *Shield) ListProtectionsWithContext(ctx aws.Context, input *ListProtecti
}
// The details of a DDoS attack.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/AttackDetail
type AttackDetail struct {
_ struct{} `type:"structure"`
@@ -801,7 +886,11 @@ type AttackDetail struct {
// The unique identifier (ID) of the attack.
AttackId *string `min:"1" type:"string"`
// The time the attack ended, in the format 2016-12-16T13:50Z.
// The array of AttackProperty objects.
AttackProperties []*AttackProperty `type:"list"`
// The time the attack ended, in Unix time in seconds. For more information
// see timestamp (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types).
EndTime *time.Time `type:"timestamp" timestampFormat:"unix"`
// List of mitigation actions taken for the attack.
@@ -810,7 +899,8 @@ type AttackDetail struct {
// The ARN (Amazon Resource Name) of the resource that was attacked.
ResourceArn *string `min:"1" type:"string"`
// The time the attack started, in the format 2016-12-16T13:50Z.
// The time the attack started, in Unix time in seconds. For more information
// see timestamp (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types).
StartTime *time.Time `type:"timestamp" timestampFormat:"unix"`
// If applicable, additional detail about the resource being attacked, for example,
@@ -840,6 +930,12 @@ func (s *AttackDetail) SetAttackId(v string) *AttackDetail {
return s
}
// SetAttackProperties sets the AttackProperties field's value.
func (s *AttackDetail) SetAttackProperties(v []*AttackProperty) *AttackDetail {
s.AttackProperties = v
return s
}
// SetEndTime sets the EndTime field's value.
func (s *AttackDetail) SetEndTime(v time.Time) *AttackDetail {
s.EndTime = &v
@@ -870,8 +966,70 @@ func (s *AttackDetail) SetSubResources(v []*SubResourceSummary) *AttackDetail {
return s
}
// Details of the described attack.
type AttackProperty struct {
_ struct{} `type:"structure"`
// The type of DDoS event that was observed. NETWORK indicates layer 3 and layer
// 4 events and APPLICATION indicates layer 7 events.
AttackLayer *string `type:"string" enum:"AttackLayer"`
// Defines the DDoS attack property information that is provided.
AttackPropertyIdentifier *string `type:"string" enum:"AttackPropertyIdentifier"`
// The array of Contributor objects that includes the top five contributors
// to an attack.
TopContributors []*Contributor `type:"list"`
// The total contributions made to this attack by all contributors, not just
// the five listed in the TopContributors list.
Total *int64 `type:"long"`
// The unit of the Value of the contributions.
Unit *string `type:"string" enum:"Unit"`
}
// String returns the string representation
func (s AttackProperty) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s AttackProperty) GoString() string {
return s.String()
}
// SetAttackLayer sets the AttackLayer field's value.
func (s *AttackProperty) SetAttackLayer(v string) *AttackProperty {
s.AttackLayer = &v
return s
}
// SetAttackPropertyIdentifier sets the AttackPropertyIdentifier field's value.
func (s *AttackProperty) SetAttackPropertyIdentifier(v string) *AttackProperty {
s.AttackPropertyIdentifier = &v
return s
}
// SetTopContributors sets the TopContributors field's value.
func (s *AttackProperty) SetTopContributors(v []*Contributor) *AttackProperty {
s.TopContributors = v
return s
}
// SetTotal sets the Total field's value.
func (s *AttackProperty) SetTotal(v int64) *AttackProperty {
s.Total = &v
return s
}
// SetUnit sets the Unit field's value.
func (s *AttackProperty) SetUnit(v string) *AttackProperty {
s.Unit = &v
return s
}
// Summarizes all DDoS attacks for a specified time period.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/AttackSummary
type AttackSummary struct {
_ struct{} `type:"structure"`
@@ -881,13 +1039,15 @@ type AttackSummary struct {
// The list of attacks for a specified time period.
AttackVectors []*AttackVectorDescription `type:"list"`
// The end time of the attack, in the format 2016-12-16T13:50Z.
// The end time of the attack, in Unix time in seconds. For more information
// see timestamp (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types).
EndTime *time.Time `type:"timestamp" timestampFormat:"unix"`
// The ARN (Amazon Resource Name) of the resource that was attacked.
ResourceArn *string `type:"string"`
// The start time of the attack, in the format 2016-12-16T13:50Z.
// The start time of the attack, in Unix time in seconds. For more information
// see timestamp (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types).
StartTime *time.Time `type:"timestamp" timestampFormat:"unix"`
}
@@ -932,11 +1092,40 @@ func (s *AttackSummary) SetStartTime(v time.Time) *AttackSummary {
}
// Describes the attack.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/AttackVectorDescription
type AttackVectorDescription struct {
_ struct{} `type:"structure"`
// The attack type, for example, SNMP reflection or SYN flood.
// The attack type. Valid values:
//
// * UDP_TRAFFIC
//
// * UDP_FRAGMENT
//
// * GENERIC_UDP_REFLECTION
//
// * DNS_REFLECTION
//
// * NTP_REFLECTION
//
// * CHARGEN_REFLECTION
//
// * SSDP_REFLECTION
//
// * PORT_MAPPER
//
// * RIP_REFLECTION
//
// * SNMP_REFLECTION
//
// * MSSQL_REFLECTION
//
// * NET_BIOS_REFLECTION
//
// * SYN_FLOOD
//
// * ACK_FLOOD
//
// * REQUEST_FLOOD
//
// VectorType is a required field
VectorType *string `type:"string" required:"true"`
@@ -958,7 +1147,42 @@ func (s *AttackVectorDescription) SetVectorType(v string) *AttackVectorDescripti
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/CreateProtectionRequest
// A contributor to the attack and their contribution.
type Contributor struct {
_ struct{} `type:"structure"`
// The name of the contributor. This is dependent on the AttackPropertyIdentifier.
// For example, if the AttackPropertyIdentifier is SOURCE_COUNTRY, the Name
// could be United States.
Name *string `type:"string"`
// The contribution of this contributor expressed in Protection units. For example
// 10,000.
Value *int64 `type:"long"`
}
// String returns the string representation
func (s Contributor) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s Contributor) GoString() string {
return s.String()
}
// SetName sets the Name field's value.
func (s *Contributor) SetName(v string) *Contributor {
s.Name = &v
return s
}
// SetValue sets the Value field's value.
func (s *Contributor) SetValue(v int64) *Contributor {
s.Value = &v
return s
}
type CreateProtectionInput struct {
_ struct{} `type:"structure"`
@@ -969,6 +1193,18 @@ type CreateProtectionInput struct {
// The ARN (Amazon Resource Name) of the resource to be protected.
//
// The ARN should be in one of the following formats:
//
// * For an Application Load Balancer: arn:aws:elasticloadbalancing:region:account-id:loadbalancer/app/load-balancer-name/load-balancer-id
//
// * For an Elastic Load Balancer (Classic Load Balancer): arn:aws:elasticloadbalancing:region:account-id:loadbalancer/load-balancer-name
//
// * For AWS CloudFront distribution: arn:aws:cloudfront::account-id:distribution/distribution-id
//
// * For Amazon Route 53: arn:aws:route53::account-id:hostedzone/hosted-zone-id
//
// * For an Elastic IP address: arn:aws:ec2:region:account-id:eip-allocation/allocation-id
//
// ResourceArn is a required field
ResourceArn *string `min:"1" type:"string" required:"true"`
}
@@ -1017,7 +1253,6 @@ func (s *CreateProtectionInput) SetResourceArn(v string) *CreateProtectionInput
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/CreateProtectionResponse
type CreateProtectionOutput struct {
_ struct{} `type:"structure"`
@@ -1041,7 +1276,6 @@ func (s *CreateProtectionOutput) SetProtectionId(v string) *CreateProtectionOutp
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/CreateSubscriptionRequest
type CreateSubscriptionInput struct {
_ struct{} `type:"structure"`
}
@@ -1056,7 +1290,6 @@ func (s CreateSubscriptionInput) GoString() string {
return s.String()
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/CreateSubscriptionResponse
type CreateSubscriptionOutput struct {
_ struct{} `type:"structure"`
}
@@ -1071,7 +1304,6 @@ func (s CreateSubscriptionOutput) GoString() string {
return s.String()
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DeleteProtectionRequest
type DeleteProtectionInput struct {
_ struct{} `type:"structure"`
@@ -1113,7 +1345,6 @@ func (s *DeleteProtectionInput) SetProtectionId(v string) *DeleteProtectionInput
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DeleteProtectionResponse
type DeleteProtectionOutput struct {
_ struct{} `type:"structure"`
}
@@ -1128,7 +1359,6 @@ func (s DeleteProtectionOutput) GoString() string {
return s.String()
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DeleteSubscriptionRequest
type DeleteSubscriptionInput struct {
_ struct{} `type:"structure"`
}
@@ -1143,7 +1373,6 @@ func (s DeleteSubscriptionInput) GoString() string {
return s.String()
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DeleteSubscriptionResponse
type DeleteSubscriptionOutput struct {
_ struct{} `type:"structure"`
}
@@ -1158,7 +1387,6 @@ func (s DeleteSubscriptionOutput) GoString() string {
return s.String()
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DescribeAttackRequest
type DescribeAttackInput struct {
_ struct{} `type:"structure"`
@@ -1200,7 +1428,6 @@ func (s *DescribeAttackInput) SetAttackId(v string) *DescribeAttackInput {
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DescribeAttackResponse
type DescribeAttackOutput struct {
_ struct{} `type:"structure"`
@@ -1224,7 +1451,6 @@ func (s *DescribeAttackOutput) SetAttack(v *AttackDetail) *DescribeAttackOutput
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DescribeProtectionRequest
type DescribeProtectionInput struct {
_ struct{} `type:"structure"`
@@ -1266,7 +1492,6 @@ func (s *DescribeProtectionInput) SetProtectionId(v string) *DescribeProtectionI
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DescribeProtectionResponse
type DescribeProtectionOutput struct {
_ struct{} `type:"structure"`
@@ -1290,7 +1515,6 @@ func (s *DescribeProtectionOutput) SetProtection(v *Protection) *DescribeProtect
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DescribeSubscriptionRequest
type DescribeSubscriptionInput struct {
_ struct{} `type:"structure"`
}
@@ -1305,7 +1529,6 @@ func (s DescribeSubscriptionInput) GoString() string {
return s.String()
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DescribeSubscriptionResponse
type DescribeSubscriptionOutput struct {
_ struct{} `type:"structure"`
@@ -1329,11 +1552,52 @@ func (s *DescribeSubscriptionOutput) SetSubscription(v *Subscription) *DescribeS
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/ListAttacksRequest
type GetSubscriptionStateInput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s GetSubscriptionStateInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetSubscriptionStateInput) GoString() string {
return s.String()
}
type GetSubscriptionStateOutput struct {
_ struct{} `type:"structure"`
// The status of the subscription.
//
// SubscriptionState is a required field
SubscriptionState *string `type:"string" required:"true" enum:"SubscriptionState"`
}
// String returns the string representation
func (s GetSubscriptionStateOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetSubscriptionStateOutput) GoString() string {
return s.String()
}
// SetSubscriptionState sets the SubscriptionState field's value.
func (s *GetSubscriptionStateOutput) SetSubscriptionState(v string) *GetSubscriptionStateOutput {
s.SubscriptionState = &v
return s
}
type ListAttacksInput struct {
_ struct{} `type:"structure"`
// The end of the time period for the attacks.
// The end of the time period for the attacks. This is a timestamp type. The
// sample request above indicates a number type because the default used by
// 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)
// is allowed.
EndTime *TimeRange `type:"structure"`
// The maximum number of AttackSummary objects to be returned. If this is left
@@ -1348,7 +1612,10 @@ type ListAttacksInput struct {
// is left blank, all applicable resources for this account will be included.
ResourceArns []*string `type:"list"`
// The time period for the attacks.
// The start of the time period for the attacks. This is a timestamp type. The
// sample request above indicates a number type because the default used by
// 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)
// is allowed.
StartTime *TimeRange `type:"structure"`
}
@@ -1405,7 +1672,6 @@ func (s *ListAttacksInput) SetStartTime(v *TimeRange) *ListAttacksInput {
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/ListAttacksResponse
type ListAttacksOutput struct {
_ struct{} `type:"structure"`
@@ -1441,7 +1707,6 @@ func (s *ListAttacksOutput) SetNextToken(v string) *ListAttacksOutput {
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/ListProtectionsRequest
type ListProtectionsInput struct {
_ struct{} `type:"structure"`
@@ -1489,7 +1754,6 @@ func (s *ListProtectionsInput) SetNextToken(v string) *ListProtectionsInput {
return s
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/ListProtectionsResponse
type ListProtectionsOutput struct {
_ struct{} `type:"structure"`
@@ -1527,7 +1791,6 @@ func (s *ListProtectionsOutput) SetProtections(v []*Protection) *ListProtections
}
// The mitigation applied to a DDoS attack.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/Mitigation
type Mitigation struct {
_ struct{} `type:"structure"`
@@ -1552,7 +1815,6 @@ func (s *Mitigation) SetMitigationName(v string) *Mitigation {
}
// An object that represents a resource that is under DDoS protection.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/Protection
type Protection struct {
_ struct{} `type:"structure"`
@@ -1595,7 +1857,6 @@ func (s *Protection) SetResourceArn(v string) *Protection {
}
// The attack information for the specified SubResource.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/SubResourceSummary
type SubResourceSummary struct {
_ struct{} `type:"structure"`
@@ -1647,11 +1908,11 @@ func (s *SubResourceSummary) SetType(v string) *SubResourceSummary {
}
// Information about the AWS Shield Advanced subscription for an account.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/Subscription
type Subscription struct {
_ struct{} `type:"structure"`
// The start time of the subscription, in the format "2016-12-16T13:50Z".
// The start time of the subscription, in Unix time in seconds. For more information
// see timestamp (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types).
StartTime *time.Time `type:"timestamp" timestampFormat:"unix"`
// The length, in seconds, of the AWS Shield Advanced subscription for the account.
@@ -1681,7 +1942,6 @@ func (s *Subscription) SetTimeCommitmentInSeconds(v int64) *Subscription {
}
// A summary of information about the attack.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/SummarizedAttackVector
type SummarizedAttackVector struct {
_ struct{} `type:"structure"`
@@ -1717,7 +1977,6 @@ func (s *SummarizedAttackVector) SetVectorType(v string) *SummarizedAttackVector
}
// The counter that describes a DDoS attack.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/SummarizedCounter
type SummarizedCounter struct {
_ struct{} `type:"structure"`
@@ -1787,14 +2046,15 @@ func (s *SummarizedCounter) SetUnit(v string) *SummarizedCounter {
}
// The time range.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/TimeRange
type TimeRange struct {
_ struct{} `type:"structure"`
// The start time, in the format 2016-12-16T13:50Z.
// The start time, in Unix time in seconds. For more information see timestamp
// (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types).
FromInclusive *time.Time `type:"timestamp" timestampFormat:"unix"`
// The end time, in the format 2016-12-16T15:50Z.
// The end time, in Unix time in seconds. For more information see timestamp
// (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types).
ToExclusive *time.Time `type:"timestamp" timestampFormat:"unix"`
}
@@ -1820,6 +2080,34 @@ func (s *TimeRange) SetToExclusive(v time.Time) *TimeRange {
return s
}
const (
// AttackLayerNetwork is a AttackLayer enum value
AttackLayerNetwork = "NETWORK"
// AttackLayerApplication is a AttackLayer enum value
AttackLayerApplication = "APPLICATION"
)
const (
// AttackPropertyIdentifierDestinationUrl is a AttackPropertyIdentifier enum value
AttackPropertyIdentifierDestinationUrl = "DESTINATION_URL"
// AttackPropertyIdentifierReferrer is a AttackPropertyIdentifier enum value
AttackPropertyIdentifierReferrer = "REFERRER"
// AttackPropertyIdentifierSourceAsn is a AttackPropertyIdentifier enum value
AttackPropertyIdentifierSourceAsn = "SOURCE_ASN"
// AttackPropertyIdentifierSourceCountry is a AttackPropertyIdentifier enum value
AttackPropertyIdentifierSourceCountry = "SOURCE_COUNTRY"
// AttackPropertyIdentifierSourceIpAddress is a AttackPropertyIdentifier enum value
AttackPropertyIdentifierSourceIpAddress = "SOURCE_IP_ADDRESS"
// AttackPropertyIdentifierSourceUserAgent is a AttackPropertyIdentifier enum value
AttackPropertyIdentifierSourceUserAgent = "SOURCE_USER_AGENT"
)
const (
// SubResourceTypeIp is a SubResourceType enum value
SubResourceTypeIp = "IP"
@@ -1827,3 +2115,25 @@ const (
// SubResourceTypeUrl is a SubResourceType enum value
SubResourceTypeUrl = "URL"
)
const (
// SubscriptionStateActive is a SubscriptionState enum value
SubscriptionStateActive = "ACTIVE"
// SubscriptionStateInactive is a SubscriptionState enum value
SubscriptionStateInactive = "INACTIVE"
)
const (
// UnitBits is a Unit enum value
UnitBits = "BITS"
// UnitBytes is a Unit enum value
UnitBytes = "BYTES"
// UnitPackets is a Unit enum value
UnitPackets = "PACKETS"
// UnitRequests is a Unit enum value
UnitRequests = "REQUESTS"
)
+1 -1
View File
@@ -16,7 +16,7 @@
//
// Using the Client
//
// To AWS Shield with the SDK use the New function to create
// To contact AWS Shield with the SDK use the New function to create
// a new service client. With that client you can make API requests to the service.
// These clients are safe to use concurrently.
//
+6 -2
View File
@@ -35,13 +35,17 @@ const (
// "LimitsExceededException".
//
// Exception that indicates that the operation would exceed a limit.
//
// Type is the type of limit that would be exceeded.
//
// Limit is the threshold that would be exceeded.
ErrCodeLimitsExceededException = "LimitsExceededException"
// ErrCodeLockedSubscriptionException for service response error code
// "LockedSubscriptionException".
//
// Exception that indicates that the subscription has been modified by another
// client. You can retry the request.
// Exception that indicates that the subscription you are trying to delete has
// not yet completed the 1-year commitment. You cannot delete this subscription.
ErrCodeLockedSubscriptionException = "LockedSubscriptionException"
// ErrCodeOptimisticLockException for service response error code
@@ -88,6 +88,10 @@ type ShieldAPI interface {
DescribeSubscriptionWithContext(aws.Context, *shield.DescribeSubscriptionInput, ...request.Option) (*shield.DescribeSubscriptionOutput, error)
DescribeSubscriptionRequest(*shield.DescribeSubscriptionInput) (*request.Request, *shield.DescribeSubscriptionOutput)
GetSubscriptionState(*shield.GetSubscriptionStateInput) (*shield.GetSubscriptionStateOutput, error)
GetSubscriptionStateWithContext(aws.Context, *shield.GetSubscriptionStateInput, ...request.Option) (*shield.GetSubscriptionStateOutput, error)
GetSubscriptionStateRequest(*shield.GetSubscriptionStateInput) (*request.Request, *shield.GetSubscriptionStateOutput)
ListAttacks(*shield.ListAttacksInput) (*shield.ListAttacksOutput, error)
ListAttacksWithContext(aws.Context, *shield.ListAttacksInput, ...request.Option) (*shield.ListAttacksOutput, error)
ListAttacksRequest(*shield.ListAttacksInput) (*request.Request, *shield.ListAttacksOutput)