Skip to content

update_brand_profile_from_registration

update_brand_profile_from_registration(
    brand_profile_id: BrandProfileIdOrArn,
    registration_id: RegistrationIdOrArn,
    *,
    config_overrides: Optional[EndUserMessagingClientConfig] = None,
    smart_match: Optional[bool] = None,
    on_attribute_conflict: Optional[OnAttributeConflict] = None,
    client_token: Optional[ClientToken] = None,
) -> UpdateBrandProfileFromRegistrationOutput

Imports or refreshes the attributes of an existing brand profile from an existing registration. This operation runs asynchronously. Use the GetJob operation to track its progress.

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

  • registration_id (RegistrationIdOrArn) –

    The identifier or Amazon Resource Name (ARN) of the registration to import attributes from.

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

    Specifies whether to use semantic field mapping between brand profile attributes and registration fields. The default is true. When false, the service maps fields using a fixed set of standard field types.

  • on_attribute_conflict (Optional[OnAttributeConflict], default: None ) –

    Specifies how the service resolves an attribute that already exists. REPLACE overwrites the existing value with the incoming value. PRESERVE keeps the existing value.

  • client_token (Optional[ClientToken], default: None ) –

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you do not specify a client token, the AWS SDK automatically generates one.

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 from a registration

>>> client.update_brand_profile_from_registration(brand_profile_id='bp-abc12345678901234', registration_id='reg-abc12345678901234', smart_match=True, on_attribute_conflict='REPLACE')
Source code in docs_src/capo_endusermessaging/_services/end_user_messaging.py
def update_brand_profile_from_registration(
    self,
    brand_profile_id: "capo_endusermessaging.types.brand_profile_id_or_arn.BrandProfileIdOrArn",
    registration_id: "capo_endusermessaging.types.registration_id_or_arn.RegistrationIdOrArn",
    *,
    config_overrides: Optional[EndUserMessagingClientConfig] = None,
    smart_match: Optional[bool] = None,
    on_attribute_conflict: Optional[
        "capo_endusermessaging.types.on_attribute_conflict.OnAttributeConflict"
    ] = None,
    client_token: Optional[
        "capo_endusermessaging.types.client_token.ClientToken"
    ] = None,
) -> "capo_endusermessaging.types.update_brand_profile_from_registration_output.UpdateBrandProfileFromRegistrationOutput":
    """<p>Imports or refreshes the attributes of an existing brand profile from an existing registration. This operation runs asynchronously. Use the GetJob operation to track its progress.</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>
        registration_id: <p>The identifier or Amazon Resource Name (ARN) of the registration to import attributes from.</p>
        smart_match: <p>Specifies whether to use semantic field mapping between brand profile attributes and registration fields. The default is true. When false, the service maps fields using a fixed set of standard field types.</p>
        on_attribute_conflict: <p>Specifies how the service resolves an attribute that already exists. REPLACE overwrites the existing value with the incoming value. PRESERVE keeps the existing value.</p>
        client_token: <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you do not specify a client token, the AWS SDK automatically generates one.</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 from a registration

        >>> client.update_brand_profile_from_registration(brand_profile_id='bp-abc12345678901234', registration_id='reg-abc12345678901234', smart_match=True, on_attribute_conflict='REPLACE')
    """

    def _handler(
        req: "OperationRequest[capo_endusermessaging.types.update_brand_profile_from_registration_input.UpdateBrandProfileFromRegistrationInput]",
    ) -> OperationResponse[
        "capo_endusermessaging.types.update_brand_profile_from_registration_output.UpdateBrandProfileFromRegistrationOutput"
    ]:
        import capo_endusermessaging._operations.end_user_messaging.update_brand_profile_from_registration

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

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

        return capo_endusermessaging.types.update_brand_profile_from_registration_input.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "UpdateBrandProfileFromRegistration", redact_input=_redact_input
        ),
    )
    input_: capo_endusermessaging.types.update_brand_profile_from_registration_input.UpdateBrandProfileFromRegistrationInput = {
        "brand_profile_id": brand_profile_id,
        "registration_id": registration_id,
    }
    if smart_match is not None:
        input_["smart_match"] = smart_match
    if on_attribute_conflict is not None:
        input_["on_attribute_conflict"] = on_attribute_conflict
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token

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