Class: Aws::Shield::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::Shield::Client
- Includes:
- ClientStubs
- Defined in:
- gems/aws-sdk-shield/lib/aws-sdk-shield/client.rb
Overview
An API client for Shield. To construct a client, you need to configure a :region
and :credentials
.
client = Aws::Shield::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the developer guide.
See #initialize for a full list of supported configuration options.
Instance Attribute Summary
Attributes inherited from Seahorse::Client::Base
API Operations collapse
-
#associate_drt_log_bucket(params = {}) ⇒ Struct
Authorizes the DDoS Response Team (DRT) to access the specified Amazon S3 bucket containing your AWS WAF logs.
-
#associate_drt_role(params = {}) ⇒ Struct
Authorizes the DDoS Response Team (DRT), using the specified role, to access your AWS account to assist with DDoS attack mitigation during potential attacks.
-
#associate_health_check(params = {}) ⇒ Struct
Adds health-based detection to the Shield Advanced protection for a resource.
-
#associate_proactive_engagement_details(params = {}) ⇒ Struct
Initializes proactive engagement and sets the list of contacts for the DDoS Response Team (DRT) to use.
-
#create_protection(params = {}) ⇒ Types::CreateProtectionResponse
Enables AWS Shield Advanced for a specific AWS resource.
-
#create_protection_group(params = {}) ⇒ Struct
Creates a grouping of protected resources so they can be handled as a collective.
-
#create_subscription(params = {}) ⇒ Struct
Activates AWS Shield Advanced for an account.
-
#delete_protection(params = {}) ⇒ Struct
Deletes an AWS Shield Advanced Protection.
-
#delete_protection_group(params = {}) ⇒ Struct
Removes the specified protection group.
-
#delete_subscription(params = {}) ⇒ Struct
Removes AWS Shield Advanced from an account.
-
#describe_attack(params = {}) ⇒ Types::DescribeAttackResponse
Describes the details of a DDoS attack.
-
#describe_attack_statistics(params = {}) ⇒ Types::DescribeAttackStatisticsResponse
Provides information about the number and type of attacks AWS Shield has detected in the last year for all resources that belong to your account, regardless of whether you've defined Shield protections for them.
-
#describe_drt_access(params = {}) ⇒ Types::DescribeDRTAccessResponse
Returns the current role and list of Amazon S3 log buckets used by the DDoS Response Team (DRT) to access your AWS account while assisting with attack mitigation.
-
#describe_emergency_contact_settings(params = {}) ⇒ Types::DescribeEmergencyContactSettingsResponse
A list of email addresses and phone numbers that the DDoS Response Team (DRT) can use to contact you if you have proactive engagement enabled, for escalations to the DRT and to initiate proactive customer support.
-
#describe_protection(params = {}) ⇒ Types::DescribeProtectionResponse
Lists the details of a Protection object.
-
#describe_protection_group(params = {}) ⇒ Types::DescribeProtectionGroupResponse
Returns the specification for the specified protection group.
-
#describe_subscription(params = {}) ⇒ Types::DescribeSubscriptionResponse
Provides details about the AWS Shield Advanced subscription for an account.
-
#disable_proactive_engagement(params = {}) ⇒ Struct
Removes authorization from the DDoS Response Team (DRT) to notify contacts about escalations to the DRT and to initiate proactive customer support.
-
#disassociate_drt_log_bucket(params = {}) ⇒ Struct
Removes the DDoS Response Team's (DRT) access to the specified Amazon S3 bucket containing your AWS WAF logs.
-
#disassociate_drt_role(params = {}) ⇒ Struct
Removes the DDoS Response Team's (DRT) access to your AWS account.
-
#disassociate_health_check(params = {}) ⇒ Struct
Removes health-based detection from the Shield Advanced protection for a resource.
-
#enable_proactive_engagement(params = {}) ⇒ Struct
Authorizes the DDoS Response Team (DRT) to use email and phone to notify contacts about escalations to the DRT and to initiate proactive customer support.
-
#get_subscription_state(params = {}) ⇒ Types::GetSubscriptionStateResponse
Returns the
SubscriptionState
, eitherActive
orInactive
. -
#list_attacks(params = {}) ⇒ Types::ListAttacksResponse
Returns all ongoing DDoS attacks or all DDoS attacks during a specified time period.
-
#list_protection_groups(params = {}) ⇒ Types::ListProtectionGroupsResponse
Retrieves the ProtectionGroup objects for the account.
-
#list_protections(params = {}) ⇒ Types::ListProtectionsResponse
Lists all Protection objects for the account.
-
#list_resources_in_protection_group(params = {}) ⇒ Types::ListResourcesInProtectionGroupResponse
Retrieves the resources that are included in the protection group.
-
#update_emergency_contact_settings(params = {}) ⇒ Struct
Updates the details of the list of email addresses and phone numbers that the DDoS Response Team (DRT) can use to contact you if you have proactive engagement enabled, for escalations to the DRT and to initiate proactive customer support.
-
#update_protection_group(params = {}) ⇒ Struct
Updates an existing protection group.
-
#update_subscription(params = {}) ⇒ Struct
Updates the details of an existing subscription.
Instance Method Summary collapse
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
Methods included from ClientStubs
#api_requests, #stub_data, #stub_responses
Methods inherited from Seahorse::Client::Base
add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins
Methods included from Seahorse::Client::HandlerBuilder
#handle, #handle_request, #handle_response
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
334 335 336 |
# File 'gems/aws-sdk-shield/lib/aws-sdk-shield/client.rb', line 334 def initialize(*args) super end |
Instance Method Details
#associate_drt_log_bucket(params = {}) ⇒ Struct
Authorizes the DDoS Response Team (DRT) to access the specified Amazon S3 bucket containing your AWS WAF logs. You can associate up to 10 Amazon S3 buckets with your subscription.
To use the services of the DRT and make an AssociateDRTLogBucket
request, you must be subscribed to the Business Support plan or
the Enterprise Support plan.
368 369 370 371 |
# File 'gems/aws-sdk-shield/lib/aws-sdk-shield/client.rb', line 368 def associate_drt_log_bucket(params = {}, = {}) req = build_request(:associate_drt_log_bucket, params) req.send_request() end |
#associate_drt_role(params = {}) ⇒ Struct
Authorizes the DDoS Response Team (DRT), using the specified role, to access your AWS account to assist with DDoS attack mitigation during potential attacks. This enables the DRT to inspect your AWS WAF configuration and create or update AWS WAF rules and web ACLs.
You can associate only one RoleArn
with your subscription. If you
submit an AssociateDRTRole
request for an account that already has
an associated role, the new RoleArn
will replace the existing
RoleArn
.
Prior to making the AssociateDRTRole
request, you must attach the
AWSShieldDRTAccessPolicy managed policy to the role you will
specify in the request. For more information see Attaching and
Detaching IAM Policies.
The role must also trust the service principal
drt.shield.amazonaws.com
. For more information, see IAM JSON Policy
Elements: Principal.
The DRT will have access only to your AWS WAF and Shield resources. By submitting this request, you authorize the DRT to inspect your AWS WAF and Shield configuration and create and update AWS WAF rules and web ACLs on your behalf. The DRT takes these actions only if explicitly authorized by you.
You must have the iam:PassRole
permission to make an
AssociateDRTRole
request. For more information, see Granting a User
Permissions to Pass a Role to an AWS Service.
To use the services of the DRT and make an AssociateDRTRole
request,
you must be subscribed to the Business Support plan or the
Enterprise Support plan.
439 440 441 442 |
# File 'gems/aws-sdk-shield/lib/aws-sdk-shield/client.rb', line 439 def associate_drt_role(params = {}, = {}) req = build_request(:associate_drt_role, params) req.send_request() end |
#associate_health_check(params = {}) ⇒ Struct
Adds health-based detection to the Shield Advanced protection for a resource. Shield Advanced health-based detection uses the health of your AWS resource to improve responsiveness and accuracy in attack detection and mitigation.
You define the health check in Route 53 and then associate it with your Shield Advanced protection. For more information, see Shield Advanced Health-Based Detection in the AWS WAF and AWS Shield Developer Guide.
480 481 482 483 |
# File 'gems/aws-sdk-shield/lib/aws-sdk-shield/client.rb', line 480 def associate_health_check(params = {}, = {}) req = build_request(:associate_health_check, params) req.send_request() end |
#associate_proactive_engagement_details(params = {}) ⇒ Struct
Initializes proactive engagement and sets the list of contacts for the DDoS Response Team (DRT) to use. You must provide at least one phone number in the emergency contact list.
After you have initialized proactive engagement using this call, to
disable or enable proactive engagement, use the calls
DisableProactiveEngagement
and EnableProactiveEngagement
.
The contacts that you provide in the request replace any contacts that
were already defined. If you already have contacts defined and want to
use them, retrieve the list using DescribeEmergencyContactSettings
and then provide it to this call.
537 538 539 540 |
# File 'gems/aws-sdk-shield/lib/aws-sdk-shield/client.rb', line 537 def associate_proactive_engagement_details(params = {}, = {}) req = build_request(:associate_proactive_engagement_details, params) req.send_request() end |
#create_protection(params = {}) ⇒ Types::CreateProtectionResponse
Enables AWS Shield Advanced for a specific AWS resource. The resource can be an Amazon CloudFront distribution, Elastic Load Balancing load balancer, AWS Global Accelerator accelerator, Elastic IP Address, or an Amazon Route 53 hosted zone.
You can add protection to only a single resource with each CreateProtection request. If you want to add protection to multiple resources at once, use the AWS WAF console. For more information see Getting Started with AWS Shield Advanced and Add AWS Shield Advanced Protection to more AWS Resources.
605 606 607 608 |
# File 'gems/aws-sdk-shield/lib/aws-sdk-shield/client.rb', line 605 def create_protection(params = {}, = {}) req = build_request(:create_protection, params) req.send_request() end |
#create_protection_group(params = {}) ⇒ Struct
Creates a grouping of protected resources so they can be handled as a collective. This resource grouping improves the accuracy of detection and reduces false positives.
670 671 672 673 |
# File 'gems/aws-sdk-shield/lib/aws-sdk-shield/client.rb', line 670 def create_protection_group(params = {}, = {}) req = build_request(:create_protection_group, params) req.send_request() end |
#create_subscription(params = {}) ⇒ Struct
Activates AWS Shield Advanced for an account.
When you initally create a subscription, your subscription is set to
be automatically renewed at the end of the existing subscription
period. You can change this by submitting an UpdateSubscription
request.
688 689 690 691 |
# File 'gems/aws-sdk-shield/lib/aws-sdk-shield/client.rb', line 688 def create_subscription(params = {}, = {}) req = build_request(:create_subscription, params) req.send_request() end |
#delete_protection(params = {}) ⇒ Struct
Deletes an AWS Shield Advanced Protection.
710 711 712 713 |
# File 'gems/aws-sdk-shield/lib/aws-sdk-shield/client.rb', line 710 def delete_protection(params = {}, = {}) req = build_request(:delete_protection, params) req.send_request() end |
#delete_protection_group(params = {}) ⇒ Struct
Removes the specified protection group.
734 735 736 737 |
# File 'gems/aws-sdk-shield/lib/aws-sdk-shield/client.rb', line 734 def delete_protection_group(params = {}, = {}) req = build_request(:delete_protection_group, params) req.send_request() end |
#delete_subscription(params = {}) ⇒ Struct
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.
749 750 751 752 |
# File 'gems/aws-sdk-shield/lib/aws-sdk-shield/client.rb', line 749 def delete_subscription(params = {}, = {}) req = build_request(:delete_subscription, params) req.send_request() end |
#describe_attack(params = {}) ⇒ Types::DescribeAttackResponse
Describes the details of a DDoS attack.
816 817 818 819 |
# File 'gems/aws-sdk-shield/lib/aws-sdk-shield/client.rb', line 816 def describe_attack(params = {}, = {}) req = build_request(:describe_attack, params) req.send_request() end |
#describe_attack_statistics(params = {}) ⇒ Types::DescribeAttackStatisticsResponse
Provides information about the number and type of attacks AWS Shield has detected in the last year for all resources that belong to your account, regardless of whether you've defined Shield protections for them. This operation is available to Shield customers as well as to Shield Advanced customers.
The operation returns data for the time range of midnight UTC, one
year ago, to midnight UTC, today. For example, if the current time is
2020-10-26 15:39:32 PDT
, equal to 2020-10-26 22:39:32 UTC
, then
the time range for the attack data returned is from 2019-10-26
00:00:00 UTC
to 2020-10-26 00:00:00 UTC
.
The time range indicates the period covered by the attack statistics data items.
855 856 857 858 |
# File 'gems/aws-sdk-shield/lib/aws-sdk-shield/client.rb', line 855 def describe_attack_statistics(params = {}, = {}) req = build_request(:describe_attack_statistics, params) req.send_request() end |
#describe_drt_access(params = {}) ⇒ Types::DescribeDRTAccessResponse
Returns the current role and list of Amazon S3 log buckets used by the DDoS Response Team (DRT) to access your AWS account while assisting with attack mitigation.
879 880 881 882 |
# File 'gems/aws-sdk-shield/lib/aws-sdk-shield/client.rb', line 879 def describe_drt_access(params = {}, = {}) req = build_request(:describe_drt_access, params) req.send_request() end |
#describe_emergency_contact_settings(params = {}) ⇒ Types::DescribeEmergencyContactSettingsResponse
A list of email addresses and phone numbers that the DDoS Response Team (DRT) can use to contact you if you have proactive engagement enabled, for escalations to the DRT and to initiate proactive customer support.
904 905 906 907 |
# File 'gems/aws-sdk-shield/lib/aws-sdk-shield/client.rb', line 904 def describe_emergency_contact_settings(params = {}, = {}) req = build_request(:describe_emergency_contact_settings, params) req.send_request() end |
#describe_protection(params = {}) ⇒ Types::DescribeProtectionResponse
Lists the details of a Protection object.
945 946 947 948 |
# File 'gems/aws-sdk-shield/lib/aws-sdk-shield/client.rb', line 945 def describe_protection(params = {}, = {}) req = build_request(:describe_protection, params) req.send_request() end |
#describe_protection_group(params = {}) ⇒ Types::DescribeProtectionGroupResponse
Returns the specification for the specified protection group.
980 981 982 983 |
# File 'gems/aws-sdk-shield/lib/aws-sdk-shield/client.rb', line 980 def describe_protection_group(params = {}, = {}) req = build_request(:describe_protection_group, params) req.send_request() end |
#describe_subscription(params = {}) ⇒ Types::DescribeSubscriptionResponse
Provides details about the AWS Shield Advanced subscription for an account.
1012 1013 1014 1015 |
# File 'gems/aws-sdk-shield/lib/aws-sdk-shield/client.rb', line 1012 def describe_subscription(params = {}, = {}) req = build_request(:describe_subscription, params) req.send_request() end |
#disable_proactive_engagement(params = {}) ⇒ Struct
Removes authorization from the DDoS Response Team (DRT) to notify contacts about escalations to the DRT and to initiate proactive customer support.
1027 1028 1029 1030 |
# File 'gems/aws-sdk-shield/lib/aws-sdk-shield/client.rb', line 1027 def disable_proactive_engagement(params = {}, = {}) req = build_request(:disable_proactive_engagement, params) req.send_request() end |
#disassociate_drt_log_bucket(params = {}) ⇒ Struct
Removes the DDoS Response Team's (DRT) access to the specified Amazon S3 bucket containing your AWS WAF logs.
To make a DisassociateDRTLogBucket
request, you must be subscribed
to the Business Support plan or the Enterprise Support plan.
However, if you are not subscribed to one of these support plans, but
had been previously and had granted the DRT access to your account,
you can submit a DisassociateDRTLogBucket
request to remove this
access.
1062 1063 1064 1065 |
# File 'gems/aws-sdk-shield/lib/aws-sdk-shield/client.rb', line 1062 def disassociate_drt_log_bucket(params = {}, = {}) req = build_request(:disassociate_drt_log_bucket, params) req.send_request() end |
#disassociate_drt_role(params = {}) ⇒ Struct
Removes the DDoS Response Team's (DRT) access to your AWS account.
To make a DisassociateDRTRole
request, you must be subscribed to the
Business Support plan or the Enterprise Support plan.
However, if you are not subscribed to one of these support plans, but
had been previously and had granted the DRT access to your account,
you can submit a DisassociateDRTRole
request to remove this access.
1086 1087 1088 1089 |
# File 'gems/aws-sdk-shield/lib/aws-sdk-shield/client.rb', line 1086 def disassociate_drt_role(params = {}, = {}) req = build_request(:disassociate_drt_role, params) req.send_request() end |
#disassociate_health_check(params = {}) ⇒ Struct
Removes health-based detection from the Shield Advanced protection for a resource. Shield Advanced health-based detection uses the health of your AWS resource to improve responsiveness and accuracy in attack detection and mitigation.
You define the health check in Route 53 and then associate or disassociate it with your Shield Advanced protection. For more information, see Shield Advanced Health-Based Detection in the AWS WAF and AWS Shield Developer Guide.
1127 1128 1129 1130 |
# File 'gems/aws-sdk-shield/lib/aws-sdk-shield/client.rb', line 1127 def disassociate_health_check(params = {}, = {}) req = build_request(:disassociate_health_check, params) req.send_request() end |
#enable_proactive_engagement(params = {}) ⇒ Struct
Authorizes the DDoS Response Team (DRT) to use email and phone to notify contacts about escalations to the DRT and to initiate proactive customer support.
1142 1143 1144 1145 |
# File 'gems/aws-sdk-shield/lib/aws-sdk-shield/client.rb', line 1142 def enable_proactive_engagement(params = {}, = {}) req = build_request(:enable_proactive_engagement, params) req.send_request() end |
#get_subscription_state(params = {}) ⇒ Types::GetSubscriptionStateResponse
Returns the SubscriptionState
, either Active
or Inactive
.
1161 1162 1163 1164 |
# File 'gems/aws-sdk-shield/lib/aws-sdk-shield/client.rb', line 1161 def get_subscription_state(params = {}, = {}) req = build_request(:get_subscription_state, params) req.send_request() end |
#list_attacks(params = {}) ⇒ Types::ListAttacksResponse
Returns all ongoing DDoS attacks or all DDoS attacks during a specified time period.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1247 1248 1249 1250 |
# File 'gems/aws-sdk-shield/lib/aws-sdk-shield/client.rb', line 1247 def list_attacks(params = {}, = {}) req = build_request(:list_attacks, params) req.send_request() end |
#list_protection_groups(params = {}) ⇒ Types::ListProtectionGroupsResponse
Retrieves the ProtectionGroup objects for the account.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1298 1299 1300 1301 |
# File 'gems/aws-sdk-shield/lib/aws-sdk-shield/client.rb', line 1298 def list_protection_groups(params = {}, = {}) req = build_request(:list_protection_groups, params) req.send_request() end |
#list_protections(params = {}) ⇒ Types::ListProtectionsResponse
Lists all Protection objects for the account.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1348 1349 1350 1351 |
# File 'gems/aws-sdk-shield/lib/aws-sdk-shield/client.rb', line 1348 def list_protections(params = {}, = {}) req = build_request(:list_protections, params) req.send_request() end |
#list_resources_in_protection_group(params = {}) ⇒ Types::ListResourcesInProtectionGroupResponse
Retrieves the resources that are included in the protection group.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1400 1401 1402 1403 |
# File 'gems/aws-sdk-shield/lib/aws-sdk-shield/client.rb', line 1400 def list_resources_in_protection_group(params = {}, = {}) req = build_request(:list_resources_in_protection_group, params) req.send_request() end |
#update_emergency_contact_settings(params = {}) ⇒ Struct
Updates the details of the list of email addresses and phone numbers that the DDoS Response Team (DRT) can use to contact you if you have proactive engagement enabled, for escalations to the DRT and to initiate proactive customer support.
1437 1438 1439 1440 |
# File 'gems/aws-sdk-shield/lib/aws-sdk-shield/client.rb', line 1437 def update_emergency_contact_settings(params = {}, = {}) req = build_request(:update_emergency_contact_settings, params) req.send_request() end |
#update_protection_group(params = {}) ⇒ Struct
Updates an existing protection group. A protection group is a grouping of protected resources so they can be handled as a collective. This resource grouping improves the accuracy of detection and reduces false positives.
1502 1503 1504 1505 |
# File 'gems/aws-sdk-shield/lib/aws-sdk-shield/client.rb', line 1502 def update_protection_group(params = {}, = {}) req = build_request(:update_protection_group, params) req.send_request() end |
#update_subscription(params = {}) ⇒ Struct
Updates the details of an existing subscription. Only enter values for parameters you want to change. Empty parameters are not updated.
1530 1531 1532 1533 |
# File 'gems/aws-sdk-shield/lib/aws-sdk-shield/client.rb', line 1530 def update_subscription(params = {}, = {}) req = build_request(:update_subscription, params) req.send_request() end |