We announced the upcoming end-of-support for AWS SDK for JavaScript v2.
We recommend that you migrate to AWS SDK for JavaScript v3. For dates, additional details, and information on how to migrate, please refer to the linked announcement.

Class: AWS.Shield

Inherits:
AWS.Service show all
Identifier:
shield
API Version:
2016-06-02
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

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.

Sending a Request Using Shield

var shield = new AWS.Shield();
shield.associateDRTLogBucket(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the Shield object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var shield = new AWS.Shield({apiVersion: '2016-06-02'});

You can also set the API version globally in AWS.config.apiVersions using the shield service identifier:

AWS.config.apiVersions = {
  shield: '2016-06-02',
  // other service API versions
};

var shield = new AWS.Shield();

Version:

  • 2016-06-02

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

new AWS.Shield(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a Shield object

var shield = new AWS.Shield({apiVersion: '2016-06-02'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String|AWS.Endpoint)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com' or an Endpoint object.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.Shield.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.Shield.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.Shield.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • s3UsEast1RegionalEndpoint ('legacy'|'regional')

    when region is set to 'us-east-1', whether to send s3 request to global endpoints or 'us-east-1' regional endpoints. This config is only applicable to S3 client. Defaults to legacy

  • s3UseArnRegion (Boolean)

    whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets Defaults to true

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and error and returns the amount of time to delay in milliseconds. If the result is a non-zero negative value, no further retry attempts will be made. The base option will be ignored if this option is supplied. The function is only called for retryable errors.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean|undefined)

    whether to call operations with endpoints given by service dynamically. Setting this

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

  • stsRegionalEndpoints ('legacy'|'regional')

    whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.

  • useFipsEndpoint (Boolean)

    Enables FIPS compatible endpoints. Defaults to false.

  • useDualstackEndpoint (Boolean)

    Enables IPv6 dualstack endpoint. Defaults to false.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

associateDRTLogBucket(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the associateDRTLogBucket operation

var params = {
  LogBucket: 'STRING_VALUE' /* required */
};
shield.associateDRTLogBucket(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • LogBucket — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

associateDRTRole(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the associateDRTRole operation

var params = {
  RoleArn: 'STRING_VALUE' /* required */
};
shield.associateDRTRole(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • RoleArn — (String)

      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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

associateHealthCheck(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the associateHealthCheck operation

var params = {
  HealthCheckArn: 'STRING_VALUE', /* required */
  ProtectionId: 'STRING_VALUE' /* required */
};
shield.associateHealthCheck(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ProtectionId — (String)

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

    • HealthCheckArn — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

associateProactiveEngagementDetails(params = {}, callback) ⇒ AWS.Request

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.

Examples:

Calling the associateProactiveEngagementDetails operation

var params = {
  EmergencyContactList: [ /* required */
    {
      EmailAddress: 'STRING_VALUE', /* required */
      ContactNotes: 'STRING_VALUE',
      PhoneNumber: 'STRING_VALUE'
    },
    /* more items */
  ]
};
shield.associateProactiveEngagementDetails(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • EmergencyContactList — (Array<map>)

      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.
      • EmailAddressrequired — (String)

        The email address for the contact.

      • PhoneNumber — (String)

        The phone number for the contact.

      • ContactNotes — (String)

        Additional notes regarding the contact.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createProtection(params = {}, callback) ⇒ AWS.Request

Enables Shield Advanced for a specific Amazon Web Services resource. The resource can be an Amazon CloudFront distribution, Amazon RouteĀ 53 hosted zone, Global Accelerator standard accelerator, Elastic IP Address, Application Load Balancer, or a Classic Load Balancer. You can protect Amazon EC2 instances and Network Load Balancers by association with protected Amazon EC2 Elastic IP addresses.

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.

Service Reference:

Examples:

Calling the createProtection operation

var params = {
  Name: 'STRING_VALUE', /* required */
  ResourceArn: 'STRING_VALUE', /* required */
  Tags: [
    {
      Key: 'STRING_VALUE',
      Value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
shield.createProtection(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      Friendly name for the Protection you are creating.

    • ResourceArn — (String)

      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 standard 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 — (Array<map>)

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

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ProtectionId — (String)

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

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createProtectionGroup(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the createProtectionGroup operation

var params = {
  Aggregation: SUM | MEAN | MAX, /* required */
  Pattern: ALL | ARBITRARY | BY_RESOURCE_TYPE, /* required */
  ProtectionGroupId: 'STRING_VALUE', /* required */
  Members: [
    'STRING_VALUE',
    /* more items */
  ],
  ResourceType: CLOUDFRONT_DISTRIBUTION | ROUTE_53_HOSTED_ZONE | ELASTIC_IP_ALLOCATION | CLASSIC_LOAD_BALANCER | APPLICATION_LOAD_BALANCER | GLOBAL_ACCELERATOR,
  Tags: [
    {
      Key: 'STRING_VALUE',
      Value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
shield.createProtectionGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • 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 and origin resources for CloudFront distributions.

      Possible values include:
      • "SUM"
      • "MEAN"
      • "MAX"
    • 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.

      Possible values include:
      • "ALL"
      • "ARBITRARY"
      • "BY_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.

      Possible values include:
      • "CLOUDFRONT_DISTRIBUTION"
      • "ROUTE_53_HOSTED_ZONE"
      • "ELASTIC_IP_ALLOCATION"
      • "CLASSIC_LOAD_BALANCER"
      • "APPLICATION_LOAD_BALANCER"
      • "GLOBAL_ACCELERATOR"
    • Members — (Array<String>)

      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.

    • Tags — (Array<map>)

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

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createSubscription(params = {}, callback) ⇒ AWS.Request

Activates Shield Advanced for an account.

Note: For accounts that are members of an Organizations organization, Shield Advanced subscriptions are billed against the organization's payer account, regardless of whether the payer account itself is subscribed.

When you initially 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.

Service Reference:

Examples:

Calling the createSubscription operation

var params = {
};
shield.createSubscription(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteProtection(params = {}, callback) ⇒ AWS.Request

Deletes an Shield Advanced Protection.

Service Reference:

Examples:

Calling the deleteProtection operation

var params = {
  ProtectionId: 'STRING_VALUE' /* required */
};
shield.deleteProtection(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ProtectionId — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteProtectionGroup(params = {}, callback) ⇒ AWS.Request

Removes the specified protection group.

Service Reference:

Examples:

Calling the deleteProtectionGroup operation

var params = {
  ProtectionGroupId: 'STRING_VALUE' /* required */
};
shield.deleteProtectionGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • 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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteSubscription(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the deleteSubscription operation

var params = {
};
shield.deleteSubscription(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeAttack(params = {}, callback) ⇒ AWS.Request

Describes the details of a DDoS attack.

Service Reference:

Examples:

Calling the describeAttack operation

var params = {
  AttackId: 'STRING_VALUE' /* required */
};
shield.describeAttack(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AttackId — (String)

      The unique identifier (ID) for the attack.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Attack — (map)

        The attack that you requested.

        • AttackId — (String)

          The unique identifier (ID) of the attack.

        • ResourceArn — (String)

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

        • SubResources — (Array<map>)

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

          • Type — (String)

            The SubResource type.

            Possible values include:
            • "IP"
            • "URL"
          • Id — (String)

            The unique identifier (ID) of the SubResource.

          • AttackVectors — (Array<map>)

            The list of attack types and associated counters.

            • VectorTyperequired — (String)

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

            • VectorCounters — (Array<map>)

              The list of counters that describe the details of the 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 — (Array<map>)

            The counters that describe the details of the 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 — (Date)

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

        • EndTime — (Date)

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

        • AttackCounters — (Array<map>)

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

          • 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 — (Array<map>)

          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.

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

            Possible values include:
            • "NETWORK"
            • "APPLICATION"
          • 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.

            Possible values include:
            • "DESTINATION_URL"
            • "REFERRER"
            • "SOURCE_ASN"
            • "SOURCE_COUNTRY"
            • "SOURCE_IP_ADDRESS"
            • "SOURCE_USER_AGENT"
            • "WORDPRESS_PINGBACK_REFLECTOR"
            • "WORDPRESS_PINGBACK_SOURCE"
          • TopContributors — (Array<map>)

            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.

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

            Possible values include:
            • "BITS"
            • "BYTES"
            • "PACKETS"
            • "REQUESTS"
          • Total — (Integer)

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

        • Mitigations — (Array<map>)

          List of mitigation actions taken for the attack.

          • MitigationName — (String)

            The name of the mitigation taken for this attack.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeAttackStatistics(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the describeAttackStatistics operation

var params = {
};
shield.describeAttackStatistics(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • TimeRange — (map)

        The time range of the attack.

        • FromInclusive — (Date)

          The start time, in Unix time in seconds.

        • ToExclusive — (Date)

          The end time, in Unix time in seconds.

      • DataItems — (Array<map>)

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

        • AttackVolume — (map)

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

          • BitsPerSecond — (map)

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

            • Maxrequired — (Float)

              The maximum attack volume observed for the given unit.

          • PacketsPerSecond — (map)

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

            • Maxrequired — (Float)

              The maximum attack volume observed for the given unit.

          • RequestsPerSecond — (map)

            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.

            • Maxrequired — (Float)

              The maximum attack volume observed for the given unit.

        • AttackCountrequired — (Integer)

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

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeDRTAccess(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the describeDRTAccess operation

var params = {
};
shield.describeDRTAccess(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • RoleArn — (String)

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

      • LogBucketList — (Array<String>)

        The list of Amazon S3 buckets accessed by the SRT.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeEmergencyContactSettings(params = {}, callback) ⇒ AWS.Request

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.

Examples:

Calling the describeEmergencyContactSettings operation

var params = {
};
shield.describeEmergencyContactSettings(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • EmergencyContactList — (Array<map>)

        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.

        • EmailAddressrequired — (String)

          The email address for the contact.

        • PhoneNumber — (String)

          The phone number for the contact.

        • ContactNotes — (String)

          Additional notes regarding the contact.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeProtection(params = {}, callback) ⇒ AWS.Request

Lists the details of a Protection object.

Service Reference:

Examples:

Calling the describeProtection operation

var params = {
  ProtectionId: 'STRING_VALUE',
  ResourceArn: 'STRING_VALUE'
};
shield.describeProtection(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ProtectionId — (String)

      The unique identifier (ID) for the Protection object to describe. You must provide either the ResourceArn of the protected resource or the ProtectionID of the protection, but not both.

    • ResourceArn — (String)

      The ARN (Amazon Resource Name) of the protected Amazon Web Services resource. You must provide either the ResourceArn of the protected resource or the ProtectionID of the protection, but not both.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Protection — (map)

        The Protection that you requested.

        • 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 — (Array<String>)

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

        • ProtectionArn — (String)

          The ARN (Amazon Resource Name) of the protection.

        • ApplicationLayerAutomaticResponseConfiguration — (map)

          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.

          • Statusrequired — (String)

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

            Possible values include:
            • "ENABLED"
            • "DISABLED"
          • Actionrequired — (map)

            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 — (map)

              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 — (map)

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

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

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeProtectionGroup(params = {}, callback) ⇒ AWS.Request

Returns the specification for the specified protection group.

Service Reference:

Examples:

Calling the describeProtectionGroup operation

var params = {
  ProtectionGroupId: 'STRING_VALUE' /* required */
};
shield.describeProtectionGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • 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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ProtectionGroup — (map)

        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.

        • ProtectionGroupIdrequired — (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.

        • Aggregationrequired — (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.

          Possible values include:
          • "SUM"
          • "MEAN"
          • "MAX"
        • Patternrequired — (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 ARNs (Amazon Resource Names), or include all resources of a specified resource type.

          Possible values include:
          • "ALL"
          • "ARBITRARY"
          • "BY_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.

          Possible values include:
          • "CLOUDFRONT_DISTRIBUTION"
          • "ROUTE_53_HOSTED_ZONE"
          • "ELASTIC_IP_ALLOCATION"
          • "CLASSIC_LOAD_BALANCER"
          • "APPLICATION_LOAD_BALANCER"
          • "GLOBAL_ACCELERATOR"
        • Membersrequired — (Array<String>)

          The ARNs (Amazon Resource Names) 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.

        • ProtectionGroupArn — (String)

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

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeSubscription(params = {}, callback) ⇒ AWS.Request

Provides details about the Shield Advanced subscription for an account.

Service Reference:

Examples:

Calling the describeSubscription operation

var params = {
};
shield.describeSubscription(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Subscription — (map)

        The Shield Advanced subscription details for an account.

        • StartTime — (Date)

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

        • EndTime — (Date)

          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.

          Possible values include:
          • "ENABLED"
          • "DISABLED"
        • Limits — (Array<map>)

          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.

          Possible values include:
          • "ENABLED"
          • "DISABLED"
          • "PENDING"
        • SubscriptionLimitsrequired — (map)

          Limits settings for your subscription.

          • ProtectionLimitsrequired — (map)

            Limits settings on protections for your subscription.

            • ProtectedResourceTypeLimitsrequired — (Array<map>)

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

              • Type — (String)

                The type of protection.

              • Max — (Integer)

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

          • ProtectionGroupLimitsrequired — (map)

            Limits settings on protection groups for your subscription.

            • MaxProtectionGroupsrequired — (Integer)

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

            • PatternTypeLimitsrequired — (map)

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

              • ArbitraryPatternLimitsrequired — (map)

                Limits settings on protection groups with arbitrary pattern type.

                • MaxMembersrequired — (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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

disableApplicationLayerAutomaticResponse(params = {}, callback) ⇒ AWS.Request

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

Examples:

Calling the disableApplicationLayerAutomaticResponse operation

var params = {
  ResourceArn: 'STRING_VALUE' /* required */
};
shield.disableApplicationLayerAutomaticResponse(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceArn — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

disableProactiveEngagement(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the disableProactiveEngagement operation

var params = {
};
shield.disableProactiveEngagement(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

disassociateDRTLogBucket(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the disassociateDRTLogBucket operation

var params = {
  LogBucket: 'STRING_VALUE' /* required */
};
shield.disassociateDRTLogBucket(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • LogBucket — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

disassociateDRTRole(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the disassociateDRTRole operation

var params = {
};
shield.disassociateDRTRole(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

disassociateHealthCheck(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the disassociateHealthCheck operation

var params = {
  HealthCheckArn: 'STRING_VALUE', /* required */
  ProtectionId: 'STRING_VALUE' /* required */
};
shield.disassociateHealthCheck(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ProtectionId — (String)

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

    • HealthCheckArn — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

enableApplicationLayerAutomaticResponse(params = {}, callback) ⇒ AWS.Request

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

Note: This feature is available for Amazon CloudFront distributions and Application Load Balancers 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.

Note: 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 associate the web ACL to the resource 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.

Examples:

Calling the enableApplicationLayerAutomaticResponse operation

var params = {
  Action: { /* required */
    Block: {
    },
    Count: {
    }
  },
  ResourceArn: 'STRING_VALUE' /* required */
};
shield.enableApplicationLayerAutomaticResponse(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceArn — (String)

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

    • Action — (map)

      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 — (map)

        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 — (map)

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

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

enableProactiveEngagement(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the enableProactiveEngagement operation

var params = {
};
shield.enableProactiveEngagement(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getSubscriptionState(params = {}, callback) ⇒ AWS.Request

Returns the SubscriptionState, either Active or Inactive.

Service Reference:

Examples:

Calling the getSubscriptionState operation

var params = {
};
shield.getSubscriptionState(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • SubscriptionState — (String)

        The status of the subscription.

        Possible values include:
        • "ACTIVE"
        • "INACTIVE"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listAttacks(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the listAttacks operation

var params = {
  EndTime: {
    FromInclusive: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
    ToExclusive: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789
  },
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  ResourceArns: [
    'STRING_VALUE',
    /* more items */
  ],
  StartTime: {
    FromInclusive: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
    ToExclusive: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789
  }
};
shield.listAttacks(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceArns — (Array<String>)

      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.

    • StartTime — (map)

      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 — (Date)

        The start time, in Unix time in seconds.

      • ToExclusive — (Date)

        The end time, in Unix time in seconds.

    • EndTime — (map)

      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 — (Date)

        The start time, in Unix time in seconds.

      • ToExclusive — (Date)

        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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • AttackSummaries — (Array<map>)

        The attack information for the specified time range.

        • AttackId — (String)

          The unique identifier (ID) of the attack.

        • ResourceArn — (String)

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

        • StartTime — (Date)

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

        • EndTime — (Date)

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

        • AttackVectors — (Array<map>)

          The list of attacks for a specified time period.

          • VectorTyperequired — (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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listProtectionGroups(params = {}, callback) ⇒ AWS.Request

Retrieves ProtectionGroup objects for the account. You can retrieve all protection groups or you can provide filtering criteria and retrieve just the subset of protection groups that match the criteria.

Service Reference:

Examples:

Calling the listProtectionGroups operation

var params = {
  InclusionFilters: {
    Aggregations: [
      SUM | MEAN | MAX,
      /* more items */
    ],
    Patterns: [
      ALL | ARBITRARY | BY_RESOURCE_TYPE,
      /* more items */
    ],
    ProtectionGroupIds: [
      'STRING_VALUE',
      /* more items */
    ],
    ResourceTypes: [
      CLOUDFRONT_DISTRIBUTION | ROUTE_53_HOSTED_ZONE | ELASTIC_IP_ALLOCATION | CLASSIC_LOAD_BALANCER | APPLICATION_LOAD_BALANCER | GLOBAL_ACCELERATOR,
      /* more items */
    ]
  },
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
shield.listProtectionGroups(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • 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.

    • InclusionFilters — (map)

      Narrows the set of protection groups that the call retrieves. You can retrieve a single protection group by its name and you can retrieve all protection groups that are configured with specific pattern or aggregation settings. You can provide up to one criteria per filter type. Shield Advanced returns the protection groups that exactly match all of the search criteria that you provide.

      • ProtectionGroupIds — (Array<String>)

        The ID of the protection group that you want to retrieve.

      • Patterns — (Array<String>)

        The pattern specification of the protection groups that you want to retrieve.

      • ResourceTypes — (Array<String>)

        The resource type configuration of the protection groups that you want to retrieve. In the protection group configuration, you specify the resource type when you set the group's Pattern to BY_RESOURCE_TYPE.

      • Aggregations — (Array<String>)

        The aggregation setting of the protection groups that you want to retrieve.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ProtectionGroups — (Array<map>)

        • ProtectionGroupIdrequired — (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.

        • Aggregationrequired — (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.

          Possible values include:
          • "SUM"
          • "MEAN"
          • "MAX"
        • Patternrequired — (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 ARNs (Amazon Resource Names), or include all resources of a specified resource type.

          Possible values include:
          • "ALL"
          • "ARBITRARY"
          • "BY_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.

          Possible values include:
          • "CLOUDFRONT_DISTRIBUTION"
          • "ROUTE_53_HOSTED_ZONE"
          • "ELASTIC_IP_ALLOCATION"
          • "CLASSIC_LOAD_BALANCER"
          • "APPLICATION_LOAD_BALANCER"
          • "GLOBAL_ACCELERATOR"
        • Membersrequired — (Array<String>)

          The ARNs (Amazon Resource Names) 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.

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

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listProtections(params = {}, callback) ⇒ AWS.Request

Retrieves Protection objects for the account. You can retrieve all protections or you can provide filtering criteria and retrieve just the subset of protections that match the criteria.

Service Reference:

Examples:

Calling the listProtections operation

var params = {
  InclusionFilters: {
    ProtectionNames: [
      'STRING_VALUE',
      /* more items */
    ],
    ResourceArns: [
      'STRING_VALUE',
      /* more items */
    ],
    ResourceTypes: [
      CLOUDFRONT_DISTRIBUTION | ROUTE_53_HOSTED_ZONE | ELASTIC_IP_ALLOCATION | CLASSIC_LOAD_BALANCER | APPLICATION_LOAD_BALANCER | GLOBAL_ACCELERATOR,
      /* more items */
    ]
  },
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
shield.listProtections(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • 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.

    • InclusionFilters — (map)

      Narrows the set of protections that the call retrieves. You can retrieve a single protection by providing its name or the ARN (Amazon Resource Name) of its protected resource. You can also retrieve all protections for a specific resource type. You can provide up to one criteria per filter type. Shield Advanced returns protections that exactly match all of the filter criteria that you provide.

      • ResourceArns — (Array<String>)

        The ARN (Amazon Resource Name) of the resource whose protection you want to retrieve.

      • ProtectionNames — (Array<String>)

        The name of the protection that you want to retrieve.

      • ResourceTypes — (Array<String>)

        The type of protected resource whose protections you want to retrieve.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Protections — (Array<map>)

        The array of enabled Protection objects.

        • 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 — (Array<String>)

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

        • ProtectionArn — (String)

          The ARN (Amazon Resource Name) of the protection.

        • ApplicationLayerAutomaticResponseConfiguration — (map)

          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.

          • Statusrequired — (String)

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

            Possible values include:
            • "ENABLED"
            • "DISABLED"
          • Actionrequired — (map)

            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 — (map)

              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 — (map)

              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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listResourcesInProtectionGroup(params = {}, callback) ⇒ AWS.Request

Retrieves the resources that are included in the protection group.

Service Reference:

Examples:

Calling the listResourcesInProtectionGroup operation

var params = {
  ProtectionGroupId: 'STRING_VALUE', /* required */
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
shield.listResourcesInProtectionGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • 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.

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ResourceArns — (Array<String>)

        The Amazon Resource Names (ARNs) of the resources that are included in 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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listTagsForResource(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the listTagsForResource operation

var params = {
  ResourceARN: 'STRING_VALUE' /* required */
};
shield.listTagsForResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceARN — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Tags — (Array<map>)

        A list of tag key and value pairs associated with the specified 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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

tagResource(params = {}, callback) ⇒ AWS.Request

Adds or updates tags for a resource in Shield.

Service Reference:

Examples:

Calling the tagResource operation

var params = {
  ResourceARN: 'STRING_VALUE', /* required */
  Tags: [ /* required */
    {
      Key: 'STRING_VALUE',
      Value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
shield.tagResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceARN — (String)

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

    • Tags — (Array<map>)

      The tags that you want to modify or add to the 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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

untagResource(params = {}, callback) ⇒ AWS.Request

Removes tags from a resource in Shield.

Service Reference:

Examples:

Calling the untagResource operation

var params = {
  ResourceARN: 'STRING_VALUE', /* required */
  TagKeys: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
shield.untagResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceARN — (String)

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

    • TagKeys — (Array<String>)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateApplicationLayerAutomaticResponse(params = {}, callback) ⇒ AWS.Request

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

Examples:

Calling the updateApplicationLayerAutomaticResponse operation

var params = {
  Action: { /* required */
    Block: {
    },
    Count: {
    }
  },
  ResourceArn: 'STRING_VALUE' /* required */
};
shield.updateApplicationLayerAutomaticResponse(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceArn — (String)

      The ARN (Amazon Resource Name) of the resource.

    • Action — (map)

      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 — (map)

        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 — (map)

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

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateEmergencyContactSettings(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the updateEmergencyContactSettings operation

var params = {
  EmergencyContactList: [
    {
      EmailAddress: 'STRING_VALUE', /* required */
      ContactNotes: 'STRING_VALUE',
      PhoneNumber: 'STRING_VALUE'
    },
    /* more items */
  ]
};
shield.updateEmergencyContactSettings(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • EmergencyContactList — (Array<map>)

      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.

      • EmailAddressrequired — (String)

        The email address for the contact.

      • PhoneNumber — (String)

        The phone number for the contact.

      • ContactNotes — (String)

        Additional notes regarding the contact.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateProtectionGroup(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the updateProtectionGroup operation

var params = {
  Aggregation: SUM | MEAN | MAX, /* required */
  Pattern: ALL | ARBITRARY | BY_RESOURCE_TYPE, /* required */
  ProtectionGroupId: 'STRING_VALUE', /* required */
  Members: [
    'STRING_VALUE',
    /* more items */
  ],
  ResourceType: CLOUDFRONT_DISTRIBUTION | ROUTE_53_HOSTED_ZONE | ELASTIC_IP_ALLOCATION | CLASSIC_LOAD_BALANCER | APPLICATION_LOAD_BALANCER | GLOBAL_ACCELERATOR
};
shield.updateProtectionGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • 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.

      Possible values include:
      • "SUM"
      • "MEAN"
      • "MAX"
    • 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.

      Possible values include:
      • "ALL"
      • "ARBITRARY"
      • "BY_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.

      Possible values include:
      • "CLOUDFRONT_DISTRIBUTION"
      • "ROUTE_53_HOSTED_ZONE"
      • "ELASTIC_IP_ALLOCATION"
      • "CLASSIC_LOAD_BALANCER"
      • "APPLICATION_LOAD_BALANCER"
      • "GLOBAL_ACCELERATOR"
    • Members — (Array<String>)

      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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateSubscription(params = {}, callback) ⇒ AWS.Request

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

Note: For accounts that are members of an Organizations organization, Shield Advanced subscriptions are billed against the organization's payer account, regardless of whether the payer account itself is subscribed.

Service Reference:

Examples:

Calling the updateSubscription operation

var params = {
  AutoRenew: ENABLED | DISABLED
};
shield.updateSubscription(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • 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.

      Possible values include:
      • "ENABLED"
      • "DISABLED"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.