# generated by fastapi-codegen:
# filename: openapi.yaml
# timestamp: 2025-06-06T03:37:32+00:00
import argparse
import os
from typing import *
from typing import Optional, Union
from autogen.mcp.mcp_proxy import MCPProxy
from autogen.mcp.mcp_proxy.security import APIKeyHeader, BaseSecurity
from fastapi import Header, Path, Query
from pydantic import conint, constr
from models import (
AcceptAdministratorInvitationResponse,
AcceptInvitationResponse,
AccessDeniedException,
AccountsPatchRequest,
AccountsPostRequest,
ActionTargetsActionTargetArnPatchRequest,
ActionTargetsGetPostRequest,
ActionTargetsPostRequest,
AdministratorPostRequest,
AssociationsBatchGetPostRequest,
AssociationsPatchRequest,
BatchDisableStandardsResponse,
BatchEnableStandardsResponse,
BatchGetSecurityControlsResponse,
BatchGetStandardsControlAssociationsResponse,
BatchImportFindingsResponse,
BatchUpdateFindingsResponse,
BatchUpdateStandardsControlAssociationsResponse,
CreateActionTargetResponse,
CreateFindingAggregatorResponse,
CreateInsightResponse,
CreateMembersResponse,
DeclineInvitationsResponse,
DeleteActionTargetResponse,
DeleteFindingAggregatorResponse,
DeleteInsightResponse,
DeleteInvitationsResponse,
DeleteMembersResponse,
DescribeActionTargetsResponse,
DescribeHubResponse,
DescribeOrganizationConfigurationResponse,
DescribeProductsResponse,
DescribeStandardsControlsResponse,
DescribeStandardsResponse,
DisableImportFindingsForProductResponse,
DisableOrganizationAdminAccountResponse,
DisableSecurityHubResponse,
DisassociateFromAdministratorAccountResponse,
DisassociateFromMasterAccountResponse,
DisassociateMembersResponse,
EnableImportFindingsForProductResponse,
EnableOrganizationAdminAccountResponse,
EnableSecurityHubResponse,
FindingAggregatorCreatePostRequest,
FindingAggregatorUpdatePatchRequest,
FindingsBatchupdatePatchRequest,
FindingsImportPostRequest,
FindingsPatchRequest,
FindingsPostRequest,
GetAdministratorAccountResponse,
GetEnabledStandardsResponse,
GetFindingAggregatorResponse,
GetFindingsResponse,
GetInsightResultsResponse,
GetInsightsResponse,
GetInvitationsCountResponse,
GetMasterAccountResponse,
GetMembersResponse,
InsightsGetPostRequest,
InsightsInsightArnPatchRequest,
InsightsPostRequest,
InternalException,
InvalidAccessException,
InvalidInputException,
InvitationsDeclinePostRequest,
InvitationsDeletePostRequest,
InviteMembersResponse,
LimitExceededException,
ListEnabledProductsForImportResponse,
ListFindingAggregatorsResponse,
ListInvitationsResponse,
ListMembersResponse,
ListOrganizationAdminAccountsResponse,
ListSecurityControlDefinitionsResponse,
ListStandardsControlAssociationsResponse,
ListTagsForResourceResponse,
MasterPostRequest,
MembersDeletePostRequest,
MembersDisassociatePostRequest,
MembersGetPostRequest,
MembersInvitePostRequest,
MembersPostRequest,
OrganizationAdminDisablePostRequest,
OrganizationAdminEnablePostRequest,
OrganizationConfigurationPostRequest,
ProductSubscriptionsPostRequest,
ResourceConflictException,
ResourceNotFoundException,
SecurityControlsBatchGetPostRequest,
StandardsControlStandardsControlArnPatchRequest,
StandardsDeregisterPostRequest,
StandardsGetPostRequest,
StandardsRegisterPostRequest,
TagKeys,
TagResourceResponse,
TagsResourceArnPostRequest,
UntagResourceResponse,
UpdateActionTargetResponse,
UpdateFindingAggregatorResponse,
UpdateFindingsResponse,
UpdateInsightResponse,
UpdateOrganizationConfigurationResponse,
UpdateSecurityHubConfigurationResponse,
UpdateStandardsControlResponse,
)
app = MCPProxy(
contact={
'email': 'mike.ralphson@gmail.com',
'name': 'Mike Ralphson',
'url': 'https://github.com/mermade/aws2openapi',
'x-twitter': 'PermittedSoc',
},
description='<p>Security Hub provides you with a comprehensive view of the security state of your Amazon Web Services 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 Amazon Web Services 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 <a href="https://docs.aws.amazon.com/securityhub/latest/userguide/what-is-securityhub.html">Security HubUser Guide</a>.</p> <p>When you use operations in the Security Hub API, the requests are executed only in the Amazon Web Services Region that is currently active or in the specific Amazon Web Services 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, run the same command for each Region in which you want to apply the change.</p> <p>For example, if your Region is set to <code>us-west-2</code>, when you use <code>CreateMembers</code> to add a member account to Security Hub, the association of the member account with the administrator account is created only in the <code>us-west-2</code> Region. Security Hub must be enabled for the member account in the same Region that the invitation was sent from.</p> <p>The following throttling limits apply to using Security Hub API operations.</p> <ul> <li> <p> <code>BatchEnableStandards</code> - <code>RateLimit</code> of 1 request per second. <code>BurstLimit</code> of 1 request per second.</p> </li> <li> <p> <code>GetFindings</code> - <code>RateLimit</code> of 3 requests per second. <code>BurstLimit</code> of 6 requests per second.</p> </li> <li> <p> <code>BatchImportFindings</code> - <code>RateLimit</code> of 10 requests per second. <code>BurstLimit</code> of 30 requests per second.</p> </li> <li> <p> <code>BatchUpdateFindings</code> - <code>RateLimit</code> of 10 requests per second. <code>BurstLimit</code> of 30 requests per second.</p> </li> <li> <p> <code>UpdateStandardsControl</code> - <code>RateLimit</code> of 1 request per second. <code>BurstLimit</code> of 5 requests per second.</p> </li> <li> <p>All other operations - <code>RateLimit</code> of 10 requests per second. <code>BurstLimit</code> of 30 requests per second.</p> </li> </ul>',
license={'name': 'Apache 2.0 License', 'url': 'http://www.apache.org/licenses/'},
termsOfService='https://aws.amazon.com/service-terms/',
title='AWS SecurityHub',
version='2018-10-26',
servers=[
{
'description': 'The AWS SecurityHub multi-region endpoint',
'url': 'http://securityhub.{region}.amazonaws.com',
'variables': {
'region': {
'default': 'us-east-1',
'description': 'The AWS region',
'enum': [
'us-east-1',
'us-east-2',
'us-west-1',
'us-west-2',
'us-gov-west-1',
'us-gov-east-1',
'ca-central-1',
'eu-north-1',
'eu-west-1',
'eu-west-2',
'eu-west-3',
'eu-central-1',
'eu-south-1',
'af-south-1',
'ap-northeast-1',
'ap-northeast-2',
'ap-northeast-3',
'ap-southeast-1',
'ap-southeast-2',
'ap-east-1',
'ap-south-1',
'sa-east-1',
'me-south-1',
],
}
},
},
{
'description': 'The AWS SecurityHub multi-region endpoint',
'url': 'https://securityhub.{region}.amazonaws.com',
'variables': {
'region': {
'default': 'us-east-1',
'description': 'The AWS region',
'enum': [
'us-east-1',
'us-east-2',
'us-west-1',
'us-west-2',
'us-gov-west-1',
'us-gov-east-1',
'ca-central-1',
'eu-north-1',
'eu-west-1',
'eu-west-2',
'eu-west-3',
'eu-central-1',
'eu-south-1',
'af-south-1',
'ap-northeast-1',
'ap-northeast-2',
'ap-northeast-3',
'ap-southeast-1',
'ap-southeast-2',
'ap-east-1',
'ap-south-1',
'sa-east-1',
'me-south-1',
],
}
},
},
{
'description': 'The AWS SecurityHub endpoint for China (Beijing) and China (Ningxia)',
'url': 'http://securityhub.{region}.amazonaws.com.cn',
'variables': {
'region': {
'default': 'cn-north-1',
'description': 'The AWS region',
'enum': ['cn-north-1', 'cn-northwest-1'],
}
},
},
{
'description': 'The AWS SecurityHub endpoint for China (Beijing) and China (Ningxia)',
'url': 'https://securityhub.{region}.amazonaws.com.cn',
'variables': {
'region': {
'default': 'cn-north-1',
'description': 'The AWS region',
'enum': ['cn-north-1', 'cn-northwest-1'],
}
},
},
],
)
@app.delete(
'/accounts',
description=""" <p>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.</p> <p>When you disable Security Hub for an administrator account, it doesn't disable Security Hub for any associated member accounts.</p> <p>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 administrator and member account associations are removed.</p> <p>If you want to save your existing findings, you must export them before you disable Security Hub.</p> """,
tags=['security_control_operations'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def disable_security_hub(
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/accounts',
description=""" Returns details about the Hub resource in your account, including the <code>HubArn</code> and the time when you enabled Security Hub. """,
tags=[
'security_hub_configuration',
'action_target_operations',
'finding_operations',
'insight_operations',
'invitation_processing',
'control_standard_management',
'member_invitation_management',
'organization_structure_management',
'security_control_operations',
'product_inventory_management',
'resource_tagging_operations',
'resource_tagging_management',
],
security=[
APIKeyHeader(name="Authorization"),
],
)
def describe_hub(
hub_arn: Optional[constr(pattern=r'.*\S.*')] = Query(None, alias='HubArn'),
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.patch(
'/accounts',
description=""" Updates configuration options for Security Hub. """,
tags=['security_control_operations', 'action_target_operations'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def update_security_hub_configuration(
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
body: AccountsPatchRequest = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/accounts',
description=""" <p>Enables Security Hub for your account in the current Region or the Region you specify in the request.</p> <p>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.</p> <p>When you use the <code>EnableSecurityHub</code> operation to enable Security Hub, you also automatically enable the following standards:</p> <ul> <li> <p>Center for Internet Security (CIS) Amazon Web Services Foundations Benchmark v1.2.0</p> </li> <li> <p>Amazon Web Services Foundational Security Best Practices</p> </li> </ul> <p>Other standards are not automatically enabled. </p> <p>To opt out of automatically enabled standards, set <code>EnableDefaultStandards</code> to <code>false</code>.</p> <p>After you enable Security Hub, to enable a standard, use the <code>BatchEnableStandards</code> operation. To disable a standard, use the <code>BatchDisableStandards</code> operation.</p> <p>To learn more, see the <a href="https://docs.aws.amazon.com/securityhub/latest/userguide/securityhub-settingup.html">setup information</a> in the <i>Security Hub User Guide</i>.</p> """,
tags=['security_control_operations'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def enable_security_hub(
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
body: AccountsPostRequest = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/actionTargets',
description=""" <p>Creates a custom action target in Security Hub.</p> <p>You can use custom actions on findings and insights in Security Hub to trigger target actions in Amazon CloudWatch Events.</p> """,
tags=['action_target_operations'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def create_action_target(
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
body: ActionTargetsPostRequest = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/actionTargets/get',
description=""" Returns a list of the custom action targets in Security Hub in your account. """,
tags=['action_target_operations'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def describe_action_targets(
max_results: Optional[str] = Query(None, alias='MaxResults'),
next_token: Optional[str] = Query(None, alias='NextToken'),
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
body: ActionTargetsGetPostRequest = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/actionTargets/{ActionTargetArn}',
description=""" <p>Deletes a custom action target from Security Hub.</p> <p>Deleting a custom action target does not affect any findings or insights that were already sent to Amazon CloudWatch Events using the custom action.</p> """,
tags=['action_target_operations', 'security_hub_configuration'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def delete_action_target(
action_target_arn: constr(pattern=r'.*\S.*') = Path(..., alias='ActionTargetArn'),
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.patch(
'/actionTargets/{ActionTargetArn}',
description=""" Updates the name and description of a custom action target in Security Hub. """,
tags=['action_target_operations'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def update_action_target(
action_target_arn: constr(pattern=r'.*\S.*') = Path(..., alias='ActionTargetArn'),
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
body: ActionTargetsActionTargetArnPatchRequest = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/administrator',
description=""" <p>Provides the details for the Security Hub administrator account for the current member account.</p> <p>Can be used by both member accounts that are managed using Organizations and accounts that were invited manually.</p> """,
tags=['security_control_operations'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def get_administrator_account(
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/administrator',
description=""" <p>Accepts the invitation to be a member account and be monitored by the Security Hub administrator account that the invitation was sent from.</p> <p>This operation is only used by member accounts that are not added through Organizations.</p> <p>When the member account accepts the invitation, permission is granted to the administrator account to view findings generated in the member account.</p> """,
tags=['security_control_operations', 'action_target_operations'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def accept_administrator_invitation(
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
body: AdministratorPostRequest = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/administrator/disassociate',
description=""" <p>Disassociates the current Security Hub member account from the associated administrator account.</p> <p>This operation is only used by accounts that are not part of an organization. For organization accounts, only the administrator account can disassociate a member account.</p> """,
tags=['security_control_operations'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def disassociate_from_administrator_account(
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.patch(
'/associations',
description=""" For a batch of security controls and standards, this operation updates the enablement status of a control in a standard. """,
tags=['security_control_operations'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def batch_update_standards_control_associations(
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
body: AssociationsPatchRequest = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/associations#SecurityControlId',
description=""" Specifies whether a control is currently enabled or disabled in each enabled standard in the calling account. """,
tags=['security_control_operations'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def list_standards_control_associations(
security_control_id: constr(pattern=r'.*\S.*') = Query(
..., alias='SecurityControlId'
),
next_token: Optional[str] = Query(None, alias='NextToken'),
max_results: Optional[conint(ge=1, le=100)] = Query(None, alias='MaxResults'),
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/associations/batchGet',
description=""" For a batch of security controls and standards, identifies whether each control is currently enabled or disabled in a standard. """,
tags=['security_control_operations'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def batch_get_standards_control_associations(
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
body: AssociationsBatchGetPostRequest = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/findingAggregator/create',
description=""" <p>Used to enable finding aggregation. Must be called from the aggregation Region.</p> <p>For more details about cross-Region replication, see <a href="https://docs.aws.amazon.com/securityhub/latest/userguide/finding-aggregation.html">Configuring finding aggregation</a> in the <i>Security Hub User Guide</i>. </p> """,
tags=['finding_aggregator_management'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def create_finding_aggregator(
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
body: FindingAggregatorCreatePostRequest = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/findingAggregator/delete/{FindingAggregatorArn}',
description=""" <p>Deletes a finding aggregator. When you delete the finding aggregator, you stop finding aggregation.</p> <p>When you stop finding aggregation, findings that were already aggregated to the aggregation Region are still visible from the aggregation Region. New findings and finding updates are not aggregated. </p> """,
tags=['finding_aggregator_management'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def delete_finding_aggregator(
finding_aggregator_arn: constr(pattern=r'.*\S.*') = Path(
..., alias='FindingAggregatorArn'
),
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/findingAggregator/get/{FindingAggregatorArn}',
description=""" Returns the current finding aggregation configuration. """,
tags=['finding_aggregator_management'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def get_finding_aggregator(
finding_aggregator_arn: constr(pattern=r'.*\S.*') = Path(
..., alias='FindingAggregatorArn'
),
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/findingAggregator/list',
description=""" If finding aggregation is enabled, then <code>ListFindingAggregators</code> returns the ARN of the finding aggregator. You can run this operation from any Region. """,
tags=['security_hub_configuration', 'finding_operations', 'invitation_processing'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def list_finding_aggregators(
next_token: Optional[str] = Query(None, alias='NextToken'),
max_results: Optional[conint(ge=1, le=100)] = Query(None, alias='MaxResults'),
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.patch(
'/findingAggregator/update',
description=""" <p>Updates the finding aggregation configuration. Used to update the Region linking mode and the list of included or excluded Regions. You cannot use <code>UpdateFindingAggregator</code> to change the aggregation Region.</p> <p>You must run <code>UpdateFindingAggregator</code> from the current aggregation Region. </p> """,
tags=['finding_aggregator_management'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def update_finding_aggregator(
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
body: FindingAggregatorUpdatePatchRequest = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.patch(
'/findings',
description=""" <p> <code>UpdateFindings</code> is deprecated. Instead of <code>UpdateFindings</code>, use <code>BatchUpdateFindings</code>.</p> <p>Updates the <code>Note</code> and <code>RecordState</code> of the Security Hub-aggregated findings that the filter attributes specify. Any member account that can view the finding also sees the update to the finding.</p> """,
tags=['finding_operations'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def update_findings(
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
body: FindingsPatchRequest = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/findings',
description=""" <p>Returns a list of findings that match the specified criteria.</p> <p>If finding aggregation is enabled, then when you call <code>GetFindings</code> from the aggregation Region, the results include all of the matching findings from both the aggregation Region and the linked Regions.</p> """,
tags=['finding_operations'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def get_findings(
max_results: Optional[str] = Query(None, alias='MaxResults'),
next_token: Optional[str] = Query(None, alias='NextToken'),
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
body: FindingsPostRequest = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.patch(
'/findings/batchupdate',
description=""" <p>Used by Security Hub customers to update information about their investigation into a finding. Requested by administrator accounts or member accounts. Administrator accounts can update findings for their account and their member accounts. Member accounts can update findings for their account.</p> <p>Updates from <code>BatchUpdateFindings</code> do not affect the value of <code>UpdatedAt</code> for a finding.</p> <p>Administrator and member accounts can use <code>BatchUpdateFindings</code> to update the following finding fields and objects.</p> <ul> <li> <p> <code>Confidence</code> </p> </li> <li> <p> <code>Criticality</code> </p> </li> <li> <p> <code>Note</code> </p> </li> <li> <p> <code>RelatedFindings</code> </p> </li> <li> <p> <code>Severity</code> </p> </li> <li> <p> <code>Types</code> </p> </li> <li> <p> <code>UserDefinedFields</code> </p> </li> <li> <p> <code>VerificationState</code> </p> </li> <li> <p> <code>Workflow</code> </p> </li> </ul> <p>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 <a href="https://docs.aws.amazon.com/securityhub/latest/userguide/finding-update-batchupdatefindings.html#batchupdatefindings-configure-access">Configuring access to BatchUpdateFindings</a> in the <i>Security Hub User Guide</i>.</p> """,
tags=['finding_operations', 'security_control_operations'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def batch_update_findings(
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
body: FindingsBatchupdatePatchRequest = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/findings/import',
description=""" <p>Imports security findings generated by a finding provider into Security Hub. This action is requested by the finding provider to import its findings into Security Hub.</p> <p> <code>BatchImportFindings</code> must be called by one of the following:</p> <ul> <li> <p>The Amazon Web Services account that is associated with a finding if you are using the <a href="https://docs.aws.amazon.com/securityhub/latest/userguide/securityhub-custom-providers.html#securityhub-custom-providers-bfi-reqs">default product ARN</a> or are a partner sending findings from within a customer's Amazon Web Services account. In these cases, the identifier of the account that you are calling <code>BatchImportFindings</code> from needs to be the same as the <code>AwsAccountId</code> attribute for the finding.</p> </li> <li> <p>An Amazon Web Services account that Security Hub has allow-listed for an official partner integration. In this case, you can call <code>BatchImportFindings</code> from the allow-listed account and send findings from different customer accounts in the same batch.</p> </li> </ul> <p>The maximum allowed size for a finding is 240 Kb. An error is returned for any finding larger than 240 Kb.</p> <p>After a finding is created, <code>BatchImportFindings</code> cannot be used to update the following finding fields and objects, which Security Hub customers use to manage their investigation workflow.</p> <ul> <li> <p> <code>Note</code> </p> </li> <li> <p> <code>UserDefinedFields</code> </p> </li> <li> <p> <code>VerificationState</code> </p> </li> <li> <p> <code>Workflow</code> </p> </li> </ul> <p>Finding providers also should not use <code>BatchImportFindings</code> to update the following attributes.</p> <ul> <li> <p> <code>Confidence</code> </p> </li> <li> <p> <code>Criticality</code> </p> </li> <li> <p> <code>RelatedFindings</code> </p> </li> <li> <p> <code>Severity</code> </p> </li> <li> <p> <code>Types</code> </p> </li> </ul> <p>Instead, finding providers use <code>FindingProviderFields</code> to provide values for these attributes.</p> """,
tags=['finding_operations', 'product_inventory_management'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def batch_import_findings(
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
body: FindingsImportPostRequest = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/insights',
description=""" <p>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.</p> <p>To group the related findings in the insight, use the <code>GroupByAttribute</code>.</p> """,
tags=['finding_operations', 'insight_operations'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def create_insight(
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
body: InsightsPostRequest = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/insights/get',
description=""" Lists and describes insights for the specified insight ARNs. """,
tags=['insight_operations'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def get_insights(
max_results: Optional[str] = Query(None, alias='MaxResults'),
next_token: Optional[str] = Query(None, alias='NextToken'),
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
body: InsightsGetPostRequest = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/insights/results/{InsightArn}',
description=""" Lists the results of the Security Hub insight specified by the insight ARN. """,
tags=['insight_operations'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def get_insight_results(
insight_arn: constr(pattern=r'.*\S.*') = Path(..., alias='InsightArn'),
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/insights/{InsightArn}',
description=""" Deletes the insight specified by the <code>InsightArn</code>. """,
tags=['insight_operations'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def delete_insight(
insight_arn: constr(pattern=r'.*\S.*') = Path(..., alias='InsightArn'),
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.patch(
'/insights/{InsightArn}',
description=""" Updates the Security Hub insight identified by the specified insight ARN. """,
tags=['insight_operations'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def update_insight(
insight_arn: constr(pattern=r'.*\S.*') = Path(..., alias='InsightArn'),
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
body: InsightsInsightArnPatchRequest = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/invitations',
description=""" <p>Lists all Security Hub membership invitations that were sent to the current Amazon Web Services account.</p> <p>This operation is only used by accounts that are managed by invitation. Accounts that are managed using the integration with Organizations do not receive invitations.</p> """,
tags=[
'security_hub_configuration',
'action_target_operations',
'finding_operations',
'insight_operations',
'security_control_operations',
],
security=[
APIKeyHeader(name="Authorization"),
],
)
def list_invitations(
max_results: Optional[conint(ge=1, le=50)] = Query(None, alias='MaxResults'),
next_token: Optional[str] = Query(None, alias='NextToken'),
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/invitations/count',
description=""" Returns the count of all Security Hub membership invitations that were sent to the current member account, not including the currently accepted invitation. """,
tags=['security_hub_configuration', 'security_control_operations'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def get_invitations_count(
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/invitations/decline',
description=""" <p>Declines invitations to become a member account.</p> <p>A prospective member account uses this operation to decline an invitation to become a member.</p> <p>This operation is only called by member accounts that aren't part of an organization. Organization accounts don't receive invitations.</p> """,
tags=['invitation_processing', 'member_invitation_management'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def decline_invitations(
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
body: InvitationsDeclinePostRequest = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/invitations/delete',
description=""" <p>Deletes invitations received by the Amazon Web Services account to become a member account.</p> <p>A Security Hub administrator account can use this operation to delete invitations sent to one or more member accounts.</p> <p>This operation is only used to delete invitations that are sent to member accounts that aren't part of an organization. Organization accounts don't receive invitations.</p> """,
tags=['invitation_processing', 'member_invitation_management'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def delete_invitations(
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
body: InvitationsDeletePostRequest = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/master',
description=""" <p>This method is deprecated. Instead, use <code>GetAdministratorAccount</code>.</p> <p>The Security Hub console continues to use <code>GetMasterAccount</code>. It will eventually change to use <code>GetAdministratorAccount</code>. Any IAM policies that specifically control access to this function must continue to use <code>GetMasterAccount</code>. You should also add <code>GetAdministratorAccount</code> to your policies to ensure that the correct permissions are in place after the console begins to use <code>GetAdministratorAccount</code>.</p> <p>Provides the details for the Security Hub administrator account for the current member account.</p> <p>Can be used by both member accounts that are managed using Organizations and accounts that were invited manually.</p> """,
tags=['security_control_operations'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def get_master_account(
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/master',
description=""" <p>This method is deprecated. Instead, use <code>AcceptAdministratorInvitation</code>.</p> <p>The Security Hub console continues to use <code>AcceptInvitation</code>. It will eventually change to use <code>AcceptAdministratorInvitation</code>. Any IAM policies that specifically control access to this function must continue to use <code>AcceptInvitation</code>. You should also add <code>AcceptAdministratorInvitation</code> to your policies to ensure that the correct permissions are in place after the console begins to use <code>AcceptAdministratorInvitation</code>.</p> <p>Accepts the invitation to be a member account and be monitored by the Security Hub administrator account that the invitation was sent from.</p> <p>This operation is only used by member accounts that are not added through Organizations.</p> <p>When the member account accepts the invitation, permission is granted to the administrator account to view findings generated in the member account.</p> """,
tags=['security_control_operations'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def accept_invitation(
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
body: MasterPostRequest = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/master/disassociate',
description=""" <p>This method is deprecated. Instead, use <code>DisassociateFromAdministratorAccount</code>.</p> <p>The Security Hub console continues to use <code>DisassociateFromMasterAccount</code>. It will eventually change to use <code>DisassociateFromAdministratorAccount</code>. Any IAM policies that specifically control access to this function must continue to use <code>DisassociateFromMasterAccount</code>. You should also add <code>DisassociateFromAdministratorAccount</code> to your policies to ensure that the correct permissions are in place after the console begins to use <code>DisassociateFromAdministratorAccount</code>.</p> <p>Disassociates the current Security Hub member account from the associated administrator account.</p> <p>This operation is only used by accounts that are not part of an organization. For organization accounts, only the administrator account can disassociate a member account.</p> """,
tags=['security_control_operations'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def disassociate_from_master_account(
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/members',
description=""" <p>Lists details about all member accounts for the current Security Hub administrator account.</p> <p>The results include both member accounts that belong to an organization and member accounts that were invited manually.</p> """,
tags=[
'security_hub_configuration',
'action_target_operations',
'finding_operations',
'insight_operations',
'security_control_operations',
],
security=[
APIKeyHeader(name="Authorization"),
],
)
def list_members(
only_associated: Optional[bool] = Query(None, alias='OnlyAssociated'),
max_results: Optional[conint(ge=1, le=50)] = Query(None, alias='MaxResults'),
next_token: Optional[str] = Query(None, alias='NextToken'),
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/members',
description=""" <p>Creates a member association in Security Hub between the specified accounts and the account used to make the request, which is the administrator account. If you are integrated with Organizations, then the administrator account is designated by the organization management account.</p> <p> <code>CreateMembers</code> is always used to add accounts that are not organization members.</p> <p>For accounts that are managed using Organizations, <code>CreateMembers</code> is only used in the following cases:</p> <ul> <li> <p>Security Hub is not configured to automatically add new organization accounts.</p> </li> <li> <p>The account was disassociated or deleted in Security Hub.</p> </li> </ul> <p>This action can only be used by an account that has Security Hub enabled. To enable Security Hub, you can use the <code>EnableSecurityHub</code> operation.</p> <p>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 <code>InviteMembers</code> operation. If the account owner accepts the invitation, the account becomes a member account in Security Hub.</p> <p>Accounts that are managed using Organizations do not receive an invitation. They automatically become a member account in Security Hub.</p> <ul> <li> <p>If the organization account does not have Security Hub enabled, then Security Hub and the default standards are automatically enabled. Note that Security Hub cannot be enabled automatically for the organization management account. The organization management account must enable Security Hub before the administrator account enables it as a member account.</p> </li> <li> <p>For organization accounts that already have Security Hub enabled, Security Hub does not make any other changes to those accounts. It does not change their enabled standards or controls.</p> </li> </ul> <p>A permissions policy is added that permits the administrator account to view the findings generated in the member account.</p> <p>To remove the association between the administrator and member accounts, use the <code>DisassociateFromMasterAccount</code> or <code>DisassociateMembers</code> operation.</p> """,
tags=['security_hub_configuration', 'security_control_operations'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def create_members(
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
body: MembersPostRequest = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/members/delete',
description=""" <p>Deletes the specified member accounts from Security Hub.</p> <p>Can be used to delete member accounts that belong to an organization as well as member accounts that were invited manually.</p> """,
tags=['security_hub_configuration', 'finding_operations'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def delete_members(
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
body: MembersDeletePostRequest = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/members/disassociate',
description=""" <p>Disassociates the specified member accounts from the associated administrator account.</p> <p>Can be used to disassociate both accounts that are managed using Organizations and accounts that were invited manually.</p> """,
tags=[
'security_hub_configuration',
'action_target_operations',
'finding_operations',
'insight_operations',
],
security=[
APIKeyHeader(name="Authorization"),
],
)
def disassociate_members(
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
body: MembersDisassociatePostRequest = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/members/get',
description=""" <p>Returns the details for the Security Hub member accounts for the specified account IDs.</p> <p>An administrator account can be either the delegated Security Hub administrator account for an organization or an administrator account that enabled Security Hub manually.</p> <p>The results include both member accounts that are managed using Organizations and accounts that were invited manually.</p> """,
tags=['security_control_operations'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def get_members(
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
body: MembersGetPostRequest = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/members/invite',
description=""" <p>Invites other Amazon Web Services accounts to become member accounts for the Security Hub administrator account that the invitation is sent from.</p> <p>This operation is only used to invite accounts that do not belong to an organization. Organization accounts do not receive invitations.</p> <p>Before you can use this action to invite a member, you must first use the <code>CreateMembers</code> action to create the member account in Security Hub.</p> <p>When the account owner enables Security Hub and accepts the invitation to become a member account, the administrator account can view the findings generated from the member account.</p> """,
tags=['member_invitation_management', 'invitation_processing'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def invite_members(
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
body: MembersInvitePostRequest = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/organization/admin',
description=""" Lists the Security Hub administrator accounts. Can only be called by the organization management account. """,
tags=['security_hub_configuration', 'control_standard_management'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def list_organization_admin_accounts(
max_results: Optional[conint(ge=1, le=10)] = Query(None, alias='MaxResults'),
next_token: Optional[str] = Query(None, alias='NextToken'),
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/organization/admin/disable',
description=""" Disables a Security Hub administrator account. Can only be called by the organization management account. """,
tags=['organization_structure_management'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def disable_organization_admin_account(
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
body: OrganizationAdminDisablePostRequest = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/organization/admin/enable',
description=""" Designates the Security Hub administrator account for an organization. Can only be called by the organization management account. """,
tags=['organization_structure_management'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def enable_organization_admin_account(
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
body: OrganizationAdminEnablePostRequest = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/organization/configuration',
description=""" Returns information about the Organizations configuration for Security Hub. Can only be called from a Security Hub administrator account. """,
tags=['security_control_operations'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def describe_organization_configuration(
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/organization/configuration',
description=""" Used to update the configuration related to Organizations. Can only be called from a Security Hub administrator account. """,
tags=['security_hub_configuration', 'organization_structure_management'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def update_organization_configuration(
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
body: OrganizationConfigurationPostRequest = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/productSubscriptions',
description=""" Lists all findings-generating solutions (products) that you are subscribed to receive findings from in Security Hub. """,
tags=['security_hub_configuration'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def list_enabled_products_for_import(
next_token: Optional[str] = Query(None, alias='NextToken'),
max_results: Optional[conint(ge=1, le=100)] = Query(None, alias='MaxResults'),
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/productSubscriptions',
description=""" <p>Enables the integration of a partner product with Security Hub. Integrated products send findings to Security Hub.</p> <p>When you enable a product integration, a permissions policy that grants permission for the product to send findings to Security Hub is applied.</p> """,
tags=['security_hub_configuration', 'finding_operations'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def enable_import_findings_for_product(
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
body: ProductSubscriptionsPostRequest = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/productSubscriptions/{ProductSubscriptionArn}',
description=""" 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. """,
tags=['security_hub_configuration', 'product_inventory_management'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def disable_import_findings_for_product(
product_subscription_arn: constr(pattern=r'.*\S.*') = Path(
..., alias='ProductSubscriptionArn'
),
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/products',
description=""" <p>Returns information about product integrations in Security Hub.</p> <p>You can optionally provide an integration ARN. If you provide an integration ARN, then the results only include that integration.</p> <p>If you do not provide an integration ARN, then the results include all of the available product integrations. </p> """,
tags=['product_inventory_management'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def describe_products(
next_token: Optional[str] = Query(None, alias='NextToken'),
max_results: Optional[conint(ge=1, le=100)] = Query(None, alias='MaxResults'),
product_arn: Optional[constr(pattern=r'.*\S.*')] = Query(None, alias='ProductArn'),
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/securityControls/batchGet',
description=""" Provides details about a batch of security controls for the current Amazon Web Services account and Amazon Web Services Region. """,
tags=['security_control_operations'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def batch_get_security_controls(
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
body: SecurityControlsBatchGetPostRequest = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/securityControls/definitions',
description=""" Lists all of the security controls that apply to a specified standard. """,
tags=['control_standard_management'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def list_security_control_definitions(
standards_arn: Optional[constr(pattern=r'.*\S.*')] = Query(
None, alias='StandardsArn'
),
next_token: Optional[str] = Query(None, alias='NextToken'),
max_results: Optional[conint(ge=1, le=100)] = Query(None, alias='MaxResults'),
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/standards',
description=""" <p>Returns a list of the available standards in Security Hub.</p> <p>For each standard, the results include the standard ARN, the name, and a description. </p> """,
tags=[
'security_hub_configuration',
'action_target_operations',
'finding_operations',
'insight_operations',
'invitation_processing',
'control_standard_management',
'member_invitation_management',
'organization_structure_management',
'security_control_operations',
'product_inventory_management',
'resource_tagging_operations',
'resource_tagging_management',
],
security=[
APIKeyHeader(name="Authorization"),
],
)
def describe_standards(
next_token: Optional[str] = Query(None, alias='NextToken'),
max_results: Optional[conint(ge=1, le=100)] = Query(None, alias='MaxResults'),
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.patch(
'/standards/control/{StandardsControlArn}',
description=""" Used to control whether an individual security standard control is enabled or disabled. """,
tags=['control_standard_management'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def update_standards_control(
standards_control_arn: constr(pattern=r'.*\S.*') = Path(
..., alias='StandardsControlArn'
),
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
body: StandardsControlStandardsControlArnPatchRequest = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/standards/controls/{StandardsSubscriptionArn}',
description=""" <p>Returns a list of security standards controls.</p> <p>For each control, the results include information about whether it is currently enabled, the severity, and a link to remediation information.</p> """,
tags=['security_hub_configuration', 'control_standard_management'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def describe_standards_controls(
standards_subscription_arn: constr(pattern=r'.*\S.*') = Path(
..., alias='StandardsSubscriptionArn'
),
next_token: Optional[str] = Query(None, alias='NextToken'),
max_results: Optional[conint(ge=1, le=100)] = Query(None, alias='MaxResults'),
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/standards/deregister',
description=""" <p>Disables the standards specified by the provided <code>StandardsSubscriptionArns</code>.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/securityhub/latest/userguide/securityhub-standards.html">Security Standards</a> section of the <i>Security Hub User Guide</i>.</p> """,
tags=['security_control_operations'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def batch_disable_standards(
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
body: StandardsDeregisterPostRequest = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/standards/get',
description=""" Returns a list of the standards that are currently enabled. """,
tags=['finding_operations'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def get_enabled_standards(
max_results: Optional[str] = Query(None, alias='MaxResults'),
next_token: Optional[str] = Query(None, alias='NextToken'),
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
body: StandardsGetPostRequest = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/standards/register',
description=""" <p>Enables the standards specified by the provided <code>StandardsArn</code>. To obtain the ARN for a standard, use the <code>DescribeStandards</code> operation.</p> <p>For more information, see the <a href="https://docs.aws.amazon.com/securityhub/latest/userguide/securityhub-standards.html">Security Standards</a> section of the <i>Security Hub User Guide</i>.</p> """,
tags=['security_control_operations'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def batch_enable_standards(
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
body: StandardsRegisterPostRequest = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/tags/{ResourceArn}',
description=""" Returns a list of tags associated with a resource. """,
tags=['resource_tagging_management'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def list_tags_for_resource(
resource_arn: constr(pattern=r'^arn:aws:securityhub:.*') = Path(
..., alias='ResourceArn'
),
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/tags/{ResourceArn}',
description=""" Adds one or more tags to a resource. """,
tags=['resource_tagging_management', 'resource_tagging_operations'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def tag_resource(
resource_arn: constr(pattern=r'^arn:aws:securityhub:.*') = Path(
..., alias='ResourceArn'
),
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
body: TagsResourceArnPostRequest = ...,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/tags/{ResourceArn}#tagKeys',
description=""" Removes one or more tags from a resource. """,
tags=['resource_tagging_operations', 'resource_tagging_management'],
security=[
APIKeyHeader(name="Authorization"),
],
)
def untag_resource(
resource_arn: constr(pattern=r'^arn:aws:securityhub:.*') = Path(
..., alias='ResourceArn'
),
tag_keys: TagKeys = Query(..., alias='tagKeys'),
x__amz__content__sha256: Optional[str] = Header(None, alias='X-Amz-Content-Sha256'),
x__amz__date: Optional[str] = Header(None, alias='X-Amz-Date'),
x__amz__algorithm: Optional[str] = Header(None, alias='X-Amz-Algorithm'),
x__amz__credential: Optional[str] = Header(None, alias='X-Amz-Credential'),
x__amz__security__token: Optional[str] = Header(None, alias='X-Amz-Security-Token'),
x__amz__signature: Optional[str] = Header(None, alias='X-Amz-Signature'),
x__amz__signed_headers: Optional[str] = Header(None, alias='X-Amz-SignedHeaders'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="MCP Server")
parser.add_argument(
"transport", choices=["stdio", "sse"], help="Transport mode (stdio or sse)"
)
args = parser.parse_args()
if "CONFIG_PATH" in os.environ:
config_path = os.environ["CONFIG_PATH"]
app.load_configuration(config_path)
if "CONFIG" in os.environ:
config = os.environ["CONFIG"]
app.load_configuration_from_string(config)
if "SECURITY" in os.environ:
security_params = BaseSecurity.parse_security_parameters_from_env(
os.environ,
)
app.set_security_params(security_params)
app.mcp.run(transport=args.transport)