AWS.SecurityHub reference
AcceptAdministratorInvitation
Section titled “AcceptAdministratorInvitation”Source:
src/AWS/SecurityHub/AcceptAdministratorInvitation.ts
Runtime binding for securityhub:AcceptAdministratorInvitation.
Accepts an invitation to become a member of a Security Hub administrator account.
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.AcceptAdministratorInvitationHttp).
AcceptAdministratorInvitation: Members & Organization
Section titled “AcceptAdministratorInvitation: Members & Organization”// init — account-level binding, no resource argumentconst acceptAdministratorInvitation = yield* AWS.SecurityHub.AcceptAdministratorInvitation();
// runtimeyield* acceptAdministratorInvitation({ AdministratorId: adminAccountId, InvitationId: invitationId,});ActionTarget
Section titled “ActionTarget”Source:
src/AWS/SecurityHub/ActionTarget.ts
A Security Hub custom action target. Selecting the custom action on
findings or insights in the console publishes a
Security Hub Findings - Custom Action event to EventBridge, which a
Function can consume via consumeCustomActions.
ActionTarget: Creating a Custom Action
Section titled “ActionTarget: Creating a Custom Action”Send Findings to a Triage Function
const action = yield* AWS.SecurityHub.ActionTarget("Escalate", { name: "Escalate", description: "Escalate the selected findings to on-call",});Consume Custom Action Events
yield* AWS.SecurityHub.consumeCustomActions( { actionArns: [action.actionTargetArn] }, (events) => Stream.runForEach(events, (event) => Effect.log(event.detail.findings), ),);AutomationRule
Section titled “AutomationRule”Source:
src/AWS/SecurityHub/AutomationRule.ts
A Security Hub automation rule — automatically updates findings that match its criteria (suppress, change severity, add notes) as they are ingested.
AutomationRule: Automating Finding Triage
Section titled “AutomationRule: Automating Finding Triage”Suppress Informational Findings
const rule = yield* AWS.SecurityHub.AutomationRule("SuppressInfo", { description: "Suppress informational findings", ruleOrder: 1, criteria: { SeverityLabel: [{ Value: "INFORMATIONAL", Comparison: "EQUALS" }], }, actions: [{ Type: "FINDING_FIELDS_UPDATE", FindingFieldsUpdate: { Workflow: { Status: "SUPPRESSED" } }, }],});Escalate Production Findings
const rule = yield* AWS.SecurityHub.AutomationRule("EscalateProd", { description: "Raise severity of findings on production resources", ruleOrder: 2, isTerminal: true, criteria: { ResourceTags: [{ Key: "env", Value: "prod", Comparison: "EQUALS" }], }, actions: [{ Type: "FINDING_FIELDS_UPDATE", FindingFieldsUpdate: { Severity: { Label: "CRITICAL" } }, }],});BatchDisableStandards
Section titled “BatchDisableStandards”Source:
src/AWS/SecurityHub/BatchDisableStandards.ts
Runtime binding for securityhub:BatchDisableStandards.
Disables (unsubscribes the account from) one or more security standards.
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.BatchDisableStandardsHttp).
BatchDisableStandards: Standards & Controls
Section titled “BatchDisableStandards: Standards & Controls”// init — account-level binding, no resource argumentconst batchDisableStandards = yield* AWS.SecurityHub.BatchDisableStandards();
// runtimeyield* batchDisableStandards({ StandardsSubscriptionArns: [subscriptionArn],});BatchEnableStandards
Section titled “BatchEnableStandards”Source:
src/AWS/SecurityHub/BatchEnableStandards.ts
Runtime binding for securityhub:BatchEnableStandards.
Enables (subscribes the account to) one or more security standards.
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.BatchEnableStandardsHttp).
BatchEnableStandards: Standards & Controls
Section titled “BatchEnableStandards: Standards & Controls”// init — account-level binding, no resource argumentconst batchEnableStandards = yield* AWS.SecurityHub.BatchEnableStandards();
// runtimeyield* batchEnableStandards({ StandardsSubscriptionRequests: [{ StandardsArn: standardsArn }],});BatchGetAutomationRules
Section titled “BatchGetAutomationRules”Source:
src/AWS/SecurityHub/BatchGetAutomationRules.ts
Runtime binding for securityhub:BatchGetAutomationRules.
Returns the full configuration of a batch of automation rules by ARN.
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.BatchGetAutomationRulesHttp).
BatchGetAutomationRules: Custom Actions, Automation Rules & Aggregation
Section titled “BatchGetAutomationRules: Custom Actions, Automation Rules & Aggregation”// init — account-level binding, no resource argumentconst batchGetAutomationRules = yield* AWS.SecurityHub.BatchGetAutomationRules();
// runtimeconst { Rules } = yield* batchGetAutomationRules({ AutomationRulesArns: [rule.ruleArn],});BatchGetSecurityControls
Section titled “BatchGetSecurityControls”Source:
src/AWS/SecurityHub/BatchGetSecurityControls.ts
Runtime binding for securityhub:BatchGetSecurityControls.
Returns detailed definitions for a batch of security controls by id or ARN.
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.BatchGetSecurityControlsHttp).
BatchGetSecurityControls: Standards & Controls
Section titled “BatchGetSecurityControls: Standards & Controls”// init — account-level binding, no resource argumentconst batchGetSecurityControls = yield* AWS.SecurityHub.BatchGetSecurityControls();
// runtimeconst { SecurityControls } = yield* batchGetSecurityControls({ SecurityControlIds: ["IAM.1", "S3.1"],});BatchGetStandardsControlAssociations
Section titled “BatchGetStandardsControlAssociations”Source:
src/AWS/SecurityHub/BatchGetStandardsControlAssociations.ts
Runtime binding for securityhub:BatchGetStandardsControlAssociations.
Returns the enablement status of a batch of controls within specific standards.
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.BatchGetStandardsControlAssociationsHttp).
BatchGetStandardsControlAssociations: Standards & Controls
Section titled “BatchGetStandardsControlAssociations: Standards & Controls”// init — account-level binding, no resource argumentconst batchGetStandardsControlAssociations = yield* AWS.SecurityHub.BatchGetStandardsControlAssociations();
// runtimeconst { StandardsControlAssociationDetails } = yield* batchGetStandardsControlAssociations({ StandardsControlAssociationIds: [ { SecurityControlId: "IAM.1", StandardsArn: standardsArn }, ], });BatchImportFindings
Section titled “BatchImportFindings”Source:
src/AWS/SecurityHub/BatchImportFindings.ts
Runtime binding for securityhub:BatchImportFindings.
Imports findings in AWS Security Finding Format (ASFF) from a custom integration into Security Hub.
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.BatchImportFindingsHttp).
BatchImportFindings: Working with Findings
Section titled “BatchImportFindings: Working with Findings”// init — account-level binding, no resource argumentconst batchImportFindings = yield* AWS.SecurityHub.BatchImportFindings();
// runtimeconst { SuccessCount } = yield* batchImportFindings({ Findings: [myAsffFinding],});BatchUpdateFindings
Section titled “BatchUpdateFindings”Source:
src/AWS/SecurityHub/BatchUpdateFindings.ts
Runtime binding for securityhub:BatchUpdateFindings.
Updates workflow status, severity, notes, and other customer-editable fields on one or more findings.
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.BatchUpdateFindingsHttp).
BatchUpdateFindings: Working with Findings
Section titled “BatchUpdateFindings: Working with Findings”// init — account-level binding, no resource argumentconst batchUpdateFindings = yield* AWS.SecurityHub.BatchUpdateFindings();
// runtimeyield* batchUpdateFindings({ FindingIdentifiers: [{ Id: findingId, ProductArn: productArn }], Workflow: { Status: "RESOLVED" },});BatchUpdateStandardsControlAssociations
Section titled “BatchUpdateStandardsControlAssociations”Source:
src/AWS/SecurityHub/BatchUpdateStandardsControlAssociations.ts
Runtime binding for securityhub:BatchUpdateStandardsControlAssociations.
Enables or disables a batch of controls within specific standards.
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.BatchUpdateStandardsControlAssociationsHttp).
BatchUpdateStandardsControlAssociations: Standards & Controls
Section titled “BatchUpdateStandardsControlAssociations: Standards & Controls”// init — account-level binding, no resource argumentconst batchUpdateStandardsControlAssociations = yield* AWS.SecurityHub.BatchUpdateStandardsControlAssociations();
// runtimeyield* batchUpdateStandardsControlAssociations({ StandardsControlAssociationUpdates: [{ SecurityControlId: "IAM.1", StandardsArn: standardsArn, AssociationStatus: "DISABLED", UpdatedReason: "handled by SSO", }],});CreateMembers
Section titled “CreateMembers”Source:
src/AWS/SecurityHub/CreateMembers.ts
Runtime binding for securityhub:CreateMembers.
Creates member associations between this administrator account and the specified accounts.
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.CreateMembersHttp).
CreateMembers: Members & Organization
Section titled “CreateMembers: Members & Organization”// init — account-level binding, no resource argumentconst createMembers = yield* AWS.SecurityHub.CreateMembers();
// runtimeconst { UnprocessedAccounts } = yield* createMembers({ AccountDetails: [{ AccountId: "111122223333" }],});DeclineInvitations
Section titled “DeclineInvitations”Source:
src/AWS/SecurityHub/DeclineInvitations.ts
Runtime binding for securityhub:DeclineInvitations.
Declines Security Hub membership invitations from the specified accounts.
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.DeclineInvitationsHttp).
DeclineInvitations: Members & Organization
Section titled “DeclineInvitations: Members & Organization”// init — account-level binding, no resource argumentconst declineInvitations = yield* AWS.SecurityHub.DeclineInvitations();
// runtimeyield* declineInvitations({ AccountIds: ["111122223333"] });DeleteInvitations
Section titled “DeleteInvitations”Source:
src/AWS/SecurityHub/DeleteInvitations.ts
Runtime binding for securityhub:DeleteInvitations.
Deletes Security Hub membership invitations from the specified accounts.
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.DeleteInvitationsHttp).
DeleteInvitations: Members & Organization
Section titled “DeleteInvitations: Members & Organization”// init — account-level binding, no resource argumentconst deleteInvitations = yield* AWS.SecurityHub.DeleteInvitations();
// runtimeyield* deleteInvitations({ AccountIds: ["111122223333"] });DeleteMembers
Section titled “DeleteMembers”Source:
src/AWS/SecurityHub/DeleteMembers.ts
Runtime binding for securityhub:DeleteMembers.
Deletes the member associations for the specified accounts.
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.DeleteMembersHttp).
DeleteMembers: Members & Organization
Section titled “DeleteMembers: Members & Organization”// init — account-level binding, no resource argumentconst deleteMembers = yield* AWS.SecurityHub.DeleteMembers();
// runtimeyield* deleteMembers({ AccountIds: ["111122223333"] });DescribeActionTargets
Section titled “DescribeActionTargets”Source:
src/AWS/SecurityHub/DescribeActionTargets.ts
Runtime binding for securityhub:DescribeActionTargets.
Lists the custom action targets defined in the account.
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.DescribeActionTargetsHttp).
DescribeActionTargets: Custom Actions, Automation Rules & Aggregation
Section titled “DescribeActionTargets: Custom Actions, Automation Rules & Aggregation”// init — account-level binding, no resource argumentconst describeActionTargets = yield* AWS.SecurityHub.DescribeActionTargets();
// runtimeconst { ActionTargets } = yield* describeActionTargets();DescribeOrganizationConfiguration
Section titled “DescribeOrganizationConfiguration”Source:
src/AWS/SecurityHub/DescribeOrganizationConfiguration.ts
Runtime binding for securityhub:DescribeOrganizationConfiguration.
Returns how Security Hub is configured across the organization (auto-enable, central configuration).
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.DescribeOrganizationConfigurationHttp).
DescribeOrganizationConfiguration: Members & Organization
Section titled “DescribeOrganizationConfiguration: Members & Organization”// init — account-level binding, no resource argumentconst describeOrganizationConfiguration = yield* AWS.SecurityHub.DescribeOrganizationConfiguration();
// runtimeconst { AutoEnable } = yield* describeOrganizationConfiguration();DescribeProducts
Section titled “DescribeProducts”Source:
src/AWS/SecurityHub/DescribeProducts.ts
Runtime binding for securityhub:DescribeProducts.
Lists the product integrations available in Security Hub (AWS services and partner products).
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.DescribeProductsHttp).
DescribeProducts: Product Integrations
Section titled “DescribeProducts: Product Integrations”// init — account-level binding, no resource argumentconst describeProducts = yield* AWS.SecurityHub.DescribeProducts();
// runtimeconst { Products } = yield* describeProducts({ MaxResults: 10 });DescribeStandards
Section titled “DescribeStandards”Source:
src/AWS/SecurityHub/DescribeStandards.ts
Runtime binding for securityhub:DescribeStandards.
Lists the security standards available in Security Hub.
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.DescribeStandardsHttp).
DescribeStandards: Standards & Controls
Section titled “DescribeStandards: Standards & Controls”// init — account-level binding, no resource argumentconst describeStandards = yield* AWS.SecurityHub.DescribeStandards();
// runtimeconst { Standards } = yield* describeStandards();DescribeStandardsControls
Section titled “DescribeStandardsControls”Source:
src/AWS/SecurityHub/DescribeStandardsControls.ts
Runtime binding for securityhub:DescribeStandardsControls.
Lists the controls of an enabled standard with their current status.
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.DescribeStandardsControlsHttp).
DescribeStandardsControls: Standards & Controls
Section titled “DescribeStandardsControls: Standards & Controls”// init — account-level binding, no resource argumentconst describeStandardsControls = yield* AWS.SecurityHub.DescribeStandardsControls();
// runtimeconst { Controls } = yield* describeStandardsControls({ StandardsSubscriptionArn: subscriptionArn,});DisableImportFindingsForProduct
Section titled “DisableImportFindingsForProduct”Source:
src/AWS/SecurityHub/DisableImportFindingsForProduct.ts
Runtime binding for securityhub:DisableImportFindingsForProduct.
Disables a product integration so its findings no longer flow into Security Hub.
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.DisableImportFindingsForProductHttp).
DisableImportFindingsForProduct: Product Integrations
Section titled “DisableImportFindingsForProduct: Product Integrations”// init — account-level binding, no resource argumentconst disableImportFindingsForProduct = yield* AWS.SecurityHub.DisableImportFindingsForProduct();
// runtimeyield* disableImportFindingsForProduct({ ProductSubscriptionArn: subscriptionArn,});DisableOrganizationAdminAccount
Section titled “DisableOrganizationAdminAccount”Source:
src/AWS/SecurityHub/DisableOrganizationAdminAccount.ts
Runtime binding for securityhub:DisableOrganizationAdminAccount.
Removes an organization account’s delegated Security Hub administrator status.
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.DisableOrganizationAdminAccountHttp).
DisableOrganizationAdminAccount: Members & Organization
Section titled “DisableOrganizationAdminAccount: Members & Organization”// init — account-level binding, no resource argumentconst disableOrganizationAdminAccount = yield* AWS.SecurityHub.DisableOrganizationAdminAccount();
// runtimeyield* disableOrganizationAdminAccount({ AdminAccountId: "111122223333" });DisassociateFromAdministratorAccount
Section titled “DisassociateFromAdministratorAccount”Source:
src/AWS/SecurityHub/DisassociateFromAdministratorAccount.ts
Runtime binding for securityhub:DisassociateFromAdministratorAccount.
Disassociates this member account from its Security Hub administrator account.
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.DisassociateFromAdministratorAccountHttp).
DisassociateFromAdministratorAccount: Members & Organization
Section titled “DisassociateFromAdministratorAccount: Members & Organization”// init — account-level binding, no resource argumentconst disassociateFromAdministratorAccount = yield* AWS.SecurityHub.DisassociateFromAdministratorAccount();
// runtimeyield* disassociateFromAdministratorAccount();DisassociateMembers
Section titled “DisassociateMembers”Source:
src/AWS/SecurityHub/DisassociateMembers.ts
Runtime binding for securityhub:DisassociateMembers.
Disassociates the specified member accounts from this administrator account.
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.DisassociateMembersHttp).
DisassociateMembers: Members & Organization
Section titled “DisassociateMembers: Members & Organization”// init — account-level binding, no resource argumentconst disassociateMembers = yield* AWS.SecurityHub.DisassociateMembers();
// runtimeyield* disassociateMembers({ AccountIds: ["111122223333"] });EnableImportFindingsForProduct
Section titled “EnableImportFindingsForProduct”Source:
src/AWS/SecurityHub/EnableImportFindingsForProduct.ts
Runtime binding for securityhub:EnableImportFindingsForProduct.
Enables a product integration so its findings flow into Security Hub.
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.EnableImportFindingsForProductHttp).
EnableImportFindingsForProduct: Product Integrations
Section titled “EnableImportFindingsForProduct: Product Integrations”// init — account-level binding, no resource argumentconst enableImportFindingsForProduct = yield* AWS.SecurityHub.EnableImportFindingsForProduct();
// runtimeconst { ProductSubscriptionArn } = yield* enableImportFindingsForProduct({ ProductArn: productArn,});EnableOrganizationAdminAccount
Section titled “EnableOrganizationAdminAccount”Source:
src/AWS/SecurityHub/EnableOrganizationAdminAccount.ts
Runtime binding for securityhub:EnableOrganizationAdminAccount.
Designates an organization account as the delegated Security Hub administrator.
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.EnableOrganizationAdminAccountHttp).
EnableOrganizationAdminAccount: Members & Organization
Section titled “EnableOrganizationAdminAccount: Members & Organization”// init — account-level binding, no resource argumentconst enableOrganizationAdminAccount = yield* AWS.SecurityHub.EnableOrganizationAdminAccount();
// runtimeyield* enableOrganizationAdminAccount({ AdminAccountId: "111122223333" });FindingAggregator
Section titled “FindingAggregator”Source:
src/AWS/SecurityHub/FindingAggregator.ts
The Security Hub cross-Region finding aggregator — replicates findings
from linked Regions into the home Region. Only one aggregator can exist
per account, so this is a singleton: adopting a pre-existing aggregator
that Alchemy did not create requires --adopt.
FindingAggregator: Aggregating Findings Across Regions
Section titled “FindingAggregator: Aggregating Findings Across Regions”Aggregate from All Regions
const aggregator = yield* AWS.SecurityHub.FindingAggregator("Aggregator", { regionLinkingMode: "ALL_REGIONS",});Aggregate from Specific Regions
const aggregator = yield* AWS.SecurityHub.FindingAggregator("Aggregator", { regionLinkingMode: "SPECIFIED_REGIONS", regions: ["us-east-1", "eu-west-1"],});GetAdministratorAccount
Section titled “GetAdministratorAccount”Source:
src/AWS/SecurityHub/GetAdministratorAccount.ts
Runtime binding for securityhub:GetAdministratorAccount.
Returns the details of the Security Hub administrator account for this member account, if any.
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.GetAdministratorAccountHttp).
GetAdministratorAccount: Members & Organization
Section titled “GetAdministratorAccount: Members & Organization”// init — account-level binding, no resource argumentconst getAdministratorAccount = yield* AWS.SecurityHub.GetAdministratorAccount();
// runtimeconst { Administrator } = yield* getAdministratorAccount();GetEnabledStandards
Section titled “GetEnabledStandards”Source:
src/AWS/SecurityHub/GetEnabledStandards.ts
Runtime binding for securityhub:GetEnabledStandards.
Lists the standards subscriptions currently enabled in the account.
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.GetEnabledStandardsHttp).
GetEnabledStandards: Standards & Controls
Section titled “GetEnabledStandards: Standards & Controls”// init — account-level binding, no resource argumentconst getEnabledStandards = yield* AWS.SecurityHub.GetEnabledStandards();
// runtimeconst { StandardsSubscriptions } = yield* getEnabledStandards();GetFindingHistory
Section titled “GetFindingHistory”Source:
src/AWS/SecurityHub/GetFindingHistory.ts
Runtime binding for securityhub:GetFindingHistory.
Returns the history of a finding for up to 90 days — every update Security Hub or a provider applied to it.
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.GetFindingHistoryHttp).
GetFindingHistory: Working with Findings
Section titled “GetFindingHistory: Working with Findings”// init — account-level binding, no resource argumentconst getFindingHistory = yield* AWS.SecurityHub.GetFindingHistory();
// runtimeconst { Records } = yield* getFindingHistory({ FindingIdentifier: { Id: findingId, ProductArn: productArn },});GetFindings
Section titled “GetFindings”Source:
src/AWS/SecurityHub/GetFindings.ts
Runtime binding for securityhub:GetFindings.
Returns findings that match the specified filter criteria. With cross-Region aggregation enabled, the home Region returns matching findings from all linked Regions.
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.GetFindingsHttp).
GetFindings: Working with Findings
Section titled “GetFindings: Working with Findings”// init — account-level binding, no resource argumentconst getFindings = yield* AWS.SecurityHub.GetFindings();
// runtimeconst { Findings } = yield* getFindings({ Filters: { SeverityLabel: [{ Value: "HIGH", Comparison: "EQUALS" }] }, MaxResults: 25,});GetInsightResults
Section titled “GetInsightResults”Source:
src/AWS/SecurityHub/GetInsightResults.ts
Runtime binding for securityhub:GetInsightResults.
Returns the aggregated results of a Security Hub insight, grouped by the insight’s group-by attribute.
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.GetInsightResultsHttp).
GetInsightResults: Working with Insights
Section titled “GetInsightResults: Working with Insights”// init — account-level binding, no resource argumentconst getInsightResults = yield* AWS.SecurityHub.GetInsightResults();
// runtimeconst { InsightResults } = yield* getInsightResults({ InsightArn: insight.insightArn,});GetInsights
Section titled “GetInsights”Source:
src/AWS/SecurityHub/GetInsights.ts
Runtime binding for securityhub:GetInsights.
Lists and describes Security Hub insights (saved, grouped finding queries).
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.GetInsightsHttp).
GetInsights: Working with Insights
Section titled “GetInsights: Working with Insights”// init — account-level binding, no resource argumentconst getInsights = yield* AWS.SecurityHub.GetInsights();
// runtimeconst { Insights } = yield* getInsights();GetInvitationsCount
Section titled “GetInvitationsCount”Source:
src/AWS/SecurityHub/GetInvitationsCount.ts
Runtime binding for securityhub:GetInvitationsCount.
Returns the count of membership invitations received by this account (excluding accepted ones).
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.GetInvitationsCountHttp).
GetInvitationsCount: Members & Organization
Section titled “GetInvitationsCount: Members & Organization”// init — account-level binding, no resource argumentconst getInvitationsCount = yield* AWS.SecurityHub.GetInvitationsCount();
// runtimeconst { InvitationsCount } = yield* getInvitationsCount();GetMembers
Section titled “GetMembers”Source:
src/AWS/SecurityHub/GetMembers.ts
Runtime binding for securityhub:GetMembers.
Returns the member details for the specified accounts.
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.GetMembersHttp).
GetMembers: Members & Organization
Section titled “GetMembers: Members & Organization”// init — account-level binding, no resource argumentconst getMembers = yield* AWS.SecurityHub.GetMembers();
// runtimeconst { Members } = yield* getMembers({ AccountIds: ["111122223333"] });GetSecurityControlDefinition
Section titled “GetSecurityControlDefinition”Source:
src/AWS/SecurityHub/GetSecurityControlDefinition.ts
Runtime binding for securityhub:GetSecurityControlDefinition.
Returns the definition (title, description, parameters, severity) of a single security control.
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.GetSecurityControlDefinitionHttp).
GetSecurityControlDefinition: Standards & Controls
Section titled “GetSecurityControlDefinition: Standards & Controls”// init — account-level binding, no resource argumentconst getSecurityControlDefinition = yield* AWS.SecurityHub.GetSecurityControlDefinition();
// runtimeconst { SecurityControlDefinition } = yield* getSecurityControlDefinition({ SecurityControlId: "IAM.1",});Source:
src/AWS/SecurityHub/Hub.ts
The Security Hub Hub — the account/region singleton that enables AWS Security
Hub. Only one Hub can exist per region, so this is a capture-and-restore
singleton: adopting a pre-existing Hub that Alchemy did not create requires
--adopt.
Hub: Enabling Security Hub
Section titled “Hub: Enabling Security Hub”Enable with default standards
const hub = yield* SecurityHub.Hub("Hub", {});Enable without default standards, auto-enable controls
const hub = yield* SecurityHub.Hub("Hub", { enableDefaultStandards: false, autoEnableControls: true, controlFindingGenerator: "SECURITY_CONTROL", tags: { team: "security" },});Insight
Section titled “Insight”Source:
src/AWS/SecurityHub/Insight.ts
A Security Hub custom insight — a saved finding query grouped by an
attribute. Read its aggregated results at runtime with the
GetInsightResults binding.
Insight: Creating an Insight
Section titled “Insight: Creating an Insight”Critical Findings by Resource
const insight = yield* AWS.SecurityHub.Insight("CriticalByResource", { filters: { SeverityLabel: [{ Value: "CRITICAL", Comparison: "EQUALS" }], RecordState: [{ Value: "ACTIVE", Comparison: "EQUALS" }], }, groupByAttribute: "ResourceId",});Read Insight Results at Runtime
const getInsightResults = yield* AWS.SecurityHub.GetInsightResults();const { InsightResults } = yield* getInsightResults({ InsightArn: insight.insightArn,});InviteMembers
Section titled “InviteMembers”Source:
src/AWS/SecurityHub/InviteMembers.ts
Runtime binding for securityhub:InviteMembers.
Invites the specified accounts to associate with this account as Security Hub members.
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.InviteMembersHttp).
InviteMembers: Members & Organization
Section titled “InviteMembers: Members & Organization”// init — account-level binding, no resource argumentconst inviteMembers = yield* AWS.SecurityHub.InviteMembers();
// runtimeyield* inviteMembers({ AccountIds: ["111122223333"] });ListAutomationRules
Section titled “ListAutomationRules”Source:
src/AWS/SecurityHub/ListAutomationRules.ts
Runtime binding for securityhub:ListAutomationRules.
Lists the automation rules defined in the account.
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.ListAutomationRulesHttp).
ListAutomationRules: Custom Actions, Automation Rules & Aggregation
Section titled “ListAutomationRules: Custom Actions, Automation Rules & Aggregation”// init — account-level binding, no resource argumentconst listAutomationRules = yield* AWS.SecurityHub.ListAutomationRules();
// runtimeconst { AutomationRulesMetadata } = yield* listAutomationRules();ListEnabledProductsForImport
Section titled “ListEnabledProductsForImport”Source:
src/AWS/SecurityHub/ListEnabledProductsForImport.ts
Runtime binding for securityhub:ListEnabledProductsForImport.
Lists the product integrations currently enabled to import findings into Security Hub.
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.ListEnabledProductsForImportHttp).
ListEnabledProductsForImport: Product Integrations
Section titled “ListEnabledProductsForImport: Product Integrations”// init — account-level binding, no resource argumentconst listEnabledProductsForImport = yield* AWS.SecurityHub.ListEnabledProductsForImport();
// runtimeconst { ProductSubscriptions } = yield* listEnabledProductsForImport();ListFindingAggregators
Section titled “ListFindingAggregators”Source:
src/AWS/SecurityHub/ListFindingAggregators.ts
Runtime binding for securityhub:ListFindingAggregators.
Lists the cross-Region finding aggregators configured in the account.
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.ListFindingAggregatorsHttp).
ListFindingAggregators: Custom Actions, Automation Rules & Aggregation
Section titled “ListFindingAggregators: Custom Actions, Automation Rules & Aggregation”// init — account-level binding, no resource argumentconst listFindingAggregators = yield* AWS.SecurityHub.ListFindingAggregators();
// runtimeconst { FindingAggregators } = yield* listFindingAggregators();ListInvitations
Section titled “ListInvitations”Source:
src/AWS/SecurityHub/ListInvitations.ts
Runtime binding for securityhub:ListInvitations.
Lists the Security Hub membership invitations received by this account.
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.ListInvitationsHttp).
ListInvitations: Members & Organization
Section titled “ListInvitations: Members & Organization”// init — account-level binding, no resource argumentconst listInvitations = yield* AWS.SecurityHub.ListInvitations();
// runtimeconst { Invitations } = yield* listInvitations();ListMembers
Section titled “ListMembers”Source:
src/AWS/SecurityHub/ListMembers.ts
Runtime binding for securityhub:ListMembers.
Lists the member accounts associated with this administrator account.
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.ListMembersHttp).
ListMembers: Members & Organization
Section titled “ListMembers: Members & Organization”// init — account-level binding, no resource argumentconst listMembers = yield* AWS.SecurityHub.ListMembers();
// runtimeconst { Members } = yield* listMembers();ListOrganizationAdminAccounts
Section titled “ListOrganizationAdminAccounts”Source:
src/AWS/SecurityHub/ListOrganizationAdminAccounts.ts
Runtime binding for securityhub:ListOrganizationAdminAccounts.
Lists the organization’s delegated Security Hub administrator accounts.
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.ListOrganizationAdminAccountsHttp).
ListOrganizationAdminAccounts: Members & Organization
Section titled “ListOrganizationAdminAccounts: Members & Organization”// init — account-level binding, no resource argumentconst listOrganizationAdminAccounts = yield* AWS.SecurityHub.ListOrganizationAdminAccounts();
// runtimeconst { AdminAccounts } = yield* listOrganizationAdminAccounts();ListSecurityControlDefinitions
Section titled “ListSecurityControlDefinitions”Source:
src/AWS/SecurityHub/ListSecurityControlDefinitions.ts
Runtime binding for securityhub:ListSecurityControlDefinitions.
Lists all security control definitions, optionally restricted to one standard.
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.ListSecurityControlDefinitionsHttp).
ListSecurityControlDefinitions: Standards & Controls
Section titled “ListSecurityControlDefinitions: Standards & Controls”// init — account-level binding, no resource argumentconst listSecurityControlDefinitions = yield* AWS.SecurityHub.ListSecurityControlDefinitions();
// runtimeconst { SecurityControlDefinitions } = yield* listSecurityControlDefinitions();ListStandardsControlAssociations
Section titled “ListStandardsControlAssociations”Source:
src/AWS/SecurityHub/ListStandardsControlAssociations.ts
Runtime binding for securityhub:ListStandardsControlAssociations.
Lists, for one security control, every standard it belongs to and its enablement status there.
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.ListStandardsControlAssociationsHttp).
ListStandardsControlAssociations: Standards & Controls
Section titled “ListStandardsControlAssociations: Standards & Controls”// init — account-level binding, no resource argumentconst listStandardsControlAssociations = yield* AWS.SecurityHub.ListStandardsControlAssociations();
// runtimeconst { StandardsControlAssociationSummaries } = yield* listStandardsControlAssociations({ SecurityControlId: "IAM.1" });UpdateOrganizationConfiguration
Section titled “UpdateOrganizationConfiguration”Source:
src/AWS/SecurityHub/UpdateOrganizationConfiguration.ts
Runtime binding for securityhub:UpdateOrganizationConfiguration.
Updates how Security Hub is configured across the organization (auto-enable, central configuration).
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.UpdateOrganizationConfigurationHttp).
UpdateOrganizationConfiguration: Members & Organization
Section titled “UpdateOrganizationConfiguration: Members & Organization”// init — account-level binding, no resource argumentconst updateOrganizationConfiguration = yield* AWS.SecurityHub.UpdateOrganizationConfiguration();
// runtimeyield* updateOrganizationConfiguration({ AutoEnable: true });UpdateSecurityControl
Section titled “UpdateSecurityControl”Source:
src/AWS/SecurityHub/UpdateSecurityControl.ts
Runtime binding for securityhub:UpdateSecurityControl.
Updates the customizable parameters of a security control.
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.UpdateSecurityControlHttp).
UpdateSecurityControl: Standards & Controls
Section titled “UpdateSecurityControl: Standards & Controls”// init — account-level binding, no resource argumentconst updateSecurityControl = yield* AWS.SecurityHub.UpdateSecurityControl();
// runtimeyield* updateSecurityControl({ SecurityControlId: "ACM.1", Parameters: { daysToExpiration: { ValueType: "CUSTOM", Value: { Integer: 15 } } },});UpdateStandardsControl
Section titled “UpdateStandardsControl”Source:
src/AWS/SecurityHub/UpdateStandardsControl.ts
Runtime binding for securityhub:UpdateStandardsControl.
Enables or disables an individual control within an enabled standard.
Account-level operation — invoked with the caller’s request as-is.
Provide the implementation with
Effect.provide(AWS.SecurityHub.UpdateStandardsControlHttp).
UpdateStandardsControl: Standards & Controls
Section titled “UpdateStandardsControl: Standards & Controls”// init — account-level binding, no resource argumentconst updateStandardsControl = yield* AWS.SecurityHub.UpdateStandardsControl();
// runtimeyield* updateStandardsControl({ StandardsControlArn: controlArn, ControlStatus: "DISABLED", DisabledReason: "not applicable to this workload",});