SecurityHub class

Security Hub provides you with a comprehensive view of the security state of your AWS environment and resources. It also provides you with the readiness status of your environment based on controls from supported security standards. Security Hub collects security data from AWS accounts, services, and integrated third-party products and helps you analyze security trends in your environment to identify the highest priority security issues. For more information about Security Hub, see the AWS Security Hub User Guide .

When you use operations in the Security Hub API, the requests are executed only in the AWS Region that is currently active or in the specific AWS Region that you specify in your request. Any configuration or settings change that results from the operation is applied only to that Region. To make the same change in other Regions, execute the same command for each Region to apply the change to.

For example, if your Region is set to us-west-2, when you use CreateMembers to add a member account to Security Hub, the association of the member account with the master account is created only in the us-west-2 Region. Security Hub must be enabled for the member account in the same Region that the invitation was sent from.

The following throttling limits apply to using Security Hub API operations.

  • BatchEnableStandards - RateLimit of 1 request per second, BurstLimit of 1 request per second.
  • GetFindings - RateLimit of 3 requests per second. BurstLimit of 6 requests per second.
  • UpdateFindings - RateLimit of 1 request per second. BurstLimit of 5 requests per second.
  • UpdateStandardsControl - RateLimit of 1 request per second, BurstLimit of 5 requests per second.
  • All other operations - RateLimit of 10 requests per second. BurstLimit of 30 requests per second.

Constructors

SecurityHub({required String region, AwsClientCredentials? credentials, AwsClientCredentialsProvider? credentialsProvider, Client? client, String? endpointUrl})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

acceptInvitation({required String invitationId, required String masterId}) Future<void>
Accepts the invitation to be a member account and be monitored by the Security Hub master account that the invitation was sent from.
batchDisableStandards({required List<String> standardsSubscriptionArns}) Future<BatchDisableStandardsResponse>
Disables the standards specified by the provided StandardsSubscriptionArns.
batchEnableStandards({required List<StandardsSubscriptionRequest> standardsSubscriptionRequests}) Future<BatchEnableStandardsResponse>
Enables the standards specified by the provided StandardsArn. To obtain the ARN for a standard, use the DescribeStandards operation.
batchImportFindings({required List<AwsSecurityFinding> findings}) Future<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.
batchUpdateFindings({required List<AwsSecurityFindingIdentifier> findingIdentifiers, int? confidence, int? criticality, NoteUpdate? note, List<RelatedFinding>? relatedFindings, SeverityUpdate? severity, List<String>? types, Map<String, String>? userDefinedFields, VerificationState? verificationState, WorkflowUpdate? workflow}) Future<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.
close() → void
Closes the internal HTTP client if none was provided at creation. If a client was passed as a constructor argument, this becomes a noop.
createActionTarget({required String description, required String id, required String name}) Future<CreateActionTargetResponse>
Creates a custom action target in Security Hub.
createInsight({required AwsSecurityFindingFilters filters, required String groupByAttribute, required String name}) Future<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.
createMembers({required List<AccountDetails> accountDetails}) Future<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.
declineInvitations({required List<String> accountIds}) Future<DeclineInvitationsResponse>
Declines invitations to become a member account.
deleteActionTarget({required String actionTargetArn}) Future<DeleteActionTargetResponse>
Deletes a custom action target from Security Hub.
deleteInsight({required String insightArn}) Future<DeleteInsightResponse>
Deletes the insight specified by the InsightArn.
deleteInvitations({required List<String> accountIds}) Future<DeleteInvitationsResponse>
Deletes invitations received by the AWS account to become a member account.
deleteMembers({required List<String> accountIds}) Future<DeleteMembersResponse>
Deletes the specified member accounts from Security Hub.
describeActionTargets({List<String>? actionTargetArns, int? maxResults, String? nextToken}) Future<DescribeActionTargetsResponse>
Returns a list of the custom action targets in Security Hub in your account.
describeHub({String? hubArn}) Future<DescribeHubResponse>
Returns details about the Hub resource in your account, including the HubArn and the time when you enabled Security Hub.
describeOrganizationConfiguration() Future<DescribeOrganizationConfigurationResponse>
Returns information about the Organizations configuration for Security Hub. Can only be called from a Security Hub administrator account.
describeProducts({int? maxResults, String? nextToken}) Future<DescribeProductsResponse>
Returns information about the available products that you can subscribe to and integrate with Security Hub in order to consolidate findings.
describeStandards({int? maxResults, String? nextToken}) Future<DescribeStandardsResponse>
Returns a list of the available standards in Security Hub.
describeStandardsControls({required String standardsSubscriptionArn, int? maxResults, String? nextToken}) Future<DescribeStandardsControlsResponse>
Returns a list of security standards controls.
disableImportFindingsForProduct({required String productSubscriptionArn}) Future<void>
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.
disableOrganizationAdminAccount({required String adminAccountId}) Future<void>
Disables a Security Hub administrator account. Can only be called by the organization management account.
disableSecurityHub() Future<void>
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.
disassociateFromMasterAccount() Future<void>
Disassociates the current Security Hub member account from the associated master account.
disassociateMembers({required List<String> accountIds}) Future<void>
Disassociates the specified member accounts from the associated master account.
enableImportFindingsForProduct({required String productArn}) Future<EnableImportFindingsForProductResponse>
Enables the integration of a partner product with Security Hub. Integrated products send findings to Security Hub.
enableOrganizationAdminAccount({required String adminAccountId}) Future<void>
Designates the Security Hub administrator account for an organization. Can only be called by the organization management account.
enableSecurityHub({bool? enableDefaultStandards, Map<String, String>? tags}) Future<void>
Enables Security Hub for your account in the current Region or the Region you specify in the request.
getEnabledStandards({int? maxResults, String? nextToken, List<String>? standardsSubscriptionArns}) Future<GetEnabledStandardsResponse>
Returns a list of the standards that are currently enabled.
getFindings({AwsSecurityFindingFilters? filters, int? maxResults, String? nextToken, List<SortCriterion>? sortCriteria}) Future<GetFindingsResponse>
Returns a list of findings that match the specified criteria.
getInsightResults({required String insightArn}) Future<GetInsightResultsResponse>
Lists the results of the Security Hub insight specified by the insight ARN.
getInsights({List<String>? insightArns, int? maxResults, String? nextToken}) Future<GetInsightsResponse>
Lists and describes insights for the specified insight ARNs.
getInvitationsCount() Future<GetInvitationsCountResponse>
Returns the count of all Security Hub membership invitations that were sent to the current member account, not including the currently accepted invitation.
getMasterAccount() Future<GetMasterAccountResponse>
Provides the details for the Security Hub master account for the current member account.
getMembers({required List<String> accountIds}) Future<GetMembersResponse>
Returns the details for the Security Hub member accounts for the specified account IDs.
inviteMembers({required List<String> accountIds}) Future<InviteMembersResponse>
Invites other AWS accounts to become member accounts for the Security Hub master account that the invitation is sent from.
listEnabledProductsForImport({int? maxResults, String? nextToken}) Future<ListEnabledProductsForImportResponse>
Lists all findings-generating solutions (products) that you are subscribed to receive findings from in Security Hub.
listInvitations({int? maxResults, String? nextToken}) Future<ListInvitationsResponse>
Lists all Security Hub membership invitations that were sent to the current AWS account.
listMembers({int? maxResults, String? nextToken, bool? onlyAssociated}) Future<ListMembersResponse>
Lists details about all member accounts for the current Security Hub master account.
listOrganizationAdminAccounts({int? maxResults, String? nextToken}) Future<ListOrganizationAdminAccountsResponse>
Lists the Security Hub administrator accounts. Can only be called by the organization management account.
listTagsForResource({required String resourceArn}) Future<ListTagsForResourceResponse>
Returns a list of tags associated with a resource.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
tagResource({required String resourceArn, required Map<String, String> tags}) Future<void>
Adds one or more tags to a resource.
toString() String
A string representation of this object.
inherited
untagResource({required String resourceArn, required List<String> tagKeys}) Future<void>
Removes one or more tags from a resource.
updateActionTarget({required String actionTargetArn, String? description, String? name}) Future<void>
Updates the name and description of a custom action target in Security Hub.
updateFindings({required AwsSecurityFindingFilters filters, NoteUpdate? note, RecordState? recordState}) Future<void>
UpdateFindings is deprecated. Instead of UpdateFindings, use BatchUpdateFindings.
updateInsight({required String insightArn, AwsSecurityFindingFilters? filters, String? groupByAttribute, String? name}) Future<void>
Updates the Security Hub insight identified by the specified insight ARN.
updateOrganizationConfiguration({required bool autoEnable}) Future<void>
Used to update the configuration related to Organizations. Can only be called from a Security Hub administrator account.
updateSecurityHubConfiguration({bool? autoEnableControls}) Future<void>
Updates configuration options for Security Hub.
updateStandardsControl({required String standardsControlArn, ControlStatus? controlStatus, String? disabledReason}) Future<void>
Used to control whether an individual security standard control is enabled or disabled.

Operators

operator ==(Object other) bool
The equality operator.
inherited