You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::FMS::Client

Inherits:
Seahorse::Client::Base show all
Includes:
ClientStubs
Defined in:
gems/aws-sdk-fms/lib/aws-sdk-fms/client.rb

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#api_requests, #stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(*args) ⇒ Client

Returns a new instance of Client

Parameters:

  • options (Hash)

    a customizable set of options



183
184
185
# File 'gems/aws-sdk-fms/lib/aws-sdk-fms/client.rb', line 183

def initialize(*args)
  super
end

Instance Method Details

#associate_admin_account(params = {}) ⇒ Struct

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.

Examples:

Request syntax with placeholder values


resp = client.({
  admin_account: "AWSAccountId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :admin_account (required, 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.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



222
223
224
225
# File 'gems/aws-sdk-fms/lib/aws-sdk-fms/client.rb', line 222

def (params = {}, options = {})
  req = build_request(:associate_admin_account, params)
  req.send_request(options)
end

#delete_notification_channel(params = {}) ⇒ Struct

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.

Parameters:

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

    ({})

Returns:

  • (Struct)

    Returns an empty response.

See Also:



237
238
239
240
# File 'gems/aws-sdk-fms/lib/aws-sdk-fms/client.rb', line 237

def delete_notification_channel(params = {}, options = {})
  req = build_request(:delete_notification_channel, params)
  req.send_request(options)
end

#delete_policy(params = {}) ⇒ Struct

Permanently deletes an AWS Firewall Manager policy.

Examples:

Request syntax with placeholder values


resp = client.delete_policy({
  policy_id: "PolicyId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :policy_id (required, String)

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

Returns:

  • (Struct)

    Returns an empty response.

See Also:



260
261
262
263
# File 'gems/aws-sdk-fms/lib/aws-sdk-fms/client.rb', line 260

def delete_policy(params = {}, options = {})
  req = build_request(:delete_policy, params)
  req.send_request(options)
end

#disassociate_admin_account(params = {}) ⇒ Struct

Disassociates the account that has been set as the AWS Firewall Manager administrator account. You will need to submit an AssociateAdminAccount request to set a new account as the AWS Firewall administrator.

Parameters:

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

    ({})

Returns:

  • (Struct)

    Returns an empty response.

See Also:



276
277
278
279
# File 'gems/aws-sdk-fms/lib/aws-sdk-fms/client.rb', line 276

def (params = {}, options = {})
  req = build_request(:disassociate_admin_account, params)
  req.send_request(options)
end

#get_admin_account(params = {}) ⇒ Types::GetAdminAccountResponse

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

Examples:

Response structure


resp. #=> String
resp.role_status #=> String, one of "READY", "CREATING", "PENDING_DELETION", "DELETING", "DELETED"

Parameters:

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

    ({})

Returns:

See Also:



298
299
300
301
# File 'gems/aws-sdk-fms/lib/aws-sdk-fms/client.rb', line 298

def (params = {}, options = {})
  req = build_request(:get_admin_account, params)
  req.send_request(options)
end

#get_compliance_detail(params = {}) ⇒ Types::GetComplianceDetailResponse

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.

Examples:

Request syntax with placeholder values


resp = client.get_compliance_detail({
  policy_id: "PolicyId", # required
  member_account: "AWSAccountId", # required
})

Response structure


resp.policy_compliance_detail.policy_owner #=> String
resp.policy_compliance_detail.policy_id #=> String
resp.policy_compliance_detail. #=> String
resp.policy_compliance_detail.violators #=> Array
resp.policy_compliance_detail.violators[0].resource_id #=> String
resp.policy_compliance_detail.violators[0].violation_reason #=> String, one of "WEB_ACL_MISSING_RULE_GROUP", "RESOURCE_MISSING_WEB_ACL", "RESOURCE_INCORRECT_WEB_ACL"
resp.policy_compliance_detail.violators[0].resource_type #=> String
resp.policy_compliance_detail.evaluation_limit_exceeded #=> Boolean
resp.policy_compliance_detail.expired_at #=> Time
resp.policy_compliance_detail.issue_info_map #=> Hash
resp.policy_compliance_detail.issue_info_map["DependentServiceName"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :policy_id (required, String)

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

  • :member_account (required, String)

    The AWS account that owns the resources that you want to get the details for.

Returns:

See Also:



345
346
347
348
# File 'gems/aws-sdk-fms/lib/aws-sdk-fms/client.rb', line 345

def get_compliance_detail(params = {}, options = {})
  req = build_request(:get_compliance_detail, params)
  req.send_request(options)
end

#get_notification_channel(params = {}) ⇒ Types::GetNotificationChannelResponse

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

Examples:

Response structure


resp.sns_topic_arn #=> String
resp.sns_role_name #=> String

Parameters:

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

    ({})

Returns:

See Also:



367
368
369
370
# File 'gems/aws-sdk-fms/lib/aws-sdk-fms/client.rb', line 367

def get_notification_channel(params = {}, options = {})
  req = build_request(:get_notification_channel, params)
  req.send_request(options)
end

#get_policy(params = {}) ⇒ Types::GetPolicyResponse

Returns information about the specified AWS Firewall Manager policy.

Examples:

Request syntax with placeholder values


resp = client.get_policy({
  policy_id: "PolicyId", # required
})

Response structure


resp.policy.policy_id #=> String
resp.policy.policy_name #=> String
resp.policy.policy_update_token #=> String
resp.policy.security_service_policy_data.type #=> String, one of "WAF"
resp.policy.security_service_policy_data.managed_service_data #=> String
resp.policy.resource_type #=> String
resp.policy.resource_tags #=> Array
resp.policy.resource_tags[0].key #=> String
resp.policy.resource_tags[0].value #=> String
resp.policy.exclude_resource_tags #=> Boolean
resp.policy.remediation_enabled #=> Boolean
resp.policy.include_map #=> Hash
resp.policy.include_map["CustomerPolicyScopeIdType"] #=> Array
resp.policy.include_map["CustomerPolicyScopeIdType"][0] #=> String
resp.policy.exclude_map #=> Hash
resp.policy.exclude_map["CustomerPolicyScopeIdType"] #=> Array
resp.policy.exclude_map["CustomerPolicyScopeIdType"][0] #=> String
resp.policy_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :policy_id (required, String)

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

Returns:

See Also:



414
415
416
417
# File 'gems/aws-sdk-fms/lib/aws-sdk-fms/client.rb', line 414

def get_policy(params = {}, options = {})
  req = build_request(:get_policy, params)
  req.send_request(options)
end

#list_compliance_status(params = {}) ⇒ Types::ListComplianceStatusResponse

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.

Examples:

Request syntax with placeholder values


resp = client.list_compliance_status({
  policy_id: "PolicyId", # required
  next_token: "PaginationToken",
  max_results: 1,
})

Response structure


resp.policy_compliance_status_list #=> Array
resp.policy_compliance_status_list[0].policy_owner #=> String
resp.policy_compliance_status_list[0].policy_id #=> String
resp.policy_compliance_status_list[0].policy_name #=> String
resp.policy_compliance_status_list[0]. #=> String
resp.policy_compliance_status_list[0].evaluation_results #=> Array
resp.policy_compliance_status_list[0].evaluation_results[0].compliance_status #=> String, one of "COMPLIANT", "NON_COMPLIANT"
resp.policy_compliance_status_list[0].evaluation_results[0].violator_count #=> Integer
resp.policy_compliance_status_list[0].evaluation_results[0].evaluation_limit_exceeded #=> Boolean
resp.policy_compliance_status_list[0].last_updated #=> Time
resp.policy_compliance_status_list[0].issue_info_map #=> Hash
resp.policy_compliance_status_list[0].issue_info_map["DependentServiceName"] #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :policy_id (required, String)

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

  • :next_token (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.

  • :max_results (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.

Returns:

See Also:



477
478
479
480
# File 'gems/aws-sdk-fms/lib/aws-sdk-fms/client.rb', line 477

def list_compliance_status(params = {}, options = {})
  req = build_request(:list_compliance_status, params)
  req.send_request(options)
end

#list_member_accounts(params = {}) ⇒ Types::ListMemberAccountsResponse

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.

Examples:

Request syntax with placeholder values


resp = client.list_member_accounts({
  next_token: "PaginationToken",
  max_results: 1,
})

Response structure


resp.member_accounts #=> Array
resp.member_accounts[0] #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (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.

  • :max_results (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. The maximum value for MaxResults is 100.

Returns:

See Also:



526
527
528
529
# File 'gems/aws-sdk-fms/lib/aws-sdk-fms/client.rb', line 526

def list_member_accounts(params = {}, options = {})
  req = build_request(:list_member_accounts, params)
  req.send_request(options)
end

#list_policies(params = {}) ⇒ Types::ListPoliciesResponse

Returns an array of PolicySummary objects in the response.

Examples:

Request syntax with placeholder values


resp = client.list_policies({
  next_token: "PaginationToken",
  max_results: 1,
})

Response structure


resp.policy_list #=> Array
resp.policy_list[0].policy_arn #=> String
resp.policy_list[0].policy_id #=> String
resp.policy_list[0].policy_name #=> String
resp.policy_list[0].resource_type #=> String
resp.policy_list[0].security_service_type #=> String, one of "WAF"
resp.policy_list[0].remediation_enabled #=> Boolean
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (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.

  • :max_results (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.

Returns:

See Also:



576
577
578
579
# File 'gems/aws-sdk-fms/lib/aws-sdk-fms/client.rb', line 576

def list_policies(params = {}, options = {})
  req = build_request(:list_policies, params)
  req.send_request(options)
end

#put_notification_channel(params = {}) ⇒ Struct

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

Examples:

Request syntax with placeholder values


resp = client.put_notification_channel({
  sns_topic_arn: "ResourceArn", # required
  sns_role_name: "ResourceArn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :sns_topic_arn (required, String)

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

  • :sns_role_name (required, String)

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

Returns:

  • (Struct)

    Returns an empty response.

See Also:



605
606
607
608
# File 'gems/aws-sdk-fms/lib/aws-sdk-fms/client.rb', line 605

def put_notification_channel(params = {}, options = {})
  req = build_request(:put_notification_channel, params)
  req.send_request(options)
end

#put_policy(params = {}) ⇒ Types::PutPolicyResponse

Creates an AWS Firewall Manager policy.

Examples:

Request syntax with placeholder values


resp = client.put_policy({
  policy: { # required
    policy_id: "PolicyId",
    policy_name: "ResourceName", # required
    policy_update_token: "PolicyUpdateToken",
    security_service_policy_data: { # required
      type: "WAF", # required, accepts WAF
      managed_service_data: "ManagedServiceData",
    },
    resource_type: "ResourceType", # required
    resource_tags: [
      {
        key: "TagKey", # required
        value: "TagValue",
      },
    ],
    exclude_resource_tags: false, # required
    remediation_enabled: false, # required
    include_map: {
      "ACCOUNT" => ["CustomerPolicyScopeId"],
    },
    exclude_map: {
      "ACCOUNT" => ["CustomerPolicyScopeId"],
    },
  },
})

Response structure


resp.policy.policy_id #=> String
resp.policy.policy_name #=> String
resp.policy.policy_update_token #=> String
resp.policy.security_service_policy_data.type #=> String, one of "WAF"
resp.policy.security_service_policy_data.managed_service_data #=> String
resp.policy.resource_type #=> String
resp.policy.resource_tags #=> Array
resp.policy.resource_tags[0].key #=> String
resp.policy.resource_tags[0].value #=> String
resp.policy.exclude_resource_tags #=> Boolean
resp.policy.remediation_enabled #=> Boolean
resp.policy.include_map #=> Hash
resp.policy.include_map["CustomerPolicyScopeIdType"] #=> Array
resp.policy.include_map["CustomerPolicyScopeIdType"][0] #=> String
resp.policy.exclude_map #=> Hash
resp.policy.exclude_map["CustomerPolicyScopeIdType"] #=> Array
resp.policy.exclude_map["CustomerPolicyScopeIdType"][0] #=> String
resp.policy_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :policy (required, Types::Policy)

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

Returns:

See Also:



674
675
676
677
# File 'gems/aws-sdk-fms/lib/aws-sdk-fms/client.rb', line 674

def put_policy(params = {}, options = {})
  req = build_request(:put_policy, params)
  req.send_request(options)
end