EndUserMessaging / Client / create_brand_profile_attributes

create_brand_profile_attributes

EndUserMessaging.Client.create_brand_profile_attributes(**kwargs)

Creates up to 10 attributes for a brand profile in a single request. For attributes of type IMAGE or DOCUMENT, the response includes a presigned Amazon S3 URL that you use to upload the media. This operation is atomic: either all of the attributes are created, or none of them are.

See also: AWS API Documentation

Request Syntax

response = client.create_brand_profile_attributes(
    brandProfileId='string',
    attributes=[
        {
            'attributeName': 'string',
            'attributeType': 'TEXT'|'IMAGE'|'DOCUMENT',
            'attributeValue': 'string',
            'attachmentBody': b'bytes',
            'description': 'string',
            'category': 'string'
        },
    ],
    clientToken='string'
)
Parameters:
  • brandProfileId (string) –

    [REQUIRED]

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

  • attributes (list) –

    [REQUIRED]

    The brand profile attributes.

    • (dict) –

      Specifies an attribute to create for a brand profile.

      • attributeName (string) – [REQUIRED]

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

      • attributeType (string) – [REQUIRED]

        The type of the attribute. TEXT stores an inline value. IMAGE and DOCUMENT store binary media that you upload.

      • attributeValue (string) –

        The text value for the attribute. This value applies to attributes of type TEXT. For attributes of type IMAGE or DOCUMENT, provide the media through the attachment body instead.

      • attachmentBody (bytes) –

        The binary content for an attribute of type IMAGE or DOCUMENT. The content is base64-encoded when it is sent over the wire.

      • description (string) –

        A description of the attribute.

      • category (string) –

        The category of the attribute.

  • clientToken (string) –

    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.

    This field is autopopulated if not provided.

Return type:

dict

Returns:

Response Syntax

{
    'attributes': [
        {
            'attributeName': 'string',
            'attributeType': 'TEXT'|'IMAGE'|'DOCUMENT',
            'mediaDownloadUrl': 'string'
        },
    ]
}

Response Structure

  • (dict) –

    • attributes (list) –

      The brand profile attributes.

      • (dict) –

        Contains information about an attribute that was created for a brand profile.

        • attributeName (string) –

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

        • attributeType (string) –

          The type of the attribute. TEXT stores an inline value. IMAGE and DOCUMENT store binary media that you upload.

        • mediaDownloadUrl (string) –

          A presigned Amazon S3 URL that you can use to download the attribute media. The URL is valid for one hour and is present only for attributes of type IMAGE or DOCUMENT.

Exceptions

  • EndUserMessaging.Client.exceptions.ValidationException

  • EndUserMessaging.Client.exceptions.ThrottlingException

  • EndUserMessaging.Client.exceptions.AccessDeniedException

  • EndUserMessaging.Client.exceptions.ResourceNotFoundException

  • EndUserMessaging.Client.exceptions.InternalServerException

  • EndUserMessaging.Client.exceptions.ConflictException

  • EndUserMessaging.Client.exceptions.ServiceQuotaExceededException