Skip to content

CodeGuruSecurityClient#

Index > CodeGuruSecurity > CodeGuruSecurityClient

Auto-generated documentation for CodeGuruSecurity type annotations stubs module mypy-boto3-codeguru-security.

CodeGuruSecurityClient#

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

# CodeGuruSecurityClient usage example

from boto3.session import Session
from mypy_boto3_codeguru_security.client import CodeGuruSecurityClient

def get_codeguru-security_client() -> CodeGuruSecurityClient:
    return Session().client("codeguru-security")

Exceptions#

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

# Exceptions.exceptions usage example

client = boto3.client("codeguru-security")

try:
    do_something(client)
except (
    client.exceptions.AccessDeniedException,
    client.exceptions.ClientError,
    client.exceptions.ConflictException,
    client.exceptions.InternalServerException,
    client.exceptions.ResourceNotFoundException,
    client.exceptions.ThrottlingException,
    client.exceptions.ValidationException,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_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 boto3.client("codeguru-security").batch_get_findings method. boto3 documentation

# batch_get_findings method definition

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 boto3.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 boto3.client("codeguru-security").close method. boto3 documentation

# close method definition

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

create_scan#

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

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

# create_scan method definition

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 boto3.client("codeguru-security").create_upload_url method. boto3 documentation

# create_upload_url method definition

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 boto3.client("codeguru-security").generate_presigned_url method. boto3 documentation

# generate_presigned_url method definition

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 boto3.client("codeguru-security").get_account_configuration method. boto3 documentation

# get_account_configuration method definition

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 boto3.client("codeguru-security").get_findings method. boto3 documentation

# get_findings method definition

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 boto3.client("codeguru-security").get_metrics_summary method. boto3 documentation

# get_metrics_summary method definition

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 boto3.client("codeguru-security").get_scan method. boto3 documentation

# get_scan method definition

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 boto3.client("codeguru-security").list_findings_metrics method. boto3 documentation

# list_findings_metrics method definition

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 boto3.client("codeguru-security").list_scans method. boto3 documentation

# list_scans method definition

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 boto3.client("codeguru-security").list_tags_for_resource method. boto3 documentation

# list_tags_for_resource method definition

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 boto3.client("codeguru-security").tag_resource method. boto3 documentation

# tag_resource method definition

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 boto3.client("codeguru-security").untag_resource method. boto3 documentation

# untag_resource method definition

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 boto3.client("codeguru-security").update_account_configuration method. boto3 documentation

# update_account_configuration method definition

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

get_paginator#

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