create_campaign
async
¶
create_campaign(
catalog: Catalog,
name: CampaignName,
campaign_template_id: CampaignTemplateId,
*,
config_overrides: Optional[AsyncPartnerCentralMarketingClientConfig] = None,
sender_email: Optional[SenderEmail] = None,
privacy_policy_url: Optional[PrivacyPolicyUrl] = None,
partner_address: Optional[PartnerAddress] = None,
partner_badge: Optional[FileRef] = None,
email_target: Optional[FileRef] = None,
email_target_engagement_group_ids: Optional[EngagementGroupIdList] = None,
target_audience: Optional[TargetAudience] = None,
estimated_budget: Optional[MonetaryValue] = None,
total_budget: Optional[MonetaryValue] = None,
start_on: Optional[UtcDate] = None,
end_on: Optional[UtcDate] = None,
client_token: Optional[ClientToken] = None,
tags: Optional[TagList] = None,
) -> CreateCampaignResponse
Creates a new marketing campaign. Returns the identity of the new campaign, not the campaign. Growing a response is backward compatible and shrinking one is not, and the caller's next step is a GetCampaign anyway — a write that supplies an audience cannot report its scan verdict, because that is decided after it commits.
Parameters:
-
catalog(Catalog) –The catalog (AWS or Sandbox).
-
name(CampaignName) –The display name.
-
campaign_template_id(CampaignTemplateId) –The campaign template this campaign draws its assets from.
Binds the campaign to a single source template: every asset must come from this template's asset templates, and one from another template is refused at
BatchCreateCampaignAsset. Immutable once set. Every campaign has one: a campaign's language and its assets' blueprints both come from its template.Templates are AWS-authored and read-only — they are discovered through
SearchCampaignTemplatesandGetCampaignTemplate, and there is no create, update or delete operation for one.The template's id only: a campaign template has no ARN (DG-084). The member keeps the
<Resource>Idname, which is the convention for referencing another resource from a body. -
sender_email(Optional[SenderEmail], default:None) –The address every email of this campaign is sent from.
Printable ASCII only, with no spaces or line breaks, or field code
PATTERN_MISMATCH. Then three rules, all checked when the sender is set. Its domain must exactly match, ignoring case, the domain of the partner's alliance lead email in AWS Partner Central (a subdomain does not), or field codeSENDER_DOMAIN_NOT_ALLIANCE_LEAD. Then, for a sender at example.com, DNS must hold the CNAMEdkim._domainkey.example.com→dkim._domainkey.md02.com(field codeSENDER_DOMAIN_DKIM_MISSING) and a DMARC record, one TXT_dmarc.example.comstartingv=DMARC1with apofnone,quarantineorreject(field codeSENDER_DOMAIN_DMARC_MISSING). Both DNS codes are reported together when both records are missing.A partner who can't satisfy them can't set a sender, so can't run email campaigns. A shared mail provider's domain, such as gmail.com, can't carry the records. Optional here: a campaign with no sender can be created and edited, but its email assets cannot be activated until one is set.
-
privacy_policy_url(Optional[PrivacyPolicyUrl], default:None) –The URL of the partner's privacy policy, linked from every email and landing page footer. Optional here: a campaign whose emails or landing pages show it cannot activate them until one is set.
-
partner_address(Optional[PartnerAddress], default:None) –The partner's physical postal address, shown in every email footer and as a landing page's contact line. Optional here: an email that shows it cannot activate until one is set. A landing page that shows it publishes it empty when it is unset, and a document's footer then prints the partner's name alone.
-
partner_badge(Optional[FileRef], default:None) –The partner's badge — a tier or designation badge from AWS Partner Badge Manager — shown in every badge slot of the campaign's emails, landing pages and documents. Optional: until one is set, every badge slot shows the Standalone AWS Partner badge.
A PNG or JPEG of at most 2 MB, staged like an asset image and checked the same way: it must have passed the staging scan (
SCAN_REJECTED, orSCAN_IN_PROGRESSwhile it is pending), and its bytes must be the format its name says (IMAGE_FORMAT_NOT_SUPPORTED). Any shape is accepted: a badge is drawn whole, never cropped. Content moderation judges it when an asset that shows it is activated. -
email_target(Optional[FileRef], default:None) –The campaign's send audience — a CSV of recipient email addresses.
The campaign's target: who the campaign is sent to, as distinct from a
CampaignAsset, which is the content that is sent. It sits on the campaign and not on the activation call because a partner assembles it in the same wizard flow that sets the name and the dates — and because attaching it here means it is validated, staged and resolved to a count before anything is activated, rather than at the last click.Required format: a header row naming the email column
Email,E-mail,Email AddressorE-mail Address— compared without case, spaces or punctuation. Other columns are permitted and ignored, and with two email columns the first is used. A file without such a header is refused with field codeEMAIL_COLUMN_MISSING: the address column is never guessed. The rows reach the delivery platform's importer as the partner wrote them — a partner's audience is never rewritten.At most 5 MB, checked against the object's size before anything is copied, and at most 10,000 distinct addresses, refused with
RECIPIENT_LIST_TOO_LARGE. A file with no valid address at all is refused withRECIPIENT_LIST_EMPTY; otherwise rows without a usable address are not a refusal: they are skipped and counted, andGetCampaignreports the counts. Optional here, because a campaign is a container and holds no state to be incomplete in — but an email asset cannot be activated without it, so the requirement moved to the point of activation.Editable at any time, and an edit reaches the delivery platform only when an asset is activated after it. Each email activation loads the audience into a contact list of its own, so an address taken off the file is not sent to by the next activation.
The bytes are write-only. No response returns a URL or an
S3Urifor this file;GetCampaignreturns the scan verdict, when the list was attached and how its rows resolved, and nothing more. -
email_target_engagement_group_ids(Optional[EngagementGroupIdList], default:None) –Engagement groups whose contacts the campaign's emails will also go to: the
IdsListEngagementGroupsreturns (AWS Partner Central Selling). 1–10, each named once.Each group is named once: a repeated id is refused with field code
INVALID_VALUE. Not checked against your groups when saved. StartCampaignAssetActivationTask resolves them to recipients. On a stage that can't resolve groups yet, Start refuses an email while groups are set (ENGAGEMENT_GROUPS_UNAVAILABLE), rather than send toEmailTargetalone. -
target_audience(Optional[TargetAudience], default:None) –Advisory targeting metadata. Refined later, and not validated here.
-
estimated_budget(Optional[MonetaryValue], default:None) –What the partner expects the campaign to cost.
-
total_budget(Optional[MonetaryValue], default:None) –The campaign's total budget.
-
start_on(Optional[UtcDate], default:None) –The first day of the campaign's run window. Not after
EndOn(ValidationException,INVALID_VALUE). -
end_on(Optional[UtcDate], default:None) –The last day of the campaign's run window, inclusive and in UTC. Not in the past: the campaign completes at the UTC midnight after it (see
CampaignState). A scheduled send must fall on or before it. Optional here, but required before any asset activates: until it is set, GetCampaign'sActivationIssuesreportsEND_ON_MISSINGand StartCampaignAssetActivationTask refuses (CAMPAIGN_INCOMPLETE). Set it with UpdateCampaign. -
client_token(Optional[ClientToken], default:None) –Idempotency token. Same token within 24h returns existing resource.
-
tags(Optional[TagList], default:None) –Tags to apply at creation. Tag-on-create rather than create-then-tag is a Tagris requirement, not a convenience: it is what lets a tag-based access control policy govern the creation itself. A campaign created untagged and tagged a moment later is briefly outside any such policy.
A key beginning
aws:(any case) is reserved for AWS-applied system tags and is refused withValidationException, as is a key repeated in the list; nothing is created. The tags are recorded before the campaign is written, so a create that cannot record them fails and creates nothing. A retry with the sameClientTokenreturns the campaign the first attempt created and does not re-apply tags — useTagResourceto change them afterwards.ListTagsForResourcereturns them.
Raises:
-
AccessDeniedException–You do not have sufficient access to perform this action. An IAM denial carries no
Reason. A refusal for the caller's Partner Central state carries one, so a client tells the two apart by its presence. -
InternalServerException–An unexpected error occurred during the processing of the request.
-
ThrottlingException–The request was denied due to request throttling.
-
ValidationException–The input fails to satisfy the constraints specified by the service. A caller branches on
Reason, and where the rejection is attributable to particular fields it readsFieldListrather than parsingMessage, which is prose and may change. -
ConflictException–The request conflicts with the current state of the resource.
-
ResourceNotFoundException–The specified resource does not exist.
-
ServiceQuotaExceededException–The request exceeds a service quota.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Create a campaign
>>> await client.create_campaign(catalog='AWS', name='Q4 GenAI Campaign', campaign_template_id='tmpl-a1b2c3d4e5f6g', total_budget={'Amount': '25000.00', 'CurrencyCode': 'USD'}, start_on='2026-11-01', end_on='2026-12-31')
Source code in docs_src/capo_partnercentral_marketing/_services/async_partner_central_marketing.py
880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 | |