[ aws . partnercentral-marketing ]

update-campaign-asset

Description

Updates an asset’s field values, layout or send time. Refused with ConflictException while the campaign’s running activation task still owns the asset (ASSET_START_IN_PROGRESS ), and for a live email or social post (ASSET_ALREADY_ACTIVE ): deactivate it first.

See also: AWS API Documentation

Synopsis

  update-campaign-asset
--catalog <value>
--campaign-identifier <value>
--campaign-asset-identifier <value>
[--field-values <value>]
[--layout <value>]
[--send-mode <value>]
[--scheduled-send-at <value>]
[--client-token <value>]
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]
[--debug]
[--endpoint-url <value>]
[--no-verify-ssl]
[--no-paginate]
[--output <value>]
[--query <value>]
[--profile <value>]
[--region <value>]
[--version <value>]
[--color <value>]
[--no-sign-request]
[--ca-bundle <value>]
[--cli-read-timeout <value>]
[--cli-connect-timeout <value>]
[--cli-binary-format <value>]
[--no-cli-pager]
[--cli-auto-prompt]
[--no-cli-auto-prompt]
[--cli-error-format <value>]
[--help]

Options

--catalog (string) [required]

The catalog (AWS or Sandbox).

Possible values:

  • AWS
  • Sandbox

--campaign-identifier (string) [required]

The campaign identifier.

Constraints:

  • min: 18
  • max: 200
  • pattern: (arn:[a-z-]+:partnercentral:[a-z0-9-]+:[0-9]{12}:catalog/[A-Za-z]+/campaign/)?camp-[A-Za-z0-9]{13}

--campaign-asset-identifier (string) [required]

The asset identifier.

Constraints:

  • min: 17
  • max: 17
  • pattern: ast-[0-9a-z]{13}

--field-values (list)

Value-only updates to the asset’s pinned template fields, keyed by FieldId. The field schema (labels, descriptions, constraints, placeholders, image defaults) is service-owned and pinned at instantiation, so clients send only the values they are changing. Fields omitted keep their stored values; send the entry with Value omitted to clear one.

Named FieldValues to match the member it edits on CampaignAsset , which is the same concept read back. It was templateFieldUpdates ; the two names for one concept were the defect, not the length.

Constraints:

  • min: 0
  • max: 150

(structure)

A value-only update to one email template field. The write counterpart of CampaignAssetFieldValue: it carries just the addressing key and the new value, never the service-owned schema.

FieldId -> (string) [required]

The field to update; must match a FieldId in the asset’s stored schema.

Constraints:

  • min: 1
  • max: 64
  • pattern: [A-Za-z][A-Za-z0-9_]*( [A-Za-z0-9_]+)*

Value -> (tagged union structure)

The new value. Omit to clear the field.

Note

This is a Tagged Union structure. Only one of the following top level keys can be set: Text, ImageReference, LinkedAssetId, CampaignAssetImage.

Text -> (string)

Text value — for both text and RichText fields. A RichText value is a markup fragment restricted to the field’s AllowedTags.

Constraints:

  • min: 1
  • max: 100000

ImageReference -> (string)

Image reference (image fields).

On a write, one of exactly two forms:

  • the s3:// URI of a file you staged in the Partner Central file staging bucket. It is scanned, then copied into this asset.
  • the URL Build with AI returned for a suggested image, unchanged. It is copied into this asset and not scanned. Any other URL is refused with FILE_REFERENCE_INVALID , including one a read returned: to keep the current image, omit the field; to put it on another asset, use CampaignAssetImage .

On a read, a URL the caller can fetch: an image in the asset’s own storage comes back as a presigned GET that expires one hour after the read, so fetch it again with GetCampaignAsset when it returns 403; an image already on DG’s public CDN comes back as that stable URL. A stored reference outside this asset’s storage, or not a raster image, is never signed, and the value is omitted. The signed URL serves the image as its image type, whatever the upload declared.

Constraints:

  • min: 1
  • max: 4096

LinkedAssetId -> (string)

The asset an AssetLink field names: the id of an asset on the same campaign, of the field’s category. It is a prerequisite of this asset while linked, so it activates first, this asset cannot start until it is live, and it cannot be deleted.

Constraints:

  • min: 17
  • max: 17
  • pattern: ast-[0-9a-z]{13}

CampaignAssetImage -> (structure)

Write only. Copies an image stored on another of your assets into this image field. The image is checked against this field’s constraints and not scanned again. Also requires partnercentral:GetCampaignAsset on the source campaign. Reads return the copy as ImageReference .

CampaignIdentifier -> (string) [required]

The source campaign’s id or ARN.

Constraints:

  • min: 18
  • max: 200
  • pattern: (arn:[a-z-]+:partnercentral:[a-z0-9-]+:[0-9]{12}:catalog/[A-Za-z]+/campaign/)?camp-[A-Za-z0-9]{13}

CampaignAssetIdentifier -> (string) [required]

The source asset’s id.

Constraints:

  • min: 17
  • max: 17
  • pattern: ast-[0-9a-z]{13}

FieldId -> (string) [required]

The source image field.

Constraints:

  • min: 1
  • max: 64
  • pattern: [A-Za-z][A-Za-z0-9_]*( [A-Za-z0-9_]+)*

Shorthand Syntax:

FieldId=string,Value={Text=string,ImageReference=string,LinkedAssetId=string,CampaignAssetImage={CampaignIdentifier=string,CampaignAssetIdentifier=string,FieldId=string}} ...

JSON Syntax:

[
  {
    "FieldId": "string",
    "Value": {
      "Text": "string",
      "ImageReference": "string",
      "LinkedAssetId": "string",
      "CampaignAssetImage": {
        "CampaignIdentifier": "string",
        "CampaignAssetIdentifier": "string",
        "FieldId": "string"
      }
    }
  }
  ...
]

--layout (string)

Selects a multi-layout asset’s layout: one of the values in CampaignAsset.layout.options .

PATCH: omitted leaves the selection unchanged, and there is no way to clear it. A value that is not one of the asset’s options — or any value on a single-layout asset — is a plain ValidationException , and nothing in the call is applied. Every pinned field stays writable whichever layout is selected.

Constraints:

  • min: 1
  • max: 64
  • pattern: [A-Za-z][A-Za-z0-9_]*

--send-mode (string)

When a sendableasset (EMAIL , SOCIAL_POST ) sends: on activation, or at ScheduledSendAt .

A mode beside a value rather than a union, on purpose: ScheduledSendAt stays a plain Timestamp , and the precedent is EventBridge Scheduler’s FlexibleTimeWindow { Mode, MaximumWindowInMinutes } . The pair is checked as one, and a request where they disagree is refused with ValidationException (INVALID_VALUE , naming the member) and applies nothing:

  • SCHEDULED requires ScheduledSendAt ; a reschedule resends SCHEDULED with the new time;
  • ON_ACTIVATION forbids ScheduledSendAt , and drops any time already stored;
  • ScheduledSendAt without SendMode is refused.

PATCH: omitted leaves both unchanged. Until a mode is chosen the asset reports SEND_MODE_MISSING and does not activate: no default, because an unchosen send mails the real audience. Rejected with ValidationException (NOT_SUPPORTED_FOR_CATEGORY ) for a category that has no send (LANDING_PAGE , DOCUMENT , BANNER_AD ). Like every other edit, it reaches the delivery platform at the asset’s next activation, and a live email or social post refuses it (ASSET_ALREADY_ACTIVE ): deactivate first.

Possible values:

  • ON_ACTIVATION
  • SCHEDULED

--scheduled-send-at (timestamp)

The send time, with SendMode: SCHEDULED and only then. See SendMode .

Must be at least an hour out (SEND_WINDOW_TOO_SOON ), unless it is the time already stored: resending the stored mode and time changes nothing and is accepted, so a form that always resubmits does not trip the window.

Must also fall on or before the campaign’s EndOn (by the end of that UTC day): refused with ValidationException (INVALID_VALUE ) otherwise, so nothing is scheduled to send after the campaign completes.

Was scheduleDate , a YYYY-MM-DD string. Retyped because a date alone cannot express a send time, which is the whole point of a schedule — and because the resource already spelled the same concept ScheduledSendAt on the activation responses. Two spellings of one concept on one resource was the defect.

--client-token (string)

Idempotency token. Retry-safety only — this is nota concurrency token, and sequential edits to one field are last-writer-wins.

Constraints:

  • min: 1
  • max: 128
  • pattern: [\x21-\x7E]+

--cli-input-json | --cli-input-yaml (string) Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. Similarly, if provided yaml-input it will print a sample input YAML that can be used with --cli-input-yaml. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command. The generated JSON skeleton is not stable between versions of the AWS CLI and there are no backwards compatibility guarantees in the JSON skeleton generated.

Global Options

--debug (boolean)

Turn on debug logging.

--endpoint-url (string)

Override command’s default URL with the given URL.

--no-verify-ssl (boolean)

By default, the AWS CLI uses SSL when communicating with AWS services. For each SSL connection, the AWS CLI will verify SSL certificates. This option overrides the default behavior of verifying SSL certificates.

--no-paginate (boolean)

Disable automatic pagination. If automatic pagination is disabled, the AWS CLI will only make one call, for the first page of results.

--output (string)

The formatting style for command output.

  • json
  • text
  • table
  • yaml
  • yaml-stream
  • off

--query (string)

A JMESPath query to use in filtering the response data.

--profile (string)

Use a specific profile from your credential file.

--region (string)

The region to use. Overrides config/env settings.

--version (string)

Display the version of this tool.

--color (string)

Turn on/off color output.

  • on
  • off
  • auto

--no-sign-request (boolean)

Do not sign requests. Credentials will not be loaded if this argument is provided.

--ca-bundle (string)

The CA certificate bundle to use when verifying SSL certificates. Overrides config/env settings.

--cli-read-timeout (int)

The maximum socket read time in seconds. If the value is set to 0, the socket read will be blocking and not timeout. The default value is 60 seconds.

--cli-connect-timeout (int)

The maximum socket connect time in seconds. If the value is set to 0, the socket connect will be blocking and not timeout. The default value is 60 seconds.

--cli-binary-format (string)

The formatting style to be used for binary blobs. The default format is base64. The base64 format expects binary blobs to be provided as a base64 encoded string. The raw-in-base64-out format preserves compatibility with AWS CLI V1 behavior and binary values must be passed literally. When providing contents from a file that map to a binary blob fileb:// will always be treated as binary and use the file contents directly regardless of the cli-binary-format setting. When using file:// the file contents will need to properly formatted for the configured cli-binary-format.

  • base64
  • raw-in-base64-out

--no-cli-pager (boolean)

Disable cli pager for output.

--cli-auto-prompt (boolean)

Automatically prompt for CLI input parameters.

--no-cli-auto-prompt (boolean)

Disable automatically prompt for CLI input parameters.

--cli-error-format (string)

The formatting style for error output. By default, errors are displayed in enhanced format.

  • legacy
  • json
  • yaml
  • text
  • table
  • enhanced

--help (boolean)

Display help for the command/subcommand.

Output

Id -> (string)

The asset identifier.

Constraints:

  • min: 17
  • max: 17
  • pattern: ast-[0-9a-z]{13}

State -> (string)

The asset’s state, unchanged.

An update never moves it, so a live asset stays ACTIVE while its edited values take effect for the next activation. There is no edit-outcome member: a 200 means every submitted value applied, and every failure is a refusal on the call itself (DG-040 Decision 11).

Possible values:

  • INACTIVE
  • ACTIVE

ActivationIssues -> (list)

What must be fixed on this asset before it can be activated. Empty when the asset is ready.

Issues don’t block saving: an asset can be saved incomplete and fixed over several updates. StartCampaignAssetActivationTask refuses an asset that still has issues: an issue blocks activation when only an edit to the asset can change the outcome. Most issues name the field to fix in FieldId . Fix it with UpdateCampaignAsset , then read this list again.

Besides the issues computed from the asset’s content, the list carries what the last activation found: CONTENT_REJECTED and PARTNER_IMAGE_REJECTED when moderation refused a field. Editing that field removes its issue. A CONTENT_REJECTED without a FieldId means the text was refused as a whole; editing any text field removes it.

Problems with the campaign’s own settings, such as a missing recipient list, and with the partner’s profile, such as a missing logo, are reported on Campaign.ActivationIssues , not here.

Constraints:

  • min: 0
  • max: 150

(structure)

One thing that must be fixed before activation.

Code -> (string) [required]

What is wrong. Branch on this, not on Message .

Possible values:

  • ASSET_NOT_FOUND
  • ASSET_NOT_STARTABLE
  • ASSET_START_IN_PROGRESS
  • ASSET_ALREADY_ACTIVE
  • SEND_WINDOW_TOO_SOON
  • REQUIRED_FIELD_MISSING
  • RECIPIENT_LIST_MISSING
  • ENGAGEMENT_GROUPS_UNAVAILABLE
  • SENDER_EMAIL_MISSING
  • END_ON_MISSING
  • ASSET_CONTENT_MISSING
  • ASSET_NOT_ACTIVATABLE
  • TEMPLATE_CHANGED
  • PARTNER_IMAGE_REJECTED
  • PREREQUISITE_ASSET_NOT_ACTIVE
  • PARTNER_NOT_PROVISIONED
  • RECIPIENT_LIST_EMPTY
  • RECIPIENT_LIMIT_EXCEEDED
  • CONTACT_OPT_IN_REQUIRED
  • MAILING_CREDITS_EXHAUSTED
  • SENDER_EMAIL_INVALID
  • SOCIAL_CONNECTION_MISSING
  • SOCIAL_CONNECTION_EXPIRED
  • SOCIAL_CONNECTION_PAGE_REQUIRED
  • DELIVERY_FAILED
  • INTERNAL_ERROR
  • MAILING_CREDITS_INSUFFICIENT
  • PARTNER_PROFILE_FIELD_MISSING
  • PARTNER_PROFILE_FIELD_DOES_NOT_FIT
  • SOCIAL_CONNECTION_NOT_CHOSEN
  • PRIVACY_POLICY_URL_MISSING
  • PARTNER_ADDRESS_MISSING
  • SEND_MODE_MISSING
  • CONTENT_REJECTED
  • URL_NOT_ALLOWED
  • SENDER_NOT_APPROVED

FieldId -> (string)

The asset field to fix. Present for asset-level issues, except SEND_MODE_MISSING and a CONTENT_REJECTED that refused the asset’s text as a whole rather than one field.

Constraints:

  • min: 1
  • max: 64
  • pattern: [A-Za-z][A-Za-z0-9_]*( [A-Za-z0-9_]+)*

CampaignSetting -> (string)

The UpdateCampaign member to set. Present for campaign-level issues.

Possible values:

  • SENDER_EMAIL
  • END_ON
  • EMAIL_TARGET
  • PRIVACY_POLICY_URL
  • PARTNER_ADDRESS
  • PARTNER_BADGE

PartnerProfileField -> (string)

The partner-profile value to set or shorten, in AWS Partner Central, or the derived value whose input it is. Present on PARTNER_PROFILE_FIELD_MISSING and PARTNER_PROFILE_FIELD_DOES_NOT_FIT .

Possible values:

  • DISPLAY_NAME
  • WEBSITE_URL
  • LOGO
  • WEBSITE_DOMAIN
  • COPYRIGHT_LINE
  • PARTNER_DETAILS
  • COPYRIGHT_AND_DETAILS
  • COPYRIGHT_YEAR_LINE

AffectedAssetIds -> (list)

The assets this campaign-level issue blocks.

Constraints:

  • min: 0
  • max: 25

(string)

A campaign asset’s id: ast- and 13 lowercase letters or digits (DG-087). An asset has no ARN; it is named by its id within its campaign.

Constraints:

  • min: 17
  • max: 17
  • pattern: ast-[0-9a-z]{13}

Message -> (string) [required]

A description for display. Don’t parse it.