Class: Aws::PartnerCentralMarketing::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::PartnerCentralMarketing::Client
- Includes:
- ClientStubs
- Defined in:
- gems/aws-sdk-partnercentralmarketing/lib/aws-sdk-partnercentralmarketing/client.rb
Overview
An API client for PartnerCentralMarketing. To construct a client, you need to configure a :region and :credentials.
client = Aws::PartnerCentralMarketing::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the developer guide.
See #initialize for a full list of supported configuration options.
Instance Attribute Summary
Attributes inherited from Seahorse::Client::Base
API Operations collapse
-
#batch_create_campaign_asset(params = {}) ⇒ Types::BatchCreateCampaignAssetResponse
Instantiates one or more of the campaign template's blueprints as assets of this campaign.
-
#create_campaign(params = {}) ⇒ Types::CreateCampaignResponse
Creates a new marketing campaign.
-
#create_social_connection_authorization_url(params = {}) ⇒ Types::CreateSocialConnectionAuthorizationUrlResponse
Creates a single-use URL the partner visits to authorize publishing on a platform.
-
#deactivate_campaign_asset(params = {}) ⇒ Types::DeactivateCampaignAssetResponse
Stops a live campaign asset: an email's scheduled send is withdrawn, a social post is removed before it publishes.
-
#delete_campaign(params = {}) ⇒ Struct
Permanently deletes a campaign, its assets and their stored files.
-
#delete_campaign_asset(params = {}) ⇒ Struct
Permanently deletes a campaign asset.
-
#delete_social_connection(params = {}) ⇒ Struct
Revokes and deletes one social connection; other connections on the same platform are untouched.
-
#get_campaign(params = {}) ⇒ Types::GetCampaignResponse
Retrieves a campaign by its identifier.
-
#get_campaign_asset(params = {}) ⇒ Types::GetCampaignAssetResponse
Retrieves an asset by its identifier.
-
#get_campaign_asset_activation_task(params = {}) ⇒ Types::GetCampaignAssetActivationTaskResponse
Reads a campaign's current activation task.
-
#get_campaign_asset_export_task(params = {}) ⇒ Types::GetCampaignAssetExportTaskResponse
Retrieves a campaign asset export task by its identifier, reporting its status and, when the task is COMPLETED, a freshly minted short-lived presigned URL for downloading the ZIP archive.
-
#get_campaign_template(params = {}) ⇒ Types::GetCampaignTemplateResponse
Retrieves full detail of one campaign template, including its ordered asset templates with their field schema and layout previews.
-
#list_campaign_assets(params = {}) ⇒ Types::ListCampaignAssetsResponse
Lists assets for a campaign with pagination.
-
#list_campaigns(params = {}) ⇒ Types::ListCampaignsResponse
Lists campaigns with optional filters and pagination.
-
#list_social_connections(params = {}) ⇒ Types::ListSocialConnectionsResponse
Lists the partner's social connections, optionally filtered by platform.
-
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Lists the tags applied to a Partner Central Marketing resource.
-
#search_campaign_templates(params = {}) ⇒ Types::SearchCampaignTemplatesResponse
Searches and browses the AWS-authored campaign template catalog.
-
#start_campaign_asset_activation_task(params = {}) ⇒ Types::StartCampaignAssetActivationTaskResponse
Activates 1–25 of a campaign's assets as one ordered unit, and returns a task to poll.
-
#start_campaign_asset_export_task(params = {}) ⇒ Types::StartCampaignAssetExportTaskResponse
Starts an asynchronous task that packages a campaign's assets into a single downloadable ZIP archive.
-
#tag_resource(params = {}) ⇒ Struct
Adds or replaces tags on a Partner Central Marketing resource.
-
#untag_resource(params = {}) ⇒ Struct
Removes tags from a Partner Central Marketing resource.
-
#update_campaign(params = {}) ⇒ Types::UpdateCampaignResponse
Edits a campaign in place.
-
#update_campaign_asset(params = {}) ⇒ Types::UpdateCampaignAssetResponse
Updates an asset's field values, layout or send time.
Instance Method Summary collapse
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
Methods included from ClientStubs
#api_requests, #stub_data, #stub_responses
Methods inherited from Seahorse::Client::Base
add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins
Methods included from Seahorse::Client::HandlerBuilder
#handle, #handle_request, #handle_response
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
479 480 481 |
# File 'gems/aws-sdk-partnercentralmarketing/lib/aws-sdk-partnercentralmarketing/client.rb', line 479 def initialize(*args) super end |
Instance Method Details
#batch_create_campaign_asset(params = {}) ⇒ Types::BatchCreateCampaignAssetResponse
Instantiates one or more of the campaign template's blueprints as assets of this campaign.
The only asset-create operation: DG-038 deleted the singular CreateCampaignAsset, and AWS Batch Operations makes exposing a singular alongside a batch optional ("which MAY actually be exposed in addition"). It also replaced kit instantiation -- CreateCampaign creates zero assets, so this is the only path by which an asset comes into existence.
Errors here are whole-request only, and nothing is written when one is
thrown. Per-entry failures ride in the response's Errors list with
a 200. ServiceQuotaExceededException is deliberately absent: a
campaign holds at most one asset per blueprint (I-15), so the ceiling
is the size of the bound kit and a request of unique valid entries
cannot exceed it.
616 617 618 619 |
# File 'gems/aws-sdk-partnercentralmarketing/lib/aws-sdk-partnercentralmarketing/client.rb', line 616 def batch_create_campaign_asset(params = {}, = {}) req = build_request(:batch_create_campaign_asset, params) req.send_request() end |
#create_campaign(params = {}) ⇒ Types::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.
867 868 869 870 |
# File 'gems/aws-sdk-partnercentralmarketing/lib/aws-sdk-partnercentralmarketing/client.rb', line 867 def create_campaign(params = {}, = {}) req = build_request(:create_campaign, params) req.send_request() end |
#create_social_connection_authorization_url(params = {}) ⇒ Types::CreateSocialConnectionAuthorizationUrlResponse
Creates a single-use URL the partner visits to authorize publishing on a platform. Serves a first connect, connecting a further account, and re-authorizing an expired one: consenting with an account that is already connected re-authorizes that connection and keeps its id; any other account adds a connection. Poll ListSocialConnections for the outcome. Deliberately not idempotent and takes no client token: every call must mint a fresh single-use URL, so replaying a cached response would hand back a dead one.
908 909 910 911 |
# File 'gems/aws-sdk-partnercentralmarketing/lib/aws-sdk-partnercentralmarketing/client.rb', line 908 def (params = {}, = {}) req = build_request(:create_social_connection_authorization_url, params) req.send_request() end |
#deactivate_campaign_asset(params = {}) ⇒ Types::DeactivateCampaignAssetResponse
Stops a live campaign asset: an email's scheduled send is withdrawn, a social post is removed before it publishes. On a completed campaign, it also removes a published document, banner or landing page.
Synchronous, and safe to repeat. Does not delete the asset record, so a stopped email or social post can be started again.
Not every asset can be stopped, and the reasons differ in kind. An
email that has begun sending cannot be recalled: the send is gone.
A document, a banner or a landing page is refused with
ASSET_NOT_DEACTIVATABLE until the campaign has completed (the UTC
date is after its EndOn). Until then the partner fixes one in place
by updating it and activating it again, which keeps its URL, so every
email that already linked to it keeps working.
Once the campaign has completed, the removal is permanent, because a completed campaign can't activate anything again:
- A document's published PDF is deleted. Its URL stops serving within
about a minute (the CDN revalidates), and
PublicUrlis no longer returned. Anything that linked to it, such as a landing page's download button or a sent email, reaches an error page. The export still contains the document. - A banner's or landing page's published object is taken down at the
delivery platform, and the images the partner put on it are deleted.
A landing page stops capturing leads, and its
PublicUrlis no longer returned. A partner site that embedded a banner shows nothing there. The platform's own CDN can keep serving a copy a visitor already cached, which collects nothing.
A landing page and a document it links to can be removed in either order.
981 982 983 984 |
# File 'gems/aws-sdk-partnercentralmarketing/lib/aws-sdk-partnercentralmarketing/client.rb', line 981 def deactivate_campaign_asset(params = {}, = {}) req = build_request(:deactivate_campaign_asset, params) req.send_request() end |
#delete_campaign(params = {}) ⇒ Struct
Permanently deletes a campaign, its assets and their stored files.
A hard delete with no undo: the campaign leaves ListCampaigns and every read of it returns ResourceNotFoundException. Its tags are removed with it.
Refused with ConflictException while the campaign has a live asset
(CAMPAIGN_HAS_ACTIVE_ASSETS), because deleting the record would
orphan what the delivery platform still serves or sends: deactivate
those assets first. Also refused while an activation task is running
(CAMPAIGN_ACTIVATION_IN_PROGRESS). A completed campaign can be
deleted.
Idempotent in effect: deleting a campaign that is already gone returns ResourceNotFoundException, and nothing is left behind by a retry.
1029 1030 1031 1032 |
# File 'gems/aws-sdk-partnercentralmarketing/lib/aws-sdk-partnercentralmarketing/client.rb', line 1029 def delete_campaign(params = {}, = {}) req = build_request(:delete_campaign, params) req.send_request() end |
#delete_campaign_asset(params = {}) ⇒ Struct
Permanently deletes a campaign asset.
1068 1069 1070 1071 |
# File 'gems/aws-sdk-partnercentralmarketing/lib/aws-sdk-partnercentralmarketing/client.rb', line 1068 def delete_campaign_asset(params = {}, = {}) req = build_request(:delete_campaign_asset, params) req.send_request() end |
#delete_social_connection(params = {}) ⇒ Struct
Revokes and deletes one social connection; other connections on the same platform are untouched. Idempotent: deleting an unknown or already-deleted connection succeeds rather than returning a not-found error.
1104 1105 1106 1107 |
# File 'gems/aws-sdk-partnercentralmarketing/lib/aws-sdk-partnercentralmarketing/client.rb', line 1104 def (params = {}, = {}) req = build_request(:delete_social_connection, params) req.send_request() end |
#get_campaign(params = {}) ⇒ Types::GetCampaignResponse
Retrieves a campaign by its identifier.
1217 1218 1219 1220 |
# File 'gems/aws-sdk-partnercentralmarketing/lib/aws-sdk-partnercentralmarketing/client.rb', line 1217 def get_campaign(params = {}, = {}) req = build_request(:get_campaign, params) req.send_request() end |
#get_campaign_asset(params = {}) ⇒ Types::GetCampaignAssetResponse
Retrieves an asset by its identifier.
1349 1350 1351 1352 |
# File 'gems/aws-sdk-partnercentralmarketing/lib/aws-sdk-partnercentralmarketing/client.rb', line 1349 def get_campaign_asset(params = {}, = {}) req = build_request(:get_campaign_asset, params) req.send_request() end |
#get_campaign_asset_activation_task(params = {}) ⇒ Types::GetCampaignAssetActivationTaskResponse
Reads a campaign's current activation task.
Keyed on the campaign, with no task identifier, because a campaign has at most one activation task: runs are serialised, so there is no collection to address into. The caller always holds the task id anyway, because Start returned it — the id is a correlation value, not an address.
Returns the campaign's most recent task. A new task overwrites the previous one, so this is not a history: the durable per-asset record is on the assets themselves. Returns ResourceNotFoundException when the campaign has never had a task, or when its last one has expired.
1444 1445 1446 1447 |
# File 'gems/aws-sdk-partnercentralmarketing/lib/aws-sdk-partnercentralmarketing/client.rb', line 1444 def get_campaign_asset_activation_task(params = {}, = {}) req = build_request(:get_campaign_asset_activation_task, params) req.send_request() end |
#get_campaign_asset_export_task(params = {}) ⇒ Types::GetCampaignAssetExportTaskResponse
Retrieves a campaign asset export task by its identifier, reporting its status and, when the task is COMPLETED, a freshly minted short-lived presigned URL for downloading the ZIP archive.
The download URL is minted on each call and is valid for at most 15 minutes; clients should download promptly rather than caching it. When the task has FAILED, FailureReason explains why. Poll this operation (roughly every 2-5 seconds) until the task reaches a terminal state.
1506 1507 1508 1509 |
# File 'gems/aws-sdk-partnercentralmarketing/lib/aws-sdk-partnercentralmarketing/client.rb', line 1506 def get_campaign_asset_export_task(params = {}, = {}) req = build_request(:get_campaign_asset_export_task, params) req.send_request() end |
#get_campaign_template(params = {}) ⇒ Types::GetCampaignTemplateResponse
Retrieves full detail of one campaign template, including its ordered asset templates with their field schema and layout previews.
1615 1616 1617 1618 |
# File 'gems/aws-sdk-partnercentralmarketing/lib/aws-sdk-partnercentralmarketing/client.rb', line 1615 def get_campaign_template(params = {}, = {}) req = build_request(:get_campaign_template, params) req.send_request() end |
#list_campaign_assets(params = {}) ⇒ Types::ListCampaignAssetsResponse
Lists assets for a campaign with pagination.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1687 1688 1689 1690 |
# File 'gems/aws-sdk-partnercentralmarketing/lib/aws-sdk-partnercentralmarketing/client.rb', line 1687 def list_campaign_assets(params = {}, = {}) req = build_request(:list_campaign_assets, params) req.send_request() end |
#list_campaigns(params = {}) ⇒ Types::ListCampaignsResponse
Lists campaigns with optional filters and pagination.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1824 1825 1826 1827 |
# File 'gems/aws-sdk-partnercentralmarketing/lib/aws-sdk-partnercentralmarketing/client.rb', line 1824 def list_campaigns(params = {}, = {}) req = build_request(:list_campaigns, params) req.send_request() end |
#list_social_connections(params = {}) ⇒ Types::ListSocialConnectionsResponse
Lists the partner's social connections, optionally filtered by platform.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1876 1877 1878 1879 |
# File 'gems/aws-sdk-partnercentralmarketing/lib/aws-sdk-partnercentralmarketing/client.rb', line 1876 def (params = {}, = {}) req = build_request(:list_social_connections, params) req.send_request() end |
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Lists the tags applied to a Partner Central Marketing resource.
1908 1909 1910 1911 |
# File 'gems/aws-sdk-partnercentralmarketing/lib/aws-sdk-partnercentralmarketing/client.rb', line 1908 def (params = {}, = {}) req = build_request(:list_tags_for_resource, params) req.send_request() end |
#search_campaign_templates(params = {}) ⇒ Types::SearchCampaignTemplatesResponse
Searches and browses the AWS-authored campaign template catalog. With no SearchText it returns the whole catalog in the default order, so browse and keyword search share one shape; GetCampaignTemplate reads one template.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2076 2077 2078 2079 |
# File 'gems/aws-sdk-partnercentralmarketing/lib/aws-sdk-partnercentralmarketing/client.rb', line 2076 def search_campaign_templates(params = {}, = {}) req = build_request(:search_campaign_templates, params) req.send_request() end |
#start_campaign_asset_activation_task(params = {}) ⇒ Types::StartCampaignAssetActivationTaskResponse
Activates 1–25 of a campaign's assets as one ordered unit, and returns a task to poll.
Takes a list because the service owns the ordering. Assets link to one another by URL — an email's call-to-action carries the landing page's URL, the landing page's download field carries the document's — and a URL does not exist until the asset it points at is activated. Those edges are derived by the service from the campaign's pinned template, so reconstructing and topologically sorting them is work the service has already done, and getting it wrong arms an email with a dead link. Name every asset you want live and the service sequences them; "activate everything" is the list with every id in it, which ListCampaignAssets already gave you.
Asynchronous, because activating an asset installs or arms behaviour that runs later and an email activation bulk-loads its audience into the delivery platform. Everything decidable without a write to the delivery platform is evaluated before this returns; everything else lands on the task.
A refusal that applies to one asset does not fail the request: that
asset is on the task already FAILED, with its reason, and the rest
run. A refusal that applies to the whole request — a malformed list,
an unknown campaign, another task already running on this campaign,
this service's service-linked role being deleted (ConflictException
SERVICE_LINKED_ROLE_DELETION_IN_PROGRESS), a campaign setting an
asset in the request needs (ValidationException
CAMPAIGN_INCOMPLETE), a campaign sender that no longer passes
CreateCampaign's sender rules while the request names an email
(ValidationException with no FieldList, whose message ends with one
Reason: <code> token per failed rule: PATTERN_MISMATCH,
SENDER_DOMAIN_NOT_ALLIANCE_LEAD, or SENDER_DOMAIN_DKIM_MISSING
and/or SENDER_DOMAIN_DMARC_MISSING) — is thrown, and nothing starts.
One task runs on a campaign at a time. A second concurrent call is
refused with ConflictException / CAMPAIGN_ACTIVATION_IN_PROGRESS,
whose ResourceId names the task already holding the campaign. Two
tasks over disjoint asset sets are refused too: the guard is
deliberately campaign-wide, because overlapping runs made the
per-asset status misleading rather than merely contended.
2292 2293 2294 2295 |
# File 'gems/aws-sdk-partnercentralmarketing/lib/aws-sdk-partnercentralmarketing/client.rb', line 2292 def start_campaign_asset_activation_task(params = {}, = {}) req = build_request(:start_campaign_asset_activation_task, params) req.send_request() end |
#start_campaign_asset_export_task(params = {}) ⇒ Types::StartCampaignAssetExportTaskResponse
Starts an asynchronous task that packages a campaign's assets into a single downloadable ZIP archive.
Fire-and-return: the campaign is validated (it must exist and not be cancelled), a task record is persisted, an asynchronous execution is started, and the task id is returned with status IN_PROGRESS. This operation does not inspect assets — all resolution, exclusion, and failure are determined by the execution and surfaced only by GetCampaignAssetExportTask.
Every campaign is exportable, including one never activated, because renderable assets are composed on demand at export time rather than requiring finished, launched deliverables.
2347 2348 2349 2350 |
# File 'gems/aws-sdk-partnercentralmarketing/lib/aws-sdk-partnercentralmarketing/client.rb', line 2347 def start_campaign_asset_export_task(params = {}, = {}) req = build_request(:start_campaign_asset_export_task, params) req.send_request() end |
#tag_resource(params = {}) ⇒ Struct
Adds or replaces tags on a Partner Central Marketing resource.
Idempotent: applying a tag that is already present with the same value is a no-op, and supplying a key that already exists replaces its value.
2382 2383 2384 2385 |
# File 'gems/aws-sdk-partnercentralmarketing/lib/aws-sdk-partnercentralmarketing/client.rb', line 2382 def tag_resource(params = {}, = {}) req = build_request(:tag_resource, params) req.send_request() end |
#untag_resource(params = {}) ⇒ Struct
Removes tags from a Partner Central Marketing resource.
Idempotent: removing a key that is not present succeeds.
2410 2411 2412 2413 |
# File 'gems/aws-sdk-partnercentralmarketing/lib/aws-sdk-partnercentralmarketing/client.rb', line 2410 def untag_resource(params = {}, = {}) req = build_request(:untag_resource, params) req.send_request() end |
#update_campaign(params = {}) ⇒ Types::UpdateCampaignResponse
Edits a campaign in place.
Partial update: an omitted field is left unchanged, which is the
standard meaning of an Update verb — a full replacement would be a
Put. Change-only, with no way to clear a field back to empty,
because the campaign's file members cannot round-trip: they are
written as an s3:// reference and read back as a URL or as metadata,
so a replacement payload could not resend an unchanged recipient list
without re-uploading it.
Refused while an activation task runs
(CAMPAIGN_ACTIVATION_IN_PROGRESS) and once the campaign is completed
(CAMPAIGN_COMPLETED, the UTC date is after its EndOn).
Last-writer-wins, with no concurrency token: this is low-contention metadata owned by one partner.
2597 2598 2599 2600 |
# File 'gems/aws-sdk-partnercentralmarketing/lib/aws-sdk-partnercentralmarketing/client.rb', line 2597 def update_campaign(params = {}, = {}) req = build_request(:update_campaign, params) req.send_request() end |
#update_campaign_asset(params = {}) ⇒ Types::UpdateCampaignAssetResponse
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.
2876 2877 2878 2879 |
# File 'gems/aws-sdk-partnercentralmarketing/lib/aws-sdk-partnercentralmarketing/client.rb', line 2876 def update_campaign_asset(params = {}, = {}) req = build_request(:update_campaign_asset, params) req.send_request() end |