Skip to content

Macie2Client#

Index > Macie2 > Macie2Client

Auto-generated documentation for Macie2 type annotations stubs module mypy-boto3-macie2.

Macie2Client#

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

# Macie2Client usage example

from boto3.session import Session
from mypy_boto3_macie2.client import Macie2Client

def get_macie2_client() -> Macie2Client:
    return Session().client("macie2")

Exceptions#

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

# Exceptions.exceptions usage example

client = boto3.client("macie2")

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

from mypy_boto3_macie2.client import Exceptions

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

Methods#

accept_invitation#

Accepts an Amazon Macie membership invitation that was received from a specific account.

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

# accept_invitation method definition

def accept_invitation(
    self,
    *,
    invitationId: str,
    administratorAccountId: str = ...,
    masterAccount: str = ...,
) -> Dict[str, Any]:
    ...
# accept_invitation method usage example with argument unpacking

kwargs: AcceptInvitationRequestRequestTypeDef = {  # (1)
    "invitationId": ...,
}

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

batch_get_custom_data_identifiers#

Retrieves information about one or more custom data identifiers.

Type annotations and code completion for boto3.client("macie2").batch_get_custom_data_identifiers method. boto3 documentation

# batch_get_custom_data_identifiers method definition

def batch_get_custom_data_identifiers(
    self,
    *,
    ids: Sequence[str] = ...,
) -> BatchGetCustomDataIdentifiersResponseTypeDef:  # (1)
    ...
  1. See BatchGetCustomDataIdentifiersResponseTypeDef
# batch_get_custom_data_identifiers method usage example with argument unpacking

kwargs: BatchGetCustomDataIdentifiersRequestRequestTypeDef = {  # (1)
    "ids": ...,
}

parent.batch_get_custom_data_identifiers(**kwargs)
  1. See BatchGetCustomDataIdentifiersRequestRequestTypeDef

can_paginate#

Check if an operation can be paginated.

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

# close method definition

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

create_allow_list#

Creates and defines the settings for an allow list.

Type annotations and code completion for boto3.client("macie2").create_allow_list method. boto3 documentation

# create_allow_list method definition

def create_allow_list(
    self,
    *,
    clientToken: str,
    criteria: AllowListCriteriaTypeDef,  # (1)
    name: str,
    description: str = ...,
    tags: Mapping[str, str] = ...,
) -> CreateAllowListResponseTypeDef:  # (2)
    ...
  1. See AllowListCriteriaTypeDef
  2. See CreateAllowListResponseTypeDef
# create_allow_list method usage example with argument unpacking

kwargs: CreateAllowListRequestRequestTypeDef = {  # (1)
    "clientToken": ...,
    "criteria": ...,
    "name": ...,
}

parent.create_allow_list(**kwargs)
  1. See CreateAllowListRequestRequestTypeDef

create_classification_job#

Creates and defines the settings for a classification job.

Type annotations and code completion for boto3.client("macie2").create_classification_job method. boto3 documentation

# create_classification_job method definition

def create_classification_job(
    self,
    *,
    clientToken: str,
    jobType: JobTypeType,  # (1)
    name: str,
    s3JobDefinition: Union[S3JobDefinitionTypeDef, S3JobDefinitionOutputTypeDef],  # (2)
    allowListIds: Sequence[str] = ...,
    customDataIdentifierIds: Sequence[str] = ...,
    description: str = ...,
    initialRun: bool = ...,
    managedDataIdentifierIds: Sequence[str] = ...,
    managedDataIdentifierSelector: ManagedDataIdentifierSelectorType = ...,  # (3)
    samplingPercentage: int = ...,
    scheduleFrequency: Union[JobScheduleFrequencyTypeDef, JobScheduleFrequencyOutputTypeDef] = ...,  # (4)
    tags: Mapping[str, str] = ...,
) -> CreateClassificationJobResponseTypeDef:  # (5)
    ...
  1. See JobTypeType
  2. See S3JobDefinitionTypeDef S3JobDefinitionOutputTypeDef
  3. See ManagedDataIdentifierSelectorType
  4. See JobScheduleFrequencyTypeDef JobScheduleFrequencyOutputTypeDef
  5. See CreateClassificationJobResponseTypeDef
# create_classification_job method usage example with argument unpacking

kwargs: CreateClassificationJobRequestRequestTypeDef = {  # (1)
    "clientToken": ...,
    "jobType": ...,
    "name": ...,
    "s3JobDefinition": ...,
}

parent.create_classification_job(**kwargs)
  1. See CreateClassificationJobRequestRequestTypeDef

create_custom_data_identifier#

Creates and defines the criteria and other settings for a custom data identifier.

Type annotations and code completion for boto3.client("macie2").create_custom_data_identifier method. boto3 documentation

# create_custom_data_identifier method definition

def create_custom_data_identifier(
    self,
    *,
    name: str,
    regex: str,
    clientToken: str = ...,
    description: str = ...,
    ignoreWords: Sequence[str] = ...,
    keywords: Sequence[str] = ...,
    maximumMatchDistance: int = ...,
    severityLevels: Sequence[SeverityLevelTypeDef] = ...,  # (1)
    tags: Mapping[str, str] = ...,
) -> CreateCustomDataIdentifierResponseTypeDef:  # (2)
    ...
  1. See SeverityLevelTypeDef
  2. See CreateCustomDataIdentifierResponseTypeDef
# create_custom_data_identifier method usage example with argument unpacking

kwargs: CreateCustomDataIdentifierRequestRequestTypeDef = {  # (1)
    "name": ...,
    "regex": ...,
}

parent.create_custom_data_identifier(**kwargs)
  1. See CreateCustomDataIdentifierRequestRequestTypeDef

create_findings_filter#

Creates and defines the criteria and other settings for a findings filter.

Type annotations and code completion for boto3.client("macie2").create_findings_filter method.