Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

AWS Marketplace API Reference Code Library - Java

How to use the reference code examples

You will need to have Java 17 installed.

Before running this Java V2 code example, set up your development environment, including your credentials. For more information, see the following documentation topic: https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/get-started.html

Change directories into the java source code folder:

cd aws-marketplace-reference-code/java

Import the project into eclipse or your java IDE as maven project.

Execute the following maven command. It will download all the required jars

mvn clean compile assembly:single 

All sample changesets are inside resources folder

To run against one particular changeset, run RunChangesets.java as a java application by changing the changeset name inside the java file; or run with the changeset file path as the input parameter.

To run the code inside your IDE, add the resources folder to your build path -> source.

Catalog API reference code

Use case
Create an AMI draft product with a draft public offer
Create a container draft product with a draft public offer
Create a SaaS draft product with a draft public offer
Publish my SaaS product and associated public offer (product will be in limited state by default)
Publish my SaaS product and associated public offer (product will be in limited state by default)
Create a public or limited AMI product and public offer with hourly annual pricing and standard or custom EULA
Create a public or limited AMI product and public offer with hourly pricing and standard or custom EULA
Create a public or limited AMI product and public offer with hourly monthly pricing and standard or custom EULA
Create a public or limited SaaS product and public offer with subscription(usage) pricing and standard or custom EULA
Create a public or limited SaaS product and public offer with contract with PAYG pricing and standard or custom EULA
Create a public or limited SaaS product and public offer with contract pricing and standard or custom EULA
Create public free trial offer with subscription pricing for SaaS product
Change free trial duration of public free trial offer for SaaS product
Create limited container product with public offer, contract pricing and standard EULA
Make your AMI or SaaS or Container product restricted
Update name and description of my public offer
Update EULA of my public offer
Update refund policy of my public offer
Update geo-targeting of my public offer to specifically target few countries (e.g US/Canada/Spain) so that only customers in that region can subscribe to my offer
Update price of my public offer for my AMI product with hourly annual pricing
Update price of my public offer for my SaaS product with contract and PAYG pricing
Add a new dimension to an AMI product and set the hourly price for this new dimension in the public offer
Update (e.g name) dimensions on my AMI or SaaS product
Add a region where my AMI product is deployed
Restrict a region where my AMI product is deployed
Specify if I want my AMI assets to be deployed in new regions built by AWS (future region support)
List all my AMI or SaaS or Container products and associated public offers
Describe my AMI or SaaS or Container product and check if it contains all the information I need to know about the product
Describe my public offer and check if it contains all the information I need to know about the offer
Create draft private offers for my AMI or SaaS product so I can review them internally before publishing to my buyers
Create a private offer with hourly annual pricing for my AMI product and add a custom EULA
Create a private offer with hourly pricing for my AMI product
Create a private offer with contract pricing for my AMI product
Create a private offer (target buyers)for my Container product with contract pricing
List all my private offers and sort or filter them by Offer Publish Date, Offer Expiry Date and Buyer IDs
Create draft resale authorization for any product type (AMI/SaaS/Container) so I can review them internally before publishing to my CPs
Publish a one-time resale authorization on my SaaS product so my CP can use that to create Channel Partner Private Offer (CPPO)
Publish one-time resale authorization for any product type (AMI/SaaS/Container) and add a custom EULA to be sent to the buyer
Publish one-time resale authorization for any product type (AMI/SaaS/Container) and add reseller contract documentation between the ISV and CP
Publish multi-use resale authorization with expiry date for my AMI product with hourly annual pricing so my CP can use that to create CPPO
Publish multi-use resale authorization without expiry date for my AMI product with hourly annual pricing so my CP can use that to create CPPO
Publish multi-use resale authorization with expiry date for any product type (AMI/SaaS/Container) and add a custom EULA to be sent to the buyer
Publish multi-use resale authorization with expiry date for any product type (AMI/SaaS/Container) and add reseller contract documentation between the ISV and CP
Publish multi-use resale authorization without expiry date for any product type (AMI/SaaS/Container) and add a custom EULA to be sent to the buyer
Publish multi-use resale authorization without expiry date for any product type (AMI/SaaS/Container) and add reseller contract documentation between the ISV and CP
Create draft CPPO for any product type (AMI/SaaS/Container) so I can review them internally before publishing to my buyers
Publish CPPO using one-time resale authorization on AMI, SaaS, or Container products and update price markup
Publish CPPO using one-time resale authorization on any product type (AMI/SaaS/Container) and append buyer EULA with what was received from ISV
Update the offer expiry date of a CPPO I created to a date in future so my buyers get more time to evaluate and accept the offer
Publish CPPO using multi-use resale authorization with expiry date on AMI products and update price markup
Publish CPPO using multi-use resale authorization with expiry date on SaaS products and update price markup
Publish CPPO using multi-use resale authorization with expiry date on Container products and update price markup
Publish CPPO using multi-use resale authorization with expiry date on any product type (AMI/SaaS/Container) and append buyer EULA with what was received from ISV
Publish more than one CPPO using multi-use resale authorization with or without expiry date on any product type (AMI/SaaS/Container) and update price markup
Publish CPPO using multi-use resale authorization without expiry date on AMI products and update price markup
Publish CPPO using multi-use resale authorization without expiry date on SaaS products and update price markup
Publish CPPO using multi-use resale authorization without expiry date on Container products and update price markup
Publish CPPO using multi-use resale authorization without expiry date on any product type (AMI/SaaS/Container) and append buyer EULA with what was received from ISV
Update name/description of one-time or multi-use resale authorization before publishing for any product type (AMI/SaaS/Container)
Publish one-time resale authorization for any product type (AMI/SaaS/Container) and add Flexible payment schedule
Publish one-time resale authorization for any product type (AMI/SaaS/Container) and add specific buyer account for the resale
Publish multi-use resale authorization with expiry date for any product type (AMI/SaaS/Container) and add specific buyer account for the resale
Publish multi-use resale authorization without expiry date for any product type (AMI/SaaS/Container) and add specific buyer account for the resale
Restrict a one-time resale authorization for any product type (AMI/SaaS/Container)
Publish one-time resale authorization for any product type (AMI/SaaS/Container) and add whether it is renewal or not
Create a custom dimension for an existing SaaS product and create a private offer
Describe a resale authorization
List all CPPOs created by a channel partner
List all shared resale authorizations available to a channel partner
Create a replacement private offer from an existing agreement with contract pricing
Create a resale authorization replacement private offer from an existing agreement with contract pricing
List and describe all private Offers associated with a product
List released Public/Private offers for a specific product id
BatchDescribe my entities in a single call and check if it contains all the information I need to know about the entities

Agreement API reference code

Seller use cases

Use case
Obtain a list of all of my agreements
Filter my agreements based on product ID, Customer AWS Account ID, Offer ID
Filter my agreements based on product ID
Filter my agreements based on AWS Account ID
Filter my agreements based on Offer ID
Filter my agreements based on whether its end date is before or after a date I can specify (such as today)
Filter my agreements based on status
Filter my agreement based on its product type
Filter my agreement based on a combination of any of the above filters
Obtain metadata about my agreement, like its sign date, start date or end date
Obtain metadata about the customer who created the agreement, such as the customer's AWS Account ID
Obtain all the Agreement IDs
Obtain information about the product and offer that the agreement was created on such as Product ID and Offer ID
Obtain the Product Type of the product the agreement was created on
Retrieve the status of the agreement
Obtain financial details, such as Total Contract Value of the agreement
Obtain the auto-renewal status of the agreement
Obtain the pricing type of the agreement (contract, FPS, metered, free etc.)
Obtain the payment schedule I have agreed to with the agreement, including the invoice date and invoice amount
Obtain the EULA I have entered into with my customer via the agreement
Obtain the support and refund policy I have provided to the customer
Obtain the details from an agreement of a free trial I have provided to the customer
Obtain the dimensions the buyer has purchased from me via the agreement
Obtain pricing per each dimension in the agreement
Obtain instances of each dimension that buyer has purchased in the agreement

Buyer use cases

Use case
Amend an AMI agreement with ConfigurableUpfrontPricingTerm by updating dimension quantity for usage pricing model
Amend a SaaS contract agreement to add or update its renewal term
Create a new AMI free trial agreement
Create a new SaaS contract agreement with upfront payment
Replace an AMI usage-based pricing term but keep the existing ConfigurableUpfrontPricingTerm
Replace a SaaS contract agreement with a new agreement-based offer
Replace a SaaS free trial with a Contract with Consumption Pricing (CCP)
Replace a SaaS usage-based pricing term and cancel the previous agreement
Update purchase orders after the agreement has been accepted
Accept an agreement cancellation request initiated by the seller
Get details of a specific agreement cancellation request
List all agreement cancellation requests for agreements I participate in as acceptor
Reject an agreement cancellation request initiated by the seller
Accept an agreement payment request initiated by the seller
Get details of a specific agreement payment request
List all agreement payment requests for agreements I participate in as acceptor
Reject an agreement payment request initiated by the seller

Submit defects & questions

If you find any defects with the APIs, need help troubleshooting, or have general questions or feedback, use this form to contact us

AWS SDK for Java

Get started quickly using AWS in java, the AWS SDK for Java makes it easy to integrate your Java application, library, or script with AWS services including Amazon S3, Amazon EC2, Amazon DynamoDB, and more.

https://aws.amazon.com/sdk-for-java/

AWS Marketplace Documentation

To access detailed AWS Marketplace API documentation:

https://docs.aws.amazon.com/marketplace/