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#

can_paginate#

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:
    ...

generate_presigned_url#

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:
    ...

batch_get_findings#

Returns a list of requested findings from standard scans.

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

create_scan#

Use to create a scan using code uploaded to an Amazon 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, request headers used to upload a code resource, and code artifact identifier for the uploaded 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

get_account_configuration#

Use to get the encryption configuration for an account.

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 a summary of metrics for 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: TimestampTypeDef,
) -> 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: TimestampTypeDef,
    startDate: TimestampTypeDef,
    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 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 the encryption configuration for an account.

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.