Class CreateCampaignRequest

All Implemented Interfaces:
SdkPojo, ToCopyableBuilder<CreateCampaignRequest.Builder,CreateCampaignRequest>

@Generated("software.amazon.awssdk:codegen") public final class CreateCampaignRequest extends PartnerCentralMarketingRequest implements ToCopyableBuilder<CreateCampaignRequest.Builder,CreateCampaignRequest>

Input for CreateCampaign operation.

  • Method Details

    • catalog

      public final Catalog catalog()

      The catalog (AWS or Sandbox).

      If the service returns an enum value that is not available in the current SDK version, catalog will return Catalog.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from catalogAsString().

      Returns:
      The catalog (AWS or Sandbox).
      See Also:
    • catalogAsString

      public final String catalogAsString()

      The catalog (AWS or Sandbox).

      If the service returns an enum value that is not available in the current SDK version, catalog will return Catalog.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from catalogAsString().

      Returns:
      The catalog (AWS or Sandbox).
      See Also:
    • name

      public final String name()

      The display name.

      Returns:
      The display name.
    • campaignTemplateId

      public final String 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

      public final String 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

      public final String 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

      public final String 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

      public final FileRef 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

      public final FileRef 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 the isEmpty() 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

      public final List<String> emailTargetEngagementGroupIds()

      Engagement groups whose contacts the campaign's emails will also go to: the Ids ListEngagementGroups returns (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 Ids ListEngagementGroups returns (AWS Partner Central Selling). 1–10, each named once.

    • targetAudience

      public final TargetAudience targetAudience()

      Advisory targeting metadata. Refined later, and not validated here.

      Returns:
      Advisory targeting metadata. Refined later, and not validated here.
    • estimatedBudget

      public final MonetaryValue estimatedBudget()

      What the partner expects the campaign to cost.

      Returns:
      What the partner expects the campaign to cost.
    • totalBudget

      public final MonetaryValue totalBudget()

      The campaign's total budget.

      Returns:
      The campaign's total budget.
    • startOn

      public final String 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

      public final String 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 ActivationIssues reports END_ON_MISSING and 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 ActivationIssues reports END_ON_MISSING and StartCampaignAssetActivationTask refuses (CAMPAIGN_INCOMPLETE). Set it with UpdateCampaign.

    • clientToken

      public final String 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 the isEmpty() 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

      public final List<Tag> 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

      public CreateCampaignRequest.Builder toBuilder()
      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<CreateCampaignRequest.Builder,CreateCampaignRequest>
      Specified by:
      toBuilder in class PartnerCentralMarketingRequest
      Returns:
      a builder for type T
    • builder

      public static CreateCampaignRequest.Builder builder()
    • serializableBuilderClass

      public static Class<? extends CreateCampaignRequest.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class AwsRequest
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class AwsRequest
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      Description copied from interface: SdkPojo
      Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • toString

      public final String toString()
      Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
      Description copied from class: SdkRequest
      Used to retrieve the value of a field from any class that extends SdkRequest. 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, the SdkRequest.getValueForField(String, Class) method will again be available.
      Overrides:
      getValueForField in class SdkRequest
      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

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.
    • sdkFieldNameToField

      public final Map<String,SdkField<?>> sdkFieldNameToField()
      Specified by:
      sdkFieldNameToField in interface SdkPojo
      Returns:
      The mapping between the field name and its corresponding field.