Skip to content

update_allow_list async

update_allow_list(
    id: __string,
    *,
    config_overrides: Optional[AsyncMacie2ClientConfig] = None,
    criteria: Optional[AllowListCriteria] = None,
    description: Optional[__stringMin1Max512PatternSS] = None,
    name: Optional[__stringMin1Max128Pattern] = None,
) -> UpdateAllowListResponse

Updates the settings for an allow list.

Parameters:

  • criteria (Optional[AllowListCriteria], default: None ) –

    The criteria that specify the text or text pattern to ignore. The criteria can be the location and name of an S3 object that lists specific text to ignore (s3WordsList), or a regular expression that defines a text pattern to ignore (regex).

    You can change a list's underlying criteria, such as the name of the S3 object or the regular expression to use. However, you can't change the type from s3WordsList to regex or the other way around.

  • description (Optional[__stringMin1Max512PatternSS], default: None ) –

    A custom description of the allow list. The description can contain as many as 512 characters.

  • id (__string) –

    The unique identifier for the Amazon Macie resource that the request applies to.

  • name (Optional[__stringMin1Max128Pattern], default: None ) –

    A custom name for the allow list. The name can contain as many as 128 characters.

Raises:

  • AccessDeniedException –

    Provides information about an error that occurred due to insufficient access to a specified resource.

  • InternalServerException –

    Provides information about an error that occurred due to an unknown internal server error, exception, or failure.

  • ResourceNotFoundException –

    Provides information about an error that occurred because a specified resource wasn't found.

  • ThrottlingException –

    Provides information about an error that occurred because too many requests were sent during a certain amount of time.

  • ValidationException –

    Provides information about an error that occurred due to a syntax error in a request.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_macie2/_services/async_macie2.py
async def update_allow_list(
    self,
    id: "capo_macie2.types.__string.__string",
    *,
    config_overrides: Optional[AsyncMacie2ClientConfig] = None,
    criteria: Optional[
        "capo_macie2.types.allow_list_criteria.AllowListCriteria"
    ] = None,
    description: Optional[
        "capo_macie2.types.__string_min1_max512_pattern_ss.__stringMin1Max512PatternSS"
    ] = None,
    name: Optional[
        "capo_macie2.types.__string_min1_max128_pattern.__stringMin1Max128Pattern"
    ] = None,
) -> "capo_macie2.types.update_allow_list_response.UpdateAllowListResponse":
    """<p>Updates the settings for an allow list.</p>

    Args:
        criteria: <p>The criteria that specify the text or text pattern to ignore. The criteria can be the location and name of an S3 object that lists specific text to ignore (s3WordsList), or a regular expression that defines a text pattern to ignore (regex).</p> <p>You can change a list's underlying criteria, such as the name of the S3 object or the regular expression to use. However, you can't change the type from s3WordsList to regex or the other way around.</p>
        description: <p>A custom description of the allow list. The description can contain as many as 512 characters.</p>
        id: <p>The unique identifier for the Amazon Macie resource that the request applies to.</p>
        name: <p>A custom name for the allow list. The name can contain as many as 128 characters.</p>

    Raises:
        capo_macie2.errors.access_denied_exception.AccessDeniedException: <p>Provides information about an error that occurred due to insufficient access to a specified resource.</p>
        capo_macie2.errors.internal_server_exception.InternalServerException: <p>Provides information about an error that occurred due to an unknown internal server error, exception, or failure.</p>
        capo_macie2.errors.resource_not_found_exception.ResourceNotFoundException: <p>Provides information about an error that occurred because a specified resource wasn't found.</p>
        capo_macie2.errors.throttling_exception.ThrottlingException: <p>Provides information about an error that occurred because too many requests were sent during a certain amount of time.</p>
        capo_macie2.errors.validation_exception.ValidationException: <p>Provides information about an error that occurred due to a syntax error in a request.</p>
        capo_macie2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_macie2.types.update_allow_list_request.UpdateAllowListRequest]",
    ) -> AsyncOperationResponse[
        "capo_macie2.types.update_allow_list_response.UpdateAllowListResponse"
    ]:
        import capo_macie2._operations.macie2.update_allow_list

        (
            output,
            http_response,
        ) = await capo_macie2._operations.macie2.update_allow_list.async_update_allow_list(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateAllowList")
    )
    input_: capo_macie2.types.update_allow_list_request.UpdateAllowListRequest = {
        "id": id
    }
    if criteria is not None:
        input_["criteria"] = criteria
    if description is not None:
        input_["description"] = description
    if name is not None:
        input_["name"] = name

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output