Skip to content

delete_brand_profile_attribute async

delete_brand_profile_attribute(
    brand_profile_id: BrandProfileIdOrArn,
    attribute_name: BrandProfileAttributeName,
    *,
    config_overrides: Optional[AsyncEndUserMessagingClientConfig] = None,
) -> DeleteBrandProfileAttributeOutput

Deletes a brand profile attribute. If the attribute stores media, this operation also deletes the associated media.

Parameters:

  • brand_profile_id (BrandProfileIdOrArn) –

    The unique identifier of the brand profile. You can specify either the bare ID or the full Amazon Resource Name (ARN).

  • attribute_name (BrandProfileAttributeName) –

    The name of the brand profile attribute. The name is unique within a brand profile.

Raises:

  • AccessDeniedException –

    You do not have sufficient access to perform this action.

  • ConflictException –

    The request conflicts with the current state of the resource.

  • InternalServerException –

    An unexpected error occurred during the processing of the request.

  • ResourceNotFoundException –

    The request references a resource that does not exist. Verify that the resource identifier is correct and try your request again.

  • ThrottlingException –

    The request was denied because it exceeded the allowed request rate.

  • ValidationException –

    A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.

  • UnknownServiceError –

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

Examples:

Delete a brand profile attribute

>>> await client.delete_brand_profile_attribute(brand_profile_id='bp-abc12345678901234', attribute_name='SupportEmail')
Source code in docs_src/capo_endusermessaging/_services/async_end_user_messaging.py
async def delete_brand_profile_attribute(
    self,
    brand_profile_id: "capo_endusermessaging.types.brand_profile_id_or_arn.BrandProfileIdOrArn",
    attribute_name: "capo_endusermessaging.types.brand_profile_attribute_name.BrandProfileAttributeName",
    *,
    config_overrides: Optional[AsyncEndUserMessagingClientConfig] = None,
) -> "capo_endusermessaging.types.delete_brand_profile_attribute_output.DeleteBrandProfileAttributeOutput":
    """<p>Deletes a brand profile attribute. If the attribute stores media, this operation also deletes the associated media.</p>

    Args:
        brand_profile_id: <p>The unique identifier of the brand profile. You can specify either the bare ID or the full Amazon Resource Name (ARN).</p>
        attribute_name: <p>The name of the brand profile attribute. The name is unique within a brand profile.</p>

    Raises:
        capo_endusermessaging.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_endusermessaging.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</p>
        capo_endusermessaging.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred during the processing of the request.</p>
        capo_endusermessaging.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request references a resource that does not exist. Verify that the resource identifier is correct and try your request again.</p>
        capo_endusermessaging.errors.throttling_exception.ThrottlingException: <p>The request was denied because it exceeded the allowed request rate.</p>
        capo_endusermessaging.errors.validation_exception.ValidationException: A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
        capo_endusermessaging.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Delete a brand profile attribute

        >>> await client.delete_brand_profile_attribute(brand_profile_id='bp-abc12345678901234', attribute_name='SupportEmail')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_endusermessaging.types.delete_brand_profile_attribute_input.DeleteBrandProfileAttributeInput]",
    ) -> AsyncOperationResponse[
        "capo_endusermessaging.types.delete_brand_profile_attribute_output.DeleteBrandProfileAttributeOutput"
    ]:
        import capo_endusermessaging._operations.end_user_messaging.delete_brand_profile_attribute

        (
            output,
            http_response,
        ) = await capo_endusermessaging._operations.end_user_messaging.delete_brand_profile_attribute.async_delete_brand_profile_attribute(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_endusermessaging.types.delete_brand_profile_attribute_input.DeleteBrandProfileAttributeInput",
    ) -> dict[str, Any]:
        import capo_endusermessaging.types.delete_brand_profile_attribute_input

        return capo_endusermessaging.types.delete_brand_profile_attribute_input.redact_sensitive(
            input_
        )

    def _redact_output(
        output: "capo_endusermessaging.types.delete_brand_profile_attribute_output.DeleteBrandProfileAttributeOutput",
    ) -> dict[str, Any]:
        import capo_endusermessaging.types.delete_brand_profile_attribute_output

        return capo_endusermessaging.types.delete_brand_profile_attribute_output.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "DeleteBrandProfileAttribute",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_endusermessaging.types.delete_brand_profile_attribute_input.DeleteBrandProfileAttributeInput = {
        "brand_profile_id": brand_profile_id,
        "attribute_name": attribute_name,
    }

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