shield - ActiveState ActiveGo 1.8
...

Package shield

import "github.com/aws/aws-sdk-go/service/shield"
Overview
Index
Subdirectories

Overview ▾

Package shield provides the client and types for making API requests to AWS Shield.

This is the AWS Shield Advanced API Reference. This guide is for developers who need detailed information about the AWS Shield Advanced API actions, data types, and errors. For detailed information about AWS WAF and AWS Shield Advanced features and an overview of how to use the AWS WAF and AWS Shield Advanced APIs, see the AWS WAF and AWS Shield Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).

See https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02 for more information on this service.

See shield package documentation for more information. https://docs.aws.amazon.com/sdk-for-go/api/service/shield/

Using the Client

To use the client for AWS Shield you will first need to create a new instance of it.

When creating a client for an AWS service you'll first need to have a Session already created. The Session provides configuration that can be shared between multiple service clients. Additional configuration can be applied to the Session and service's client when they are constructed. The aws package's Config type contains several fields such as Region for the AWS Region the client should make API requests too. The optional Config value can be provided as the variadic argument for Sessions and client creation.

Once the service's client is created you can use it to make API requests the AWS service. These clients are safe to use concurrently.

// Create a session to share configuration, and load external configuration.
sess := session.Must(session.NewSession())

// Create the service's client with the session.
svc := shield.New(sess)

See the SDK's documentation for more information on how to use service clients. https://docs.aws.amazon.com/sdk-for-go/api/

See aws package's Config type for more information on configuration options. https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config

See the AWS Shield client Shield for more information on creating the service's client. https://docs.aws.amazon.com/sdk-for-go/api/service/shield/#New

Once the client is created you can make an API request to the service. Each API method takes a input parameter, and returns the service response and an error.

The API method will document which error codes the service can be returned by the operation if the service models the API operation's errors. These errors will also be available as const strings prefixed with "ErrCode".

result, err := svc.CreateProtection(params)
if err != nil {
    // Cast err to awserr.Error to handle specific error codes.
    aerr, ok := err.(awserr.Error)
    if ok && aerr.Code() == <error code to check for> {
        // Specific error code handling
    }
    return err
}

fmt.Println("CreateProtection result:")
fmt.Println(result)

Using the Client with Context

The service's client also provides methods to make API requests with a Context value. This allows you to control the timeout, and cancellation of pending requests. These methods also take request Option as variadic parameter to apply additional configuration to the API request.

ctx := context.Background()

result, err := svc.CreateProtectionWithContext(ctx, params)

See the request package documentation for more information on using Context pattern with the SDK. https://docs.aws.amazon.com/sdk-for-go/api/aws/request/

Index ▾

Constants
type AttackDetail
    func (s AttackDetail) GoString() string
    func (s *AttackDetail) SetAttackCounters(v []*SummarizedCounter) *AttackDetail
    func (s *AttackDetail) SetAttackId(v string) *AttackDetail
    func (s *AttackDetail) SetEndTime(v time.Time) *AttackDetail
    func (s *AttackDetail) SetMitigations(v []*Mitigation) *AttackDetail
    func (s *AttackDetail) SetResourceArn(v string) *AttackDetail
    func (s *AttackDetail) SetStartTime(v time.Time) *AttackDetail
    func (s *AttackDetail) SetSubResources(v []*SubResourceSummary) *AttackDetail
    func (s AttackDetail) String() string
type AttackSummary
    func (s AttackSummary) GoString() string
    func (s *AttackSummary) SetAttackId(v string) *AttackSummary
    func (s *AttackSummary) SetAttackVectors(v []*AttackVectorDescription) *AttackSummary
    func (s *AttackSummary) SetEndTime(v time.Time) *AttackSummary
    func (s *AttackSummary) SetResourceArn(v string) *AttackSummary
    func (s *AttackSummary) SetStartTime(v time.Time) *AttackSummary
    func (s AttackSummary) String() string
type AttackVectorDescription
    func (s AttackVectorDescription) GoString() string
    func (s *AttackVectorDescription) SetVectorType(v string) *AttackVectorDescription
    func (s AttackVectorDescription) String() string
type CreateProtectionInput
    func (s CreateProtectionInput) GoString() string
    func (s *CreateProtectionInput) SetName(v string) *CreateProtectionInput
    func (s *CreateProtectionInput) SetResourceArn(v string) *CreateProtectionInput
    func (s CreateProtectionInput) String() string
    func (s *CreateProtectionInput) Validate() error
type CreateProtectionOutput
    func (s CreateProtectionOutput) GoString() string
    func (s *CreateProtectionOutput) SetProtectionId(v string) *CreateProtectionOutput
    func (s CreateProtectionOutput) String() string
type CreateSubscriptionInput
    func (s CreateSubscriptionInput) GoString() string
    func (s CreateSubscriptionInput) String() string
type CreateSubscriptionOutput
    func (s CreateSubscriptionOutput) GoString() string
    func (s CreateSubscriptionOutput) String() string
type DeleteProtectionInput
    func (s DeleteProtectionInput) GoString() string
    func (s *DeleteProtectionInput) SetProtectionId(v string) *DeleteProtectionInput
    func (s DeleteProtectionInput) String() string
    func (s *DeleteProtectionInput) Validate() error
type DeleteProtectionOutput
    func (s DeleteProtectionOutput) GoString() string
    func (s DeleteProtectionOutput) String() string
type DeleteSubscriptionInput
    func (s DeleteSubscriptionInput) GoString() string
    func (s DeleteSubscriptionInput) String() string
type DeleteSubscriptionOutput
    func (s DeleteSubscriptionOutput) GoString() string
    func (s DeleteSubscriptionOutput) String() string
type DescribeAttackInput
    func (s DescribeAttackInput) GoString() string
    func (s *DescribeAttackInput) SetAttackId(v string) *DescribeAttackInput
    func (s DescribeAttackInput) String() string
    func (s *DescribeAttackInput) Validate() error
type DescribeAttackOutput
    func (s DescribeAttackOutput) GoString() string
    func (s *DescribeAttackOutput) SetAttack(v *AttackDetail) *DescribeAttackOutput
    func (s DescribeAttackOutput) String() string
type DescribeProtectionInput
    func (s DescribeProtectionInput) GoString() string
    func (s *DescribeProtectionInput) SetProtectionId(v string) *DescribeProtectionInput
    func (s DescribeProtectionInput) String() string
    func (s *DescribeProtectionInput) Validate() error
type DescribeProtectionOutput
    func (s DescribeProtectionOutput) GoString() string
    func (s *DescribeProtectionOutput) SetProtection(v *Protection) *DescribeProtectionOutput
    func (s DescribeProtectionOutput) String() string
type DescribeSubscriptionInput
    func (s DescribeSubscriptionInput) GoString() string
    func (s DescribeSubscriptionInput) String() string
type DescribeSubscriptionOutput
    func (s DescribeSubscriptionOutput) GoString() string
    func (s *DescribeSubscriptionOutput) SetSubscription(v *Subscription) *DescribeSubscriptionOutput
    func (s DescribeSubscriptionOutput) String() string
type ListAttacksInput
    func (s ListAttacksInput) GoString() string
    func (s *ListAttacksInput) SetEndTime(v *TimeRange) *ListAttacksInput
    func (s *ListAttacksInput) SetMaxResults(v int64) *ListAttacksInput
    func (s *ListAttacksInput) SetNextToken(v string) *ListAttacksInput
    func (s *ListAttacksInput) SetResourceArns(v []*string) *ListAttacksInput
    func (s *ListAttacksInput) SetStartTime(v *TimeRange) *ListAttacksInput
    func (s ListAttacksInput) String() string
    func (s *ListAttacksInput) Validate() error
type ListAttacksOutput
    func (s ListAttacksOutput) GoString() string
    func (s *ListAttacksOutput) SetAttackSummaries(v []*AttackSummary) *ListAttacksOutput
    func (s *ListAttacksOutput) SetNextToken(v string) *ListAttacksOutput
    func (s ListAttacksOutput) String() string
type ListProtectionsInput
    func (s ListProtectionsInput) GoString() string
    func (s *ListProtectionsInput) SetMaxResults(v int64) *ListProtectionsInput
    func (s *ListProtectionsInput) SetNextToken(v string) *ListProtectionsInput
    func (s ListProtectionsInput) String() string
    func (s *ListProtectionsInput) Validate() error
type ListProtectionsOutput
    func (s ListProtectionsOutput) GoString() string
    func (s *ListProtectionsOutput) SetNextToken(v string) *ListProtectionsOutput
    func (s *ListProtectionsOutput) SetProtections(v []*Protection) *ListProtectionsOutput
    func (s ListProtectionsOutput) String() string
type Mitigation
    func (s Mitigation) GoString() string
    func (s *Mitigation) SetMitigationName(v string) *Mitigation
    func (s Mitigation) String() string
type Protection
    func (s Protection) GoString() string
    func (s *Protection) SetId(v string) *Protection
    func (s *Protection) SetName(v string) *Protection
    func (s *Protection) SetResourceArn(v string) *Protection
    func (s Protection) String() string
type Shield
    func New(p client.ConfigProvider, cfgs ...*aws.Config) *Shield
    func (c *Shield) CreateProtection(input *CreateProtectionInput) (*CreateProtectionOutput, error)
    func (c *Shield) CreateProtectionRequest(input *CreateProtectionInput) (req *request.Request, output *CreateProtectionOutput)
    func (c *Shield) CreateProtectionWithContext(ctx aws.Context, input *CreateProtectionInput, opts ...request.Option) (*CreateProtectionOutput, error)
    func (c *Shield) CreateSubscription(input *CreateSubscriptionInput) (*CreateSubscriptionOutput, error)
    func (c *Shield) CreateSubscriptionRequest(input *CreateSubscriptionInput) (req *request.Request, output *CreateSubscriptionOutput)
    func (c *Shield) CreateSubscriptionWithContext(ctx aws.Context, input *CreateSubscriptionInput, opts ...request.Option) (*CreateSubscriptionOutput, error)
    func (c *Shield) DeleteProtection(input *DeleteProtectionInput) (*DeleteProtectionOutput, error)
    func (c *Shield) DeleteProtectionRequest(input *DeleteProtectionInput) (req *request.Request, output *DeleteProtectionOutput)
    func (c *Shield) DeleteProtectionWithContext(ctx aws.Context, input *DeleteProtectionInput, opts ...request.Option) (*DeleteProtectionOutput, error)
    func (c *Shield) DeleteSubscription(input *DeleteSubscriptionInput) (*DeleteSubscriptionOutput, error)
    func (c *Shield) DeleteSubscriptionRequest(input *DeleteSubscriptionInput) (req *request.Request, output *DeleteSubscriptionOutput)
    func (c *Shield) DeleteSubscriptionWithContext(ctx aws.Context, input *DeleteSubscriptionInput, opts ...request.Option) (*DeleteSubscriptionOutput, error)
    func (c *Shield) DescribeAttack(input *DescribeAttackInput) (*DescribeAttackOutput, error)
    func (c *Shield) DescribeAttackRequest(input *DescribeAttackInput) (req *request.Request, output *DescribeAttackOutput)
    func (c *Shield) DescribeAttackWithContext(ctx aws.Context, input *DescribeAttackInput, opts ...request.Option) (*DescribeAttackOutput, error)
    func (c *Shield) DescribeProtection(input *DescribeProtectionInput) (*DescribeProtectionOutput, error)
    func (c *Shield) DescribeProtectionRequest(input *DescribeProtectionInput) (req *request.Request, output *DescribeProtectionOutput)
    func (c *Shield) DescribeProtectionWithContext(ctx aws.Context, input *DescribeProtectionInput, opts ...request.Option) (*DescribeProtectionOutput, error)
    func (c *Shield) DescribeSubscription(input *DescribeSubscriptionInput) (*DescribeSubscriptionOutput, error)
    func (c *Shield) DescribeSubscriptionRequest(input *DescribeSubscriptionInput) (req *request.Request, output *DescribeSubscriptionOutput)
    func (c *Shield) DescribeSubscriptionWithContext(ctx aws.Context, input *DescribeSubscriptionInput, opts ...request.Option) (*DescribeSubscriptionOutput, error)
    func (c *Shield) ListAttacks(input *ListAttacksInput) (*ListAttacksOutput, error)
    func (c *Shield) ListAttacksRequest(input *ListAttacksInput) (req *request.Request, output *ListAttacksOutput)
    func (c *Shield) ListAttacksWithContext(ctx aws.Context, input *ListAttacksInput, opts ...request.Option) (*ListAttacksOutput, error)
    func (c *Shield) ListProtections(input *ListProtectionsInput) (*ListProtectionsOutput, error)
    func (c *Shield) ListProtectionsRequest(input *ListProtectionsInput) (req *request.Request, output *ListProtectionsOutput)
    func (c *Shield) ListProtectionsWithContext(ctx aws.Context, input *ListProtectionsInput, opts ...request.Option) (*ListProtectionsOutput, error)
type SubResourceSummary
    func (s SubResourceSummary) GoString() string
    func (s *SubResourceSummary) SetAttackVectors(v []*SummarizedAttackVector) *SubResourceSummary
    func (s *SubResourceSummary) SetCounters(v []*SummarizedCounter) *SubResourceSummary
    func (s *SubResourceSummary) SetId(v string) *SubResourceSummary
    func (s *SubResourceSummary) SetType(v string) *SubResourceSummary
    func (s SubResourceSummary) String() string
type Subscription
    func (s Subscription) GoString() string
    func (s *Subscription) SetStartTime(v time.Time) *Subscription
    func (s *Subscription) SetTimeCommitmentInSeconds(v int64) *Subscription
    func (s Subscription) String() string
type SummarizedAttackVector
    func (s SummarizedAttackVector) GoString() string
    func (s *SummarizedAttackVector) SetVectorCounters(v []*SummarizedCounter) *SummarizedAttackVector
    func (s *SummarizedAttackVector) SetVectorType(v string) *SummarizedAttackVector
    func (s SummarizedAttackVector) String() string
type SummarizedCounter
    func (s SummarizedCounter) GoString() string
    func (s *SummarizedCounter) SetAverage(v float64) *SummarizedCounter
    func (s *SummarizedCounter) SetMax(v float64) *SummarizedCounter
    func (s *SummarizedCounter) SetN(v int64) *SummarizedCounter
    func (s *SummarizedCounter) SetName(v string) *SummarizedCounter
    func (s *SummarizedCounter) SetSum(v float64) *SummarizedCounter
    func (s *SummarizedCounter) SetUnit(v string) *SummarizedCounter
    func (s SummarizedCounter) String() string
type TimeRange
    func (s TimeRange) GoString() string
    func (s *TimeRange) SetFromInclusive(v time.Time) *TimeRange
    func (s *TimeRange) SetToExclusive(v time.Time) *TimeRange
    func (s TimeRange) String() string

Package files

api.go doc.go errors.go service.go

Constants

const (
    // SubResourceTypeIp is a SubResourceType enum value
    SubResourceTypeIp = "IP"

    // SubResourceTypeUrl is a SubResourceType enum value
    SubResourceTypeUrl = "URL"
)
const (

    // ErrCodeInternalErrorException for service response error code
    // "InternalErrorException".
    //
    // Exception that indicates that a problem occurred with the service infrastructure.
    // You can retry the request.
    ErrCodeInternalErrorException = "InternalErrorException"

    // ErrCodeInvalidOperationException for service response error code
    // "InvalidOperationException".
    //
    // Exception that indicates that the operation would not cause any change to
    // occur.
    ErrCodeInvalidOperationException = "InvalidOperationException"

    // ErrCodeInvalidParameterException for service response error code
    // "InvalidParameterException".
    //
    // Exception that indicates that the parameters passed to the API are invalid.
    ErrCodeInvalidParameterException = "InvalidParameterException"

    // ErrCodeInvalidResourceException for service response error code
    // "InvalidResourceException".
    //
    // Exception that indicates that the resource is invalid. You might not have
    // access to the resource, or the resource might not exist.
    ErrCodeInvalidResourceException = "InvalidResourceException"

    // ErrCodeLimitsExceededException for service response error code
    // "LimitsExceededException".
    //
    // Exception that indicates that the operation would exceed a limit.
    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.
    ErrCodeLockedSubscriptionException = "LockedSubscriptionException"

    // ErrCodeOptimisticLockException for service response error code
    // "OptimisticLockException".
    //
    // Exception that indicates that the protection state has been modified by another
    // client. You can retry the request.
    ErrCodeOptimisticLockException = "OptimisticLockException"

    // ErrCodeResourceAlreadyExistsException for service response error code
    // "ResourceAlreadyExistsException".
    //
    // Exception indicating the specified resource already exists.
    ErrCodeResourceAlreadyExistsException = "ResourceAlreadyExistsException"

    // ErrCodeResourceNotFoundException for service response error code
    // "ResourceNotFoundException".
    //
    // Exception indicating the specified resource does not exist.
    ErrCodeResourceNotFoundException = "ResourceNotFoundException"
)

Service information constants

const (
    ServiceName = "shield"    // Service endpoint prefix API calls made to.
    EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
)

type AttackDetail

The details of a DDoS attack. Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/AttackDetail

type AttackDetail struct {

    // List of counters that describe the attack for the specified time period.
    AttackCounters []*SummarizedCounter `type:"list"`

    // 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.
    EndTime *time.Time `type:"timestamp" timestampFormat:"unix"`

    // List of mitigation actions taken for the attack.
    Mitigations []*Mitigation `type:"list"`

    // 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.
    StartTime *time.Time `type:"timestamp" timestampFormat:"unix"`

    // If applicable, additional detail about the resource being attacked, for example,
    // IP address or URL.
    SubResources []*SubResourceSummary `type:"list"`
    // contains filtered or unexported fields
}

func (AttackDetail) GoString

func (s AttackDetail) GoString() string

GoString returns the string representation

func (*AttackDetail) SetAttackCounters

func (s *AttackDetail) SetAttackCounters(v []*SummarizedCounter) *AttackDetail

SetAttackCounters sets the AttackCounters field's value.

func (*AttackDetail) SetAttackId

func (s *AttackDetail) SetAttackId(v string) *AttackDetail

SetAttackId sets the AttackId field's value.

func (*AttackDetail) SetEndTime

func (s *AttackDetail) SetEndTime(v time.Time) *AttackDetail

SetEndTime sets the EndTime field's value.

func (*AttackDetail) SetMitigations

func (s *AttackDetail) SetMitigations(v []*Mitigation) *AttackDetail

SetMitigations sets the Mitigations field's value.

func (*AttackDetail) SetResourceArn

func (s *AttackDetail) SetResourceArn(v string) *AttackDetail

SetResourceArn sets the ResourceArn field's value.

func (*AttackDetail) SetStartTime

func (s *AttackDetail) SetStartTime(v time.Time) *AttackDetail

SetStartTime sets the StartTime field's value.

func (*AttackDetail) SetSubResources

func (s *AttackDetail) SetSubResources(v []*SubResourceSummary) *AttackDetail

SetSubResources sets the SubResources field's value.

func (AttackDetail) String

func (s AttackDetail) String() string

String returns the string representation

type AttackSummary

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 {

    // The unique identifier (ID) of the attack.
    AttackId *string `type:"string"`

    // 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.
    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.
    StartTime *time.Time `type:"timestamp" timestampFormat:"unix"`
    // contains filtered or unexported fields
}

func (AttackSummary) GoString

func (s AttackSummary) GoString() string

GoString returns the string representation

func (*AttackSummary) SetAttackId

func (s *AttackSummary) SetAttackId(v string) *AttackSummary

SetAttackId sets the AttackId field's value.

func (*AttackSummary) SetAttackVectors

func (s *AttackSummary) SetAttackVectors(v []*AttackVectorDescription) *AttackSummary

SetAttackVectors sets the AttackVectors field's value.

func (*AttackSummary) SetEndTime

func (s *AttackSummary) SetEndTime(v time.Time) *AttackSummary

SetEndTime sets the EndTime field's value.

func (*AttackSummary) SetResourceArn

func (s *AttackSummary) SetResourceArn(v string) *AttackSummary

SetResourceArn sets the ResourceArn field's value.

func (*AttackSummary) SetStartTime

func (s *AttackSummary) SetStartTime(v time.Time) *AttackSummary

SetStartTime sets the StartTime field's value.

func (AttackSummary) String

func (s AttackSummary) String() string

String returns the string representation

type AttackVectorDescription

Describes the attack. Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/AttackVectorDescription

type AttackVectorDescription struct {

    // The attack type, for example, SNMP reflection or SYN flood.
    //
    // VectorType is a required field
    VectorType *string `type:"string" required:"true"`
    // contains filtered or unexported fields
}

func (AttackVectorDescription) GoString

func (s AttackVectorDescription) GoString() string

GoString returns the string representation

func (*AttackVectorDescription) SetVectorType

func (s *AttackVectorDescription) SetVectorType(v string) *AttackVectorDescription

SetVectorType sets the VectorType field's value.

func (AttackVectorDescription) String

func (s AttackVectorDescription) String() string

String returns the string representation

type CreateProtectionInput

Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/CreateProtectionRequest

type CreateProtectionInput struct {

    // Friendly name for the Protection you are creating.
    //
    // Name is a required field
    Name *string `min:"1" type:"string" required:"true"`

    // The ARN (Amazon Resource Name) of the resource to be protected.
    //
    // ResourceArn is a required field
    ResourceArn *string `min:"1" type:"string" required:"true"`
    // contains filtered or unexported fields
}

func (CreateProtectionInput) GoString

func (s CreateProtectionInput) GoString() string

GoString returns the string representation

func (*CreateProtectionInput) SetName

func (s *CreateProtectionInput) SetName(v string) *CreateProtectionInput

SetName sets the Name field's value.

func (*CreateProtectionInput) SetResourceArn

func (s *CreateProtectionInput) SetResourceArn(v string) *CreateProtectionInput

SetResourceArn sets the ResourceArn field's value.

func (CreateProtectionInput) String

func (s CreateProtectionInput) String() string

String returns the string representation

func (*CreateProtectionInput) Validate

func (s *CreateProtectionInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type CreateProtectionOutput

Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/CreateProtectionResponse

type CreateProtectionOutput struct {

    // The unique identifier (ID) for the Protection object that is created.
    ProtectionId *string `min:"1" type:"string"`
    // contains filtered or unexported fields
}

func (CreateProtectionOutput) GoString

func (s CreateProtectionOutput) GoString() string

GoString returns the string representation

func (*CreateProtectionOutput) SetProtectionId

func (s *CreateProtectionOutput) SetProtectionId(v string) *CreateProtectionOutput

SetProtectionId sets the ProtectionId field's value.

func (CreateProtectionOutput) String

func (s CreateProtectionOutput) String() string

String returns the string representation

type CreateSubscriptionInput

Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/CreateSubscriptionRequest

type CreateSubscriptionInput struct {
    // contains filtered or unexported fields
}

func (CreateSubscriptionInput) GoString

func (s CreateSubscriptionInput) GoString() string

GoString returns the string representation

func (CreateSubscriptionInput) String

func (s CreateSubscriptionInput) String() string

String returns the string representation

type CreateSubscriptionOutput

Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/CreateSubscriptionResponse

type CreateSubscriptionOutput struct {
    // contains filtered or unexported fields
}

func (CreateSubscriptionOutput) GoString

func (s CreateSubscriptionOutput) GoString() string

GoString returns the string representation

func (CreateSubscriptionOutput) String

func (s CreateSubscriptionOutput) String() string

String returns the string representation

type DeleteProtectionInput

Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DeleteProtectionRequest

type DeleteProtectionInput struct {

    // The unique identifier (ID) for the Protection object to be deleted.
    //
    // ProtectionId is a required field
    ProtectionId *string `min:"1" type:"string" required:"true"`
    // contains filtered or unexported fields
}

func (DeleteProtectionInput) GoString

func (s DeleteProtectionInput) GoString() string

GoString returns the string representation

func (*DeleteProtectionInput) SetProtectionId

func (s *DeleteProtectionInput) SetProtectionId(v string) *DeleteProtectionInput

SetProtectionId sets the ProtectionId field's value.

func (DeleteProtectionInput) String

func (s DeleteProtectionInput) String() string

String returns the string representation

func (*DeleteProtectionInput) Validate

func (s *DeleteProtectionInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DeleteProtectionOutput

Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DeleteProtectionResponse

type DeleteProtectionOutput struct {
    // contains filtered or unexported fields
}

func (DeleteProtectionOutput) GoString

func (s DeleteProtectionOutput) GoString() string

GoString returns the string representation

func (DeleteProtectionOutput) String

func (s DeleteProtectionOutput) String() string

String returns the string representation

type DeleteSubscriptionInput

Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DeleteSubscriptionRequest

type DeleteSubscriptionInput struct {
    // contains filtered or unexported fields
}

func (DeleteSubscriptionInput) GoString

func (s DeleteSubscriptionInput) GoString() string

GoString returns the string representation

func (DeleteSubscriptionInput) String

func (s DeleteSubscriptionInput) String() string

String returns the string representation

type DeleteSubscriptionOutput

Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DeleteSubscriptionResponse

type DeleteSubscriptionOutput struct {
    // contains filtered or unexported fields
}

func (DeleteSubscriptionOutput) GoString

func (s DeleteSubscriptionOutput) GoString() string

GoString returns the string representation

func (DeleteSubscriptionOutput) String

func (s DeleteSubscriptionOutput) String() string

String returns the string representation

type DescribeAttackInput

Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DescribeAttackRequest

type DescribeAttackInput struct {

    // The unique identifier (ID) for the attack that to be described.
    //
    // AttackId is a required field
    AttackId *string `min:"1" type:"string" required:"true"`
    // contains filtered or unexported fields
}

func (DescribeAttackInput) GoString

func (s DescribeAttackInput) GoString() string

GoString returns the string representation

func (*DescribeAttackInput) SetAttackId

func (s *DescribeAttackInput) SetAttackId(v string) *DescribeAttackInput

SetAttackId sets the AttackId field's value.

func (DescribeAttackInput) String

func (s DescribeAttackInput) String() string

String returns the string representation

func (*DescribeAttackInput) Validate

func (s *DescribeAttackInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DescribeAttackOutput

Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DescribeAttackResponse

type DescribeAttackOutput struct {

    // The attack that is described.
    Attack *AttackDetail `type:"structure"`
    // contains filtered or unexported fields
}

func (DescribeAttackOutput) GoString

func (s DescribeAttackOutput) GoString() string

GoString returns the string representation

func (*DescribeAttackOutput) SetAttack

func (s *DescribeAttackOutput) SetAttack(v *AttackDetail) *DescribeAttackOutput

SetAttack sets the Attack field's value.

func (DescribeAttackOutput) String

func (s DescribeAttackOutput) String() string

String returns the string representation

type DescribeProtectionInput

Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DescribeProtectionRequest

type DescribeProtectionInput struct {

    // The unique identifier (ID) for the Protection object that is described.
    //
    // ProtectionId is a required field
    ProtectionId *string `min:"1" type:"string" required:"true"`
    // contains filtered or unexported fields
}

func (DescribeProtectionInput) GoString

func (s DescribeProtectionInput) GoString() string

GoString returns the string representation

func (*DescribeProtectionInput) SetProtectionId

func (s *DescribeProtectionInput) SetProtectionId(v string) *DescribeProtectionInput

SetProtectionId sets the ProtectionId field's value.

func (DescribeProtectionInput) String

func (s DescribeProtectionInput) String() string

String returns the string representation

func (*DescribeProtectionInput) Validate

func (s *DescribeProtectionInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DescribeProtectionOutput

Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DescribeProtectionResponse

type DescribeProtectionOutput struct {

    // The Protection object that is described.
    Protection *Protection `type:"structure"`
    // contains filtered or unexported fields
}

func (DescribeProtectionOutput) GoString

func (s DescribeProtectionOutput) GoString() string

GoString returns the string representation

func (*DescribeProtectionOutput) SetProtection

func (s *DescribeProtectionOutput) SetProtection(v *Protection) *DescribeProtectionOutput

SetProtection sets the Protection field's value.

func (DescribeProtectionOutput) String

func (s DescribeProtectionOutput) String() string

String returns the string representation

type DescribeSubscriptionInput

Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DescribeSubscriptionRequest

type DescribeSubscriptionInput struct {
    // contains filtered or unexported fields
}

func (DescribeSubscriptionInput) GoString

func (s DescribeSubscriptionInput) GoString() string

GoString returns the string representation

func (DescribeSubscriptionInput) String

func (s DescribeSubscriptionInput) String() string

String returns the string representation

type DescribeSubscriptionOutput

Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DescribeSubscriptionResponse

type DescribeSubscriptionOutput struct {

    // The AWS Shield Advanced subscription details for an account.
    Subscription *Subscription `type:"structure"`
    // contains filtered or unexported fields
}

func (DescribeSubscriptionOutput) GoString

func (s DescribeSubscriptionOutput) GoString() string

GoString returns the string representation

func (*DescribeSubscriptionOutput) SetSubscription

func (s *DescribeSubscriptionOutput) SetSubscription(v *Subscription) *DescribeSubscriptionOutput

SetSubscription sets the Subscription field's value.

func (DescribeSubscriptionOutput) String

func (s DescribeSubscriptionOutput) String() string

String returns the string representation

type ListAttacksInput

Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/ListAttacksRequest

type ListAttacksInput struct {

    // The end of the time period for the attacks.
    EndTime *TimeRange `type:"structure"`

    // The maximum number of AttackSummary objects to be returned. If this is left
    // blank, the first 20 results will be returned.
    MaxResults *int64 `type:"integer"`

    // The ListAttacksRequest.NextMarker value from a previous call to ListAttacksRequest.
    // Pass null if this is the first call.
    NextToken *string `min:"1" type:"string"`

    // The ARN (Amazon Resource Name) of the resource that was attacked. If this
    // is left blank, all applicable resources for this account will be included.
    ResourceArns []*string `type:"list"`

    // The time period for the attacks.
    StartTime *TimeRange `type:"structure"`
    // contains filtered or unexported fields
}

func (ListAttacksInput) GoString

func (s ListAttacksInput) GoString() string

GoString returns the string representation

func (*ListAttacksInput) SetEndTime

func (s *ListAttacksInput) SetEndTime(v *TimeRange) *ListAttacksInput

SetEndTime sets the EndTime field's value.

func (*ListAttacksInput) SetMaxResults

func (s *ListAttacksInput) SetMaxResults(v int64) *ListAttacksInput

SetMaxResults sets the MaxResults field's value.

func (*ListAttacksInput) SetNextToken

func (s *ListAttacksInput) SetNextToken(v string) *ListAttacksInput

SetNextToken sets the NextToken field's value.

func (*ListAttacksInput) SetResourceArns

func (s *ListAttacksInput) SetResourceArns(v []*string) *ListAttacksInput

SetResourceArns sets the ResourceArns field's value.

func (*ListAttacksInput) SetStartTime

func (s *ListAttacksInput) SetStartTime(v *TimeRange) *ListAttacksInput

SetStartTime sets the StartTime field's value.

func (ListAttacksInput) String

func (s ListAttacksInput) String() string

String returns the string representation

func (*ListAttacksInput) Validate

func (s *ListAttacksInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ListAttacksOutput

Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/ListAttacksResponse

type ListAttacksOutput struct {

    // The attack information for the specified time range.
    AttackSummaries []*AttackSummary `type:"list"`

    // The token returned by a previous call to indicate that there is more data
    // available. If not null, more results are available. Pass this value for the
    // NextMarker parameter in a subsequent call to ListAttacks to retrieve the
    // next set of items.
    NextToken *string `min:"1" type:"string"`
    // contains filtered or unexported fields
}

func (ListAttacksOutput) GoString

func (s ListAttacksOutput) GoString() string

GoString returns the string representation

func (*ListAttacksOutput) SetAttackSummaries

func (s *ListAttacksOutput) SetAttackSummaries(v []*AttackSummary) *ListAttacksOutput

SetAttackSummaries sets the AttackSummaries field's value.

func (*ListAttacksOutput) SetNextToken

func (s *ListAttacksOutput) SetNextToken(v string) *ListAttacksOutput

SetNextToken sets the NextToken field's value.

func (ListAttacksOutput) String

func (s ListAttacksOutput) String() string

String returns the string representation

type ListProtectionsInput

Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/ListProtectionsRequest

type ListProtectionsInput struct {

    // The maximum number of Protection objects to be returned. If this is left
    // blank the first 20 results will be returned.
    MaxResults *int64 `type:"integer"`

    // The ListProtectionsRequest.NextToken value from a previous call to ListProtections.
    // Pass null if this is the first call.
    NextToken *string `min:"1" type:"string"`
    // contains filtered or unexported fields
}

func (ListProtectionsInput) GoString

func (s ListProtectionsInput) GoString() string

GoString returns the string representation

func (*ListProtectionsInput) SetMaxResults

func (s *ListProtectionsInput) SetMaxResults(v int64) *ListProtectionsInput

SetMaxResults sets the MaxResults field's value.

func (*ListProtectionsInput) SetNextToken

func (s *ListProtectionsInput) SetNextToken(v string) *ListProtectionsInput

SetNextToken sets the NextToken field's value.

func (ListProtectionsInput) String

func (s ListProtectionsInput) String() string

String returns the string representation

func (*ListProtectionsInput) Validate

func (s *ListProtectionsInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ListProtectionsOutput

Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/ListProtectionsResponse

type ListProtectionsOutput struct {

    // If you specify a value for MaxResults and you have more Protections than
    // the value of MaxResults, AWS Shield Advanced returns a NextToken value in
    // the response that allows you to list another group of Protections. For the
    // second and subsequent ListProtections requests, specify the value of NextToken
    // from the previous response to get information about another batch of Protections.
    NextToken *string `min:"1" type:"string"`

    // The array of enabled Protection objects.
    Protections []*Protection `type:"list"`
    // contains filtered or unexported fields
}

func (ListProtectionsOutput) GoString

func (s ListProtectionsOutput) GoString() string

GoString returns the string representation

func (*ListProtectionsOutput) SetNextToken

func (s *ListProtectionsOutput) SetNextToken(v string) *ListProtectionsOutput

SetNextToken sets the NextToken field's value.

func (*ListProtectionsOutput) SetProtections

func (s *ListProtectionsOutput) SetProtections(v []*Protection) *ListProtectionsOutput

SetProtections sets the Protections field's value.

func (ListProtectionsOutput) String

func (s ListProtectionsOutput) String() string

String returns the string representation

type Mitigation

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 {

    // The name of the mitigation taken for this attack.
    MitigationName *string `type:"string"`
    // contains filtered or unexported fields
}

func (Mitigation) GoString

func (s Mitigation) GoString() string

GoString returns the string representation

func (*Mitigation) SetMitigationName

func (s *Mitigation) SetMitigationName(v string) *Mitigation

SetMitigationName sets the MitigationName field's value.

func (Mitigation) String

func (s Mitigation) String() string

String returns the string representation

type Protection

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 {

    // The unique identifier (ID) of the protection.
    Id *string `min:"1" type:"string"`

    // The friendly name of the protection. For example, My CloudFront distributions.
    Name *string `min:"1" type:"string"`

    // The ARN (Amazon Resource Name) of the AWS resource that is protected.
    ResourceArn *string `min:"1" type:"string"`
    // contains filtered or unexported fields
}

func (Protection) GoString

func (s Protection) GoString() string

GoString returns the string representation

func (*Protection) SetId

func (s *Protection) SetId(v string) *Protection

SetId sets the Id field's value.

func (*Protection) SetName

func (s *Protection) SetName(v string) *Protection

SetName sets the Name field's value.

func (*Protection) SetResourceArn

func (s *Protection) SetResourceArn(v string) *Protection

SetResourceArn sets the ResourceArn field's value.

func (Protection) String

func (s Protection) String() string

String returns the string representation

type Shield

Shield provides the API operation methods for making requests to AWS Shield. See this package's package overview docs for details on the service.

Shield methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.

type Shield struct {
    *client.Client
}

func New

func New(p client.ConfigProvider, cfgs ...*aws.Config) *Shield

New creates a new instance of the Shield client with a session. If additional configuration is needed for the client instance use the optional aws.Config parameter to add your extra config.

Example:

// Create a Shield client from just a session.
svc := shield.New(mySession)

// Create a Shield client with additional configuration
svc := shield.New(mySession, aws.NewConfig().WithRegion("us-west-2"))

func (*Shield) CreateProtection

func (c *Shield) CreateProtection(input *CreateProtectionInput) (*CreateProtectionOutput, error)

CreateProtection API operation for AWS Shield.

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.

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 CreateProtection 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.

* ErrCodeInvalidResourceException "InvalidResourceException"
Exception that indicates that the resource is invalid. You might not have
access to the resource, or the resource might not exist.

* ErrCodeInvalidOperationException "InvalidOperationException"
Exception that indicates that the operation would not cause any change to
occur.

* ErrCodeLimitsExceededException "LimitsExceededException"
Exception that indicates that the operation would exceed a limit.

* ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException"
Exception indicating the specified resource already exists.

* ErrCodeOptimisticLockException "OptimisticLockException"
Exception that indicates that the protection state has been modified by another
client. You can retry the request.

* 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

func (*Shield) CreateProtectionRequest

func (c *Shield) CreateProtectionRequest(input *CreateProtectionInput) (req *request.Request, output *CreateProtectionOutput)

CreateProtectionRequest generates a "aws/request.Request" representing the client's request for the CreateProtection operation. The "output" return value can be used to capture response data after the request's "Send" method is called.

See CreateProtection for usage and error information.

Creating a request object using this method should be used when you want to inject custom logic into the request's lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the CreateProtection method directly instead.

Note: You must call the "Send" method on the returned request object in order to execute the request.

// Example sending a request using the CreateProtectionRequest method.
req, resp := client.CreateProtectionRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/CreateProtection

func (*Shield) CreateProtectionWithContext

func (c *Shield) CreateProtectionWithContext(ctx aws.Context, input *CreateProtectionInput, opts ...request.Option) (*CreateProtectionOutput, error)

CreateProtectionWithContext is the same as CreateProtection with the addition of the ability to pass a context and additional request options.

See CreateProtection 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 (*Shield) CreateSubscription

func (c *Shield) CreateSubscription(input *CreateSubscriptionInput) (*CreateSubscriptionOutput, error)

CreateSubscription API operation for AWS Shield.

Activates AWS Shield Advanced for an account.

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 CreateSubscription 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.

* ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException"
Exception indicating the specified resource already exists.

Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/CreateSubscription

func (*Shield) CreateSubscriptionRequest

func (c *Shield) CreateSubscriptionRequest(input *CreateSubscriptionInput) (req *request.Request, output *CreateSubscriptionOutput)

CreateSubscriptionRequest generates a "aws/request.Request" representing the client's request for the CreateSubscription operation. The "output" return value can be used to capture response data after the request's "Send" method is called.

See CreateSubscription for usage and error information.

Creating a request object using this method should be used when you want to inject custom logic into the request's lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the CreateSubscription method directly instead.

Note: You must call the "Send" method on the returned request object in order to execute the request.

// Example sending a request using the CreateSubscriptionRequest method.
req, resp := client.CreateSubscriptionRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/CreateSubscription

func (*Shield) CreateSubscriptionWithContext

func (c *Shield) CreateSubscriptionWithContext(ctx aws.Context, input *CreateSubscriptionInput, opts ...request.Option) (*CreateSubscriptionOutput, error)

CreateSubscriptionWithContext is the same as CreateSubscription with the addition of the ability to pass a context and additional request options.

See CreateSubscription 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 (*Shield) DeleteProtection

func (c *Shield) DeleteProtection(input *DeleteProtectionInput) (*DeleteProtectionOutput, error)

DeleteProtection API operation for AWS Shield.

Deletes an AWS Shield Advanced Protection.

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 DeleteProtection 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.

* ErrCodeResourceNotFoundException "ResourceNotFoundException"
Exception indicating the specified resource does not exist.

* ErrCodeOptimisticLockException "OptimisticLockException"
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

func (*Shield) DeleteProtectionRequest

func (c *Shield) DeleteProtectionRequest(input *DeleteProtectionInput) (req *request.Request, output *DeleteProtectionOutput)

DeleteProtectionRequest generates a "aws/request.Request" representing the client's request for the DeleteProtection operation. The "output" return value can be used to capture response data after the request's "Send" method is called.

See DeleteProtection for usage and error information.

Creating a request object using this method should be used when you want to inject custom logic into the request's lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the DeleteProtection method directly instead.

Note: You must call the "Send" method on the returned request object in order to execute the request.

// Example sending a request using the DeleteProtectionRequest method.
req, resp := client.DeleteProtectionRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DeleteProtection

func (*Shield) DeleteProtectionWithContext

func (c *Shield) DeleteProtectionWithContext(ctx aws.Context, input *DeleteProtectionInput, opts ...request.Option) (*DeleteProtectionOutput, error)

DeleteProtectionWithContext is the same as DeleteProtection with the addition of the ability to pass a context and additional request options.

See DeleteProtection 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 (*Shield) DeleteSubscription

func (c *Shield) DeleteSubscription(input *DeleteSubscriptionInput) (*DeleteSubscriptionOutput, error)

DeleteSubscription API operation for AWS Shield.

Removes AWS Shield Advanced from an account.

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 DeleteSubscription 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.

* ErrCodeLockedSubscriptionException "LockedSubscriptionException"
Exception that indicates that the subscription has been modified by another
client. You can retry the request.

* 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

func (*Shield) DeleteSubscriptionRequest

func (c *Shield) DeleteSubscriptionRequest(input *DeleteSubscriptionInput) (req *request.Request, output *DeleteSubscriptionOutput)

DeleteSubscriptionRequest generates a "aws/request.Request" representing the client's request for the DeleteSubscription operation. The "output" return value can be used to capture response data after the request's "Send" method is called.

See DeleteSubscription for usage and error information.

Creating a request object using this method should be used when you want to inject custom logic into the request's lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the DeleteSubscription method directly instead.

Note: You must call the "Send" method on the returned request object in order to execute the request.

// Example sending a request using the DeleteSubscriptionRequest method.
req, resp := client.DeleteSubscriptionRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DeleteSubscription

func (*Shield) DeleteSubscriptionWithContext

func (c *Shield) DeleteSubscriptionWithContext(ctx aws.Context, input *DeleteSubscriptionInput, opts ...request.Option) (*DeleteSubscriptionOutput, error)

DeleteSubscriptionWithContext is the same as DeleteSubscription with the addition of the ability to pass a context and additional request options.

See DeleteSubscription 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 (*Shield) DescribeAttack

func (c *Shield) DescribeAttack(input *DescribeAttackInput) (*DescribeAttackOutput, error)

DescribeAttack API operation for AWS Shield.

Describes the details of a DDoS attack.

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 DescribeAttack 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.

* 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

func (*Shield) DescribeAttackRequest

func (c *Shield) DescribeAttackRequest(input *DescribeAttackInput) (req *request.Request, output *DescribeAttackOutput)

DescribeAttackRequest generates a "aws/request.Request" representing the client's request for the DescribeAttack operation. The "output" return value can be used to capture response data after the request's "Send" method is called.

See DescribeAttack for usage and error information.

Creating a request object using this method should be used when you want to inject custom logic into the request's lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the DescribeAttack method directly instead.

Note: You must call the "Send" method on the returned request object in order to execute the request.

// Example sending a request using the DescribeAttackRequest method.
req, resp := client.DescribeAttackRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DescribeAttack

func (*Shield) DescribeAttackWithContext

func (c *Shield) DescribeAttackWithContext(ctx aws.Context, input *DescribeAttackInput, opts ...request.Option) (*DescribeAttackOutput, error)

DescribeAttackWithContext is the same as DescribeAttack with the addition of the ability to pass a context and additional request options.

See DescribeAttack 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 (*Shield) DescribeProtection

func (c *Shield) DescribeProtection(input *DescribeProtectionInput) (*DescribeProtectionOutput, error)

DescribeProtection API operation for AWS Shield.

Lists the details of a Protection object.

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 DescribeProtection 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.

* 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

func (*Shield) DescribeProtectionRequest

func (c *Shield) DescribeProtectionRequest(input *DescribeProtectionInput) (req *request.Request, output *DescribeProtectionOutput)

DescribeProtectionRequest generates a "aws/request.Request" representing the client's request for the DescribeProtection operation. The "output" return value can be used to capture response data after the request's "Send" method is called.

See DescribeProtection for usage and error information.

Creating a request object using this method should be used when you want to inject custom logic into the request's lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the DescribeProtection method directly instead.

Note: You must call the "Send" method on the returned request object in order to execute the request.

// Example sending a request using the DescribeProtectionRequest method.
req, resp := client.DescribeProtectionRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DescribeProtection

func (*Shield) DescribeProtectionWithContext

func (c *Shield) DescribeProtectionWithContext(ctx aws.Context, input *DescribeProtectionInput, opts ...request.Option) (*DescribeProtectionOutput, error)

DescribeProtectionWithContext is the same as DescribeProtection with the addition of the ability to pass a context and additional request options.

See DescribeProtection 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 (*Shield) DescribeSubscription

func (c *Shield) DescribeSubscription(input *DescribeSubscriptionInput) (*DescribeSubscriptionOutput, error)

DescribeSubscription API operation for AWS Shield.

Provides details about the AWS Shield Advanced subscription for an account.

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 DescribeSubscription 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.

* 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

func (*Shield) DescribeSubscriptionRequest

func (c *Shield) DescribeSubscriptionRequest(input *DescribeSubscriptionInput) (req *request.Request, output *DescribeSubscriptionOutput)

DescribeSubscriptionRequest generates a "aws/request.Request" representing the client's request for the DescribeSubscription operation. The "output" return value can be used to capture response data after the request's "Send" method is called.

See DescribeSubscription for usage and error information.

Creating a request object using this method should be used when you want to inject custom logic into the request's lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the DescribeSubscription method directly instead.

Note: You must call the "Send" method on the returned request object in order to execute the request.

// Example sending a request using the DescribeSubscriptionRequest method.
req, resp := client.DescribeSubscriptionRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DescribeSubscription

func (*Shield) DescribeSubscriptionWithContext

func (c *Shield) DescribeSubscriptionWithContext(ctx aws.Context, input *DescribeSubscriptionInput, opts ...request.Option) (*DescribeSubscriptionOutput, error)

DescribeSubscriptionWithContext is the same as DescribeSubscription with the addition of the ability to pass a context and additional request options.

See DescribeSubscription 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 (*Shield) ListAttacks

func (c *Shield) ListAttacks(input *ListAttacksInput) (*ListAttacksOutput, error)

ListAttacks API operation for AWS Shield.

Returns all ongoing DDoS attacks or all DDoS attacks during a specified time period.

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 ListAttacks 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.

* ErrCodeInvalidParameterException "InvalidParameterException"
Exception that indicates that the parameters passed to the API are invalid.

* ErrCodeInvalidOperationException "InvalidOperationException"
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

func (*Shield) ListAttacksRequest

func (c *Shield) ListAttacksRequest(input *ListAttacksInput) (req *request.Request, output *ListAttacksOutput)

ListAttacksRequest generates a "aws/request.Request" representing the client's request for the ListAttacks operation. The "output" return value can be used to capture response data after the request's "Send" method is called.

See ListAttacks for usage and error information.

Creating a request object using this method should be used when you want to inject custom logic into the request's lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the ListAttacks method directly instead.

Note: You must call the "Send" method on the returned request object in order to execute the request.

// Example sending a request using the ListAttacksRequest method.
req, resp := client.ListAttacksRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/ListAttacks

func (*Shield) ListAttacksWithContext

func (c *Shield) ListAttacksWithContext(ctx aws.Context, input *ListAttacksInput, opts ...request.Option) (*ListAttacksOutput, error)

ListAttacksWithContext is the same as ListAttacks with the addition of the ability to pass a context and additional request options.

See ListAttacks 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 (*Shield) ListProtections

func (c *Shield) ListProtections(input *ListProtectionsInput) (*ListProtectionsOutput, error)

ListProtections API operation for AWS Shield.

Lists all Protection objects for the account.

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 ListProtections 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.

* 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

func (*Shield) ListProtectionsRequest

func (c *Shield) ListProtectionsRequest(input *ListProtectionsInput) (req *request.Request, output *ListProtectionsOutput)

ListProtectionsRequest generates a "aws/request.Request" representing the client's request for the ListProtections operation. The "output" return value can be used to capture response data after the request's "Send" method is called.

See ListProtections for usage and error information.

Creating a request object using this method should be used when you want to inject custom logic into the request's lifecycle using a custom handler, or if you want to access properties on the request object before or after sending the request. If you just want the service response, call the ListProtections method directly instead.

Note: You must call the "Send" method on the returned request object in order to execute the request.

// Example sending a request using the ListProtectionsRequest method.
req, resp := client.ListProtectionsRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/ListProtections

func (*Shield) ListProtectionsWithContext

func (c *Shield) ListProtectionsWithContext(ctx aws.Context, input *ListProtectionsInput, opts ...request.Option) (*ListProtectionsOutput, error)

ListProtectionsWithContext is the same as ListProtections with the addition of the ability to pass a context and additional request options.

See ListProtections 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.

type SubResourceSummary

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 {

    // The list of attack types and associated counters.
    AttackVectors []*SummarizedAttackVector `type:"list"`

    // The counters that describe the details of the attack.
    Counters []*SummarizedCounter `type:"list"`

    // The unique identifier (ID) of the SubResource.
    Id *string `type:"string"`

    // The SubResource type.
    Type *string `type:"string" enum:"SubResourceType"`
    // contains filtered or unexported fields
}

func (SubResourceSummary) GoString

func (s SubResourceSummary) GoString() string

GoString returns the string representation

func (*SubResourceSummary) SetAttackVectors

func (s *SubResourceSummary) SetAttackVectors(v []*SummarizedAttackVector) *SubResourceSummary

SetAttackVectors sets the AttackVectors field's value.

func (*SubResourceSummary) SetCounters

func (s *SubResourceSummary) SetCounters(v []*SummarizedCounter) *SubResourceSummary

SetCounters sets the Counters field's value.

func (*SubResourceSummary) SetId

func (s *SubResourceSummary) SetId(v string) *SubResourceSummary

SetId sets the Id field's value.

func (*SubResourceSummary) SetType

func (s *SubResourceSummary) SetType(v string) *SubResourceSummary

SetType sets the Type field's value.

func (SubResourceSummary) String

func (s SubResourceSummary) String() string

String returns the string representation

type Subscription

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 {

    // The start time of the subscription, in the format "2016-12-16T13:50Z".
    StartTime *time.Time `type:"timestamp" timestampFormat:"unix"`

    // The length, in seconds, of the AWS Shield Advanced subscription for the account.
    TimeCommitmentInSeconds *int64 `type:"long"`
    // contains filtered or unexported fields
}

func (Subscription) GoString

func (s Subscription) GoString() string

GoString returns the string representation

func (*Subscription) SetStartTime

func (s *Subscription) SetStartTime(v time.Time) *Subscription

SetStartTime sets the StartTime field's value.

func (*Subscription) SetTimeCommitmentInSeconds

func (s *Subscription) SetTimeCommitmentInSeconds(v int64) *Subscription

SetTimeCommitmentInSeconds sets the TimeCommitmentInSeconds field's value.

func (Subscription) String

func (s Subscription) String() string

String returns the string representation

type SummarizedAttackVector

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 {

    // The list of counters that describe the details of the attack.
    VectorCounters []*SummarizedCounter `type:"list"`

    // The attack type, for example, SNMP reflection or SYN flood.
    //
    // VectorType is a required field
    VectorType *string `type:"string" required:"true"`
    // contains filtered or unexported fields
}

func (SummarizedAttackVector) GoString

func (s SummarizedAttackVector) GoString() string

GoString returns the string representation

func (*SummarizedAttackVector) SetVectorCounters

func (s *SummarizedAttackVector) SetVectorCounters(v []*SummarizedCounter) *SummarizedAttackVector

SetVectorCounters sets the VectorCounters field's value.

func (*SummarizedAttackVector) SetVectorType

func (s *SummarizedAttackVector) SetVectorType(v string) *SummarizedAttackVector

SetVectorType sets the VectorType field's value.

func (SummarizedAttackVector) String

func (s SummarizedAttackVector) String() string

String returns the string representation

type SummarizedCounter

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 {

    // The average value of the counter for a specified time period.
    Average *float64 `type:"double"`

    // The maximum value of the counter for a specified time period.
    Max *float64 `type:"double"`

    // The number of counters for a specified time period.
    N *int64 `type:"integer"`

    // The counter name.
    Name *string `type:"string"`

    // The total of counter values for a specified time period.
    Sum *float64 `type:"double"`

    // The unit of the counters.
    Unit *string `type:"string"`
    // contains filtered or unexported fields
}

func (SummarizedCounter) GoString

func (s SummarizedCounter) GoString() string

GoString returns the string representation

func (*SummarizedCounter) SetAverage

func (s *SummarizedCounter) SetAverage(v float64) *SummarizedCounter

SetAverage sets the Average field's value.

func (*SummarizedCounter) SetMax

func (s *SummarizedCounter) SetMax(v float64) *SummarizedCounter

SetMax sets the Max field's value.

func (*SummarizedCounter) SetN

func (s *SummarizedCounter) SetN(v int64) *SummarizedCounter

SetN sets the N field's value.

func (*SummarizedCounter) SetName

func (s *SummarizedCounter) SetName(v string) *SummarizedCounter

SetName sets the Name field's value.

func (*SummarizedCounter) SetSum

func (s *SummarizedCounter) SetSum(v float64) *SummarizedCounter

SetSum sets the Sum field's value.

func (*SummarizedCounter) SetUnit

func (s *SummarizedCounter) SetUnit(v string) *SummarizedCounter

SetUnit sets the Unit field's value.

func (SummarizedCounter) String

func (s SummarizedCounter) String() string

String returns the string representation

type TimeRange

The time range. Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/TimeRange

type TimeRange struct {

    // The start time, in the format 2016-12-16T13:50Z.
    FromInclusive *time.Time `type:"timestamp" timestampFormat:"unix"`

    // The end time, in the format 2016-12-16T15:50Z.
    ToExclusive *time.Time `type:"timestamp" timestampFormat:"unix"`
    // contains filtered or unexported fields
}

func (TimeRange) GoString

func (s TimeRange) GoString() string

GoString returns the string representation

func (*TimeRange) SetFromInclusive

func (s *TimeRange) SetFromInclusive(v time.Time) *TimeRange

SetFromInclusive sets the FromInclusive field's value.

func (*TimeRange) SetToExclusive

func (s *TimeRange) SetToExclusive(v time.Time) *TimeRange

SetToExclusive sets the ToExclusive field's value.

func (TimeRange) String

func (s TimeRange) String() string

String returns the string representation

Subdirectories

Name Synopsis
..
shieldiface Package shieldiface provides an interface to enable mocking the AWS Shield service client for testing your code.