Shield

Table of Contents

Client

class Shield.Client

A low-level client representing AWS Shield

This is the Shield Advanced API Reference . This guide is for developers who need detailed information about the Shield Advanced API actions, data types, and errors. For detailed information about WAF and Shield Advanced features and an overview of how to use the WAF and Shield Advanced APIs, see the WAF and Shield Developer Guide .

import boto3

client = boto3.client('shield')

These are the available methods:

associate_drt_log_bucket(**kwargs)

Authorizes the Shield Response Team (SRT) to access the specified Amazon S3 bucket containing log data such as Application Load Balancer access logs, CloudFront logs, or logs from third party sources. You can associate up to 10 Amazon S3 buckets with your subscription.

To use the services of the SRT and make an AssociateDRTLogBucket request, you must be subscribed to the Business Support plan or the Enterprise Support plan .

See also: AWS API Documentation

Request Syntax

response = client.associate_drt_log_bucket(
    LogBucket='string'
)
Parameters
LogBucket (string) --

[REQUIRED]

The Amazon S3 bucket that contains the logs that you want to share.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • Shield.Client.exceptions.InternalErrorException
  • Shield.Client.exceptions.InvalidOperationException
  • Shield.Client.exceptions.NoAssociatedRoleException
  • Shield.Client.exceptions.LimitsExceededException
  • Shield.Client.exceptions.InvalidParameterException
  • Shield.Client.exceptions.AccessDeniedForDependencyException
  • Shield.Client.exceptions.OptimisticLockException
  • Shield.Client.exceptions.ResourceNotFoundException
associate_drt_role(**kwargs)

Authorizes the Shield Response Team (SRT) using the specified role, to access your Amazon Web Services account to assist with DDoS attack mitigation during potential attacks. This enables the SRT to inspect your WAF configuration and create or update 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 that you'll specify in the request. You can access this policy in the IAM console at AWSShieldDRTAccessPolicy . For more information see Adding and removing IAM identity permissions . The role must also trust the service principal drt.shield.amazonaws.com . For more information, see IAM JSON policy elements: Principal .

The SRT will have access only to your WAF and Shield resources. By submitting this request, you authorize the SRT to inspect your WAF and Shield configuration and create and update WAF rules and web ACLs on your behalf. The SRT 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 Amazon Web Services service .

To use the services of the SRT and make an AssociateDRTRole request, you must be subscribed to the Business Support plan or the Enterprise Support plan .

See also: AWS API Documentation

Request Syntax

response = client.associate_drt_role(
    RoleArn='string'
)
Parameters
RoleArn (string) --

[REQUIRED]

The Amazon Resource Name (ARN) of the role the SRT will use to access your Amazon Web Services account.

Prior to making the AssociateDRTRole request, you must attach the AWSShieldDRTAccessPolicy managed policy to this role. For more information see `Attaching and Detaching IAM Policies < https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_manage-attach-detach.html>`__ .

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • Shield.Client.exceptions.InternalErrorException
  • Shield.Client.exceptions.InvalidOperationException
  • Shield.Client.exceptions.InvalidParameterException
  • Shield.Client.exceptions.AccessDeniedForDependencyException
  • Shield.Client.exceptions.OptimisticLockException
  • Shield.Client.exceptions.ResourceNotFoundException
associate_health_check(**kwargs)

Adds health-based detection to the Shield Advanced protection for a resource. Shield Advanced health-based detection uses the health of your Amazon Web Services resource to improve responsiveness and accuracy in attack detection and response.

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 WAF Developer Guide .

See also: AWS API Documentation

Request Syntax

response = client.associate_health_check(
    ProtectionId='string',
    HealthCheckArn='string'
)
Parameters
  • ProtectionId (string) --

    [REQUIRED]

    The unique identifier (ID) for the Protection object to add the health check association to.

  • HealthCheckArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the health check to associate with the protection.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • Shield.Client.exceptions.InternalErrorException
  • Shield.Client.exceptions.LimitsExceededException
  • Shield.Client.exceptions.ResourceNotFoundException
  • Shield.Client.exceptions.InvalidParameterException
  • Shield.Client.exceptions.OptimisticLockException
  • Shield.Client.exceptions.InvalidResourceException
associate_proactive_engagement_details(**kwargs)

Initializes proactive engagement and sets the list of contacts for the Shield Response Team (SRT) 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 .

Note

This call defines the list of email addresses and phone numbers that the SRT can use to contact you for escalations to the SRT and to initiate proactive customer support.

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.

See also: AWS API Documentation

Request Syntax

response = client.associate_proactive_engagement_details(
    EmergencyContactList=[
        {
            'EmailAddress': 'string',
            'PhoneNumber': 'string',
            'ContactNotes': 'string'
        },
    ]
)
Parameters
EmergencyContactList (list) --

[REQUIRED]

A list of email addresses and phone numbers that the Shield Response Team (SRT) can use to contact you for escalations to the SRT and to initiate proactive customer support.

To enable proactive engagement, the contact list must include at least one phone number.

Note

The contacts that you provide here 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 here.

  • (dict) --

    Contact information that the SRT can use to contact you if you have proactive engagement enabled, for escalations to the SRT and to initiate proactive customer support.

    • EmailAddress (string) -- [REQUIRED]

      The email address for the contact.

    • PhoneNumber (string) --

      The phone number for the contact.

    • ContactNotes (string) --

      Additional notes regarding the contact.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • Shield.Client.exceptions.InternalErrorException
  • Shield.Client.exceptions.InvalidOperationException
  • Shield.Client.exceptions.InvalidParameterException
  • Shield.Client.exceptions.ResourceNotFoundException
  • Shield.Client.exceptions.OptimisticLockException
can_paginate(operation_name)

Check if an operation can be paginated.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Returns
True if the operation can be paginated, False otherwise.
close()

Closes underlying endpoint connections.

create_protection(**kwargs)

Enables Shield Advanced for a specific Amazon Web Services resource. The resource can be an Amazon CloudFront distribution, Elastic Load Balancing load balancer, 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. You can add protection to multiple resources at once through the Shield Advanced console at https://console.aws.amazon.com/wafv2/shieldv2#/ . For more information see Getting Started with Shield Advanced and Adding Shield Advanced protection to Amazon Web Services resources .

See also: AWS API Documentation

Request Syntax

response = client.create_protection(
    Name='string',
    ResourceArn='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • Name (string) --

    [REQUIRED]

    Friendly name for the Protection you are creating.

  • ResourceArn (string) --

    [REQUIRED]

    The ARN (Amazon Resource Name) of the resource to be protected.

    The ARN should be in one of the following formats:

    • For an Application Load Balancer: ``arn:aws:elasticloadbalancing:region :account-id :loadbalancer/app/load-balancer-name /load-balancer-id ``
    • For an Elastic Load Balancer (Classic Load Balancer): ``arn:aws:elasticloadbalancing:region :account-id :loadbalancer/load-balancer-name ``
    • For an Amazon CloudFront distribution: ``arn:aws:cloudfront::account-id :distribution/distribution-id ``
    • For an Global Accelerator accelerator: ``arn:aws:globalaccelerator::account-id :accelerator/accelerator-id ``
    • For Amazon Route 53: ``arn:aws:route53:::hostedzone/hosted-zone-id ``
    • For an Elastic IP address: ``arn:aws:ec2:region :account-id :eip-allocation/allocation-id ``
  • Tags (list) --

    One or more tag key-value pairs for the Protection object that is created.

    • (dict) --

      A tag associated with an Amazon Web Services resource. Tags are key:value pairs that you can use to categorize and manage your resources, for purposes like billing or other management. Typically, the tag key represents a category, such as "environment", and the tag value represents a specific value within that category, such as "test," "development," or "production". Or you might set the tag key to "customer" and the value to the customer name or ID. You can specify one or more tags to add to each Amazon Web Services resource, up to 50 tags for a resource.

      • Key (string) --

        Part of the key:value pair that defines a tag. You can use a tag key to describe a category of information, such as "customer." Tag keys are case-sensitive.

      • Value (string) --

        Part of the key:value pair that defines a tag. You can use a tag value to describe a specific value within a category, such as "companyA" or "companyB." Tag values are case-sensitive.

Return type

dict

Returns

Response Syntax

{
    'ProtectionId': 'string'
}

Response Structure

  • (dict) --

    • ProtectionId (string) --

      The unique identifier (ID) for the Protection object that is created.

Exceptions

  • Shield.Client.exceptions.InternalErrorException
  • Shield.Client.exceptions.InvalidResourceException
  • Shield.Client.exceptions.InvalidOperationException
  • Shield.Client.exceptions.LimitsExceededException
  • Shield.Client.exceptions.ResourceAlreadyExistsException
  • Shield.Client.exceptions.OptimisticLockException
  • Shield.Client.exceptions.ResourceNotFoundException
  • Shield.Client.exceptions.InvalidParameterException
create_protection_group(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.create_protection_group(
    ProtectionGroupId='string',
    Aggregation='SUM'|'MEAN'|'MAX',
    Pattern='ALL'|'ARBITRARY'|'BY_RESOURCE_TYPE',
    ResourceType='CLOUDFRONT_DISTRIBUTION'|'ROUTE_53_HOSTED_ZONE'|'ELASTIC_IP_ALLOCATION'|'CLASSIC_LOAD_BALANCER'|'APPLICATION_LOAD_BALANCER'|'GLOBAL_ACCELERATOR',
    Members=[
        'string',
    ],
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • ProtectionGroupId (string) --

    [REQUIRED]

    The name of the protection group. You use this to identify the protection group in lists and to manage the protection group, for example to update, delete, or describe it.

  • Aggregation (string) --

    [REQUIRED]

    Defines how Shield combines resource data for the group in order to detect, mitigate, and report events.

    • Sum - Use the total traffic across the group. This is a good choice for most cases. Examples include Elastic IP addresses for EC2 instances that scale manually or automatically.
    • Mean - Use the average of the traffic across the group. This is a good choice for resources that share traffic uniformly. Examples include accelerators and load balancers.
    • Max - Use the highest traffic from each resource. This is useful for resources that don't share traffic and for resources that share that traffic in a non-uniform way. Examples include Amazon CloudFront and origin resources for CloudFront distributions.
  • Pattern (string) --

    [REQUIRED]

    The criteria to use to choose the protected resources for inclusion in the group. You can include all resources that have protections, provide a list of resource Amazon Resource Names (ARNs), or include all resources of a specified resource type.

  • ResourceType (string) -- The resource type to include in the protection group. All protected resources of this type are included in the protection group. Newly protected resources of this type are automatically added to the group. You must set this when you set Pattern to BY_RESOURCE_TYPE and you must not set it for any other Pattern setting.
  • Members (list) --

    The Amazon Resource Names (ARNs) of the resources to include in the protection group. You must set this when you set Pattern to ARBITRARY and you must not set it for any other Pattern setting.

    • (string) --
  • Tags (list) --

    One or more tag key-value pairs for the protection group.

    • (dict) --

      A tag associated with an Amazon Web Services resource. Tags are key:value pairs that you can use to categorize and manage your resources, for purposes like billing or other management. Typically, the tag key represents a category, such as "environment", and the tag value represents a specific value within that category, such as "test," "development," or "production". Or you might set the tag key to "customer" and the value to the customer name or ID. You can specify one or more tags to add to each Amazon Web Services resource, up to 50 tags for a resource.

      • Key (string) --

        Part of the key:value pair that defines a tag. You can use a tag key to describe a category of information, such as "customer." Tag keys are case-sensitive.

      • Value (string) --

        Part of the key:value pair that defines a tag. You can use a tag value to describe a specific value within a category, such as "companyA" or "companyB." Tag values are case-sensitive.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • Shield.Client.exceptions.InternalErrorException
  • Shield.Client.exceptions.ResourceAlreadyExistsException
  • Shield.Client.exceptions.OptimisticLockException
  • Shield.Client.exceptions.ResourceNotFoundException
  • Shield.Client.exceptions.InvalidParameterException
  • Shield.Client.exceptions.LimitsExceededException
create_subscription()

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

See also: AWS API Documentation

Request Syntax

response = client.create_subscription()
Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • Shield.Client.exceptions.InternalErrorException
  • Shield.Client.exceptions.ResourceAlreadyExistsException
delete_protection(**kwargs)

Deletes an Shield Advanced Protection .

See also: AWS API Documentation

Request Syntax

response = client.delete_protection(
    ProtectionId='string'
)
Parameters
ProtectionId (string) --

[REQUIRED]

The unique identifier (ID) for the Protection object to be deleted.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • Shield.Client.exceptions.InternalErrorException
  • Shield.Client.exceptions.ResourceNotFoundException
  • Shield.Client.exceptions.OptimisticLockException
delete_protection_group(**kwargs)

Removes the specified protection group.

See also: AWS API Documentation

Request Syntax

response = client.delete_protection_group(
    ProtectionGroupId='string'
)
Parameters
ProtectionGroupId (string) --

[REQUIRED]

The name of the protection group. You use this to identify the protection group in lists and to manage the protection group, for example to update, delete, or describe it.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • Shield.Client.exceptions.InternalErrorException
  • Shield.Client.exceptions.OptimisticLockException
  • Shield.Client.exceptions.ResourceNotFoundException
delete_subscription()

Removes Shield Advanced from an account. Shield Advanced requires a 1-year subscription commitment. You cannot delete a subscription prior to the completion of that commitment.

Danger

This operation is deprecated and may not function as expected. This operation should not be used going forward and is only kept for the purpose of backwards compatiblity.

See also: AWS API Documentation

Request Syntax

response = client.delete_subscription()
Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • Shield.Client.exceptions.InternalErrorException
  • Shield.Client.exceptions.LockedSubscriptionException
  • Shield.Client.exceptions.ResourceNotFoundException
describe_attack(**kwargs)

Describes the details of a DDoS attack.

See also: AWS API Documentation

Request Syntax

response = client.describe_attack(
    AttackId='string'
)
Parameters
AttackId (string) --

[REQUIRED]

The unique identifier (ID) for the attack.

Return type
dict
Returns
Response Syntax
{
    'Attack': {
        'AttackId': 'string',
        'ResourceArn': 'string',
        'SubResources': [
            {
                'Type': 'IP'|'URL',
                'Id': 'string',
                'AttackVectors': [
                    {
                        'VectorType': 'string',
                        'VectorCounters': [
                            {
                                'Name': 'string',
                                'Max': 123.0,
                                'Average': 123.0,
                                'Sum': 123.0,
                                'N': 123,
                                'Unit': 'string'
                            },
                        ]
                    },
                ],
                'Counters': [
                    {
                        'Name': 'string',
                        'Max': 123.0,
                        'Average': 123.0,
                        'Sum': 123.0,
                        'N': 123,
                        'Unit': 'string'
                    },
                ]
            },
        ],
        'StartTime': datetime(2015, 1, 1),
        'EndTime': datetime(2015, 1, 1),
        'AttackCounters': [
            {
                'Name': 'string',
                'Max': 123.0,
                'Average': 123.0,
                'Sum': 123.0,
                'N': 123,
                'Unit': 'string'
            },
        ],
        'AttackProperties': [
            {
                'AttackLayer': 'NETWORK'|'APPLICATION',
                'AttackPropertyIdentifier': 'DESTINATION_URL'|'REFERRER'|'SOURCE_ASN'|'SOURCE_COUNTRY'|'SOURCE_IP_ADDRESS'|'SOURCE_USER_AGENT'|'WORDPRESS_PINGBACK_REFLECTOR'|'WORDPRESS_PINGBACK_SOURCE',
                'TopContributors': [
                    {
                        'Name': 'string',
                        'Value': 123
                    },
                ],
                'Unit': 'BITS'|'BYTES'|'PACKETS'|'REQUESTS',
                'Total': 123
            },
        ],
        'Mitigations': [
            {
                'MitigationName': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --
    • Attack (dict) --

      The attack that is described.

      • AttackId (string) --

        The unique identifier (ID) of the attack.

      • ResourceArn (string) --

        The ARN (Amazon Resource Name) of the resource that was attacked.

      • SubResources (list) --

        If applicable, additional detail about the resource being attacked, for example, IP address or URL.

        • (dict) --

          The attack information for the specified SubResource.

          • Type (string) --

            The SubResource type.

          • Id (string) --

            The unique identifier (ID) of the SubResource .

          • AttackVectors (list) --

            The list of attack types and associated counters.

            • (dict) --

              A summary of information about the attack.

              • VectorType (string) --

                The attack type, for example, SNMP reflection or SYN flood.

              • VectorCounters (list) --

                The list of counters that describe the details of the attack.

                • (dict) --

                  The counter that describes a DDoS attack.

                  • Name (string) --

                    The counter name.

                  • Max (float) --

                    The maximum value of the counter for a specified time period.

                  • Average (float) --

                    The average value of the counter for a specified time period.

                  • Sum (float) --

                    The total of counter values for a specified time period.

                  • N (integer) --

                    The number of counters for a specified time period.

                  • Unit (string) --

                    The unit of the counters.

          • Counters (list) --

            The counters that describe the details of the attack.

            • (dict) --

              The counter that describes a DDoS attack.

              • Name (string) --

                The counter name.

              • Max (float) --

                The maximum value of the counter for a specified time period.

              • Average (float) --

                The average value of the counter for a specified time period.

              • Sum (float) --

                The total of counter values for a specified time period.

              • N (integer) --

                The number of counters for a specified time period.

              • Unit (string) --

                The unit of the counters.

      • StartTime (datetime) --

        The time the attack started, in Unix time in seconds.

      • EndTime (datetime) --

        The time the attack ended, in Unix time in seconds.

      • AttackCounters (list) --

        List of counters that describe the attack for the specified time period.

        • (dict) --

          The counter that describes a DDoS attack.

          • Name (string) --

            The counter name.

          • Max (float) --

            The maximum value of the counter for a specified time period.

          • Average (float) --

            The average value of the counter for a specified time period.

          • Sum (float) --

            The total of counter values for a specified time period.

          • N (integer) --

            The number of counters for a specified time period.

          • Unit (string) --

            The unit of the counters.

      • AttackProperties (list) --

        The array of objects that provide details of the Shield event.

        For infrastructure layer events (L3 and L4 events), you can view metrics for top contributors in Amazon CloudWatch metrics. For more information, see Shield metrics and alarms in the WAF Developer Guide .

        • (dict) --

          Details of a Shield event. This is provided as part of an AttackDetail .

          • AttackLayer (string) --

            The type of Shield event that was observed. NETWORK indicates layer 3 and layer 4 events and APPLICATION indicates layer 7 events.

            For infrastructure layer events (L3 and L4 events), you can view metrics for top contributors in Amazon CloudWatch metrics. For more information, see Shield metrics and alarms in the WAF Developer Guide .

          • AttackPropertyIdentifier (string) --

            Defines the Shield event property information that is provided. The WORDPRESS_PINGBACK_REFLECTOR and WORDPRESS_PINGBACK_SOURCE values are valid only for WordPress reflective pingback events.

          • TopContributors (list) --

            Contributor objects for the top five contributors to a Shield event. A contributor is a source of traffic that Shield Advanced identifies as responsible for some or all of an event.

            • (dict) --

              A contributor to the attack and their contribution.

              • Name (string) --

                The name of the contributor. The type of name that you'll find here depends on the AttackPropertyIdentifier setting in the AttackProperty where this contributor is defined. For example, if the AttackPropertyIdentifier is SOURCE_COUNTRY , the Name could be United States .

              • Value (integer) --

                The contribution of this contributor expressed in Protection units. For example 10,000 .

          • Unit (string) --

            The unit used for the Contributor Value property.

          • Total (integer) --

            The total contributions made to this Shield event by all contributors.

      • Mitigations (list) --

        List of mitigation actions taken for the attack.

        • (dict) --

          The mitigation applied to a DDoS attack.

          • MitigationName (string) --

            The name of the mitigation taken for this attack.

Exceptions

  • Shield.Client.exceptions.InternalErrorException
  • Shield.Client.exceptions.AccessDeniedException
describe_attack_statistics()

Provides information about the number and type of attacks 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.

See also: AWS API Documentation

Request Syntax

response = client.describe_attack_statistics()
Return type
dict
Returns
Response Syntax
{
    'TimeRange': {
        'FromInclusive': datetime(2015, 1, 1),
        'ToExclusive': datetime(2015, 1, 1)
    },
    'DataItems': [
        {
            'AttackVolume': {
                'BitsPerSecond': {
                    'Max': 123.0
                },
                'PacketsPerSecond': {
                    'Max': 123.0
                },
                'RequestsPerSecond': {
                    'Max': 123.0
                }
            },
            'AttackCount': 123
        },
    ]
}

Response Structure

  • (dict) --
    • TimeRange (dict) --

      The time range.

      • FromInclusive (datetime) --

        The start time, in Unix time in seconds.

      • ToExclusive (datetime) --

        The end time, in Unix time in seconds.

    • DataItems (list) --

      The data that describes the attacks detected during the time period.

      • (dict) --

        A single attack statistics data record. This is returned by DescribeAttackStatistics along with a time range indicating the time period that the attack statistics apply to.

        • AttackVolume (dict) --

          Information about the volume of attacks during the time period. If the accompanying AttackCount is zero, this setting might be empty.

          • BitsPerSecond (dict) --

            A statistics object that uses bits per second as the unit. This is included for network level attacks.

            • Max (float) --

              The maximum attack volume observed for the given unit.

          • PacketsPerSecond (dict) --

            A statistics object that uses packets per second as the unit. This is included for network level attacks.

            • Max (float) --

              The maximum attack volume observed for the given unit.

          • RequestsPerSecond (dict) --

            A statistics object that uses requests per second as the unit. This is included for application level attacks, and is only available for accounts that are subscribed to Shield Advanced.

            • Max (float) --

              The maximum attack volume observed for the given unit.

        • AttackCount (integer) --

          The number of attacks detected during the time period. This is always present, but might be zero.

Exceptions

  • Shield.Client.exceptions.InternalErrorException
describe_drt_access()

Returns the current role and list of Amazon S3 log buckets used by the Shield Response Team (SRT) to access your Amazon Web Services account while assisting with attack mitigation.

See also: AWS API Documentation

Request Syntax

response = client.describe_drt_access()
Return type
dict
Returns
Response Syntax
{
    'RoleArn': 'string',
    'LogBucketList': [
        'string',
    ]
}

Response Structure

  • (dict) --
    • RoleArn (string) --

      The Amazon Resource Name (ARN) of the role the SRT used to access your Amazon Web Services account.

    • LogBucketList (list) --

      The list of Amazon S3 buckets accessed by the SRT.

      • (string) --

Exceptions

  • Shield.Client.exceptions.InternalErrorException
  • Shield.Client.exceptions.ResourceNotFoundException
describe_emergency_contact_settings()

A list of email addresses and phone numbers that the Shield Response Team (SRT) can use to contact you if you have proactive engagement enabled, for escalations to the SRT and to initiate proactive customer support.

See also: AWS API Documentation

Request Syntax

response = client.describe_emergency_contact_settings()
Return type
dict
Returns
Response Syntax
{
    'EmergencyContactList': [
        {
            'EmailAddress': 'string',
            'PhoneNumber': 'string',
            'ContactNotes': 'string'
        },
    ]
}

Response Structure

  • (dict) --
    • EmergencyContactList (list) --

      A list of email addresses and phone numbers that the Shield Response Team (SRT) can use to contact you if you have proactive engagement enabled, for escalations to the SRT and to initiate proactive customer support.

      • (dict) --

        Contact information that the SRT can use to contact you if you have proactive engagement enabled, for escalations to the SRT and to initiate proactive customer support.

        • EmailAddress (string) --

          The email address for the contact.

        • PhoneNumber (string) --

          The phone number for the contact.

        • ContactNotes (string) --

          Additional notes regarding the contact.

Exceptions

  • Shield.Client.exceptions.InternalErrorException
  • Shield.Client.exceptions.ResourceNotFoundException
describe_protection(**kwargs)

Lists the details of a Protection object.

See also: AWS API Documentation

Request Syntax

response = client.describe_protection(
    ProtectionId='string',
    ResourceArn='string'
)
Parameters
  • ProtectionId (string) -- The unique identifier (ID) for the Protection object that is described. When submitting the DescribeProtection request you must provide either the ResourceArn or the ProtectionID , but not both.
  • ResourceArn (string) -- The ARN (Amazon Resource Name) of the Amazon Web Services resource for the Protection object that is described. When submitting the DescribeProtection request you must provide either the ResourceArn or the ProtectionID , but not both.
Return type

dict

Returns

Response Syntax

{
    'Protection': {
        'Id': 'string',
        'Name': 'string',
        'ResourceArn': 'string',
        'HealthCheckIds': [
            'string',
        ],
        'ProtectionArn': 'string',
        'ApplicationLayerAutomaticResponseConfiguration': {
            'Status': 'ENABLED'|'DISABLED',
            'Action': {
                'Block': {},
                'Count': {}
            }
        }
    }
}

Response Structure

  • (dict) --

    • Protection (dict) --

      The Protection object that is described.

      • Id (string) --

        The unique identifier (ID) of the protection.

      • Name (string) --

        The name of the protection. For example, My CloudFront distributions .

      • ResourceArn (string) --

        The ARN (Amazon Resource Name) of the Amazon Web Services resource that is protected.

      • HealthCheckIds (list) --

        The unique identifier (ID) for the Route 53 health check that's associated with the protection.

        • (string) --
      • ProtectionArn (string) --

        The ARN (Amazon Resource Name) of the protection.

      • ApplicationLayerAutomaticResponseConfiguration (dict) --

        The automatic application layer DDoS mitigation settings for the protection. This configuration determines whether Shield Advanced automatically manages rules in the web ACL in order to respond to application layer events that Shield Advanced determines to be DDoS attacks.

        • Status (string) --

          Indicates whether automatic application layer DDoS mitigation is enabled for the protection.

        • Action (dict) --

          Specifies the action setting that Shield Advanced should use in the WAF rules that it creates on behalf of the protected resource in response to DDoS attacks. You specify this as part of the configuration for the automatic application layer DDoS mitigation feature, when you enable or update automatic mitigation. Shield Advanced creates the WAF rules in a Shield Advanced-managed rule group, inside the web ACL that you have associated with the resource.

          • Block (dict) --

            Specifies that Shield Advanced should configure its WAF rules with the WAF Block action.

            You must specify exactly one action, either Block or Count .

          • Count (dict) --

            Specifies that Shield Advanced should configure its WAF rules with the WAF Count action.

            You must specify exactly one action, either Block or Count .

Exceptions

  • Shield.Client.exceptions.InternalErrorException
  • Shield.Client.exceptions.InvalidParameterException
  • Shield.Client.exceptions.ResourceNotFoundException
describe_protection_group(**kwargs)

Returns the specification for the specified protection group.

See also: AWS API Documentation

Request Syntax

response = client.describe_protection_group(
    ProtectionGroupId='string'
)
Parameters
ProtectionGroupId (string) --

[REQUIRED]

The name of the protection group. You use this to identify the protection group in lists and to manage the protection group, for example to update, delete, or describe it.

Return type
dict
Returns
Response Syntax
{
    'ProtectionGroup': {
        'ProtectionGroupId': 'string',
        'Aggregation': 'SUM'|'MEAN'|'MAX',
        'Pattern': 'ALL'|'ARBITRARY'|'BY_RESOURCE_TYPE',
        'ResourceType': 'CLOUDFRONT_DISTRIBUTION'|'ROUTE_53_HOSTED_ZONE'|'ELASTIC_IP_ALLOCATION'|'CLASSIC_LOAD_BALANCER'|'APPLICATION_LOAD_BALANCER'|'GLOBAL_ACCELERATOR',
        'Members': [
            'string',
        ],
        'ProtectionGroupArn': 'string'
    }
}

Response Structure

  • (dict) --
    • ProtectionGroup (dict) --

      A grouping of protected resources that you and Shield Advanced can monitor as a collective. This resource grouping improves the accuracy of detection and reduces false positives.

      • ProtectionGroupId (string) --

        The name of the protection group. You use this to identify the protection group in lists and to manage the protection group, for example to update, delete, or describe it.

      • Aggregation (string) --

        Defines how Shield combines resource data for the group in order to detect, mitigate, and report events.

        • Sum - Use the total traffic across the group. This is a good choice for most cases. Examples include Elastic IP addresses for EC2 instances that scale manually or automatically.
        • Mean - Use the average of the traffic across the group. This is a good choice for resources that share traffic uniformly. Examples include accelerators and load balancers.
        • Max - Use the highest traffic from each resource. This is useful for resources that don't share traffic and for resources that share that traffic in a non-uniform way. Examples include Amazon CloudFront distributions and origin resources for CloudFront distributions.
      • Pattern (string) --

        The criteria to use to choose the protected resources for inclusion in the group. You can include all resources that have protections, provide a list of resource Amazon Resource Names (ARNs), or include all resources of a specified resource type.

      • ResourceType (string) --

        The resource type to include in the protection group. All protected resources of this type are included in the protection group. You must set this when you set Pattern to BY_RESOURCE_TYPE and you must not set it for any other Pattern setting.

      • Members (list) --

        The Amazon Resource Names (ARNs) of the resources to include in the protection group. You must set this when you set Pattern to ARBITRARY and you must not set it for any other Pattern setting.

        • (string) --
      • ProtectionGroupArn (string) --

        The ARN (Amazon Resource Name) of the protection group.

Exceptions

  • Shield.Client.exceptions.InternalErrorException
  • Shield.Client.exceptions.ResourceNotFoundException
describe_subscription()

Provides details about the Shield Advanced subscription for an account.

See also: AWS API Documentation

Request Syntax

response = client.describe_subscription()
Return type
dict
Returns
Response Syntax
{
    'Subscription': {
        'StartTime': datetime(2015, 1, 1),
        'EndTime': datetime(2015, 1, 1),
        'TimeCommitmentInSeconds': 123,
        'AutoRenew': 'ENABLED'|'DISABLED',
        'Limits': [
            {
                'Type': 'string',
                'Max': 123
            },
        ],
        'ProactiveEngagementStatus': 'ENABLED'|'DISABLED'|'PENDING',
        'SubscriptionLimits': {
            'ProtectionLimits': {
                'ProtectedResourceTypeLimits': [
                    {
                        'Type': 'string',
                        'Max': 123
                    },
                ]
            },
            'ProtectionGroupLimits': {
                'MaxProtectionGroups': 123,
                'PatternTypeLimits': {
                    'ArbitraryPatternLimits': {
                        'MaxMembers': 123
                    }
                }
            }
        },
        'SubscriptionArn': 'string'
    }
}

Response Structure

  • (dict) --
    • Subscription (dict) --

      The Shield Advanced subscription details for an account.

      • StartTime (datetime) --

        The start time of the subscription, in Unix time in seconds.

      • EndTime (datetime) --

        The date and time your subscription will end.

      • TimeCommitmentInSeconds (integer) --

        The length, in seconds, of the Shield Advanced subscription for the account.

      • AutoRenew (string) --

        If ENABLED , the subscription will be automatically renewed at the end of the existing subscription period.

        When you initally create a subscription, AutoRenew is set to ENABLED . You can change this by submitting an UpdateSubscription request. If the UpdateSubscription request does not included a value for AutoRenew , the existing value for AutoRenew remains unchanged.

      • Limits (list) --

        Specifies how many protections of a given type you can create.

        • (dict) --

          Specifies how many protections of a given type you can create.

          • Type (string) --

            The type of protection.

          • Max (integer) --

            The maximum number of protections that can be created for the specified Type .

      • ProactiveEngagementStatus (string) --

        If ENABLED , the Shield Response Team (SRT) will use email and phone to notify contacts about escalations to the SRT and to initiate proactive customer support.

        If PENDING , you have requested proactive engagement and the request is pending. The status changes to ENABLED when your request is fully processed.

        If DISABLED , the SRT will not proactively notify contacts about escalations or to initiate proactive customer support.

      • SubscriptionLimits (dict) --

        Limits settings for your subscription.

        • ProtectionLimits (dict) --

          Limits settings on protections for your subscription.

          • ProtectedResourceTypeLimits (list) --

            The maximum number of resource types that you can specify in a protection.

            • (dict) --

              Specifies how many protections of a given type you can create.

              • Type (string) --

                The type of protection.

              • Max (integer) --

                The maximum number of protections that can be created for the specified Type .

        • ProtectionGroupLimits (dict) --

          Limits settings on protection groups for your subscription.

          • MaxProtectionGroups (integer) --

            The maximum number of protection groups that you can have at one time.

          • PatternTypeLimits (dict) --

            Limits settings by pattern type in the protection groups for your subscription.

            • ArbitraryPatternLimits (dict) --

              Limits settings on protection groups with arbitrary pattern type.

              • MaxMembers (integer) --

                The maximum number of resources you can specify for a single arbitrary pattern in a protection group.

      • SubscriptionArn (string) --

        The ARN (Amazon Resource Name) of the subscription.

Exceptions

  • Shield.Client.exceptions.InternalErrorException
  • Shield.Client.exceptions.ResourceNotFoundException
disable_application_layer_automatic_response(**kwargs)

Disable the Shield Advanced automatic application layer DDoS mitigation feature for the resource. This stops Shield Advanced from creating, verifying, and applying WAF rules for attacks that it detects for the resource.

See also: AWS API Documentation

Request Syntax

response = client.disable_application_layer_automatic_response(
    ResourceArn='string'
)
Parameters
ResourceArn (string) --

[REQUIRED]

The ARN (Amazon Resource Name) of the resource.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • Shield.Client.exceptions.InternalErrorException
  • Shield.Client.exceptions.InvalidParameterException
  • Shield.Client.exceptions.ResourceNotFoundException
  • Shield.Client.exceptions.OptimisticLockException
  • Shield.Client.exceptions.InvalidOperationException
disable_proactive_engagement()

Removes authorization from the Shield Response Team (SRT) to notify contacts about escalations to the SRT and to initiate proactive customer support.

See also: AWS API Documentation

Request Syntax

response = client.disable_proactive_engagement()
Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • Shield.Client.exceptions.InternalErrorException
  • Shield.Client.exceptions.InvalidOperationException
  • Shield.Client.exceptions.InvalidParameterException
  • Shield.Client.exceptions.ResourceNotFoundException
  • Shield.Client.exceptions.OptimisticLockException
disassociate_drt_log_bucket(**kwargs)

Removes the Shield Response Team's (SRT) access to the specified Amazon S3 bucket containing the logs that you shared previously.

See also: AWS API Documentation

Request Syntax

response = client.disassociate_drt_log_bucket(
    LogBucket='string'
)
Parameters
LogBucket (string) --

[REQUIRED]

The Amazon S3 bucket that contains the logs that you want to share.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • Shield.Client.exceptions.InternalErrorException
  • Shield.Client.exceptions.InvalidOperationException
  • Shield.Client.exceptions.NoAssociatedRoleException
  • Shield.Client.exceptions.AccessDeniedForDependencyException
  • Shield.Client.exceptions.OptimisticLockException
  • Shield.Client.exceptions.ResourceNotFoundException
disassociate_drt_role()

Removes the Shield Response Team's (SRT) access to your Amazon Web Services account.

See also: AWS API Documentation

Request Syntax

response = client.disassociate_drt_role()
Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • Shield.Client.exceptions.InternalErrorException
  • Shield.Client.exceptions.InvalidOperationException
  • Shield.Client.exceptions.OptimisticLockException
  • Shield.Client.exceptions.ResourceNotFoundException
disassociate_health_check(**kwargs)

Removes health-based detection from the Shield Advanced protection for a resource. Shield Advanced health-based detection uses the health of your Amazon Web Services resource to improve responsiveness and accuracy in attack detection and response.

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 WAF Developer Guide .

See also: AWS API Documentation

Request Syntax

response = client.disassociate_health_check(
    ProtectionId='string',
    HealthCheckArn='string'
)
Parameters
  • ProtectionId (string) --

    [REQUIRED]

    The unique identifier (ID) for the Protection object to remove the health check association from.

  • HealthCheckArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the health check that is associated with the protection.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • Shield.Client.exceptions.InternalErrorException
  • Shield.Client.exceptions.InvalidParameterException
  • Shield.Client.exceptions.ResourceNotFoundException
  • Shield.Client.exceptions.OptimisticLockException
  • Shield.Client.exceptions.InvalidResourceException
enable_application_layer_automatic_response(**kwargs)

Enable the Shield Advanced automatic application layer DDoS mitigation for the resource.

Note

This feature is available for Amazon CloudFront distributions only.

This causes Shield Advanced to create, verify, and apply WAF rules for DDoS attacks that it detects for the resource. Shield Advanced applies the rules in a Shield rule group inside the web ACL that you've associated with the resource. For information about how automatic mitigation works and the requirements for using it, see Shield Advanced automatic application layer DDoS mitigation .

Don't use this action to make changes to automatic mitigation settings when it's already enabled for a resource. Instead, use UpdateApplicationLayerAutomaticResponse .

To use this feature, you must associate a web ACL with the protected resource. The web ACL must be created using the latest version of WAF (v2). You can associate the web ACL through the Shield Advanced console at https://console.aws.amazon.com/wafv2/shieldv2#/ . For more information, see Getting Started with Shield Advanced .

You can also do this through the WAF console or the WAF API, but you must manage Shield Advanced automatic mitigation through Shield Advanced. For information about WAF, see WAF Developer Guide .

See also: AWS API Documentation

Request Syntax

response = client.enable_application_layer_automatic_response(
    ResourceArn='string',
    Action={
        'Block': {}
        ,
        'Count': {}

    }
)
Parameters
  • ResourceArn (string) --

    [REQUIRED]

    The ARN (Amazon Resource Name) of the resource.

  • Action (dict) --

    [REQUIRED]

    Specifies the action setting that Shield Advanced should use in the WAF rules that it creates on behalf of the protected resource in response to DDoS attacks. You specify this as part of the configuration for the automatic application layer DDoS mitigation feature, when you enable or update automatic mitigation. Shield Advanced creates the WAF rules in a Shield Advanced-managed rule group, inside the web ACL that you have associated with the resource.

    • Block (dict) --

      Specifies that Shield Advanced should configure its WAF rules with the WAF Block action.

      You must specify exactly one action, either Block or Count .

    • Count (dict) --

      Specifies that Shield Advanced should configure its WAF rules with the WAF Count action.

      You must specify exactly one action, either Block or Count .

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • Shield.Client.exceptions.LimitsExceededException
  • Shield.Client.exceptions.InternalErrorException
  • Shield.Client.exceptions.ResourceNotFoundException
  • Shield.Client.exceptions.InvalidParameterException
  • Shield.Client.exceptions.OptimisticLockException
  • Shield.Client.exceptions.InvalidOperationException
enable_proactive_engagement()

Authorizes the Shield Response Team (SRT) to use email and phone to notify contacts about escalations to the SRT and to initiate proactive customer support.

See also: AWS API Documentation

Request Syntax

response = client.enable_proactive_engagement()
Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • Shield.Client.exceptions.InternalErrorException
  • Shield.Client.exceptions.InvalidOperationException
  • Shield.Client.exceptions.InvalidParameterException
  • Shield.Client.exceptions.ResourceNotFoundException
  • Shield.Client.exceptions.OptimisticLockException
get_paginator(operation_name)

Create a paginator for an operation.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Raises OperationNotPageableError
Raised if the operation is not pageable. You can use the client.can_paginate method to check if an operation is pageable.
Return type
L{botocore.paginate.Paginator}
Returns
A paginator object.
get_subscription_state()

Returns the SubscriptionState , either Active or Inactive .

See also: AWS API Documentation

Request Syntax

response = client.get_subscription_state()
Return type
dict
Returns
Response Syntax
{
    'SubscriptionState': 'ACTIVE'|'INACTIVE'
}

Response Structure

  • (dict) --
    • SubscriptionState (string) --

      The status of the subscription.

Exceptions

  • Shield.Client.exceptions.InternalErrorException
get_waiter(waiter_name)

Returns an object that can wait for some condition.

Parameters
waiter_name (str) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters.
Returns
The specified waiter object.
Return type
botocore.waiter.Waiter
list_attacks(**kwargs)

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

See also: AWS API Documentation

Request Syntax

response = client.list_attacks(
    ResourceArns=[
        'string',
    ],
    StartTime={
        'FromInclusive': datetime(2015, 1, 1),
        'ToExclusive': datetime(2015, 1, 1)
    },
    EndTime={
        'FromInclusive': datetime(2015, 1, 1),
        'ToExclusive': datetime(2015, 1, 1)
    },
    NextToken='string',
    MaxResults=123
)
Parameters
  • ResourceArns (list) --

    The ARNs (Amazon Resource Names) of the resources that were attacked. If you leave this blank, all applicable resources for this account will be included.

    • (string) --
  • StartTime (dict) --

    The start of the time period for the attacks. This is a timestamp type. The request syntax listing for this call indicates a number type, but you can provide the time in any valid timestamp format setting.

    • FromInclusive (datetime) --

      The start time, in Unix time in seconds.

    • ToExclusive (datetime) --

      The end time, in Unix time in seconds.

  • EndTime (dict) --

    The end of the time period for the attacks. This is a timestamp type. The request syntax listing for this call indicates a number type, but you can provide the time in any valid timestamp format setting.

    • FromInclusive (datetime) --

      The start time, in Unix time in seconds.

    • ToExclusive (datetime) --

      The end time, in Unix time in seconds.

  • NextToken (string) --

    When you request a list of objects from Shield Advanced, if the response does not include all of the remaining available objects, Shield Advanced includes a NextToken value in the response. You can retrieve the next batch of objects by requesting the list again and providing the token that was returned by the prior call in your request.

    You can indicate the maximum number of objects that you want Shield Advanced to return for a single call with the MaxResults setting. Shield Advanced will not return more than MaxResults objects, but may return fewer, even if more objects are still available.

    Whenever more objects remain that Shield Advanced has not yet returned to you, the response will include a NextToken value.

    On your first call to a list operation, leave this setting empty.

  • MaxResults (integer) --

    The greatest number of objects that you want Shield Advanced to return to the list request. Shield Advanced might return fewer objects than you indicate in this setting, even if more objects are available. If there are more objects remaining, Shield Advanced will always also return a NextToken value in the response.

    The default setting is 20.

Return type

dict

Returns

Response Syntax

{
    'AttackSummaries': [
        {
            'AttackId': 'string',
            'ResourceArn': 'string',
            'StartTime': datetime(2015, 1, 1),
            'EndTime': datetime(2015, 1, 1),
            'AttackVectors': [
                {
                    'VectorType': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • AttackSummaries (list) --

      The attack information for the specified time range.

      • (dict) --

        Summarizes all DDoS attacks for a specified time period.

        • AttackId (string) --

          The unique identifier (ID) of the attack.

        • ResourceArn (string) --

          The ARN (Amazon Resource Name) of the resource that was attacked.

        • StartTime (datetime) --

          The start time of the attack, in Unix time in seconds.

        • EndTime (datetime) --

          The end time of the attack, in Unix time in seconds.

        • AttackVectors (list) --

          The list of attacks for a specified time period.

          • (dict) --

            Describes the attack.

            • VectorType (string) --

              The attack type. Valid values:

              • UDP_TRAFFIC
              • UDP_FRAGMENT
              • GENERIC_UDP_REFLECTION
              • DNS_REFLECTION
              • NTP_REFLECTION
              • CHARGEN_REFLECTION
              • SSDP_REFLECTION
              • PORT_MAPPER
              • RIP_REFLECTION
              • SNMP_REFLECTION
              • MSSQL_REFLECTION
              • NET_BIOS_REFLECTION
              • SYN_FLOOD
              • ACK_FLOOD
              • REQUEST_FLOOD
              • HTTP_REFLECTION
              • UDS_REFLECTION
              • MEMCACHED_REFLECTION
    • NextToken (string) --

      When you request a list of objects from Shield Advanced, if the response does not include all of the remaining available objects, Shield Advanced includes a NextToken value in the response. You can retrieve the next batch of objects by requesting the list again and providing the token that was returned by the prior call in your request.

      You can indicate the maximum number of objects that you want Shield Advanced to return for a single call with the MaxResults setting. Shield Advanced will not return more than MaxResults objects, but may return fewer, even if more objects are still available.

      Whenever more objects remain that Shield Advanced has not yet returned to you, the response will include a NextToken value.

Exceptions

  • Shield.Client.exceptions.InternalErrorException
  • Shield.Client.exceptions.InvalidParameterException
  • Shield.Client.exceptions.InvalidOperationException
list_protection_groups(**kwargs)

Retrieves the ProtectionGroup objects for the account.

See also: AWS API Documentation

Request Syntax

response = client.list_protection_groups(
    NextToken='string',
    MaxResults=123
)
Parameters
  • NextToken (string) --

    When you request a list of objects from Shield Advanced, if the response does not include all of the remaining available objects, Shield Advanced includes a NextToken value in the response. You can retrieve the next batch of objects by requesting the list again and providing the token that was returned by the prior call in your request.

    You can indicate the maximum number of objects that you want Shield Advanced to return for a single call with the MaxResults setting. Shield Advanced will not return more than MaxResults objects, but may return fewer, even if more objects are still available.

    Whenever more objects remain that Shield Advanced has not yet returned to you, the response will include a NextToken value.

    On your first call to a list operation, leave this setting empty.

  • MaxResults (integer) --

    The greatest number of objects that you want Shield Advanced to return to the list request. Shield Advanced might return fewer objects than you indicate in this setting, even if more objects are available. If there are more objects remaining, Shield Advanced will always also return a NextToken value in the response.

    The default setting is 20.

Return type

dict

Returns

Response Syntax

{
    'ProtectionGroups': [
        {
            'ProtectionGroupId': 'string',
            'Aggregation': 'SUM'|'MEAN'|'MAX',
            'Pattern': 'ALL'|'ARBITRARY'|'BY_RESOURCE_TYPE',
            'ResourceType': 'CLOUDFRONT_DISTRIBUTION'|'ROUTE_53_HOSTED_ZONE'|'ELASTIC_IP_ALLOCATION'|'CLASSIC_LOAD_BALANCER'|'APPLICATION_LOAD_BALANCER'|'GLOBAL_ACCELERATOR',
            'Members': [
                'string',
            ],
            'ProtectionGroupArn': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ProtectionGroups (list) --

      • (dict) --

        A grouping of protected resources that you and Shield Advanced can monitor as a collective. This resource grouping improves the accuracy of detection and reduces false positives.

        • ProtectionGroupId (string) --

          The name of the protection group. You use this to identify the protection group in lists and to manage the protection group, for example to update, delete, or describe it.

        • Aggregation (string) --

          Defines how Shield combines resource data for the group in order to detect, mitigate, and report events.

          • Sum - Use the total traffic across the group. This is a good choice for most cases. Examples include Elastic IP addresses for EC2 instances that scale manually or automatically.
          • Mean - Use the average of the traffic across the group. This is a good choice for resources that share traffic uniformly. Examples include accelerators and load balancers.
          • Max - Use the highest traffic from each resource. This is useful for resources that don't share traffic and for resources that share that traffic in a non-uniform way. Examples include Amazon CloudFront distributions and origin resources for CloudFront distributions.
        • Pattern (string) --

          The criteria to use to choose the protected resources for inclusion in the group. You can include all resources that have protections, provide a list of resource Amazon Resource Names (ARNs), or include all resources of a specified resource type.

        • ResourceType (string) --

          The resource type to include in the protection group. All protected resources of this type are included in the protection group. You must set this when you set Pattern to BY_RESOURCE_TYPE and you must not set it for any other Pattern setting.

        • Members (list) --

          The Amazon Resource Names (ARNs) of the resources to include in the protection group. You must set this when you set Pattern to ARBITRARY and you must not set it for any other Pattern setting.

          • (string) --
        • ProtectionGroupArn (string) --

          The ARN (Amazon Resource Name) of the protection group.

    • NextToken (string) --

      When you request a list of objects from Shield Advanced, if the response does not include all of the remaining available objects, Shield Advanced includes a NextToken value in the response. You can retrieve the next batch of objects by requesting the list again and providing the token that was returned by the prior call in your request.

      You can indicate the maximum number of objects that you want Shield Advanced to return for a single call with the MaxResults setting. Shield Advanced will not return more than MaxResults objects, but may return fewer, even if more objects are still available.

      Whenever more objects remain that Shield Advanced has not yet returned to you, the response will include a NextToken value.

Exceptions

  • Shield.Client.exceptions.InternalErrorException
  • Shield.Client.exceptions.ResourceNotFoundException
  • Shield.Client.exceptions.InvalidPaginationTokenException
list_protections(**kwargs)

Lists all Protection objects for the account.

See also: AWS API Documentation

Request Syntax

response = client.list_protections(
    NextToken='string',
    MaxResults=123
)
Parameters
  • NextToken (string) --

    When you request a list of objects from Shield Advanced, if the response does not include all of the remaining available objects, Shield Advanced includes a NextToken value in the response. You can retrieve the next batch of objects by requesting the list again and providing the token that was returned by the prior call in your request.

    You can indicate the maximum number of objects that you want Shield Advanced to return for a single call with the MaxResults setting. Shield Advanced will not return more than MaxResults objects, but may return fewer, even if more objects are still available.

    Whenever more objects remain that Shield Advanced has not yet returned to you, the response will include a NextToken value.

    On your first call to a list operation, leave this setting empty.

  • MaxResults (integer) --

    The greatest number of objects that you want Shield Advanced to return to the list request. Shield Advanced might return fewer objects than you indicate in this setting, even if more objects are available. If there are more objects remaining, Shield Advanced will always also return a NextToken value in the response.

    The default setting is 20.

Return type

dict

Returns

Response Syntax

{
    'Protections': [
        {
            'Id': 'string',
            'Name': 'string',
            'ResourceArn': 'string',
            'HealthCheckIds': [
                'string',
            ],
            'ProtectionArn': 'string',
            'ApplicationLayerAutomaticResponseConfiguration': {
                'Status': 'ENABLED'|'DISABLED',
                'Action': {
                    'Block': {},
                    'Count': {}
                }
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Protections (list) --

      The array of enabled Protection objects.

      • (dict) --

        An object that represents a resource that is under DDoS protection.

        • Id (string) --

          The unique identifier (ID) of the protection.

        • Name (string) --

          The name of the protection. For example, My CloudFront distributions .

        • ResourceArn (string) --

          The ARN (Amazon Resource Name) of the Amazon Web Services resource that is protected.

        • HealthCheckIds (list) --

          The unique identifier (ID) for the Route 53 health check that's associated with the protection.

          • (string) --
        • ProtectionArn (string) --

          The ARN (Amazon Resource Name) of the protection.

        • ApplicationLayerAutomaticResponseConfiguration (dict) --

          The automatic application layer DDoS mitigation settings for the protection. This configuration determines whether Shield Advanced automatically manages rules in the web ACL in order to respond to application layer events that Shield Advanced determines to be DDoS attacks.

          • Status (string) --

            Indicates whether automatic application layer DDoS mitigation is enabled for the protection.

          • Action (dict) --

            Specifies the action setting that Shield Advanced should use in the WAF rules that it creates on behalf of the protected resource in response to DDoS attacks. You specify this as part of the configuration for the automatic application layer DDoS mitigation feature, when you enable or update automatic mitigation. Shield Advanced creates the WAF rules in a Shield Advanced-managed rule group, inside the web ACL that you have associated with the resource.

            • Block (dict) --

              Specifies that Shield Advanced should configure its WAF rules with the WAF Block action.

              You must specify exactly one action, either Block or Count .

            • Count (dict) --

              Specifies that Shield Advanced should configure its WAF rules with the WAF Count action.

              You must specify exactly one action, either Block or Count .

    • NextToken (string) --

      When you request a list of objects from Shield Advanced, if the response does not include all of the remaining available objects, Shield Advanced includes a NextToken value in the response. You can retrieve the next batch of objects by requesting the list again and providing the token that was returned by the prior call in your request.

      You can indicate the maximum number of objects that you want Shield Advanced to return for a single call with the MaxResults setting. Shield Advanced will not return more than MaxResults objects, but may return fewer, even if more objects are still available.

      Whenever more objects remain that Shield Advanced has not yet returned to you, the response will include a NextToken value.

Exceptions

  • Shield.Client.exceptions.InternalErrorException
  • Shield.Client.exceptions.ResourceNotFoundException
  • Shield.Client.exceptions.InvalidPaginationTokenException
list_resources_in_protection_group(**kwargs)

Retrieves the resources that are included in the protection group.

See also: AWS API Documentation

Request Syntax

response = client.list_resources_in_protection_group(
    ProtectionGroupId='string',
    NextToken='string',
    MaxResults=123
)
Parameters
  • ProtectionGroupId (string) --

    [REQUIRED]

    The name of the protection group. You use this to identify the protection group in lists and to manage the protection group, for example to update, delete, or describe it.

  • NextToken (string) --

    When you request a list of objects from Shield Advanced, if the response does not include all of the remaining available objects, Shield Advanced includes a NextToken value in the response. You can retrieve the next batch of objects by requesting the list again and providing the token that was returned by the prior call in your request.

    You can indicate the maximum number of objects that you want Shield Advanced to return for a single call with the MaxResults setting. Shield Advanced will not return more than MaxResults objects, but may return fewer, even if more objects are still available.

    Whenever more objects remain that Shield Advanced has not yet returned to you, the response will include a NextToken value.

    On your first call to a list operation, leave this setting empty.

  • MaxResults (integer) --

    The greatest number of objects that you want Shield Advanced to return to the list request. Shield Advanced might return fewer objects than you indicate in this setting, even if more objects are available. If there are more objects remaining, Shield Advanced will always also return a NextToken value in the response.

    The default setting is 20.

Return type

dict

Returns

Response Syntax

{
    'ResourceArns': [
        'string',
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ResourceArns (list) --

      The Amazon Resource Names (ARNs) of the resources that are included in the protection group.

      • (string) --
    • NextToken (string) --

      When you request a list of objects from Shield Advanced, if the response does not include all of the remaining available objects, Shield Advanced includes a NextToken value in the response. You can retrieve the next batch of objects by requesting the list again and providing the token that was returned by the prior call in your request.

      You can indicate the maximum number of objects that you want Shield Advanced to return for a single call with the MaxResults setting. Shield Advanced will not return more than MaxResults objects, but may return fewer, even if more objects are still available.

      Whenever more objects remain that Shield Advanced has not yet returned to you, the response will include a NextToken value.

Exceptions

  • Shield.Client.exceptions.InternalErrorException
  • Shield.Client.exceptions.ResourceNotFoundException
  • Shield.Client.exceptions.InvalidPaginationTokenException
list_tags_for_resource(**kwargs)

Gets information about Amazon Web Services tags for a specified Amazon Resource Name (ARN) in Shield.

See also: AWS API Documentation

Request Syntax

response = client.list_tags_for_resource(
    ResourceARN='string'
)
Parameters
ResourceARN (string) --

[REQUIRED]

The Amazon Resource Name (ARN) of the resource to get tags for.

Return type
dict
Returns
Response Syntax
{
    'Tags': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
}

Response Structure

  • (dict) --
    • Tags (list) --

      A list of tag key and value pairs associated with the specified resource.

      • (dict) --

        A tag associated with an Amazon Web Services resource. Tags are key:value pairs that you can use to categorize and manage your resources, for purposes like billing or other management. Typically, the tag key represents a category, such as "environment", and the tag value represents a specific value within that category, such as "test," "development," or "production". Or you might set the tag key to "customer" and the value to the customer name or ID. You can specify one or more tags to add to each Amazon Web Services resource, up to 50 tags for a resource.

        • Key (string) --

          Part of the key:value pair that defines a tag. You can use a tag key to describe a category of information, such as "customer." Tag keys are case-sensitive.

        • Value (string) --

          Part of the key:value pair that defines a tag. You can use a tag value to describe a specific value within a category, such as "companyA" or "companyB." Tag values are case-sensitive.

Exceptions

  • Shield.Client.exceptions.InternalErrorException
  • Shield.Client.exceptions.InvalidResourceException
  • Shield.Client.exceptions.ResourceNotFoundException
tag_resource(**kwargs)

Adds or updates tags for a resource in Shield.

See also: AWS API Documentation

Request Syntax

response = client.tag_resource(
    ResourceARN='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • ResourceARN (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the resource that you want to add or update tags for.

  • Tags (list) --

    [REQUIRED]

    The tags that you want to modify or add to the resource.

    • (dict) --

      A tag associated with an Amazon Web Services resource. Tags are key:value pairs that you can use to categorize and manage your resources, for purposes like billing or other management. Typically, the tag key represents a category, such as "environment", and the tag value represents a specific value within that category, such as "test," "development," or "production". Or you might set the tag key to "customer" and the value to the customer name or ID. You can specify one or more tags to add to each Amazon Web Services resource, up to 50 tags for a resource.

      • Key (string) --

        Part of the key:value pair that defines a tag. You can use a tag key to describe a category of information, such as "customer." Tag keys are case-sensitive.

      • Value (string) --

        Part of the key:value pair that defines a tag. You can use a tag value to describe a specific value within a category, such as "companyA" or "companyB." Tag values are case-sensitive.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • Shield.Client.exceptions.InternalErrorException
  • Shield.Client.exceptions.InvalidResourceException
  • Shield.Client.exceptions.InvalidParameterException
  • Shield.Client.exceptions.ResourceNotFoundException
untag_resource(**kwargs)

Removes tags from a resource in Shield.

See also: AWS API Documentation

Request Syntax

response = client.untag_resource(
    ResourceARN='string',
    TagKeys=[
        'string',
    ]
)
Parameters
  • ResourceARN (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the resource that you want to remove tags from.

  • TagKeys (list) --

    [REQUIRED]

    The tag key for each tag that you want to remove from the resource.

    • (string) --
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • Shield.Client.exceptions.InternalErrorException
  • Shield.Client.exceptions.InvalidResourceException
  • Shield.Client.exceptions.InvalidParameterException
  • Shield.Client.exceptions.ResourceNotFoundException
update_application_layer_automatic_response(**kwargs)

Updates an existing Shield Advanced automatic application layer DDoS mitigation configuration for the specified resource.

See also: AWS API Documentation

Request Syntax

response = client.update_application_layer_automatic_response(
    ResourceArn='string',
    Action={
        'Block': {}
        ,
        'Count': {}

    }
)
Parameters
  • ResourceArn (string) --

    [REQUIRED]

    The ARN (Amazon Resource Name) of the resource.

  • Action (dict) --

    [REQUIRED]

    Specifies the action setting that Shield Advanced should use in the WAF rules that it creates on behalf of the protected resource in response to DDoS attacks. You specify this as part of the configuration for the automatic application layer DDoS mitigation feature, when you enable or update automatic mitigation. Shield Advanced creates the WAF rules in a Shield Advanced-managed rule group, inside the web ACL that you have associated with the resource.

    • Block (dict) --

      Specifies that Shield Advanced should configure its WAF rules with the WAF Block action.

      You must specify exactly one action, either Block or Count .

    • Count (dict) --

      Specifies that Shield Advanced should configure its WAF rules with the WAF Count action.

      You must specify exactly one action, either Block or Count .

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • Shield.Client.exceptions.InternalErrorException
  • Shield.Client.exceptions.ResourceNotFoundException
  • Shield.Client.exceptions.InvalidParameterException
  • Shield.Client.exceptions.OptimisticLockException
  • Shield.Client.exceptions.InvalidOperationException
update_emergency_contact_settings(**kwargs)

Updates the details of the list of email addresses and phone numbers that the Shield Response Team (SRT) can use to contact you if you have proactive engagement enabled, for escalations to the SRT and to initiate proactive customer support.

See also: AWS API Documentation

Request Syntax

response = client.update_emergency_contact_settings(
    EmergencyContactList=[
        {
            'EmailAddress': 'string',
            'PhoneNumber': 'string',
            'ContactNotes': 'string'
        },
    ]
)
Parameters
EmergencyContactList (list) --

A list of email addresses and phone numbers that the Shield Response Team (SRT) can use to contact you if you have proactive engagement enabled, for escalations to the SRT and to initiate proactive customer support.

If you have proactive engagement enabled, the contact list must include at least one phone number.

  • (dict) --

    Contact information that the SRT can use to contact you if you have proactive engagement enabled, for escalations to the SRT and to initiate proactive customer support.

    • EmailAddress (string) -- [REQUIRED]

      The email address for the contact.

    • PhoneNumber (string) --

      The phone number for the contact.

    • ContactNotes (string) --

      Additional notes regarding the contact.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • Shield.Client.exceptions.InternalErrorException
  • Shield.Client.exceptions.InvalidParameterException
  • Shield.Client.exceptions.OptimisticLockException
  • Shield.Client.exceptions.ResourceNotFoundException
update_protection_group(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.update_protection_group(
    ProtectionGroupId='string',
    Aggregation='SUM'|'MEAN'|'MAX',
    Pattern='ALL'|'ARBITRARY'|'BY_RESOURCE_TYPE',
    ResourceType='CLOUDFRONT_DISTRIBUTION'|'ROUTE_53_HOSTED_ZONE'|'ELASTIC_IP_ALLOCATION'|'CLASSIC_LOAD_BALANCER'|'APPLICATION_LOAD_BALANCER'|'GLOBAL_ACCELERATOR',
    Members=[
        'string',
    ]
)
Parameters
  • ProtectionGroupId (string) --

    [REQUIRED]

    The name of the protection group. You use this to identify the protection group in lists and to manage the protection group, for example to update, delete, or describe it.

  • Aggregation (string) --

    [REQUIRED]

    Defines how Shield combines resource data for the group in order to detect, mitigate, and report events.

    • Sum - Use the total traffic across the group. This is a good choice for most cases. Examples include Elastic IP addresses for EC2 instances that scale manually or automatically.
    • Mean - Use the average of the traffic across the group. This is a good choice for resources that share traffic uniformly. Examples include accelerators and load balancers.
    • Max - Use the highest traffic from each resource. This is useful for resources that don't share traffic and for resources that share that traffic in a non-uniform way. Examples include Amazon CloudFront distributions and origin resources for CloudFront distributions.
  • Pattern (string) --

    [REQUIRED]

    The criteria to use to choose the protected resources for inclusion in the group. You can include all resources that have protections, provide a list of resource Amazon Resource Names (ARNs), or include all resources of a specified resource type.

  • ResourceType (string) -- The resource type to include in the protection group. All protected resources of this type are included in the protection group. You must set this when you set Pattern to BY_RESOURCE_TYPE and you must not set it for any other Pattern setting.
  • Members (list) --

    The Amazon Resource Names (ARNs) of the resources to include in the protection group. You must set this when you set Pattern to ARBITRARY and you must not set it for any other Pattern setting.

    • (string) --
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • Shield.Client.exceptions.InternalErrorException
  • Shield.Client.exceptions.ResourceNotFoundException
  • Shield.Client.exceptions.OptimisticLockException
  • Shield.Client.exceptions.InvalidParameterException
update_subscription(**kwargs)

Updates the details of an existing subscription. Only enter values for parameters you want to change. Empty parameters are not updated.

See also: AWS API Documentation

Request Syntax

response = client.update_subscription(
    AutoRenew='ENABLED'|'DISABLED'
)
Parameters
AutoRenew (string) -- When you initally create a subscription, AutoRenew is set to ENABLED . If ENABLED , the subscription will be automatically renewed at the end of the existing subscription period. You can change this by submitting an UpdateSubscription request. If the UpdateSubscription request does not included a value for AutoRenew , the existing value for AutoRenew remains unchanged.
Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • Shield.Client.exceptions.InternalErrorException
  • Shield.Client.exceptions.LockedSubscriptionException
  • Shield.Client.exceptions.ResourceNotFoundException
  • Shield.Client.exceptions.InvalidParameterException
  • Shield.Client.exceptions.OptimisticLockException

Paginators

The available paginators are:

class Shield.Paginator.ListAttacks
paginator = client.get_paginator('list_attacks')
paginate(**kwargs)

Creates an iterator that will paginate through responses from Shield.Client.list_attacks().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    ResourceArns=[
        'string',
    ],
    StartTime={
        'FromInclusive': datetime(2015, 1, 1),
        'ToExclusive': datetime(2015, 1, 1)
    },
    EndTime={
        'FromInclusive': datetime(2015, 1, 1),
        'ToExclusive': datetime(2015, 1, 1)
    },
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • ResourceArns (list) --

    The ARNs (Amazon Resource Names) of the resources that were attacked. If you leave this blank, all applicable resources for this account will be included.

    • (string) --
  • StartTime (dict) --

    The start of the time period for the attacks. This is a timestamp type. The request syntax listing for this call indicates a number type, but you can provide the time in any valid timestamp format setting.

    • FromInclusive (datetime) --

      The start time, in Unix time in seconds.

    • ToExclusive (datetime) --

      The end time, in Unix time in seconds.

  • EndTime (dict) --

    The end of the time period for the attacks. This is a timestamp type. The request syntax listing for this call indicates a number type, but you can provide the time in any valid timestamp format setting.

    • FromInclusive (datetime) --

      The start time, in Unix time in seconds.

    • ToExclusive (datetime) --

      The end time, in Unix time in seconds.

  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'AttackSummaries': [
        {
            'AttackId': 'string',
            'ResourceArn': 'string',
            'StartTime': datetime(2015, 1, 1),
            'EndTime': datetime(2015, 1, 1),
            'AttackVectors': [
                {
                    'VectorType': 'string'
                },
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • AttackSummaries (list) --

      The attack information for the specified time range.

      • (dict) --

        Summarizes all DDoS attacks for a specified time period.

        • AttackId (string) --

          The unique identifier (ID) of the attack.

        • ResourceArn (string) --

          The ARN (Amazon Resource Name) of the resource that was attacked.

        • StartTime (datetime) --

          The start time of the attack, in Unix time in seconds.

        • EndTime (datetime) --

          The end time of the attack, in Unix time in seconds.

        • AttackVectors (list) --

          The list of attacks for a specified time period.

          • (dict) --

            Describes the attack.

            • VectorType (string) --

              The attack type. Valid values:

              • UDP_TRAFFIC
              • UDP_FRAGMENT
              • GENERIC_UDP_REFLECTION
              • DNS_REFLECTION
              • NTP_REFLECTION
              • CHARGEN_REFLECTION
              • SSDP_REFLECTION
              • PORT_MAPPER
              • RIP_REFLECTION
              • SNMP_REFLECTION
              • MSSQL_REFLECTION
              • NET_BIOS_REFLECTION
              • SYN_FLOOD
              • ACK_FLOOD
              • REQUEST_FLOOD
              • HTTP_REFLECTION
              • UDS_REFLECTION
              • MEMCACHED_REFLECTION

class Shield.Paginator.ListProtections
paginator = client.get_paginator('list_protections')
paginate(**kwargs)

Creates an iterator that will paginate through responses from Shield.Client.list_protections().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
PaginationConfig (dict) --

A dictionary that provides parameters to control pagination.

  • MaxItems (integer) --

    The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

  • PageSize (integer) --

    The size of each page.

  • StartingToken (string) --

    A token to specify where to start paginating. This is the NextToken from a previous response.

Return type
dict
Returns
Response Syntax
{
    'Protections': [
        {
            'Id': 'string',
            'Name': 'string',
            'ResourceArn': 'string',
            'HealthCheckIds': [
                'string',
            ],
            'ProtectionArn': 'string',
            'ApplicationLayerAutomaticResponseConfiguration': {
                'Status': 'ENABLED'|'DISABLED',
                'Action': {
                    'Block': {},
                    'Count': {}
                }
            }
        },
    ],

}

Response Structure

  • (dict) --
    • Protections (list) --

      The array of enabled Protection objects.

      • (dict) --

        An object that represents a resource that is under DDoS protection.

        • Id (string) --

          The unique identifier (ID) of the protection.

        • Name (string) --

          The name of the protection. For example, My CloudFront distributions .

        • ResourceArn (string) --

          The ARN (Amazon Resource Name) of the Amazon Web Services resource that is protected.

        • HealthCheckIds (list) --

          The unique identifier (ID) for the Route 53 health check that's associated with the protection.

          • (string) --
        • ProtectionArn (string) --

          The ARN (Amazon Resource Name) of the protection.

        • ApplicationLayerAutomaticResponseConfiguration (dict) --

          The automatic application layer DDoS mitigation settings for the protection. This configuration determines whether Shield Advanced automatically manages rules in the web ACL in order to respond to application layer events that Shield Advanced determines to be DDoS attacks.

          • Status (string) --

            Indicates whether automatic application layer DDoS mitigation is enabled for the protection.

          • Action (dict) --

            Specifies the action setting that Shield Advanced should use in the WAF rules that it creates on behalf of the protected resource in response to DDoS attacks. You specify this as part of the configuration for the automatic application layer DDoS mitigation feature, when you enable or update automatic mitigation. Shield Advanced creates the WAF rules in a Shield Advanced-managed rule group, inside the web ACL that you have associated with the resource.

            • Block (dict) --

              Specifies that Shield Advanced should configure its WAF rules with the WAF Block action.

              You must specify exactly one action, either Block or Count .

            • Count (dict) --

              Specifies that Shield Advanced should configure its WAF rules with the WAF Count action.

              You must specify exactly one action, either Block or Count .