batch_create_campaign_asset
async
¶
batch_create_campaign_asset(
catalog: Catalog,
campaign_identifier: CampaignIdentifier,
entries: BatchCreateCampaignAssetEntries,
*,
config_overrides: Optional[AsyncPartnerCentralMarketingClientConfig] = None,
) -> 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.
Parameters:
-
catalog(Catalog) –The catalog (AWS or Sandbox).
-
campaign_identifier(CampaignIdentifier) –The campaign identifier.
-
entries(BatchCreateCampaignAssetEntries) –The blueprints to instantiate, one entry each.
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.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Instantiate two of the kit's blueprints
>>> await client.batch_create_campaign_asset(catalog='AWS', campaign_identifier='camp-5Hq2m8x4k1p9w', entries=[{'SourceAssetTemplateIdentifier': 'ta000000email'}, {'SourceAssetTemplateIdentifier': 'ta0000000lp01'}])
A partial batch: one entry names a blueprint the campaign's template does not carry
>>> await client.batch_create_campaign_asset(catalog='AWS', campaign_identifier='camp-5Hq2m8x4k1p9w', entries=[{'SourceAssetTemplateIdentifier': 'ta000000email'}, {'SourceAssetTemplateIdentifier': 'ta00000absent'}])
Source code in docs_src/capo_partnercentral_marketing/_services/async_partner_central_marketing.py
1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 | |