Skip to content

update_brand_profile

update_brand_profile(
    brand_profile_id: BrandProfileIdOrArn,
    *,
    config_overrides: Optional[EndUserMessagingClientConfig] = None,
    brand_profile_name: Optional[BrandProfileName] = None,
    deletion_protection_enabled: Optional[bool] = None,
) -> UpdateBrandProfileOutput

Updates the name or the deletion protection setting of a brand profile. To change the information that is stored in the profile, use the brand profile attribute operations.

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).

  • brand_profile_name (Optional[BrandProfileName], default: None ) –

    The name of the brand profile. The name can contain alphanumeric characters, underscores, hyphens, and spaces.

  • deletion_protection_enabled (Optional[bool], default: None ) –

    Specifies whether deletion protection is enabled. When enabled, the resource cannot be deleted until deletion protection is turned off.

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:

Update a brand profile name

>>> client.update_brand_profile(brand_profile_id='bp-abc12345678901234', brand_profile_name='AcmeCorpUpdated', deletion_protection_enabled=False)
Source code in docs_src/capo_endusermessaging/_services/end_user_messaging.py
def update_brand_profile(
    self,
    brand_profile_id: "capo_endusermessaging.types.brand_profile_id_or_arn.BrandProfileIdOrArn",
    *,
    config_overrides: Optional[EndUserMessagingClientConfig] = None,
    brand_profile_name: Optional[
        "capo_endusermessaging.types.brand_profile_name.BrandProfileName"
    ] = None,
    deletion_protection_enabled: Optional[bool] = None,
) -> "capo_endusermessaging.types.update_brand_profile_output.UpdateBrandProfileOutput":
    """<p>Updates the name or the deletion protection setting of a brand profile. To change the information that is stored in the profile, use the brand profile attribute operations.</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>
        brand_profile_name: <p>The name of the brand profile. The name can contain alphanumeric characters, underscores, hyphens, and spaces.</p>
        deletion_protection_enabled: <p>Specifies whether deletion protection is enabled. When enabled, the resource cannot be deleted until deletion protection is turned off.</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:
        Update a brand profile name

        >>> client.update_brand_profile(brand_profile_id='bp-abc12345678901234', brand_profile_name='AcmeCorpUpdated', deletion_protection_enabled=False)
    """

    def _handler(
        req: "OperationRequest[capo_endusermessaging.types.update_brand_profile_input.UpdateBrandProfileInput]",
    ) -> OperationResponse[
        "capo_endusermessaging.types.update_brand_profile_output.UpdateBrandProfileOutput"
    ]:
        import capo_endusermessaging._operations.end_user_messaging.update_brand_profile

        output, http_response = (
            capo_endusermessaging._operations.end_user_messaging.update_brand_profile.update_brand_profile(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateBrandProfile")
    )
    input_: capo_endusermessaging.types.update_brand_profile_input.UpdateBrandProfileInput = {
        "brand_profile_id": brand_profile_id
    }
    if brand_profile_name is not None:
        input_["brand_profile_name"] = brand_profile_name
    if deletion_protection_enabled is not None:
        input_["deletion_protection_enabled"] = deletion_protection_enabled

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output