Class: AWS.FMS

Inherits:
AWS.Service show all
Identifier:
fms
API Version:
2018-01-01
Defined in:
(unknown)

Overview

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

Service Description

This is the AWS Firewall Manager API Reference. This guide is for developers who need detailed information about the AWS Firewall Manager API actions, data types, and errors. For detailed information about AWS Firewall Manager features, see the AWS Firewall Manager Developer Guide.

Sending a Request Using FMS

var fms = new AWS.FMS();
fms.associateAdminAccount(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 FMS object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var fms = new AWS.FMS({apiVersion: '2018-01-01'});

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

AWS.config.apiVersions = {
  fms: '2018-01-01',
  // other service API versions
};

var fms = new AWS.FMS();

Version:

  • 2018-01-01

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.FMS(options = {}) ⇒ Object

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

Examples:

Constructing a FMS object

var fms = new AWS.FMS({apiVersion: '2018-01-01'});

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)

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

  • 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.FMS.region for more information.

  • maxRetries (Integer)

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

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.FMS.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.

  • 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 returns the amount of time to delay in milliseconds. The base option will be ignored if this option is supplied.
  • 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)

    whether to enable endpoint discovery for operations that allow optionally using an endpoint returned by the service. Defaults to 'false'

  • 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

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

Sets the AWS Firewall Manager administrator account. AWS Firewall Manager must be associated with the master account your AWS organization or associated with a member account that has the appropriate permissions. If the account ID that you submit is not an AWS Organizations master account, AWS Firewall Manager will set the appropriate permissions for the given member account.

The account that you associate with AWS Firewall Manager is called the AWS Firewall Manager administrator account.

Service Reference:

Examples:

Calling the associateAdminAccount operation

var params = {
  AdminAccount: 'STRING_VALUE' /* required */
};
fms.associateAdminAccount(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: {})
    • AdminAccount — (String)

      The AWS account ID to associate with AWS Firewall Manager as the AWS Firewall Manager administrator account. This can be an AWS Organizations master account or a member account. For more information about AWS Organizations and master accounts, see Managing the AWS Accounts in Your Organization.

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.

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

Deletes an AWS Firewall Manager association with the IAM role and the Amazon Simple Notification Service (SNS) topic that is used to record AWS Firewall Manager SNS logs.

Service Reference:

Examples:

Calling the deleteNotificationChannel operation

var params = {
};
fms.deleteNotificationChannel(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.

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

Permanently deletes an AWS Firewall Manager policy.

Service Reference:

Examples:

Calling the deletePolicy operation

var params = {
  PolicyId: 'STRING_VALUE', /* required */
  DeleteAllPolicyResources: true || false
};
fms.deletePolicy(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: {})
    • PolicyId — (String)

      The ID of the policy that you want to delete. PolicyId is returned by PutPolicy and by ListPolicies.

    • DeleteAllPolicyResources — (Boolean)

      If True, the request will also perform a clean-up process that will:

      • Delete rule groups created by AWS Firewall Manager

      • Remove web ACLs from in-scope resources

      • Delete web ACLs that contain no rules or rule groups

      After the cleanup, in-scope resources will no longer be protected by web ACLs in this policy. Protection of out-of-scope resources will remain unchanged. Scope is determined by tags and accounts associated with the policy. When creating the policy, if you specified that only resources in specific accounts or with specific tags be protected by the policy, those resources are in-scope. All others are out of scope. If you did not specify tags or accounts, all resources are in-scope.

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.

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

Disassociates the account that has been set as the AWS Firewall Manager administrator account. To set a different account as the administrator account, you must submit an AssociateAdminAccount request .

Service Reference:

Examples:

Calling the disassociateAdminAccount operation

var params = {
};
fms.disassociateAdminAccount(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.

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

Returns the AWS Organizations master account that is associated with AWS Firewall Manager as the AWS Firewall Manager administrator.

Service Reference:

Examples:

Calling the getAdminAccount operation

var params = {
};
fms.getAdminAccount(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:

      • AdminAccount — (String)

        The AWS account that is set as the AWS Firewall Manager administrator.

      • RoleStatus — (String)

        The status of the AWS account that you set as the AWS Firewall Manager administrator.

        Possible values include:
        • "READY"
        • "CREATING"
        • "PENDING_DELETION"
        • "DELETING"
        • "DELETED"

Returns:

  • (AWS.Request)

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

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

Returns detailed compliance information about the specified member account. Details include resources that are in and out of compliance with the specified policy. Resources are considered non-compliant if the specified policy has not been applied to them.

Service Reference:

Examples:

Calling the getComplianceDetail operation

var params = {
  MemberAccount: 'STRING_VALUE', /* required */
  PolicyId: 'STRING_VALUE' /* required */
};
fms.getComplianceDetail(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: {})
    • PolicyId — (String)

      The ID of the policy that you want to get the details for. PolicyId is returned by PutPolicy and by ListPolicies.

    • MemberAccount — (String)

      The AWS account that owns the resources that you want to get the details 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:

      • PolicyComplianceDetail — (map)

        Information about the resources and the policy that you specified in the GetComplianceDetail request.

        • PolicyOwner — (String)

          The AWS account that created the AWS Firewall Manager policy.

        • PolicyId — (String)

          The ID of the AWS Firewall Manager policy.

        • MemberAccount — (String)

          The AWS account ID.

        • Violators — (Array<map>)

          An array of resources that are not protected by the policy.

          • ResourceId — (String)

            The resource ID.

          • ViolationReason — (String)

            The reason that the resource is not protected by the policy.

            Possible values include:
            • "WEB_ACL_MISSING_RULE_GROUP"
            • "RESOURCE_MISSING_WEB_ACL"
            • "RESOURCE_INCORRECT_WEB_ACL"
            • "RESOURCE_MISSING_SHIELD_PROTECTION"
          • ResourceType — (String)

            The resource type. This is in the format shown in AWS Resource Types Reference. For example: AWS::ElasticLoadBalancingV2::LoadBalancer or AWS::CloudFront::Distribution.

        • EvaluationLimitExceeded — (Boolean)

          Indicates if over 100 resources are non-compliant with the AWS Firewall Manager policy.

        • ExpiredAt — (Date)

          A time stamp that indicates when the returned information should be considered out-of-date.

        • IssueInfoMap — (map<String>)

          Details about problems with dependent services, such as AWS WAF or AWS Config, that are causing a resource to be non-compliant. The details include the name of the dependent service and the error message received that indicates the problem with the service.

Returns:

  • (AWS.Request)

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

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

Returns information about the Amazon Simple Notification Service (SNS) topic that is used to record AWS Firewall Manager SNS logs.

Service Reference:

Examples:

Calling the getNotificationChannel operation

var params = {
};
fms.getNotificationChannel(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:

      • SnsTopicArn — (String)

        The SNS topic that records AWS Firewall Manager activity.

      • SnsRoleName — (String)

        The IAM role that is used by AWS Firewall Manager to record activity to SNS.

Returns:

  • (AWS.Request)

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

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

Returns information about the specified AWS Firewall Manager policy.

Service Reference:

Examples:

Calling the getPolicy operation

var params = {
  PolicyId: 'STRING_VALUE' /* required */
};
fms.getPolicy(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: {})
    • PolicyId — (String)

      The ID of the AWS Firewall Manager policy that you want the details 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:

      • Policy — (map)

        Information about the specified AWS Firewall Manager policy.

        • PolicyId — (String)

          The ID of the AWS Firewall Manager policy.

        • PolicyNamerequired — (String)

          The friendly name of the AWS Firewall Manager policy.

        • PolicyUpdateToken — (String)

          A unique identifier for each update to the policy. When issuing a PutPolicy request, the PolicyUpdateToken in the request must match the PolicyUpdateToken of the current policy version. To get the PolicyUpdateToken of the current policy version, use a GetPolicy request.

        • SecurityServicePolicyDatarequired — (map)

          Details about the security service that is being used to protect the resources.

          • Typerequired — (String)

            The service that the policy is using to protect the resources. This specifies the type of policy that is created, either a WAF policy or Shield Advanced policy.

            Possible values include:
            • "WAF"
            • "SHIELD_ADVANCED"
          • ManagedServiceData — (String)

            Details about the service. This contains WAF data in JSON format, as shown in the following example:

            ManagedServiceData": "{\"type\": \"WAF\", \"ruleGroups\": [{\"id\": \"12345678-1bcd-9012-efga-0987654321ab\", \"overrideAction\" : {\"type\": \"COUNT\"}}], \"defaultAction\": {\"type\": \"BLOCK\"}}

            If this is a Shield Advanced policy, this string will be empty.

        • ResourceTyperequired — (String)

          The type of resource to protect with the policy. This is in the format shown in AWS Resource Types Reference. For example: AWS::ElasticLoadBalancingV2::LoadBalancer or AWS::CloudFront::Distribution.

        • ResourceTypeList — (Array<String>)

          An array of ResourceType.

        • ResourceTags — (Array<map>)

          An array of ResourceTag objects.

          • Keyrequired — (String)

            The resource tag key.

          • Value — (String)

            The resource tag value.

        • ExcludeResourceTagsrequired — (Boolean)

          If set to True, resources with the tags that are specified in the ResourceTag array are not protected by the policy. If set to False, and the ResourceTag array is not null, only resources with the specified tags are associated with the policy.

        • RemediationEnabledrequired — (Boolean)

          Indicates if the policy should be automatically applied to new resources.

        • IncludeMap — (map<Array<String>>)

          Specifies the AWS account IDs to include in the policy. If IncludeMap is null, all accounts in the organization in AWS Organizations are included in the policy. If IncludeMap is not null, only values listed in IncludeMap are included in the policy.

          The key to the map is ACCOUNT. For example, a valid IncludeMap would be {“ACCOUNT” : [“accountID1”, “accountID2”]}.

        • ExcludeMap — (map<Array<String>>)

          Specifies the AWS account IDs to exclude from the policy. The IncludeMap values are evaluated first, with all the appropriate account IDs added to the policy. Then the accounts listed in ExcludeMap are removed, resulting in the final list of accounts to add to the policy.

          The key to the map is ACCOUNT. For example, a valid ExcludeMap would be {“ACCOUNT” : [“accountID1”, “accountID2”]}.

      • PolicyArn — (String)

        The Amazon Resource Name (ARN) of the specified policy.

Returns:

  • (AWS.Request)

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

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

If you created a Shield Advanced policy, returns policy-level attack summary information in the event of a potential DDoS attack.

Service Reference:

Examples:

Calling the getProtectionStatus operation

var params = {
  PolicyId: 'STRING_VALUE', /* required */
  EndTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  MaxResults: 'NUMBER_VALUE',
  MemberAccountId: 'STRING_VALUE',
  NextToken: 'STRING_VALUE',
  StartTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789
};
fms.getProtectionStatus(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: {})
    • PolicyId — (String)

      The ID of the policy for which you want to get the attack information.

    • MemberAccountId — (String)

      The AWS account that is in scope of the policy that you want to get the details for.

    • StartTime — (Date)

      The start of the time period to query for the attacks. This is a timestamp type. The sample request above indicates a number type because the default used by AWS Firewall Manager is Unix time in seconds. However, any valid timestamp format is allowed.

    • EndTime — (Date)

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

    • NextToken — (String)

      If you specify a value for MaxResults and you have more objects than the number that you specify for MaxResults, AWS Firewall Manager returns a NextToken value in the response that allows you to list another group of objects. For the second and subsequent GetProtectionStatus requests, specify the value of NextToken from the previous response to get information about another batch of objects.

    • MaxResults — (Integer)

      Specifies the number of objects that you want AWS Firewall Manager to return for this request. If you have more objects than the number that you specify for MaxResults, the response includes a NextToken value that you can use to get another 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:

      • AdminAccountId — (String)

        The ID of the AWS Firewall administrator account for this policy.

      • ServiceType — (String)

        The service type that is protected by the policy. Currently, this is always SHIELD_ADVANCED.

        Possible values include:
        • "WAF"
        • "SHIELD_ADVANCED"
      • Data — (String)

        Details about the attack, including the following:

        • Attack type

        • Account ID

        • ARN of the resource attacked

        • Start time of the attack

        • End time of the attack (ongoing attacks will not have an end time)

        The details are in JSON format. An example is shown in the Examples section below.

      • NextToken — (String)

        If you have more objects than the number that you specified for MaxResults in the request, the response includes a NextToken value. To list more objects, submit another GetProtectionStatus request, and specify the NextToken value from the response in the NextToken value in the next request.

        AWS SDKs provide auto-pagination that identify NextToken in a response and make subsequent request calls automatically on your behalf. However, this feature is not supported by GetProtectionStatus. You must submit subsequent requests with NextToken using your own processes.

Returns:

  • (AWS.Request)

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

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

Returns an array of PolicyComplianceStatus objects in the response. Use PolicyComplianceStatus to get a summary of which member accounts are protected by the specified policy.

Service Reference:

Examples:

Calling the listComplianceStatus operation

var params = {
  PolicyId: 'STRING_VALUE', /* required */
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
fms.listComplianceStatus(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: {})
    • PolicyId — (String)

      The ID of the AWS Firewall Manager policy that you want the details for.

    • NextToken — (String)

      If you specify a value for MaxResults and you have more PolicyComplianceStatus objects than the number that you specify for MaxResults, AWS Firewall Manager returns a NextToken value in the response that allows you to list another group of PolicyComplianceStatus objects. For the second and subsequent ListComplianceStatus requests, specify the value of NextToken from the previous response to get information about another batch of PolicyComplianceStatus objects.

    • MaxResults — (Integer)

      Specifies the number of PolicyComplianceStatus objects that you want AWS Firewall Manager to return for this request. If you have more PolicyComplianceStatus objects than the number that you specify for MaxResults, the response includes a NextToken value that you can use to get another batch of PolicyComplianceStatus 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:

      • PolicyComplianceStatusList — (Array<map>)

        An array of PolicyComplianceStatus objects.

        • PolicyOwner — (String)

          The AWS account that created the AWS Firewall Manager policy.

        • PolicyId — (String)

          The ID of the AWS Firewall Manager policy.

        • PolicyName — (String)

          The friendly name of the AWS Firewall Manager policy.

        • MemberAccount — (String)

          The member account ID.

        • EvaluationResults — (Array<map>)

          An array of EvaluationResult objects.

          • ComplianceStatus — (String)

            Describes an AWS account's compliance with the AWS Firewall Manager policy.

            Possible values include:
            • "COMPLIANT"
            • "NON_COMPLIANT"
          • ViolatorCount — (Integer)

            Number of resources that are non-compliant with the specified policy. A resource is considered non-compliant if it is not associated with the specified policy.

          • EvaluationLimitExceeded — (Boolean)

            Indicates that over 100 resources are non-compliant with the AWS Firewall Manager policy.

        • LastUpdated — (Date)

          Time stamp of the last update to the EvaluationResult objects.

        • IssueInfoMap — (map<String>)

          Details about problems with dependent services, such as AWS WAF or AWS Config, that are causing a resource to be non-compliant. The details include the name of the dependent service and the error message received that indicates the problem with the service.

      • NextToken — (String)

        If you have more PolicyComplianceStatus objects than the number that you specified for MaxResults in the request, the response includes a NextToken value. To list more PolicyComplianceStatus objects, submit another ListComplianceStatus request, and specify the NextToken value from the response in the NextToken value in the next request.

Returns:

  • (AWS.Request)

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

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

Returns a MemberAccounts object that lists the member accounts in the administrator's AWS organization.

The ListMemberAccounts must be submitted by the account that is set as the AWS Firewall Manager administrator.

Service Reference:

Examples:

Calling the listMemberAccounts operation

var params = {
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
fms.listMemberAccounts(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)

      If you specify a value for MaxResults and you have more account IDs than the number that you specify for MaxResults, AWS Firewall Manager returns a NextToken value in the response that allows you to list another group of IDs. For the second and subsequent ListMemberAccountsRequest requests, specify the value of NextToken from the previous response to get information about another batch of member account IDs.

    • MaxResults — (Integer)

      Specifies the number of member account IDs that you want AWS Firewall Manager to return for this request. If you have more IDs than the number that you specify for MaxResults, the response includes a NextToken value that you can use to get another batch of member account IDs.

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:

      • MemberAccounts — (Array<String>)

        An array of account IDs.

      • NextToken — (String)

        If you have more member account IDs than the number that you specified for MaxResults in the request, the response includes a NextToken value. To list more IDs, submit another ListMemberAccounts request, and specify the NextToken value from the response in the NextToken value in the next request.

Returns:

  • (AWS.Request)

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

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

Returns an array of PolicySummary objects in the response.

Service Reference:

Examples:

Calling the listPolicies operation

var params = {
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
fms.listPolicies(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)

      If you specify a value for MaxResults and you have more PolicySummary objects than the number that you specify for MaxResults, AWS Firewall Manager returns a NextToken value in the response that allows you to list another group of PolicySummary objects. For the second and subsequent ListPolicies requests, specify the value of NextToken from the previous response to get information about another batch of PolicySummary objects.

    • MaxResults — (Integer)

      Specifies the number of PolicySummary objects that you want AWS Firewall Manager to return for this request. If you have more PolicySummary objects than the number that you specify for MaxResults, the response includes a NextToken value that you can use to get another batch of PolicySummary 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:

      • PolicyList — (Array<map>)

        An array of PolicySummary objects.

        • PolicyArn — (String)

          The Amazon Resource Name (ARN) of the specified policy.

        • PolicyId — (String)

          The ID of the specified policy.

        • PolicyName — (String)

          The friendly name of the specified policy.

        • ResourceType — (String)

          The type of resource to protect with the policy. This is in the format shown in AWS Resource Types Reference. For example: AWS::ElasticLoadBalancingV2::LoadBalancer or AWS::CloudFront::Distribution.

        • SecurityServiceType — (String)

          The service that the policy is using to protect the resources. This specifies the type of policy that is created, either a WAF policy or Shield Advanced policy.

          Possible values include:
          • "WAF"
          • "SHIELD_ADVANCED"
        • RemediationEnabled — (Boolean)

          Indicates if the policy should be automatically applied to new resources.

      • NextToken — (String)

        If you have more PolicySummary objects than the number that you specified for MaxResults in the request, the response includes a NextToken value. To list more PolicySummary objects, submit another ListPolicies request, and specify the NextToken value from the response in the NextToken value in the next request.

Returns:

  • (AWS.Request)

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

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

Designates the IAM role and Amazon Simple Notification Service (SNS) topic that AWS Firewall Manager uses to record SNS logs.

Service Reference:

Examples:

Calling the putNotificationChannel operation

var params = {
  SnsRoleName: 'STRING_VALUE', /* required */
  SnsTopicArn: 'STRING_VALUE' /* required */
};
fms.putNotificationChannel(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: {})
    • SnsTopicArn — (String)

      The Amazon Resource Name (ARN) of the SNS topic that collects notifications from AWS Firewall Manager.

    • SnsRoleName — (String)

      The Amazon Resource Name (ARN) of the IAM role that allows Amazon SNS to record AWS Firewall Manager activity.

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.

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

Creates an AWS Firewall Manager policy.

Firewall Manager provides two types of policies: A Shield Advanced policy, which applies Shield Advanced protection to specified accounts and resources, or a WAF policy, which contains a rule group and defines which resources are to be protected by that rule group. A policy is specific to either WAF or Shield Advanced. If you want to enforce both WAF rules and Shield Advanced protection across accounts, you can create multiple policies. You can create one or more policies for WAF rules, and one or more policies for Shield Advanced.

You must be subscribed to Shield Advanced to create a Shield Advanced policy. For more information on subscribing to Shield Advanced, see CreateSubscription.

Service Reference:

Examples:

Calling the putPolicy operation

var params = {
  Policy: { /* required */
    ExcludeResourceTags: true || false, /* required */
    PolicyName: 'STRING_VALUE', /* required */
    RemediationEnabled: true || false, /* required */
    ResourceType: 'STRING_VALUE', /* required */
    SecurityServicePolicyData: { /* required */
      Type: WAF | SHIELD_ADVANCED, /* required */
      ManagedServiceData: 'STRING_VALUE'
    },
    ExcludeMap: {
      '<CustomerPolicyScopeIdType>': [
        'STRING_VALUE',
        /* more items */
      ],
      /* '<CustomerPolicyScopeIdType>': ... */
    },
    IncludeMap: {
      '<CustomerPolicyScopeIdType>': [
        'STRING_VALUE',
        /* more items */
      ],
      /* '<CustomerPolicyScopeIdType>': ... */
    },
    PolicyId: 'STRING_VALUE',
    PolicyUpdateToken: 'STRING_VALUE',
    ResourceTags: [
      {
        Key: 'STRING_VALUE', /* required */
        Value: 'STRING_VALUE'
      },
      /* more items */
    ],
    ResourceTypeList: [
      'STRING_VALUE',
      /* more items */
    ]
  }
};
fms.putPolicy(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: {})
    • Policy — (map)

      The details of the AWS Firewall Manager policy to be created.

      • PolicyId — (String)

        The ID of the AWS Firewall Manager policy.

      • PolicyNamerequired — (String)

        The friendly name of the AWS Firewall Manager policy.

      • PolicyUpdateToken — (String)

        A unique identifier for each update to the policy. When issuing a PutPolicy request, the PolicyUpdateToken in the request must match the PolicyUpdateToken of the current policy version. To get the PolicyUpdateToken of the current policy version, use a GetPolicy request.

      • SecurityServicePolicyDatarequired — (map)

        Details about the security service that is being used to protect the resources.

        • Typerequired — (String)

          The service that the policy is using to protect the resources. This specifies the type of policy that is created, either a WAF policy or Shield Advanced policy.

          Possible values include:
          • "WAF"
          • "SHIELD_ADVANCED"
        • ManagedServiceData — (String)

          Details about the service. This contains WAF data in JSON format, as shown in the following example:

          ManagedServiceData": "{\"type\": \"WAF\", \"ruleGroups\": [{\"id\": \"12345678-1bcd-9012-efga-0987654321ab\", \"overrideAction\" : {\"type\": \"COUNT\"}}], \"defaultAction\": {\"type\": \"BLOCK\"}}

          If this is a Shield Advanced policy, this string will be empty.

      • ResourceTyperequired — (String)

        The type of resource to protect with the policy. This is in the format shown in AWS Resource Types Reference. For example: AWS::ElasticLoadBalancingV2::LoadBalancer or AWS::CloudFront::Distribution.

      • ResourceTypeList — (Array<String>)

        An array of ResourceType.

      • ResourceTags — (Array<map>)

        An array of ResourceTag objects.

        • Keyrequired — (String)

          The resource tag key.

        • Value — (String)

          The resource tag value.

      • ExcludeResourceTagsrequired — (Boolean)

        If set to True, resources with the tags that are specified in the ResourceTag array are not protected by the policy. If set to False, and the ResourceTag array is not null, only resources with the specified tags are associated with the policy.

      • RemediationEnabledrequired — (Boolean)

        Indicates if the policy should be automatically applied to new resources.

      • IncludeMap — (map<Array<String>>)

        Specifies the AWS account IDs to include in the policy. If IncludeMap is null, all accounts in the organization in AWS Organizations are included in the policy. If IncludeMap is not null, only values listed in IncludeMap are included in the policy.

        The key to the map is ACCOUNT. For example, a valid IncludeMap would be {“ACCOUNT” : [“accountID1”, “accountID2”]}.

      • ExcludeMap — (map<Array<String>>)

        Specifies the AWS account IDs to exclude from the policy. The IncludeMap values are evaluated first, with all the appropriate account IDs added to the policy. Then the accounts listed in ExcludeMap are removed, resulting in the final list of accounts to add to the policy.

        The key to the map is ACCOUNT. For example, a valid ExcludeMap would be {“ACCOUNT” : [“accountID1”, “accountID2”]}.

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:

      • Policy — (map)

        The details of the AWS Firewall Manager policy that was created.

        • PolicyId — (String)

          The ID of the AWS Firewall Manager policy.

        • PolicyNamerequired — (String)

          The friendly name of the AWS Firewall Manager policy.

        • PolicyUpdateToken — (String)

          A unique identifier for each update to the policy. When issuing a PutPolicy request, the PolicyUpdateToken in the request must match the PolicyUpdateToken of the current policy version. To get the PolicyUpdateToken of the current policy version, use a GetPolicy request.

        • SecurityServicePolicyDatarequired — (map)

          Details about the security service that is being used to protect the resources.

          • Typerequired — (String)

            The service that the policy is using to protect the resources. This specifies the type of policy that is created, either a WAF policy or Shield Advanced policy.

            Possible values include:
            • "WAF"
            • "SHIELD_ADVANCED"
          • ManagedServiceData — (String)

            Details about the service. This contains WAF data in JSON format, as shown in the following example:

            ManagedServiceData": "{\"type\": \"WAF\", \"ruleGroups\": [{\"id\": \"12345678-1bcd-9012-efga-0987654321ab\", \"overrideAction\" : {\"type\": \"COUNT\"}}], \"defaultAction\": {\"type\": \"BLOCK\"}}

            If this is a Shield Advanced policy, this string will be empty.

        • ResourceTyperequired — (String)

          The type of resource to protect with the policy. This is in the format shown in AWS Resource Types Reference. For example: AWS::ElasticLoadBalancingV2::LoadBalancer or AWS::CloudFront::Distribution.

        • ResourceTypeList — (Array<String>)

          An array of ResourceType.

        • ResourceTags — (Array<map>)

          An array of ResourceTag objects.

          • Keyrequired — (String)

            The resource tag key.

          • Value — (String)

            The resource tag value.

        • ExcludeResourceTagsrequired — (Boolean)

          If set to True, resources with the tags that are specified in the ResourceTag array are not protected by the policy. If set to False, and the ResourceTag array is not null, only resources with the specified tags are associated with the policy.

        • RemediationEnabledrequired — (Boolean)

          Indicates if the policy should be automatically applied to new resources.

        • IncludeMap — (map<Array<String>>)

          Specifies the AWS account IDs to include in the policy. If IncludeMap is null, all accounts in the organization in AWS Organizations are included in the policy. If IncludeMap is not null, only values listed in IncludeMap are included in the policy.

          The key to the map is ACCOUNT. For example, a valid IncludeMap would be {“ACCOUNT” : [“accountID1”, “accountID2”]}.

        • ExcludeMap — (map<Array<String>>)

          Specifies the AWS account IDs to exclude from the policy. The IncludeMap values are evaluated first, with all the appropriate account IDs added to the policy. Then the accounts listed in ExcludeMap are removed, resulting in the final list of accounts to add to the policy.

          The key to the map is ACCOUNT. For example, a valid ExcludeMap would be {“ACCOUNT” : [“accountID1”, “accountID2”]}.

      • PolicyArn — (String)

        The Amazon Resource Name (ARN) of the policy that was created.

Returns:

  • (AWS.Request)

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