Class: Aws::SecurityHub::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::SecurityHub::Client
- Includes:
- ClientStubs
- Defined in:
- gems/aws-sdk-securityhub/lib/aws-sdk-securityhub/client.rb
Overview
An API client for SecurityHub. To construct a client, you need to configure a :region
and :credentials
.
client = Aws::SecurityHub::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the developer guide.
See #initialize for a full list of supported configuration options.
Instance Attribute Summary
Attributes inherited from Seahorse::Client::Base
API Operations collapse
-
#accept_invitation(params = {}) ⇒ Struct
Accepts the invitation to be a member account and be monitored by the Security Hub master account that the invitation was sent from.
-
#batch_disable_standards(params = {}) ⇒ Types::BatchDisableStandardsResponse
Disables the standards specified by the provided
StandardsSubscriptionArns
. -
#batch_enable_standards(params = {}) ⇒ Types::BatchEnableStandardsResponse
Enables the standards specified by the provided
StandardsArn
. -
#batch_import_findings(params = {}) ⇒ Types::BatchImportFindingsResponse
Imports security findings generated from an integrated third-party product into Security Hub.
-
#batch_update_findings(params = {}) ⇒ Types::BatchUpdateFindingsResponse
Used by Security Hub customers to update information about their investigation into a finding.
-
#create_action_target(params = {}) ⇒ Types::CreateActionTargetResponse
Creates a custom action target in Security Hub.
-
#create_insight(params = {}) ⇒ Types::CreateInsightResponse
Creates a custom insight in Security Hub.
-
#create_members(params = {}) ⇒ Types::CreateMembersResponse
Creates a member association in Security Hub between the specified accounts and the account used to make the request, which is the master account.
-
#decline_invitations(params = {}) ⇒ Types::DeclineInvitationsResponse
Declines invitations to become a member account.
-
#delete_action_target(params = {}) ⇒ Types::DeleteActionTargetResponse
Deletes a custom action target from Security Hub.
-
#delete_insight(params = {}) ⇒ Types::DeleteInsightResponse
Deletes the insight specified by the
InsightArn
. -
#delete_invitations(params = {}) ⇒ Types::DeleteInvitationsResponse
Deletes invitations received by the AWS account to become a member account.
-
#delete_members(params = {}) ⇒ Types::DeleteMembersResponse
Deletes the specified member accounts from Security Hub.
-
#describe_action_targets(params = {}) ⇒ Types::DescribeActionTargetsResponse
Returns a list of the custom action targets in Security Hub in your account.
-
#describe_hub(params = {}) ⇒ Types::DescribeHubResponse
Returns details about the Hub resource in your account, including the
HubArn
and the time when you enabled Security Hub. -
#describe_organization_configuration(params = {}) ⇒ Types::DescribeOrganizationConfigurationResponse
Returns information about the Organizations configuration for Security Hub.
-
#describe_products(params = {}) ⇒ Types::DescribeProductsResponse
Returns information about the available products that you can subscribe to and integrate with Security Hub in order to consolidate findings.
-
#describe_standards(params = {}) ⇒ Types::DescribeStandardsResponse
Returns a list of the available standards in Security Hub.
-
#describe_standards_controls(params = {}) ⇒ Types::DescribeStandardsControlsResponse
Returns a list of security standards controls.
-
#disable_import_findings_for_product(params = {}) ⇒ Struct
Disables the integration of the specified product with Security Hub.
-
#disable_organization_admin_account(params = {}) ⇒ Struct
Disables a Security Hub administrator account.
-
#disable_security_hub(params = {}) ⇒ Struct
Disables Security Hub in your account only in the current Region.
-
#disassociate_from_master_account(params = {}) ⇒ Struct
Disassociates the current Security Hub member account from the associated master account.
-
#disassociate_members(params = {}) ⇒ Struct
Disassociates the specified member accounts from the associated master account.
-
#enable_import_findings_for_product(params = {}) ⇒ Types::EnableImportFindingsForProductResponse
Enables the integration of a partner product with Security Hub.
-
#enable_organization_admin_account(params = {}) ⇒ Struct
Designates the Security Hub administrator account for an organization.
-
#enable_security_hub(params = {}) ⇒ Struct
Enables Security Hub for your account in the current Region or the Region you specify in the request.
-
#get_enabled_standards(params = {}) ⇒ Types::GetEnabledStandardsResponse
Returns a list of the standards that are currently enabled.
-
#get_findings(params = {}) ⇒ Types::GetFindingsResponse
Returns a list of findings that match the specified criteria.
-
#get_insight_results(params = {}) ⇒ Types::GetInsightResultsResponse
Lists the results of the Security Hub insight specified by the insight ARN.
-
#get_insights(params = {}) ⇒ Types::GetInsightsResponse
Lists and describes insights for the specified insight ARNs.
-
#get_invitations_count(params = {}) ⇒ Types::GetInvitationsCountResponse
Returns the count of all Security Hub membership invitations that were sent to the current member account, not including the currently accepted invitation.
-
#get_master_account(params = {}) ⇒ Types::GetMasterAccountResponse
Provides the details for the Security Hub master account for the current member account.
-
#get_members(params = {}) ⇒ Types::GetMembersResponse
Returns the details for the Security Hub member accounts for the specified account IDs.
-
#invite_members(params = {}) ⇒ Types::InviteMembersResponse
Invites other AWS accounts to become member accounts for the Security Hub master account that the invitation is sent from.
-
#list_enabled_products_for_import(params = {}) ⇒ Types::ListEnabledProductsForImportResponse
Lists all findings-generating solutions (products) that you are subscribed to receive findings from in Security Hub.
-
#list_invitations(params = {}) ⇒ Types::ListInvitationsResponse
Lists all Security Hub membership invitations that were sent to the current AWS account.
-
#list_members(params = {}) ⇒ Types::ListMembersResponse
Lists details about all member accounts for the current Security Hub master account.
-
#list_organization_admin_accounts(params = {}) ⇒ Types::ListOrganizationAdminAccountsResponse
Lists the Security Hub administrator accounts.
-
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Returns a list of tags associated with a resource.
-
#tag_resource(params = {}) ⇒ Struct
Adds one or more tags to a resource.
-
#untag_resource(params = {}) ⇒ Struct
Removes one or more tags from a resource.
-
#update_action_target(params = {}) ⇒ Struct
Updates the name and description of a custom action target in Security Hub.
-
#update_findings(params = {}) ⇒ Struct
UpdateFindings
is deprecated. -
#update_insight(params = {}) ⇒ Struct
Updates the Security Hub insight identified by the specified insight ARN.
-
#update_organization_configuration(params = {}) ⇒ Struct
Used to update the configuration related to Organizations.
-
#update_security_hub_configuration(params = {}) ⇒ Struct
Updates configuration options for Security Hub.
-
#update_standards_control(params = {}) ⇒ Struct
Used to control whether an individual security standard control is enabled or disabled.
Instance Method Summary collapse
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
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(options) ⇒ Client
Returns a new instance of Client.
324 325 326 |
# File 'gems/aws-sdk-securityhub/lib/aws-sdk-securityhub/client.rb', line 324 def initialize(*args) super end |
Instance Method Details
#accept_invitation(params = {}) ⇒ Struct
Accepts the invitation to be a member account and be monitored by the Security Hub master account that the invitation was sent from.
This operation is only used by member accounts that are not added through Organizations.
When the member account accepts the invitation, permission is granted to the master account to view findings generated in the member account.
360 361 362 363 |
# File 'gems/aws-sdk-securityhub/lib/aws-sdk-securityhub/client.rb', line 360 def accept_invitation(params = {}, = {}) req = build_request(:accept_invitation, params) req.send_request() end |
#batch_disable_standards(params = {}) ⇒ Types::BatchDisableStandardsResponse
Disables the standards specified by the provided
StandardsSubscriptionArns
.
For more information, see Security Standards section of the AWS Security Hub User Guide.
401 402 403 404 |
# File 'gems/aws-sdk-securityhub/lib/aws-sdk-securityhub/client.rb', line 401 def batch_disable_standards(params = {}, = {}) req = build_request(:batch_disable_standards, params) req.send_request() end |
#batch_enable_standards(params = {}) ⇒ Types::BatchEnableStandardsResponse
Enables the standards specified by the provided StandardsArn
. To
obtain the ARN for a standard, use the DescribeStandards
operation.
For more information, see the Security Standards section of the AWS Security Hub User Guide.
450 451 452 453 |
# File 'gems/aws-sdk-securityhub/lib/aws-sdk-securityhub/client.rb', line 450 def batch_enable_standards(params = {}, = {}) req = build_request(:batch_enable_standards, params) req.send_request() end |
#batch_import_findings(params = {}) ⇒ Types::BatchImportFindingsResponse
Imports security findings generated from an integrated third-party product into Security Hub. This action is requested by the integrated product to import its findings into Security Hub.
The maximum allowed size for a finding is 240 Kb. An error is returned for any finding larger than 240 Kb.
After a finding is created, BatchImportFindings
cannot be used to
update the following finding fields and objects, which Security Hub
customers use to manage their investigation workflow.
Note
UserDefinedFields
VerificationState
Workflow
BatchImportFindings
can be used to update the following finding
fields and objects only if they have not been updated using
BatchUpdateFindings
. After they are updated using
BatchUpdateFindings
, these fields cannot be updated using
BatchImportFindings
.
Confidence
Criticality
RelatedFindings
Severity
Types
2047 2048 2049 2050 |
# File 'gems/aws-sdk-securityhub/lib/aws-sdk-securityhub/client.rb', line 2047 def batch_import_findings(params = {}, = {}) req = build_request(:batch_import_findings, params) req.send_request() end |
#batch_update_findings(params = {}) ⇒ Types::BatchUpdateFindingsResponse
Used by Security Hub customers to update information about their investigation into a finding. Requested by master accounts or member accounts. Master accounts can update findings for their account and their member accounts. Member accounts can update findings for their account.
Updates from BatchUpdateFindings
do not affect the value of
UpdatedAt
for a finding.
Master and member accounts can use BatchUpdateFindings
to update the
following finding fields and objects.
Confidence
Criticality
Note
RelatedFindings
Severity
Types
UserDefinedFields
VerificationState
Workflow
You can configure IAM policies to restrict access to fields and field values. For example, you might not want member accounts to be able to suppress findings or change the finding severity. See Configuring access to BatchUpdateFindings in the AWS Security Hub User Guide.
2220 2221 2222 2223 |
# File 'gems/aws-sdk-securityhub/lib/aws-sdk-securityhub/client.rb', line 2220 def batch_update_findings(params = {}, = {}) req = build_request(:batch_update_findings, params) req.send_request() end |
#create_action_target(params = {}) ⇒ Types::CreateActionTargetResponse
Creates a custom action target in Security Hub.
You can use custom actions on findings and insights in Security Hub to trigger target actions in Amazon CloudWatch Events.
2259 2260 2261 2262 |
# File 'gems/aws-sdk-securityhub/lib/aws-sdk-securityhub/client.rb', line 2259 def create_action_target(params = {}, = {}) req = build_request(:create_action_target, params) req.send_request() end |
#create_insight(params = {}) ⇒ Types::CreateInsightResponse
Creates a custom insight in Security Hub. An insight is a consolidation of findings that relate to a security issue that requires attention or remediation.
To group the related findings in the insight, use the
GroupByAttribute
.
2859 2860 2861 2862 |
# File 'gems/aws-sdk-securityhub/lib/aws-sdk-securityhub/client.rb', line 2859 def create_insight(params = {}, = {}) req = build_request(:create_insight, params) req.send_request() end |
#create_members(params = {}) ⇒ Types::CreateMembersResponse
Creates a member association in Security Hub between the specified accounts and the account used to make the request, which is the master account. If you are integrated with Organizations, then the master account is the Security Hub administrator account that is designated by the organization management account.
CreateMembers
is always used to add accounts that are not
organization members.
For accounts that are part of an organization, CreateMembers
is only
used in the following cases:
Security Hub is not configured to automatically add new accounts in an organization.
The account was disassociated or deleted in Security Hub.
This action can only be used by an account that has Security Hub
enabled. To enable Security Hub, you can use the EnableSecurityHub
operation.
For accounts that are not organization members, you create the account
association and then send an invitation to the member account. To send
the invitation, you use the InviteMembers
operation. If the
account owner accepts the invitation, the account becomes a member
account in Security Hub.
Accounts that are part of an organization do not receive an invitation. They automatically become a member account in Security Hub.
A permissions policy is added that permits the master account to view the findings generated in the member account. When Security Hub is enabled in a member account, findings are sent to both the member and master accounts.
To remove the association between the master and member accounts, use
the DisassociateFromMasterAccount
or DisassociateMembers
operation.
2934 2935 2936 2937 |
# File 'gems/aws-sdk-securityhub/lib/aws-sdk-securityhub/client.rb', line 2934 def create_members(params = {}, = {}) req = build_request(:create_members, params) req.send_request() end |
#decline_invitations(params = {}) ⇒ Types::DeclineInvitationsResponse
Declines invitations to become a member account.
This operation is only used by accounts that are not part of an organization. Organization accounts do not receive invitations.
2968 2969 2970 2971 |
# File 'gems/aws-sdk-securityhub/lib/aws-sdk-securityhub/client.rb', line 2968 def decline_invitations(params = {}, = {}) req = build_request(:decline_invitations, params) req.send_request() end |
#delete_action_target(params = {}) ⇒ Types::DeleteActionTargetResponse
Deletes a custom action target from Security Hub.
Deleting a custom action target does not affect any findings or insights that were already sent to Amazon CloudWatch Events using the custom action.
3000 3001 3002 3003 |
# File 'gems/aws-sdk-securityhub/lib/aws-sdk-securityhub/client.rb', line 3000 def delete_action_target(params = {}, = {}) req = build_request(:delete_action_target, params) req.send_request() end |
#delete_insight(params = {}) ⇒ Types::DeleteInsightResponse
Deletes the insight specified by the InsightArn
.
3028 3029 3030 3031 |
# File 'gems/aws-sdk-securityhub/lib/aws-sdk-securityhub/client.rb', line 3028 def delete_insight(params = {}, = {}) req = build_request(:delete_insight, params) req.send_request() end |
#delete_invitations(params = {}) ⇒ Types::DeleteInvitationsResponse
Deletes invitations received by the AWS account to become a member account.
This operation is only used by accounts that are not part of an organization. Organization accounts do not receive invitations.
3062 3063 3064 3065 |
# File 'gems/aws-sdk-securityhub/lib/aws-sdk-securityhub/client.rb', line 3062 def delete_invitations(params = {}, = {}) req = build_request(:delete_invitations, params) req.send_request() end |
#delete_members(params = {}) ⇒ Types::DeleteMembersResponse
Deletes the specified member accounts from Security Hub.
Can be used to delete member accounts that belong to an organization as well as member accounts that were invited manually.
3095 3096 3097 3098 |
# File 'gems/aws-sdk-securityhub/lib/aws-sdk-securityhub/client.rb', line 3095 def delete_members(params = {}, = {}) req = build_request(:delete_members, params) req.send_request() end |
#describe_action_targets(params = {}) ⇒ Types::DescribeActionTargetsResponse
Returns a list of the custom action targets in Security Hub in your account.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
3146 3147 3148 3149 |
# File 'gems/aws-sdk-securityhub/lib/aws-sdk-securityhub/client.rb', line 3146 def describe_action_targets(params = {}, = {}) req = build_request(:describe_action_targets, params) req.send_request() end |
#describe_hub(params = {}) ⇒ Types::DescribeHubResponse
Returns details about the Hub resource in your account, including the
HubArn
and the time when you enabled Security Hub.
3179 3180 3181 3182 |
# File 'gems/aws-sdk-securityhub/lib/aws-sdk-securityhub/client.rb', line 3179 def describe_hub(params = {}, = {}) req = build_request(:describe_hub, params) req.send_request() end |
#describe_organization_configuration(params = {}) ⇒ Types::DescribeOrganizationConfigurationResponse
Returns information about the Organizations configuration for Security Hub. Can only be called from a Security Hub administrator account.
3201 3202 3203 3204 |
# File 'gems/aws-sdk-securityhub/lib/aws-sdk-securityhub/client.rb', line 3201 def describe_organization_configuration(params = {}, = {}) req = build_request(:describe_organization_configuration, params) req.send_request() end |
#describe_products(params = {}) ⇒ Types::DescribeProductsResponse
Returns information about the available products that you can subscribe to and integrate with Security Hub in order to consolidate findings.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
3256 3257 3258 3259 |
# File 'gems/aws-sdk-securityhub/lib/aws-sdk-securityhub/client.rb', line 3256 def describe_products(params = {}, = {}) req = build_request(:describe_products, params) req.send_request() end |
#describe_standards(params = {}) ⇒ Types::DescribeStandardsResponse
Returns a list of the available standards in Security Hub.
For each standard, the results include the standard ARN, the name, and a description.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
3305 3306 3307 3308 |
# File 'gems/aws-sdk-securityhub/lib/aws-sdk-securityhub/client.rb', line 3305 def describe_standards(params = {}, = {}) req = build_request(:describe_standards, params) req.send_request() end |
#describe_standards_controls(params = {}) ⇒ Types::DescribeStandardsControlsResponse
Returns a list of security standards controls.
For each control, the results include information about whether it is currently enabled, the severity, and a link to remediation information.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
3368 3369 3370 3371 |
# File 'gems/aws-sdk-securityhub/lib/aws-sdk-securityhub/client.rb', line 3368 def describe_standards_controls(params = {}, = {}) req = build_request(:describe_standards_controls, params) req.send_request() end |
#disable_import_findings_for_product(params = {}) ⇒ Struct
Disables the integration of the specified product with Security Hub. After the integration is disabled, findings from that product are no longer sent to Security Hub.
3392 3393 3394 3395 |
# File 'gems/aws-sdk-securityhub/lib/aws-sdk-securityhub/client.rb', line 3392 def disable_import_findings_for_product(params = {}, = {}) req = build_request(:disable_import_findings_for_product, params) req.send_request() end |
#disable_organization_admin_account(params = {}) ⇒ Struct
Disables a Security Hub administrator account. Can only be called by the organization management account.
3415 3416 3417 3418 |
# File 'gems/aws-sdk-securityhub/lib/aws-sdk-securityhub/client.rb', line 3415 def disable_organization_admin_account(params = {}, = {}) req = build_request(:disable_organization_admin_account, params) req.send_request() end |
#disable_security_hub(params = {}) ⇒ Struct
Disables Security Hub in your account only in the current Region. To disable Security Hub in all Regions, you must submit one request per Region where you have enabled Security Hub.
When you disable Security Hub for a master account, it doesn't disable Security Hub for any associated member accounts.
When you disable Security Hub, your existing findings and insights and any Security Hub configuration settings are deleted after 90 days and cannot be recovered. Any standards that were enabled are disabled, and your master and member account associations are removed.
If you want to save your existing findings, you must export them before you disable Security Hub.
3441 3442 3443 3444 |
# File 'gems/aws-sdk-securityhub/lib/aws-sdk-securityhub/client.rb', line 3441 def disable_security_hub(params = {}, = {}) req = build_request(:disable_security_hub, params) req.send_request() end |
#disassociate_from_master_account(params = {}) ⇒ Struct
Disassociates the current Security Hub member account from the associated master account.
This operation is only used by accounts that are not part of an organization. For organization accounts, only the master account (the designated Security Hub administrator) can disassociate a member account.
3460 3461 3462 3463 |
# File 'gems/aws-sdk-securityhub/lib/aws-sdk-securityhub/client.rb', line 3460 def disassociate_from_master_account(params = {}, = {}) req = build_request(:disassociate_from_master_account, params) req.send_request() end |
#disassociate_members(params = {}) ⇒ Struct
Disassociates the specified member accounts from the associated master account.
Can be used to disassociate both accounts that are in an organization and accounts that were invited manually.
3487 3488 3489 3490 |
# File 'gems/aws-sdk-securityhub/lib/aws-sdk-securityhub/client.rb', line 3487 def disassociate_members(params = {}, = {}) req = build_request(:disassociate_members, params) req.send_request() end |
#enable_import_findings_for_product(params = {}) ⇒ Types::EnableImportFindingsForProductResponse
Enables the integration of a partner product with Security Hub. Integrated products send findings to Security Hub.
When you enable a product integration, a permissions policy that grants permission for the product to send findings to Security Hub is applied.
3520 3521 3522 3523 |
# File 'gems/aws-sdk-securityhub/lib/aws-sdk-securityhub/client.rb', line 3520 def enable_import_findings_for_product(params = {}, = {}) req = build_request(:enable_import_findings_for_product, params) req.send_request() end |
#enable_organization_admin_account(params = {}) ⇒ Struct
Designates the Security Hub administrator account for an organization. Can only be called by the organization management account.
3544 3545 3546 3547 |
# File 'gems/aws-sdk-securityhub/lib/aws-sdk-securityhub/client.rb', line 3544 def enable_organization_admin_account(params = {}, = {}) req = build_request(:enable_organization_admin_account, params) req.send_request() end |
#enable_security_hub(params = {}) ⇒ Struct
Enables Security Hub for your account in the current Region or the Region you specify in the request.
When you enable Security Hub, you grant to Security Hub the permissions necessary to gather findings from other services that are integrated with Security Hub.
When you use the EnableSecurityHub
operation to enable Security Hub,
you also automatically enable the following standards.
CIS AWS Foundations
AWS Foundational Security Best Practices
You do not enable the Payment Card Industry Data Security Standard (PCI DSS) standard.
To not enable the automatically enabled standards, set
EnableDefaultStandards
to false
.
After you enable Security Hub, to enable a standard, use the
BatchEnableStandards
operation. To disable a standard, use the
BatchDisableStandards
operation.
To learn more, see Setting Up AWS Security Hub in the AWS Security Hub User Guide.
3605 3606 3607 3608 |
# File 'gems/aws-sdk-securityhub/lib/aws-sdk-securityhub/client.rb', line 3605 def enable_security_hub(params = {}, = {}) req = build_request(:enable_security_hub, params) req.send_request() end |
#get_enabled_standards(params = {}) ⇒ Types::GetEnabledStandardsResponse
Returns a list of the standards that are currently enabled.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
3657 3658 3659 3660 |
# File 'gems/aws-sdk-securityhub/lib/aws-sdk-securityhub/client.rb', line 3657 def get_enabled_standards(params = {}, = {}) req = build_request(:get_enabled_standards, params) req.send_request() end |
#get_findings(params = {}) ⇒ Types::GetFindingsResponse
Returns a list of findings that match the specified criteria.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.