You are viewing the documentation for an older major version of the AWS SDK for JavaScript.
The modular AWS SDK for JavaScript (v3), the latest major version of AWS SDK for JavaScript, is now stable and recommended for general use. For more information, see the Migration Guide and API Reference.

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

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 you will specify in the request. For more information see Attaching and Detaching IAM Policies. The role must also trust the service principal drt.shield.amazonaws.com. For more information, see IAM JSON Policy Elements: Principal.

The 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 mitigation.

You define the health check in Route 53 and then associate it with your Shield Advanced protection. For more information, see Shield Advanced Health-Based Detection in the 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, Elastic Load Balancing load balancer, Global Accelerator accelerator, Elastic IP Address, or an Amazon Route 53 hosted zone.

You can add protection to only a single resource with each CreateProtection request. If you want to add protection to multiple resources at once, use the WAF console. For more information see Getting Started with Shield Advanced and Add Shield Advanced Protection to more 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 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.

When you initally create a subscription, your subscription is set to be automatically renewed at the end of the existing subscription period. You can change this by submitting an UpdateSubscription request.

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 that to be described.

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 is described.

        • AttackId — (String)

          The unique identifier (ID) of the attack.

        • ResourceArn — (String)

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

        • SubResources — (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. For more information see timestamp.

        • EndTime — (Date)

          The time the attack ended, in Unix time in seconds. For more information see timestamp.

        • 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) after January 25, 2021, 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) after January 25, 2021, 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.

            • Name — (String)

              The name of the contributor. This is dependent on the AttackPropertyIdentifier. 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.

        • FromInclusive — (Date)

          The start time, in Unix time in seconds. For more information see timestamp.

        • ToExclusive — (Date)

          The end time, in Unix time in seconds. For more information see timestamp.

      • 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 that is described. When submitting the DescribeProtection request you must provide either the ResourceArn or the ProtectionID, but not both.

    • ResourceArn — (String)

      The ARN (Amazon Resource Name) of the Amazon Web Services resource for the Protection object that is described. When submitting the DescribeProtection request you must provide either the ResourceArn or the ProtectionID, but not both.

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 object that is described.

        • Id — (String)

          The unique identifier (ID) of the protection.

        • Name — (String)

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

        • ResourceArn — (String)

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

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

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

        • 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. For more information see timestamp.

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

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.

To make a DisassociateDRTLogBucket request, you must be subscribed to the Business Support plan or the Enterprise Support plan. However, if you are not subscribed to one of these support plans, but had been previously and had granted the SRT access to your account, you can submit a DisassociateDRTLogBucket request to remove this access.

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.

To make a DisassociateDRTRole request, you must be subscribed to the Business Support plan or the Enterprise Support plan. However, if you are not subscribed to one of these support plans, but had been previously and had granted the SRT access to your account, you can submit a DisassociateDRTRole request to remove this access.

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

You define the health check in Route 53 and then associate or disassociate it with your Shield Advanced protection. For more information, see Shield Advanced Health-Based Detection in the 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.

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 ARN (Amazon Resource Name) of the resource that was attacked. If this is left 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 sample request above indicates a number type because the default used by WAF is Unix time in seconds. However any valid timestamp format is allowed.

      • FromInclusive — (Date)

        The start time, in Unix time in seconds. For more information see timestamp.

      • ToExclusive — (Date)

        The end time, in Unix time in seconds. For more information see timestamp.

    • EndTime — (map)

      The end of the time period for the attacks. This is a timestamp type. The sample request above indicates a number type because the default used by WAF is Unix time in seconds. However any valid timestamp format is allowed.

      • FromInclusive — (Date)

        The start time, in Unix time in seconds. For more information see timestamp.

      • ToExclusive — (Date)

        The end time, in Unix time in seconds. For more information see timestamp.

    • NextToken — (String)

      The ListAttacksRequest.NextMarker value from a previous call to ListAttacksRequest. Pass null if this is the first call.

    • MaxResults — (Integer)

      The maximum number of AttackSummary objects to return. If you leave this blank, Shield Advanced returns the first 20 results.

      This is a maximum value. Shield Advanced might return the results in smaller batches. That is, the number of objects returned could be less than MaxResults, even if there are still more objects yet to return. If there are more objects to return, Shield Advanced returns a value in NextToken that you can use in your next request, to get the next batch of objects.

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. For more information see timestamp.

        • EndTime — (Date)

          The end time of the attack, in Unix time in seconds. For more information see timestamp.

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

        The token returned by a previous call to indicate that there is more data available. If not null, more results are available. Pass this value for the NextMarker parameter in a subsequent call to ListAttacks to retrieve the next set of items.

        Shield Advanced might return the list of AttackSummary objects in batches smaller than the number specified by MaxResults. If there are more attack summary objects to return, Shield Advanced will always also return a NextToken.

Returns:

  • (AWS.Request)

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

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

Retrieves the ProtectionGroup objects for the account.

Service Reference:

Examples:

Calling the listProtectionGroups operation

var params = {
  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)

      The next token value from a previous call to ListProtectionGroups. Pass null if this is the first call.

    • MaxResults — (Integer)

      The maximum number of ProtectionGroup objects to return. If you leave this blank, Shield Advanced returns the first 20 results.

      This is a maximum value. Shield Advanced might return the results in smaller batches. That is, the number of objects returned could be less than MaxResults, even if there are still more objects yet to return. If there are more objects to return, Shield Advanced returns a value in NextToken that you can use in your next request, to get the next batch of objects.

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

        • ProtectionGroupArn — (String)

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

      • NextToken — (String)

        If you specify a value for MaxResults and you have more protection groups than the value of MaxResults, Shield Advanced returns this token that you can use in your next request, to get the next batch of objects.

Returns:

  • (AWS.Request)

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

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

Lists all Protection objects for the account.

Service Reference:

Examples:

Calling the listProtections operation

var params = {
  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)

      The ListProtectionsRequest.NextToken value from a previous call to ListProtections. Pass null if this is the first call.

    • MaxResults — (Integer)

      The maximum number of Protection objects to return. If you leave this blank, Shield Advanced returns the first 20 results.

      This is a maximum value. Shield Advanced might return the results in smaller batches. That is, the number of objects returned could be less than MaxResults, even if there are still more objects yet to return. If there are more objects to return, Shield Advanced returns a value in NextToken that you can use in your next request, to get the next batch of objects.

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.

      • NextToken — (String)

        If you specify a value for MaxResults and you have more Protections than the value of MaxResults, Shield Advanced returns a NextToken value in the response that allows you to list another group of Protections. For the second and subsequent ListProtections requests, specify the value of NextToken from the previous response to get information about another batch of Protections.

        Shield Advanced might return the list of Protection objects in batches smaller than the number specified by MaxResults. If there are more Protection objects to return, Shield Advanced will always also return a NextToken.

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)

      The next token value from a previous call to ListResourcesInProtectionGroup. Pass null if this is the first call.

    • MaxResults — (Integer)

      The maximum number of resource ARN objects to return. If you leave this blank, Shield Advanced returns the first 20 results.

      This is a maximum value. Shield Advanced might return the results in smaller batches. That is, the number of objects returned could be less than MaxResults, even if there are still more objects yet to return. If there are more objects to return, Shield Advanced returns a value in NextToken that you can use in your next request, to get the next batch of objects.

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)

        If you specify a value for MaxResults and you have more resources in the protection group than the value of MaxResults, Shield Advanced returns this token that you can use in your next request, to get the next batch of objects.

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.

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.

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.