

文档 AWS SDK 示例 GitHub 存储库中还有更多 [S AWS DK 示例](https://github.com/awsdocs/aws-doc-sdk-examples)。

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 使用 C AWS Marketplace atalog API 的代码示例 AWS SDKs
<a name="marketplace-catalog_code_examples"></a>

以下代码示例向您展示了如何将 C AWS Marketplace atalog API 与 AWS 软件开发套件 (SDK) 配合使用。

**更多资源**
+  **[AWS Marketplace 目录 API 卖家指南](https://docs.aws.amazon.com/marketplace/latest/userguide/what-is-marketplace.html)** — 有关 AWS Marketplace 目录 API 的更多信息。
+ **[AWS Marketplace 目录 API API 参考](https://docs.aws.amazon.com/marketplace-catalog/latest/api-reference/welcome.html)**-有关所有可用 AWS Marketplace 目录 API 操作的详细信息。
+ **[AWS 开发者中心](https://aws.amazon.com/developer/code-examples/?awsf.sdk-code-examples-product=product%23)** — 您可以按类别或全文搜索筛选的代码示例。
+ **[AWS SDK 示例](https://github.com/awsdocs/aws-doc-sdk-examples)** — 包含首选语言完整代码的 GitHub 存储库。包括有关设置和运行代码的说明。

**Contents**
+ [AMI 产品](marketplace-catalog_code_examples_ami_products.md)
  + [向现有 AMI 产品添加维度并更新优惠定价条款](marketplace-catalog_example_marketplace-catalog_AddDimensionToAmiProductAndSetPriceInPublicOffer_section.md)
  + [添加部署 AMI 产品的区域](marketplace-catalog_example_marketplace-catalog_AddRegionExistingAmiProduct_section.md)
  + [创建公开或受限 AMI 产品和按小时按年定价的公开优惠](marketplace-catalog_example_marketplace-catalog_CreateLimitedAmiProductAndPublicOfferWithHourlyAnnualPricing_section.md)
  + [创建公开或受限 AMI 产品和按小时按月定价的公开优惠](marketplace-catalog_example_marketplace-catalog_CreateLimitedAmiProductAndPublicOfferWithHourlyMonthlyPricing_section.md)
  + [创建公开或受限 AMI 产品和按小时定价的公开优惠](marketplace-catalog_example_marketplace-catalog_CreateLimitedAmiProductAndPublicOfferWithHourlyPricing_section.md)
  + [创建采用公开优惠草稿的 AMI 产品草稿](marketplace-catalog_example_marketplace-catalog_CreateDraftAmiProductWithDraftPublicOffer_section.md)
  + [限制部署 AMI 产品的区域](marketplace-catalog_example_marketplace-catalog_RestrictRegionExistingAmiProduct_section.md)
  + [限制产品可见性](marketplace-catalog_example_marketplace-catalog_RestrictExistingAmi_section.md)
  + [指定是否在新区域中部署 AMI 资产](marketplace-catalog_example_marketplace-catalog_UpdateFutureRegionSupport_section.md)
+ [渠道合作伙伴优惠](marketplace-catalog_code_examples_channel_partner_offers.md)
  + [为任何产品类型创建 CPPO 草稿](marketplace-catalog_example_marketplace-catalog_CreateDraftCppoOffer_section.md)
  + [创建采用合同定价的转售授权替代专属优惠](marketplace-catalog_example_marketplace-catalog_CreateResaleAuthorizationReplacementOffer_section.md)
  + [列出渠道合作伙伴 CPPOs 创建的所有内容](marketplace-catalog_example_marketplace-catalog_ListAllCppoOffers_section.md)
  + [列出渠道合作伙伴可获得的所有共享转售授权](marketplace-catalog_example_marketplace-catalog_ListAllSharedResaleAuthorizations_section.md)
  + [发布 CPPO 并附加买家 EULA](marketplace-catalog_example_marketplace-catalog_PublishCppoEula_section.md)
  + [使用一次性转售授权发布 CPPO 并更新价格加成](marketplace-catalog_example_marketplace-catalog_PublishOneTimeCppoWithPriceMarkup_section.md)
  + [发布 CPPO 草稿并更新价格加成](marketplace-catalog_example_marketplace-catalog_PublishCppoPriceMarkup_section.md)
  + [更新 CPPO 的到期日期](marketplace-catalog_example_marketplace-catalog_UpdateCppoExpiryDate_section.md)
+ [容器产品](marketplace-catalog_code_examples_container_products.md)
  + [创建采用公开优惠草稿的容器产品草稿](marketplace-catalog_example_marketplace-catalog_CreateDraftContainerProductWithDraftPublicOffer_section.md)
  + [创建采用公开优惠和合同定价的受限容器产品](marketplace-catalog_example_marketplace-catalog_CreateLimitedContainerProductPublicOffer_section.md)
+ [实体](marketplace-catalog_code_examples_entities.md)
  + [在单次调用中描述所有实体](marketplace-catalog_example_marketplace-catalog_BatchDescribeEntities_section.md)
  + [列出并描述与产品关联的所有优惠](marketplace-catalog_example_marketplace-catalog_ListProductOffers_section.md)
+ [优惠](marketplace-catalog_code_examples_offers.md)
  + [为 SaaS 产品创建自定义维度并创建专属优惠](marketplace-catalog_example_marketplace-catalog_CreateSaasProductCustomDimensionAndPrivateOffer_section.md)
  + [为 AMI 或 SaaS 产品创建专属优惠草稿](marketplace-catalog_example_marketplace-catalog_CreateDraftPrivateOffer_section.md)
  + [为 SaaS 产品创建包含合同和 Pay-As-You-Go定价的私人报价](marketplace-catalog_example_marketplace-catalog_CreatePrivateOfferWithContractWithPayAsYouGoPricingForSaasProduct_section.md)
  + [为 SaaS 产品创建采用合同定价和灵活付款时间表的专属优惠](marketplace-catalog_example_marketplace-catalog_CreatePrivateOfferWithContractPricingWithFlexiblePaymentScheduleForSaasProduct_section.md)
  + [为容器产品创建采用合同定价的专属优惠。](marketplace-catalog_example_marketplace-catalog_CreatePrivateOfferWithContractPricingForContainerProduct_section.md)
  + [为 AMI 产品创建采用合同定价的专属优惠](marketplace-catalog_example_marketplace-catalog_CreatePrivateOfferWithContractPricingForAmiProduct_section.md)
  + [为 AMI 产品创建采用按小时按年定价和灵活付款时间表的专属优惠](marketplace-catalog_example_marketplace-catalog_CreatePrivateOfferWithHourlyAnnualPricingAndFlexiblePaymentScheduleForAmiProduct_section.md)
  + [为 AMI 产品创建采用按小时按年定价的专属优惠](marketplace-catalog_example_marketplace-catalog_CreatePrivateOfferWithHourlyAnnualPricingForAmiProduct_section.md)
  + [为 AMI 产品创建采用按小时定价的专属优惠](marketplace-catalog_example_marketplace-catalog_CreatePrivateOfferWithHourlyPricingForAmiProduct_section.md)
  + [为 SaaS 产品创建采用订阅定价的专属优惠](marketplace-catalog_example_marketplace-catalog_CreatePrivateOfferWithSubscriptionPricingForSaasProduct_section.md)
  + [为 SaaS 产品创建采用分级合同定价的专属优惠](marketplace-catalog_example_marketplace-catalog_CreatePrivateOfferWithTieredContractPricingForSaasProduct_section.md)
  + [为 SaaS 产品创建采用订阅定价的公开免费试用优惠](marketplace-catalog_example_marketplace-catalog_CreatePublicFreeTrialOfferWithSubscriptionPricingForSaasProduct_section.md)
  + [创建采用合同定价的替代专属优惠](marketplace-catalog_example_marketplace-catalog_CreateReplacementPrivateOfferWithContractPricing_section.md)
  + [描述公开优惠](marketplace-catalog_example_marketplace-catalog_DescribeOffer_section.md)
  + [使专属优惠草稿过期](marketplace-catalog_example_marketplace-catalog_ExpirePrivateOffer_section.md)
  + [列出所有专属优惠](marketplace-catalog_example_marketplace-catalog_ListAllPrivateOffers_section.md)
  + [列出针对特定产品 ID 发布的公开优惠和专属优惠](marketplace-catalog_example_marketplace-catalog_ListProductPublicOrPrivateReleasedOffers_section.md)
  + [更新报价以应用带 Pay-As-You-Go定价的合同](marketplace-catalog_example_marketplace-catalog_UpdateOfferWithContractAndPayAsYouGoPricing_section.md)
  + [更新优惠以应用按小时按年定价](marketplace-catalog_example_marketplace-catalog_UpdateOfferWithHourlyAnnualPricing_section.md)
  + [更新优惠以将目标应用于特定地理区域](marketplace-catalog_example_marketplace-catalog_UpdateOfferTargeting_section.md)
  + [更新公开优惠的名称和描述](marketplace-catalog_example_marketplace-catalog_UpdateOfferNameAndDescription_section.md)
  + [更新优惠的 EULA](marketplace-catalog_example_marketplace-catalog_UpdateEula_section.md)
  + [将专属优惠的到期日期更新为将来的日期](marketplace-catalog_example_marketplace-catalog_UpdateOfferExpirationDateOfPrivateOffer_section.md)
  + [更新 SaaS 产品的公开免费试用优惠的免费试用期限](marketplace-catalog_example_marketplace-catalog_UpdateFreeTrialDurationOfPublicFreeTrialOfferForSaasProduct_section.md)
  + [更新优惠的退款政策](marketplace-catalog_example_marketplace-catalog_UpdateRefundPolicy_section.md)
+ [产品](marketplace-catalog_code_examples_products.md)
  + [描述 AMI、SaaS 或容器产品](marketplace-catalog_example_marketplace-catalog_DescribeProduct_section.md)
  + [列出所有 AMI、SaaS 或容器产品以及关联的公开优惠](marketplace-catalog_example_marketplace-catalog_ListProducts_section.md)
+ [转售授权](marketplace-catalog_code_examples_resale_authorization.md)
  + [创建转售授权草稿](marketplace-catalog_example_marketplace-catalog_DraftResaleauthAllproducttype_section.md)
  + [描述转售授权](marketplace-catalog_example_marketplace-catalog_DescribeResaleAuthorization_section.md)
  + [发布采用专属优惠的一次性转售授权](marketplace-catalog_example_marketplace-catalog_OnetimeResaleauthPrivateoffer_section.md)
  + [发布带到期日期的多次使用转售授权](marketplace-catalog_example_marketplace-catalog_MultiuseResaleauthExpirydateCppo_section.md)
  + [发布带到期日期的多次使用转售授权和 EULA](marketplace-catalog_example_marketplace-catalog_MultiuseResaleauthExpirydateCustomEula_section.md)
  + [发布带到期日期的多次使用转售授权和经销商合同文档](marketplace-catalog_example_marketplace-catalog_MultiuseResaleauthExpirydateCustomresellerContractdoc_section.md)
  + [发布带到期日期的多次使用转售授权，并添加特定的买家账户](marketplace-catalog_example_marketplace-catalog_PublishMultiuseResaleAuthorizationExpirydateSpecificBuyer_section.md)
  + [发布无到期日期的多次使用转售授权](marketplace-catalog_example_marketplace-catalog_MultiuseResaleauthNoExpirydateCppo_section.md)
  + [发布无到期日期的多次使用转售授权和 EULA](marketplace-catalog_example_marketplace-catalog_MultiuseResaleauthNoExpirydateCustomEula_section.md)
  + [发布无到期日期的多次使用转售授权和经销商合同文档](marketplace-catalog_example_marketplace-catalog_MultiuseResaleauthNoExpirydateCustomresellerContractdoc_section.md)
  + [发布无到期日期的多次使用转售授权，并添加特定的买家账户](marketplace-catalog_example_marketplace-catalog_PublishMultiuseResaleAuthorizationNoExpirydateSpecificBuyer_section.md)
  + [发布一次性转售授权并添加灵活的付款时间表](marketplace-catalog_example_marketplace-catalog_PublishOnetimeResaleAuthorizationFlexiblePayment_section.md)
  + [发布一次性转售授权并添加 EULA](marketplace-catalog_example_marketplace-catalog_OnetimeResaleauthCustomEula_section.md)
  + [发布一次性转售授权并添加特定的买家账户](marketplace-catalog_example_marketplace-catalog_PublishOnetimeResaleAuthorizationSpecificBuyer_section.md)
  + [发布一次性转售授权并添加经销商合同文档](marketplace-catalog_example_marketplace-catalog_OnetimeResaleauthCustomresellerContractdoc_section.md)
  + [发布一次性转售授权并添加它是否为续订](marketplace-catalog_example_marketplace-catalog_OnetimeResaleauthRenewal_section.md)
  + [限制转售授权](marketplace-catalog_example_marketplace-catalog_RestrictResaleAuthorization_section.md)
  + [更新一次性或多次使用转售授权的名称和描述](marketplace-catalog_example_marketplace-catalog_UpdateUnpublishedResaleAuthorization_section.md)
+ [SaaS 产品](marketplace-catalog_code_examples_saas_products.md)
  + [创建采用公开优惠草稿的 SaaS 产品草稿](marketplace-catalog_example_marketplace-catalog_CreateDraftSaasProductWithDraftPublicOffer_section.md)
  + [创建公开或受限 SaaS 产品和按合同定价的公开优惠](marketplace-catalog_example_marketplace-catalog_CreateLimitedSaasProductAndPublicOfferWithContractPricing_section.md)
  + [创建具有定价合同的公开或有限的 SaaS 产品和公开报 Pay-As-You-Go价](marketplace-catalog_example_marketplace-catalog_CreateLimitedSaasProductAndPublicOfferWithContractWithPayAsYouGoPricing_section.md)
  + [创建公开或受限 SaaS 产品和采用订阅定价的公开优惠](marketplace-catalog_example_marketplace-catalog_CreateLimitedSaasProductAndPublicOfferWithSubscriptionPricing_section.md)
  + [发布 SaaS 产品和关联的公开优惠](marketplace-catalog_example_marketplace-catalog_PublishSaasProductPublicOffer_section.md)
  + [根据现有草稿发布 SaaS 产品和关联的公开优惠](marketplace-catalog_example_marketplace-catalog_PublishExistingSaas_section.md)
  + [更新 AMI 或 SaaS 产品的维度](marketplace-catalog_example_marketplace-catalog_UpdateNameDimensionSaasProduct_section.md)
+ [公用事业机构](marketplace-catalog_code_examples_utilities.md)
  + [用于启动更改集的实用程序](marketplace-catalog_example_marketplace-catalog_ChangeSetUtilities_section.md)