

# Code examples for AWS Marketplace using AWS SDKs
<a name="service_code_examples"></a>

The following code examples show how to use AWS Marketplace with an AWS software development kit (SDK). 

For a complete list of AWS SDK developer guides and code examples, see [Using this service with an AWS SDK](sdk-general-information-section.md). This topic also includes information about getting started and details about previous SDK versions.

**Contents**
+ [AWS Marketplace Catalog API](service_code_examples_marketplace-catalog.md)
  + [AMI products](service_code_examples_marketplace-catalog_ami_products.md)
    + [Add a dimension to an existing AMI product and update the offer pricing terms](marketplace-catalog_example_marketplace-catalog_AddDimensionToAmiProductAndSetPriceInPublicOffer_section.md)
    + [Add a region where an AMI product is deployed](marketplace-catalog_example_marketplace-catalog_AddRegionExistingAmiProduct_section.md)
    + [Create a public or limited AMI product and a public offer with hourly annual pricing](marketplace-catalog_example_marketplace-catalog_CreateLimitedAmiProductAndPublicOfferWithHourlyAnnualPricing_section.md)
    + [Create a public or limited AMI product and public offer with hourly monthly pricing](marketplace-catalog_example_marketplace-catalog_CreateLimitedAmiProductAndPublicOfferWithHourlyMonthlyPricing_section.md)
    + [Create a public or limited AMI product and public offer with hourly pricing](marketplace-catalog_example_marketplace-catalog_CreateLimitedAmiProductAndPublicOfferWithHourlyPricing_section.md)
    + [Create an draft AMI product with a draft public offer](marketplace-catalog_example_marketplace-catalog_CreateDraftAmiProductWithDraftPublicOffer_section.md)
    + [Restrict a region where an AMI product is deployed](marketplace-catalog_example_marketplace-catalog_RestrictRegionExistingAmiProduct_section.md)
    + [Restrict product visibility](marketplace-catalog_example_marketplace-catalog_RestrictExistingAmi_section.md)
    + [Specify whether AMI assets are deployed in new regions](marketplace-catalog_example_marketplace-catalog_UpdateFutureRegionSupport_section.md)
  + [Channel partner offers](service_code_examples_marketplace-catalog_channel_partner_offers.md)
    + [Create a draft CPPO for any product type](marketplace-catalog_example_marketplace-catalog_CreateDraftCppoOffer_section.md)
    + [Create a resale authorization replacement private offer with contract pricing](marketplace-catalog_example_marketplace-catalog_CreateResaleAuthorizationReplacementOffer_section.md)
    + [List all CPPOs created by a channel partner](marketplace-catalog_example_marketplace-catalog_ListAllCppoOffers_section.md)
    + [List all shared resale authorizations available to a channel partner](marketplace-catalog_example_marketplace-catalog_ListAllSharedResaleAuthorizations_section.md)
    + [Publish a CPPO and append a buyer EULA](marketplace-catalog_example_marketplace-catalog_PublishCppoEula_section.md)
    + [Publish a CPPO using one-time resale authorization and update price markup](marketplace-catalog_example_marketplace-catalog_PublishOneTimeCppoWithPriceMarkup_section.md)
    + [Publish a draft CPPO and update price markup](marketplace-catalog_example_marketplace-catalog_PublishCppoPriceMarkup_section.md)
    + [Update the expiration date of a CPPO](marketplace-catalog_example_marketplace-catalog_UpdateCppoExpiryDate_section.md)
  + [Container products](service_code_examples_marketplace-catalog_container_products.md)
    + [Create a draft container product with a draft public offer](marketplace-catalog_example_marketplace-catalog_CreateDraftContainerProductWithDraftPublicOffer_section.md)
    + [Create a limited container product with a public offer and contract pricing](marketplace-catalog_example_marketplace-catalog_CreateLimitedContainerProductPublicOffer_section.md)
  + [Entities](service_code_examples_marketplace-catalog_entities.md)
    + [Describe all entities in a single call](marketplace-catalog_example_marketplace-catalog_BatchDescribeEntities_section.md)
    + [List and describe all offers associated with a product](marketplace-catalog_example_marketplace-catalog_ListProductOffers_section.md)
  + [Offers](service_code_examples_marketplace-catalog_offers.md)
    + [Create a custom dimension for a SaaS product and create a private offer](marketplace-catalog_example_marketplace-catalog_CreateSaasProductCustomDimensionAndPrivateOffer_section.md)
    + [Create a draft private offer for an AMI or SaaS product](marketplace-catalog_example_marketplace-catalog_CreateDraftPrivateOffer_section.md)
    + [Create a private offer with contract and Pay-As-You-Go pricing for a SaaS product](marketplace-catalog_example_marketplace-catalog_CreatePrivateOfferWithContractWithPayAsYouGoPricingForSaasProduct_section.md)
    + [Create a private offer with contract pricing and a flexible payment schedule for a SaaS product](marketplace-catalog_example_marketplace-catalog_CreatePrivateOfferWithContractPricingWithFlexiblePaymentScheduleForSaasProduct_section.md)
    + [Create a private offer with contract pricing for a Container product](marketplace-catalog_example_marketplace-catalog_CreatePrivateOfferWithContractPricingForContainerProduct_section.md)
    + [Create a private offer with contract pricing for an AMI product](marketplace-catalog_example_marketplace-catalog_CreatePrivateOfferWithContractPricingForAmiProduct_section.md)
    + [Create a private offer with hourly annual pricing and a flexible payment schedule for an AMI product](marketplace-catalog_example_marketplace-catalog_CreatePrivateOfferWithHourlyAnnualPricingAndFlexiblePaymentScheduleForAmiProduct_section.md)
    + [Create a private offer with hourly annual pricing for an AMI product](marketplace-catalog_example_marketplace-catalog_CreatePrivateOfferWithHourlyAnnualPricingForAmiProduct_section.md)
    + [Create a private offer with hourly pricing for an AMI product](marketplace-catalog_example_marketplace-catalog_CreatePrivateOfferWithHourlyPricingForAmiProduct_section.md)
    + [Create a private offer with subscription pricing for a SaaS product](marketplace-catalog_example_marketplace-catalog_CreatePrivateOfferWithSubscriptionPricingForSaasProduct_section.md)
    + [Create a private offer with tiered contract pricing for a SaaS product](marketplace-catalog_example_marketplace-catalog_CreatePrivateOfferWithTieredContractPricingForSaasProduct_section.md)
    + [Create a public free trial offer with subscription pricing for a SaaS product](marketplace-catalog_example_marketplace-catalog_CreatePublicFreeTrialOfferWithSubscriptionPricingForSaasProduct_section.md)
    + [Create a replacement private offer with contract pricing](marketplace-catalog_example_marketplace-catalog_CreateReplacementPrivateOfferWithContractPricing_section.md)
    + [Describe a public offer](marketplace-catalog_example_marketplace-catalog_DescribeOffer_section.md)
    + [Expire a draft private offer](marketplace-catalog_example_marketplace-catalog_ExpirePrivateOffer_section.md)
    + [List all private offers](marketplace-catalog_example_marketplace-catalog_ListAllPrivateOffers_section.md)
    + [List released public and private offers for a specific product ID](marketplace-catalog_example_marketplace-catalog_ListProductPublicOrPrivateReleasedOffers_section.md)
    + [Update an offer to apply a contract with Pay-As-You-Go pricing](marketplace-catalog_example_marketplace-catalog_UpdateOfferWithContractAndPayAsYouGoPricing_section.md)
    + [Update an offer to apply hourly annual pricing](marketplace-catalog_example_marketplace-catalog_UpdateOfferWithHourlyAnnualPricing_section.md)
    + [Update an offer to apply targeting to specific geographic regions](marketplace-catalog_example_marketplace-catalog_UpdateOfferTargeting_section.md)
    + [Update name and description of a public offer](marketplace-catalog_example_marketplace-catalog_UpdateOfferNameAndDescription_section.md)
    + [Update the EULA of an offer](marketplace-catalog_example_marketplace-catalog_UpdateEula_section.md)
    + [Update the expiration date of a private offer to a future date](marketplace-catalog_example_marketplace-catalog_UpdateOfferExpirationDateOfPrivateOffer_section.md)
    + [Update the free trial duration of a public free trial offer for a SaaS product](marketplace-catalog_example_marketplace-catalog_UpdateFreeTrialDurationOfPublicFreeTrialOfferForSaasProduct_section.md)
    + [Update the refund policy of an offer](marketplace-catalog_example_marketplace-catalog_UpdateRefundPolicy_section.md)
  + [Products](service_code_examples_marketplace-catalog_products.md)
    + [Describe an AMI, SaaS, or Container product](marketplace-catalog_example_marketplace-catalog_DescribeProduct_section.md)
    + [List all AMI, SaaS, or Container products and associated public offers](marketplace-catalog_example_marketplace-catalog_ListProducts_section.md)
  + [Resale authorization](service_code_examples_marketplace-catalog_resale_authorization.md)
    + [Create draft resale authorization](marketplace-catalog_example_marketplace-catalog_DraftResaleauthAllproducttype_section.md)
    + [Describe a resale authorization](marketplace-catalog_example_marketplace-catalog_DescribeResaleAuthorization_section.md)
    + [Publish a one-time resale authorization with a private offer](marketplace-catalog_example_marketplace-catalog_OnetimeResaleauthPrivateoffer_section.md)
    + [Publish multi-use resale authorization with an expiration date](marketplace-catalog_example_marketplace-catalog_MultiuseResaleauthExpirydateCppo_section.md)
    + [Publish multi-use resale authorization with an expiration date and a EULA](marketplace-catalog_example_marketplace-catalog_MultiuseResaleauthExpirydateCustomEula_section.md)
    + [Publish multi-use resale authorization with an expiration date and reseller contract documentation](marketplace-catalog_example_marketplace-catalog_MultiuseResaleauthExpirydateCustomresellerContractdoc_section.md)
    + [Publish multi-use resale authorization with expiration and add a specific buyer account](marketplace-catalog_example_marketplace-catalog_PublishMultiuseResaleAuthorizationExpirydateSpecificBuyer_section.md)
    + [Publish multi-use resale authorization without an expiration date](marketplace-catalog_example_marketplace-catalog_MultiuseResaleauthNoExpirydateCppo_section.md)
    + [Publish multi-use resale authorization without an expiration date and a EULA](marketplace-catalog_example_marketplace-catalog_MultiuseResaleauthNoExpirydateCustomEula_section.md)
    + [Publish multi-use resale authorization without an expiration date and reseller contract documentation](marketplace-catalog_example_marketplace-catalog_MultiuseResaleauthNoExpirydateCustomresellerContractdoc_section.md)
    + [Publish multi-use resale authorization without expiration and add a specific buyer account](marketplace-catalog_example_marketplace-catalog_PublishMultiuseResaleAuthorizationNoExpirydateSpecificBuyer_section.md)
    + [Publish one-time resale authorization and add Flexible payment schedule](marketplace-catalog_example_marketplace-catalog_PublishOnetimeResaleAuthorizationFlexiblePayment_section.md)
    + [Publish one-time resale authorization and add a EULA](marketplace-catalog_example_marketplace-catalog_OnetimeResaleauthCustomEula_section.md)
    + [Publish one-time resale authorization and add a specific buyer account](marketplace-catalog_example_marketplace-catalog_PublishOnetimeResaleAuthorizationSpecificBuyer_section.md)
    + [Publish one-time resale authorization and add reseller contract documentation](marketplace-catalog_example_marketplace-catalog_OnetimeResaleauthCustomresellerContractdoc_section.md)
    + [Publish one-time resale authorization and add whether it is a renewal](marketplace-catalog_example_marketplace-catalog_OnetimeResaleauthRenewal_section.md)
    + [Restrict resale authorization](marketplace-catalog_example_marketplace-catalog_RestrictResaleAuthorization_section.md)
    + [Update name and description of one-time or multi-use resale authorization](marketplace-catalog_example_marketplace-catalog_UpdateUnpublishedResaleAuthorization_section.md)
  + [SaaS products](service_code_examples_marketplace-catalog_saas_products.md)
    + [Create a draft SaaS product with a draft public offer](marketplace-catalog_example_marketplace-catalog_CreateDraftSaasProductWithDraftPublicOffer_section.md)
    + [Create a public or limited SaaS product and public offer with contract pricing](marketplace-catalog_example_marketplace-catalog_CreateLimitedSaasProductAndPublicOfferWithContractPricing_section.md)
    + [Create a public or limited SaaS product and public offer with contract with Pay-As-You-Go pricing](marketplace-catalog_example_marketplace-catalog_CreateLimitedSaasProductAndPublicOfferWithContractWithPayAsYouGoPricing_section.md)
    + [Create a public or limited SaaS product and public offer with subscription pricing](marketplace-catalog_example_marketplace-catalog_CreateLimitedSaasProductAndPublicOfferWithSubscriptionPricing_section.md)
    + [Publish a SaaS product and associated public offer](marketplace-catalog_example_marketplace-catalog_PublishSaasProductPublicOffer_section.md)
    + [Publish a SaaS product and associated public offer from an existing draft](marketplace-catalog_example_marketplace-catalog_PublishExistingSaas_section.md)
    + [Update dimensions on an AMI or SaaS product](marketplace-catalog_example_marketplace-catalog_UpdateNameDimensionSaasProduct_section.md)
  + [Utilities](service_code_examples_marketplace-catalog_utilities.md)
    + [Utilities to start a changeset](marketplace-catalog_example_marketplace-catalog_ChangeSetUtilities_section.md)
+ [AWS Marketplace Agreement API](service_code_examples_marketplace-agreement.md)
  + [Agreements](service_code_examples_marketplace-agreement_agreements.md)
    + [Get all agreement IDs](marketplace-agreement_example_marketplace-agreement_GetAllAgreementsIds_section.md)
    + [Get all agreements](marketplace-agreement_example_marketplace-agreement_GetAllAgreements_section.md)
    + [Get customer ID from an agreement](marketplace-agreement_example_marketplace-agreement_GetAgreementCustomer_section.md)
    + [Get financial details from an agreement](marketplace-agreement_example_marketplace-agreement_GetAgreementFinancialDetails_section.md)
    + [Get free trial details from an agreement](marketplace-agreement_example_marketplace-agreement_GetAgreementTermsFreeTrialDetails_section.md)
    + [Get information about an agreement](marketplace-agreement_example_marketplace-agreement_DescribeAgreement_section.md)
    + [Get product and offer details from an agreement](marketplace-agreement_example_marketplace-agreement_GetProductAndOfferDetailFromAgreement_section.md)
    + [Get the EULA of an agreement](marketplace-agreement_example_marketplace-agreement_GetAgreementTermsEula_section.md)
    + [Get the auto renewal terms of an agreement](marketplace-agreement_example_marketplace-agreement_GetAgreementAutoRenewal_section.md)
    + [Get the dimensions purchased in an agreement](marketplace-agreement_example_marketplace-agreement_GetAgreementTermsDimensionPurchased_section.md)
    + [Get the instances of each dimension purchased in an agreement](marketplace-agreement_example_marketplace-agreement_GetAgreementTermsDimensionInstances_section.md)
    + [Get the payment schedule of an agreement](marketplace-agreement_example_marketplace-agreement_GetAgreementTermsPaymentSchedule_section.md)
    + [Get the pricing per dimension in an agreement](marketplace-agreement_example_marketplace-agreement_GetAgreementTermsPricingEachDimension_section.md)
    + [Get the pricing type of an agreement](marketplace-agreement_example_marketplace-agreement_GetAgreementPricingType_section.md)
    + [Get the product type of an agreement](marketplace-agreement_example_marketplace-agreement_GetAgreementProductType_section.md)
    + [Get the status of an agreement](marketplace-agreement_example_marketplace-agreement_GetAgreementStatus_section.md)
    + [Get the support terms of an agreement](marketplace-agreement_example_marketplace-agreement_GetAgreementTermsSupportTerm_section.md)
    + [Get the terms of an agreement](marketplace-agreement_example_marketplace-agreement_GetAgreementTerms_section.md)
    + [Search for agreements by account ID](marketplace-agreement_example_marketplace-agreement_SearchAgreementsByAccountId_section.md)
    + [Search for agreements by agreement ID](marketplace-agreement_example_marketplace-agreement_SearchAgreementsById_section.md)
    + [Search for agreements by end date](marketplace-agreement_example_marketplace-agreement_SearchAgreementsByEndDate_section.md)
    + [Search for agreements by offer ID](marketplace-agreement_example_marketplace-agreement_SearchAgreementsByOfferId_section.md)
    + [Search for agreements by product ID](marketplace-agreement_example_marketplace-agreement_SearchAgreementsByProductId_section.md)
    + [Search for agreements by status](marketplace-agreement_example_marketplace-agreement_SearchAgreementsByByStatus_section.md)
    + [Search for agreements with one custom filter](marketplace-agreement_example_marketplace-agreement_SearchAgreementsByOneFilter_section.md)
    + [Search for agreements with two custom filters](marketplace-agreement_example_marketplace-agreement_SearchAgreementsByTwoFilters_section.md)