Skip to content

GuardDutyClient#

Index > GuardDuty > GuardDutyClient

Auto-generated documentation for GuardDuty type annotations stubs module mypy-boto3-guardduty.

GuardDutyClient#

Type annotations and code completion for boto3.client("guardduty"). boto3 documentation

# GuardDutyClient usage example

from boto3.session import Session
from mypy_boto3_guardduty.client import GuardDutyClient

def get_guardduty_client() -> GuardDutyClient:
    return Session().client("guardduty")

Exceptions#

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

# Exceptions.exceptions usage example

client = boto3.client("guardduty")

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

from mypy_boto3_guardduty.client import Exceptions

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

Methods#

accept_administrator_invitation#

Accepts the invitation to be a member account and get monitored by a GuardDuty administrator account that sent the invitation.

Type annotations and code completion for boto3.client("guardduty").accept_administrator_invitation method. boto3 documentation

# accept_administrator_invitation method definition

def accept_administrator_invitation(
    self,
    *,
    DetectorId: str,
    AdministratorId: str,
    InvitationId: str,
) -> Dict[str, Any]:
    ...
# accept_administrator_invitation method usage example with argument unpacking

kwargs: AcceptAdministratorInvitationRequestRequestTypeDef = {  # (1)
    "DetectorId": ...,
    "AdministratorId": ...,
    "InvitationId": ...,
}

parent.accept_administrator_invitation(**kwargs)
  1. See AcceptAdministratorInvitationRequestRequestTypeDef

accept_invitation#

Accepts the invitation to be monitored by a GuardDuty administrator account.

Type annotations and code completion for boto3.client("guardduty").accept_invitation method. boto3 documentation

# accept_invitation method definition

def accept_invitation(
    self,
    *,
    DetectorId: str,
    MasterId: str,
    InvitationId: str,
) -> Dict[str, Any]:
    ...
# accept_invitation method usage example with argument unpacking

kwargs: AcceptInvitationRequestRequestTypeDef = {  # (1)
    "DetectorId": ...,
    "MasterId": ...,
    "InvitationId": ...,
}

parent.accept_invitation(**kwargs)
  1. See AcceptInvitationRequestRequestTypeDef

archive_findings#

Archives GuardDuty findings that are specified by the list of finding IDs.

Type annotations and code completion for boto3.client("guardduty").archive_findings method. boto3 documentation

# archive_findings method definition

def archive_findings(
    self,
    *,
    DetectorId: str,
    FindingIds: Sequence[str],
) -> Dict[str, Any]:
    ...
# archive_findings method usage example with argument unpacking

kwargs: ArchiveFindingsRequestRequestTypeDef = {  # (1)
    "DetectorId": ...,
    "FindingIds": ...,
}

parent.archive_findings(**kwargs)
  1. See ArchiveFindingsRequestRequestTypeDef

can_paginate#

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("guardduty").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("guardduty").close method. boto3 documentation

# close method definition

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

create_detector#

Creates a single GuardDuty detector.

Type annotations and code completion for boto3.client("guardduty").create_detector method. boto3 documentation

# create_detector method definition

def create_detector(
    self,
    *,
    Enable: bool,
    ClientToken: str = ...,
    FindingPublishingFrequency: FindingPublishingFrequencyType = ...,  # (1)
    DataSources: DataSourceConfigurationsTypeDef = ...,  # (2)
    Tags: Mapping[str, str] = ...,
    Features: Sequence[DetectorFeatureConfigurationTypeDef] = ...,  # (3)
) -> CreateDetectorResponseTypeDef:  # (4)
    ...
  1. See FindingPublishingFrequencyType
  2. See DataSourceConfigurationsTypeDef
  3. See DetectorFeatureConfigurationTypeDef
  4. See CreateDetectorResponseTypeDef
# create_detector method usage example with argument unpacking

kwargs: CreateDetectorRequestRequestTypeDef = {  # (1)
    "Enable": ...,
}

parent.create_detector(**kwargs)
  1. See CreateDetectorRequestRequestTypeDef

create_filter#

Creates a filter using the specified finding criteria.

Type annotations and code completion for boto3.client("guardduty").create_filter method. boto3 documentation

# create_filter method definition

def create_filter(
    self,
    *,
    DetectorId: str,
    Name: str,
    FindingCriteria: Union[FindingCriteriaTypeDef, FindingCriteriaOutputTypeDef],  # (1)
    Description: str = ...,
    Action: FilterActionType = ...,  # (2)
    Rank: int = ...,
    ClientToken: str = ...,
    Tags: Mapping[str, str] = ...,
) -> CreateFilterResponseTypeDef:  # (3)
    ...
  1. See FindingCriteriaTypeDef FindingCriteriaOutputTypeDef
  2. See FilterActionType
  3. See CreateFilterResponseTypeDef
# create_filter method usage example with argument unpacking

kwargs: CreateFilterRequestRequestTypeDef = {  # (1)
    "DetectorId": ...,
    "Name": ...,
    "FindingCriteria": ...,
}

parent.create_filter(**kwargs)
  1. See CreateFilterRequestRequestTypeDef

create_ip_set#

Creates a new IPSet, which is called a trusted IP list in the console user interface.

Type annotations and code completion for boto3.client("guardduty").create_ip_set method.