Documentation
¶
Index ¶
- type Attack
- type AttackStatistics
- type AttackVector
- type DRTAccess
- type Limit
- type Mitigation
- type Protection
- type ProtectionGroup
- type ShieldService
- type Store
- func (s *Store) AssociateHealthCheck(protectionID, healthCheckArn string) *service.AWSError
- func (s *Store) CreateProtection(name, resourceArn string, tags []Tag) (*Protection, *service.AWSError)
- func (s *Store) CreateProtectionGroup(id, aggregation, pattern, resourceType string, members []string, tags []Tag) (*ProtectionGroup, *service.AWSError)
- func (s *Store) CreateSubscription() (*Subscription, *service.AWSError)
- func (s *Store) DeleteProtection(id string) *service.AWSError
- func (s *Store) DeleteProtectionGroup(id string) *service.AWSError
- func (s *Store) DescribeAttackStatistics() AttackStatistics
- func (s *Store) DescribeDRTAccess() DRTAccess
- func (s *Store) DisableApplicationLayerAutomaticResponse(resourceArn string) *service.AWSError
- func (s *Store) DisassociateHealthCheck(protectionID, healthCheckArn string) *service.AWSError
- func (s *Store) EnableApplicationLayerAutomaticResponse(resourceArn string, action map[string]any) *service.AWSError
- func (s *Store) GetAttack(attackId string) (*Attack, *service.AWSError)
- func (s *Store) GetProtection(id string) (*Protection, *service.AWSError)
- func (s *Store) GetProtectionGroup(id string) (*ProtectionGroup, *service.AWSError)
- func (s *Store) GetSubscription() (*Subscription, *service.AWSError)
- func (s *Store) ListAttacks() []*Attack
- func (s *Store) ListProtectionGroups() []*ProtectionGroup
- func (s *Store) ListProtections() []*Protection
- func (s *Store) ListTagsForResource(arn string) ([]Tag, *service.AWSError)
- func (s *Store) TagResource(arn string, tags []Tag) *service.AWSError
- func (s *Store) UntagResource(arn string, tagKeys []string) *service.AWSError
- func (s *Store) UpdateProtectionGroup(id, aggregation, pattern, resourceType string, members []string) *service.AWSError
- func (s *Store) UpdateSubscription(autoRenew string) *service.AWSError
- type Subscription
- type SummarizedCounter
- type Tag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attack ¶
type Attack struct {
AttackId string
ResourceArn string
StartTime time.Time
EndTime *time.Time
AttackVectors []AttackVector
AttackCounters []SummarizedCounter
Mitigations []Mitigation
}
Attack holds attack detail information.
type AttackStatistics ¶
type AttackStatistics struct {
FromInclusive time.Time
ToExclusive time.Time
DataItems []map[string]any
}
AttackStatistics holds aggregated attack statistics.
type AttackVector ¶
type AttackVector struct {
VectorType string
}
AttackVector describes a type of attack.
type Mitigation ¶
type Mitigation struct {
MitigationName string
}
Mitigation describes a mitigation action.
type Protection ¶
type Protection struct {
Id string
Name string
ResourceArn string
ProtectionArn string
HealthCheckIds []string
ApplicationLayerAutoResponseConfiguration map[string]any
Tags []Tag
}
Protection holds a Shield protection.
type ProtectionGroup ¶
type ProtectionGroup struct {
ProtectionGroupId string
Aggregation string
Pattern string
ResourceType string
Members []string
ProtectionGroupArn string
Tags []Tag
}
ProtectionGroup holds a protection group definition.
type ShieldService ¶
type ShieldService struct {
// contains filtered or unexported fields
}
ShieldService is the cloudmock implementation of the AWS Shield API.
func New ¶
func New(accountID, region string) *ShieldService
New returns a new ShieldService for the given AWS account ID and region.
func (*ShieldService) Actions ¶
func (s *ShieldService) Actions() []service.Action
Actions returns the list of Shield API actions supported by this service.
func (*ShieldService) HandleRequest ¶
func (s *ShieldService) HandleRequest(ctx *service.RequestContext) (*service.Response, error)
HandleRequest routes an incoming Shield request to the appropriate handler.
func (*ShieldService) HealthCheck ¶
func (s *ShieldService) HealthCheck() error
HealthCheck always returns nil.
func (*ShieldService) Name ¶
func (s *ShieldService) Name() string
Name returns the AWS service name used for routing.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is the in-memory store for Shield resources.
func (*Store) AssociateHealthCheck ¶
AssociateHealthCheck associates a Route 53 health check with a protection.
func (*Store) CreateProtection ¶
func (s *Store) CreateProtection(name, resourceArn string, tags []Tag) (*Protection, *service.AWSError)
CreateProtection creates a new protection.
func (*Store) CreateProtectionGroup ¶
func (s *Store) CreateProtectionGroup(id, aggregation, pattern, resourceType string, members []string, tags []Tag) (*ProtectionGroup, *service.AWSError)
CreateProtectionGroup creates a new protection group.
func (*Store) CreateSubscription ¶
func (s *Store) CreateSubscription() (*Subscription, *service.AWSError)
CreateSubscription creates a Shield Advanced subscription.
func (*Store) DeleteProtection ¶
DeleteProtection removes a protection.
func (*Store) DeleteProtectionGroup ¶
DeleteProtectionGroup removes a protection group.
func (*Store) DescribeAttackStatistics ¶
func (s *Store) DescribeAttackStatistics() AttackStatistics
DescribeAttackStatistics returns attack statistics (mock data).
func (*Store) DescribeDRTAccess ¶
DescribeDRTAccess returns the DRT access configuration.
func (*Store) DisableApplicationLayerAutomaticResponse ¶
DisableApplicationLayerAutomaticResponse disables automatic response for a resource.
func (*Store) DisassociateHealthCheck ¶
DisassociateHealthCheck removes a Route 53 health check from a protection.
func (*Store) EnableApplicationLayerAutomaticResponse ¶
func (s *Store) EnableApplicationLayerAutomaticResponse(resourceArn string, action map[string]any) *service.AWSError
EnableApplicationLayerAutomaticResponse enables automatic response for a resource.
func (*Store) GetProtection ¶
func (s *Store) GetProtection(id string) (*Protection, *service.AWSError)
GetProtection returns a protection by ID.
func (*Store) GetProtectionGroup ¶
func (s *Store) GetProtectionGroup(id string) (*ProtectionGroup, *service.AWSError)
GetProtectionGroup returns a protection group.
func (*Store) GetSubscription ¶
func (s *Store) GetSubscription() (*Subscription, *service.AWSError)
GetSubscription returns the subscription.
func (*Store) ListAttacks ¶
ListAttacks returns all attacks.
func (*Store) ListProtectionGroups ¶
func (s *Store) ListProtectionGroups() []*ProtectionGroup
ListProtectionGroups returns all protection groups.
func (*Store) ListProtections ¶
func (s *Store) ListProtections() []*Protection
ListProtections returns all protections.
func (*Store) ListTagsForResource ¶
ListTagsForResource returns tags for a resource.
func (*Store) TagResource ¶
TagResource adds tags to a resource.
func (*Store) UntagResource ¶
UntagResource removes tags from a resource.
type Subscription ¶
type Subscription struct {
StartTime time.Time
EndTime time.Time
TimeCommitmentInSeconds int64
AutoRenew string
Limits []Limit
ProactiveEngagementStatus string
SubscriptionState string
SubscriptionArn string
}
Subscription holds a Shield Advanced subscription.