Skip to content

update_sensitivity_inspection_template async

update_sensitivity_inspection_template(
    id: __string,
    *,
    config_overrides: Optional[AsyncMacie2ClientConfig] = None,
    description: Optional[__string] = None,
    excludes: Optional[SensitivityInspectionTemplateExcludes] = None,
    includes: Optional[SensitivityInspectionTemplateIncludes] = None,
) -> UpdateSensitivityInspectionTemplateResponse

Updates the settings for the sensitivity inspection template for an account.

Parameters:

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

    A custom description of the template. The description can contain as many as 200 characters.

  • excludes (Optional[SensitivityInspectionTemplateExcludes], default: None ) –

    The managed data identifiers to explicitly exclude (not use) when performing automated sensitive data discovery.

    To exclude an allow list or custom data identifier that's currently included by the template, update the values for the SensitivityInspectionTemplateIncludes.allowListIds and SensitivityInspectionTemplateIncludes.customDataIdentifierIds properties, respectively.

  • id (__string) –

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

  • includes (Optional[SensitivityInspectionTemplateIncludes], default: None ) –

    The allow lists, custom data identifiers, and managed data identifiers to explicitly include (use) when performing automated sensitive data discovery.

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_sensitivity_inspection_template(
    self,
    id: "capo_macie2.types.__string.__string",
    *,
    config_overrides: Optional[AsyncMacie2ClientConfig] = None,
    description: Optional["capo_macie2.types.__string.__string"] = None,
    excludes: Optional[
        "capo_macie2.types.sensitivity_inspection_template_excludes.SensitivityInspectionTemplateExcludes"
    ] = None,
    includes: Optional[
        "capo_macie2.types.sensitivity_inspection_template_includes.SensitivityInspectionTemplateIncludes"
    ] = None,
) -> "capo_macie2.types.update_sensitivity_inspection_template_response.UpdateSensitivityInspectionTemplateResponse":
    """<p>Updates the settings for the sensitivity inspection template for an account.</p>

    Args:
        description: <p>A custom description of the template. The description can contain as many as 200 characters.</p>
        excludes: <p>The managed data identifiers to explicitly exclude (not use) when performing automated sensitive data discovery.</p> <p>To exclude an allow list or custom data identifier that's currently included by the template, update the values for the SensitivityInspectionTemplateIncludes.allowListIds and SensitivityInspectionTemplateIncludes.customDataIdentifierIds properties, respectively.</p>
        id: <p>The unique identifier for the Amazon Macie resource that the request applies to.</p>
        includes: <p>The allow lists, custom data identifiers, and managed data identifiers to explicitly include (use) when performing automated sensitive data discovery.</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_sensitivity_inspection_template_request.UpdateSensitivityInspectionTemplateRequest]",
    ) -> AsyncOperationResponse[
        "capo_macie2.types.update_sensitivity_inspection_template_response.UpdateSensitivityInspectionTemplateResponse"
    ]:
        import capo_macie2._operations.macie2.update_sensitivity_inspection_template

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateSensitivityInspectionTemplate")
    )
    input_: capo_macie2.types.update_sensitivity_inspection_template_request.UpdateSensitivityInspectionTemplateRequest = {
        "id": id
    }
    if description is not None:
        input_["description"] = description
    if excludes is not None:
        input_["excludes"] = excludes
    if includes is not None:
        input_["includes"] = includes

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