Skip to content

CodeGuruSecurityClient#

Index > CodeGuruSecurity > CodeGuruSecurityClient

Auto-generated documentation for CodeGuruSecurity type annotations stubs module types-aiobotocore-codeguru-security.

CodeGuruSecurityClient#

Type annotations and code completion for session.create_client("codeguru-security") boto3 documentation

CodeGuruSecurityClient usage example

from aiobotocore.session import get_session
from types_aiobotocore_codeguru_security.client import CodeGuruSecurityClient

session = get_session()
async with session.create_client("codeguru-security") as client:
    client: CodeGuruSecurityClient

Exceptions#

aiobotocore client exceptions are generated in runtime. This class provides code completion for session.create_client("codeguru-security").exceptions structure.

CodeGuruSecurityClient.exceptions usage example

async with session.create_client("codeguru-security") as client:
    try:
        do_something(client)
    except (
            client.AccessDeniedException,
        client.ClientError,
        client.ConflictException,
        client.InternalServerException,
        client.ResourceNotFoundException,
        client.ThrottlingException,
        client.ValidationException,
    ) as e:
        print(e)
CodeGuruSecurityClient usage type checking example

from types_aiobotocore_codeguru_security.client import Exceptions

def handle_error(exc: Exceptions.AccessDeniedException) -> None:
    ...

Methods#

batch_get_findings#

Returns a list of all requested findings.

Type annotations and code completion for session.create_client("codeguru-security").batch_get_findings method. boto3 documentation

# batch_get_findings method definition

await def batch_get_findings(
    self,
    *,
    findingIdentifiers: Sequence[FindingIdentifierTypeDef],  # (1)
) -> BatchGetFindingsResponseTypeDef:  # (2)
    ...
  1. See FindingIdentifierTypeDef
  2. See BatchGetFindingsResponseTypeDef
# batch_get_findings method usage example with argument unpacking

kwargs: BatchGetFindingsRequestRequestTypeDef = {  # (1)
    "findingIdentifiers": ...,
}

parent.batch_get_findings(**kwargs)
  1. See BatchGetFindingsRequestRequestTypeDef

can_paginate#

Check if an operation can be paginated.

Type annotations and code completion for session.create_client("codeguru-security").can_paginate method. boto3 documentation

# can_paginate method definition

def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

close#

Closes underlying endpoint connections.

Type annotations and code completion for session.create_client("codeguru-security").close method. boto3 documentation

# close method definition

await def close(
    self,
) -> None:
    ...

create_scan#

Use to create a scan using code uploaded to an S3 bucket.

Type annotations and code completion for session.create_client("codeguru-security").create_scan method. boto3 documentation

# create_scan method definition

await def create_scan(
    self,
    *,
    resourceId: ResourceIdTypeDef,  # (1)
    scanName: str,
    analysisType: AnalysisTypeType = ...,  # (2)
    clientToken: str = ...,
    scanType: ScanTypeType = ...,  # (3)
    tags: Mapping[str, str] = ...,
) -> CreateScanResponseTypeDef:  # (4)
    ...
  1. See ResourceIdTypeDef
  2. See AnalysisTypeType
  3. See ScanTypeType
  4. See CreateScanResponseTypeDef
# create_scan method usage example with argument unpacking

kwargs: CreateScanRequestRequestTypeDef = {  # (1)
    "resourceId": ...,
    "scanName": ...,
}

parent.create_scan(**kwargs)
  1. See CreateScanRequestRequestTypeDef

create_upload_url#

Generates a pre-signed URL and request headers used to upload a code resource.

Type annotations and code completion for session.create_client("codeguru-security").create_upload_url method. boto3 documentation

# create_upload_url method definition

await def create_upload_url(
    self,
    *,
    scanName: str,
) -> CreateUploadUrlResponseTypeDef:  # (1)
    ...
  1. See CreateUploadUrlResponseTypeDef
# create_upload_url method usage example with argument unpacking

kwargs: CreateUploadUrlRequestRequestTypeDef = {  # (1)
    "scanName": ...,
}

parent.create_upload_url(**kwargs)
  1. See CreateUploadUrlRequestRequestTypeDef

generate_presigned_url#

Generate a presigned url given a client, its method, and arguments.

Type annotations and code completion for session.create_client("codeguru-security").generate_presigned_url method. boto3 documentation

# generate_presigned_url method definition

await def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...

get_account_configuration#

Use to get account level configuration.

Type annotations and code completion for session.create_client("codeguru-security").get_account_configuration method. boto3 documentation

# get_account_configuration method definition

await def get_account_configuration(
    self,
) -> GetAccountConfigurationResponseTypeDef:  # (1)
    ...
  1. See GetAccountConfigurationResponseTypeDef

get_findings#

Returns a list of all findings generated by a particular scan.

Type annotations and code completion for session.create_client("codeguru-security").get_findings method. boto3 documentation

# get_findings method definition

await def get_findings(
    self,
    *,
    scanName: str,
    maxResults: int = ...,
    nextToken: str = ...,
    status: StatusType = ...,  # (1)
) -> GetFindingsResponseTypeDef:  # (2)
    ...
  1. See StatusType
  2. See GetFindingsResponseTypeDef
# get_findings method usage example with argument unpacking

kwargs: GetFindingsRequestRequestTypeDef = {  # (1)
    "scanName": ...,
}

parent.get_findings(**kwargs)
  1. See GetFindingsRequestRequestTypeDef

get_metrics_summary#

Returns top level metrics about an account from a specified date, including number of open findings, the categories with most findings, the scans with most open findings, and scans with most open critical findings.

Type annotations and code completion for session.create_client("codeguru-security").get_metrics_summary method. boto3 documentation

# get_metrics_summary method definition

await def get_metrics_summary(
    self,
    *,
    date: Union[datetime, str],
) -> GetMetricsSummaryResponseTypeDef:  # (1)
    ...
  1. See GetMetricsSummaryResponseTypeDef
# get_metrics_summary method usage example with argument unpacking

kwargs: GetMetricsSummaryRequestRequestTypeDef = {  # (1)
    "date": ...,
}

parent.get_metrics_summary(**kwargs)
  1. See GetMetricsSummaryRequestRequestTypeDef

get_scan#

Returns details about a scan, including whether or not a scan has completed.

Type annotations and code completion for session.create_client("codeguru-security").get_scan method. boto3 documentation

# get_scan method definition

await def get_scan(
    self,
    *,
    scanName: str,
    runId: str = ...,
) -> GetScanResponseTypeDef:  # (1)
    ...
  1. See GetScanResponseTypeDef
# get_scan method usage example with argument unpacking

kwargs: GetScanRequestRequestTypeDef = {  # (1)
    "scanName": ...,
}

parent.get_scan(**kwargs)
  1. See GetScanRequestRequestTypeDef

list_findings_metrics#

Returns metrics about all findings in an account within a specified time range.

Type annotations and code completion for session.create_client("codeguru-security").list_findings_metrics method. boto3 documentation

# list_findings_metrics method definition

await def list_findings_metrics(
    self,
    *,
    endDate: Union[datetime, str],
    startDate: Union[datetime, str],
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListFindingsMetricsResponseTypeDef:  # (1)
    ...
  1. See ListFindingsMetricsResponseTypeDef
# list_findings_metrics method usage example with argument unpacking

kwargs: ListFindingsMetricsRequestRequestTypeDef = {  # (1)
    "endDate": ...,
    "startDate": ...,
}

parent.list_findings_metrics(**kwargs)
  1. See ListFindingsMetricsRequestRequestTypeDef

list_scans#

Returns a list of all the standard scans in an account.

Type annotations and code completion for session.create_client("codeguru-security").list_scans method. boto3 documentation

# list_scans method definition

await def list_scans(
    self,
    *,
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListScansResponseTypeDef:  # (1)
    ...
  1. See ListScansResponseTypeDef
# list_scans method usage example with argument unpacking

kwargs: ListScansRequestRequestTypeDef = {  # (1)
    "maxResults": ...,
}

parent.list_scans(**kwargs)
  1. See ListScansRequestRequestTypeDef

list_tags_for_resource#

Returns a list of all tags associated with a scan.

Type annotations and code completion for session.create_client("codeguru-security").list_tags_for_resource method. boto3 documentation

# list_tags_for_resource method definition

await def list_tags_for_resource(
    self,
    *,
    resourceArn: str,
) -> ListTagsForResourceResponseTypeDef:  # (1)
    ...
  1. See ListTagsForResourceResponseTypeDef
# list_tags_for_resource method usage example with argument unpacking

kwargs: ListTagsForResourceRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
}

parent.list_tags_for_resource(**kwargs)
  1. See ListTagsForResourceRequestRequestTypeDef

tag_resource#

Use to add one or more tags to an existing scan.

Type annotations and code completion for session.create_client("codeguru-security").tag_resource method. boto3 documentation

# tag_resource method definition

await def tag_resource(
    self,
    *,
    resourceArn: str,
    tags: Mapping[str, str],
) -> Dict[str, Any]:
    ...
# tag_resource method usage example with argument unpacking

kwargs: TagResourceRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
    "tags": ...,
}

parent.tag_resource(**kwargs)
  1. See TagResourceRequestRequestTypeDef

untag_resource#

Use to remove one or more tags from an existing scan.

Type annotations and code completion for session.create_client("codeguru-security").untag_resource method. boto3 documentation

# untag_resource method definition

await def untag_resource(
    self,
    *,
    resourceArn: str,
    tagKeys: Sequence[str],
) -> Dict[str, Any]:
    ...
# untag_resource method usage example with argument unpacking

kwargs: UntagResourceRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
    "tagKeys": ...,
}

parent.untag_resource(**kwargs)
  1. See UntagResourceRequestRequestTypeDef

update_account_configuration#

Use to update account-level configuration with an encryption key.

Type annotations and code completion for session.create_client("codeguru-security").update_account_configuration method. boto3 documentation

# update_account_configuration method definition

await def update_account_configuration(
    self,
    *,
    encryptionConfig: EncryptionConfigTypeDef,  # (1)
) -> UpdateAccountConfigurationResponseTypeDef:  # (2)
    ...
  1. See EncryptionConfigTypeDef
  2. See UpdateAccountConfigurationResponseTypeDef
# update_account_configuration method usage example with argument unpacking

kwargs: UpdateAccountConfigurationRequestRequestTypeDef = {  # (1)
    "encryptionConfig": ...,
}

parent.update_account_configuration(**kwargs)
  1. See UpdateAccountConfigurationRequestRequestTypeDef

__aenter__#

Type annotations and code completion for session.create_client("codeguru-security").__aenter__ method. boto3 documentation

# __aenter__ method definition

await def __aenter__(
    self,
) -> CodeGuruSecurityClient:
    ...

__aexit__#

Type annotations and code completion for session.create_client("codeguru-security").__aexit__ method. boto3 documentation

# __aexit__ method definition

await def __aexit__(
    self,
    exc_type: Any,
    exc_val: Any,
    exc_tb: Any,
) -> Any:
    ...

get_paginator#

Type annotations and code completion for session.create_client("codeguru-security").get_paginator method with overloads.