

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

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

# 协议适用于 AWS Marketplace 协议 API
<a name="marketplace-agreement_code_examples_agreements"></a>

以下代码示例展示了如何将 AWS Marketplace 协议 API 与 AWS 软件开发工具包配合使用。

**Topics**
+ [接受取消协议的请求](marketplace-agreement_example_marketplace-agreement_AcceptAgreementCancellationRequest_section.md)
+ [接受协议付款申请](marketplace-agreement_example_marketplace-agreement_AcceptAgreementPaymentRequest_section.md)
+ [修改 SaaS 合同协议的续订期限](marketplace-agreement_example_marketplace-agreement_AmendSaaSContractRenewalTerm_section.md)
+ [修改 AMI ConfigurableUpfrontPricingTerm 的使用量定价模型](marketplace-agreement_example_marketplace-agreement_AmendAmiConfigurableUpfrontPricingTermForUsagePricingModel_section.md)
+ [创建新的 AMI 免费试用协议](marketplace-agreement_example_marketplace-agreement_NewAmiFreeTrial_section.md)
+ [使用预付费用创建新的 SaaS 合同协议](marketplace-agreement_example_marketplace-agreement_NewSaaSContractWithUpfrontPayment_section.md)
+ [获取所有协议 ID](marketplace-agreement_example_marketplace-agreement_GetAllAgreementsIds_section.md)
+ [获取所有协议](marketplace-agreement_example_marketplace-agreement_GetAllAgreements_section.md)
+ [从协议中获取客户 ID](marketplace-agreement_example_marketplace-agreement_GetAgreementCustomer_section.md)
+ [获取协议取消请求的详细信息](marketplace-agreement_example_marketplace-agreement_GetAgreementCancellationRequest_section.md)
+ [获取协议付款申请的详细信息](marketplace-agreement_example_marketplace-agreement_GetAgreementPaymentRequest_section.md)
+ [从协议中获取财务详细信息](marketplace-agreement_example_marketplace-agreement_GetAgreementFinancialDetails_section.md)
+ [从协议中获取免费试用详细信息](marketplace-agreement_example_marketplace-agreement_GetAgreementTermsFreeTrialDetails_section.md)
+ [获取有关协议的信息](marketplace-agreement_example_marketplace-agreement_DescribeAgreement_section.md)
+ [从协议中获取产品和优惠详细信息](marketplace-agreement_example_marketplace-agreement_GetProductAndOfferDetailFromAgreement_section.md)
+ [获取协议的 EULA](marketplace-agreement_example_marketplace-agreement_GetAgreementTermsEula_section.md)
+ [获取协议的自动续订条款](marketplace-agreement_example_marketplace-agreement_GetAgreementAutoRenewal_section.md)
+ [获取在协议中购买的维度](marketplace-agreement_example_marketplace-agreement_GetAgreementTermsDimensionPurchased_section.md)
+ [获取在协议中购买的每个维度的实例](marketplace-agreement_example_marketplace-agreement_GetAgreementTermsDimensionInstances_section.md)
+ [获取协议的付款时间表](marketplace-agreement_example_marketplace-agreement_GetAgreementTermsPaymentSchedule_section.md)
+ [获取协议中每个维度的定价](marketplace-agreement_example_marketplace-agreement_GetAgreementTermsPricingEachDimension_section.md)
+ [获取协议的定价类型](marketplace-agreement_example_marketplace-agreement_GetAgreementPricingType_section.md)
+ [获取协议的产品类型](marketplace-agreement_example_marketplace-agreement_GetAgreementProductType_section.md)
+ [获取协议的状态](marketplace-agreement_example_marketplace-agreement_GetAgreementStatus_section.md)
+ [获取协议的支持条款](marketplace-agreement_example_marketplace-agreement_GetAgreementTermsSupportTerm_section.md)
+ [获取协议的条款](marketplace-agreement_example_marketplace-agreement_GetAgreementTerms_section.md)
+ [列出取消协议的请求](marketplace-agreement_example_marketplace-agreement_ListAgreementCancellationRequests_section.md)
+ [列出协议付款请求](marketplace-agreement_example_marketplace-agreement_ListAgreementPaymentRequests_section.md)
+ [拒绝取消协议的请求](marketplace-agreement_example_marketplace-agreement_RejectAgreementCancellationRequest_section.md)
+ [拒绝协议付款请求](marketplace-agreement_example_marketplace-agreement_RejectAgreementPaymentRequest_section.md)
+ [将 SaaS 合同协议替换为基于协议的报价](marketplace-agreement_example_marketplace-agreement_ReplaceSaaSContractWithAgreementBasedOffer_section.md)
+ [将 SaaS 免费试用版替换为 “消费定价合同”](marketplace-agreement_example_marketplace-agreement_ReplaceSaaSFreeTrialWithCCP_section.md)
+ [替换基于 SaaS 使用量的定价条款并取消之前的协议](marketplace-agreement_example_marketplace-agreement_ReplaceSaaSUsageBasedPricingTermAndCancel_section.md)
+ [替换基于 AMI 使用量的定价条款，但要保留 ConfigurableUpfrontPricingTerm](marketplace-agreement_example_marketplace-agreement_ReplaceAmiUsageBasedPricingTermButNotCupt_section.md)
+ [按账户 ID 搜索协议](marketplace-agreement_example_marketplace-agreement_SearchAgreementsByAccountId_section.md)
+ [按协议 ID 搜索协议](marketplace-agreement_example_marketplace-agreement_SearchAgreementsById_section.md)
+ [按结束日期搜索协议](marketplace-agreement_example_marketplace-agreement_SearchAgreementsByEndDate_section.md)
+ [按优惠 ID 搜索协议](marketplace-agreement_example_marketplace-agreement_SearchAgreementsByOfferId_section.md)
+ [按产品 ID 搜索协议](marketplace-agreement_example_marketplace-agreement_SearchAgreementsByProductId_section.md)
+ [按状态搜索协议](marketplace-agreement_example_marketplace-agreement_SearchAgreementsByByStatus_section.md)
+ [通过一个自定义筛选条件来搜索协议](marketplace-agreement_example_marketplace-agreement_SearchAgreementsByOneFilter_section.md)
+ [通过两个自定义筛选条件来搜索协议](marketplace-agreement_example_marketplace-agreement_SearchAgreementsByTwoFilters_section.md)
+ [接受协议后更新采购订单](marketplace-agreement_example_marketplace-agreement_UpdatePurchaseOrdersAfterAgreementAcceptance_section.md)