Class CreateCampaignRequest
- All Implemented Interfaces:
SdkPojo,ToCopyableBuilder<CreateCampaignRequest.Builder,CreateCampaignRequest>
Input for CreateCampaign operation.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbuilder()final StringThe campaign template this campaign draws its assets from.final Catalogcatalog()The catalog (AWS or Sandbox).final StringThe catalog (AWS or Sandbox).final StringIdempotency token.final FileRefThe campaign's send audience — a CSV of recipient email addresses.Engagement groups whose contacts the campaign's emails will also go to: theIdsListEngagementGroupsreturns (AWS Partner Central Selling).final StringendOn()The last day of the campaign's run window, inclusive and in UTC.final booleanfinal booleanequalsBySdkFields(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final MonetaryValueWhat the partner expects the campaign to cost.final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) Used to retrieve the value of a field from any class that extendsSdkRequest.final booleanFor responses, this returns true if the service returned a value for the EmailTargetEngagementGroupIds property.final inthashCode()final booleanhasTags()For responses, this returns true if the service returned a value for the Tags property.final Stringname()The display name.final StringThe partner's physical postal address, shown in every email footer and as a landing page's contact line.final FileRefThe 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.final StringThe URL of the partner's privacy policy, linked from every email and landing page footer.final StringThe address every email of this campaign is sent from.static Class<? extends CreateCampaignRequest.Builder> final StringstartOn()The first day of the campaign's run window.tags()Tags to apply at creation.final TargetAudienceAdvisory targeting metadata.Take this object and create a builder that contains all of the current property values of this object.final StringtoString()Returns a string representation of this object.final MonetaryValueThe campaign's total budget.Methods inherited from class software.amazon.awssdk.awscore.AwsRequest
overrideConfigurationMethods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
catalog
The catalog (AWS or Sandbox).
If the service returns an enum value that is not available in the current SDK version,
catalogwill returnCatalog.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromcatalogAsString().- Returns:
- The catalog (AWS or Sandbox).
- See Also:
-
catalogAsString
The catalog (AWS or Sandbox).
If the service returns an enum value that is not available in the current SDK version,
catalogwill returnCatalog.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromcatalogAsString().- Returns:
- The catalog (AWS or Sandbox).
- See Also:
-
name
-
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 `SearchCampaignTemplates` and `GetCampaignTemplate`, 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 `
Id` name, which is the convention for referencing another resource from a body. - Returns:
- 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 `SearchCampaignTemplates` and `GetCampaignTemplate`, 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 `
-
senderEmail
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 code `SENDER_DOMAIN_NOT_ALLIANCE_LEAD`. Then, for a sender at example.com, DNS must hold the CNAME `dkim._domainkey.example.com` → `dkim._domainkey.md02.com` (field code `SENDER_DOMAIN_DKIM_MISSING`) and a DMARC record, one TXT `_dmarc.example.com` starting `v=DMARC1` with a `p` of `none`, `quarantine` or `reject` (field code `SENDER_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.
- Returns:
- 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 code `SENDER_DOMAIN_NOT_ALLIANCE_LEAD`. Then, for a sender at example.com, DNS must hold the CNAME `dkim._domainkey.example.com` → `dkim._domainkey.md02.com` (field code `SENDER_DOMAIN_DKIM_MISSING`) and a DMARC record, one TXT `_dmarc.example.com` starting `v=DMARC1` with a `p` of `none`, `quarantine` or `reject` (field code `SENDER_DOMAIN_DMARC_MISSING`). Both DNS codes are reported together when both records are missing.
-
privacyPolicyUrl
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.
- Returns:
- 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.
-
partnerAddress
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.
- Returns:
- 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.
-
partnerBadge
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`, or `SCAN_IN_PROGRESS` while 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.
- Returns:
- 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.
-
emailTarget
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 Address` or `E-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 code `EMAIL_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 with `RECIPIENT_LIST_EMPTY`; otherwise rows without a usable address are not a refusal: they are skipped and counted, and `GetCampaign` reports 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 `S3Uri` for this file; `GetCampaign` returns the scan verdict, when the list was attached and how its rows resolved, and nothing more.
- Returns:
- 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 Address` or `E-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 code `EMAIL_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 with `RECIPIENT_LIST_EMPTY`; otherwise rows without a usable address are not a refusal: they are skipped and counted, and `GetCampaign` reports 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.
-
hasEmailTargetEngagementGroupIds
public final boolean hasEmailTargetEngagementGroupIds()For responses, this returns true if the service returned a value for the EmailTargetEngagementGroupIds property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
emailTargetEngagementGroupIds
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 to `EmailTarget` alone.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasEmailTargetEngagementGroupIds()method.- Returns:
- Engagement groups whose contacts the campaign's emails will also go to: the
IdsListEngagementGroupsreturns (AWS Partner Central Selling). 1–10, each named once.
-
targetAudience
Advisory targeting metadata. Refined later, and not validated here.
- Returns:
- Advisory targeting metadata. Refined later, and not validated here.
-
estimatedBudget
What the partner expects the campaign to cost.
- Returns:
- What the partner expects the campaign to cost.
-
totalBudget
The campaign's total budget.
- Returns:
- The campaign's total budget.
-
startOn
The first day of the campaign's run window. Not after
EndOn(ValidationException,INVALID_VALUE).- Returns:
- The first day of the campaign's run window. Not after
EndOn(ValidationException,INVALID_VALUE).
-
endOn
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's
ActivationIssuesreportsEND_ON_MISSINGand StartCampaignAssetActivationTask refuses (CAMPAIGN_INCOMPLETE). Set it with UpdateCampaign.- Returns:
- 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's
ActivationIssuesreportsEND_ON_MISSINGand StartCampaignAssetActivationTask refuses (CAMPAIGN_INCOMPLETE). Set it with UpdateCampaign.
-
clientToken
Idempotency token. Same token within 24h returns existing resource.
- Returns:
- Idempotency token. Same token within 24h returns existing resource.
-
hasTags
public final boolean hasTags()For responses, this returns true if the service returned a value for the Tags property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
tags
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 with `ValidationException`, 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 same `ClientToken` returns the campaign the first attempt created and does not re-apply tags — use `TagResource` to change them afterwards. `ListTagsForResource` returns them.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasTags()method.- Returns:
- 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.
-
toBuilder
Description copied from interface:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<CreateCampaignRequest.Builder,CreateCampaignRequest> - Specified by:
toBuilderin classPartnerCentralMarketingRequest- Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
public final int hashCode()- Overrides:
hashCodein classAwsRequest
-
equals
- Overrides:
equalsin classAwsRequest
-
equalsBySdkFields
Description copied from interface:SdkPojoIndicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojoclass, and is generated based on a service model.If an
SdkPojoclass does not have any inherited fields,equalsBySdkFieldsandequalsare essentially the same.- Specified by:
equalsBySdkFieldsin interfaceSdkPojo- Parameters:
obj- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
-
getValueForField
Description copied from class:SdkRequestUsed to retrieve the value of a field from any class that extendsSdkRequest. The field name specified should match the member name from the corresponding service-2.json model specified in the codegen-resources folder for a given service. The class specifies what class to cast the returned value to. If the returned value is also a modeled class, theSdkRequest.getValueForField(String, Class)method will again be available.- Overrides:
getValueForFieldin classSdkRequest- Parameters:
fieldName- The name of the member to be retrieved.clazz- The class to cast the returned object to.- Returns:
- Optional containing the casted return value
-
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo- Returns:
- The mapping between the field name and its corresponding field.
-