The AWS Marketplace API Reference was restructured. For more information about the supported API operations, see the AWS Marketplace API Reference.
Work with buying policies using the AWS Marketplace API
Buying policies give procurement, finance, and cloud governance teams control over how purchases in AWS Marketplace are approved. A private marketplace controls which products users in your organization can buy. Buying policies control how individual purchases are approved and what buyers must provide when they purchase. You can use the AWS Marketplace Catalog API to do the following:
-
Require approval for purchases – Create procurement approval rules that decide which purchases need review or are declined, and where each request is sent. For more information, see Configuring buyer approvals.
-
Require purchase order numbers – Require buyers to enter a purchase order number before they subscribe, for specific offer types and pricing types. For more information, see Configuring mandatory purchase orders.
-
Display a procurement administrator message – Explain your organization's procurement requirements to buyers on AWS Marketplace procurement pages. For more information, see Configuring custom procurement messaging.
For information about configuring buying policies in the AWS Management Console, see Configuring buying policies in AWS Marketplace in the AWS Marketplace Buyer Guide.
Required permissions
Call the buying policy change types from the management account of your
organization or from a delegated administrator account for private marketplace. Use
an IAM user or role that has the AWSPrivateMarketplaceAdminFullAccess
AWS managed policy. Buying policies are AWS Marketplace purchasing settings. They're separate
from IAM policies and AWS Organizations policies, such as service control policies
(SCPs).
How buying policies map to the AWS Marketplace API
Every buying policy is a ProcurementPolicy entity attached to an
Experience. Its PolicyType determines what it does.
You create and change buying policies with the StartChangeSet action,
using the same CreateProcurementPolicy and
UpdateProcurementPolicy change types that you use for a product
curation policy. Buyer approvals also use two other entities:
TrustedActor for approvers and ApprovalWorkflow for
approval chains.
The following table maps the terms used in the AWS Management Console to the entities, fields, and change types in the AWS Marketplace Catalog API.
| Console term | API entity or field | Change types |
|---|---|---|
Procurement approval rule |
A rule in |
|
Require approval, Decline purchase |
The rule's |
|
Approval criteria |
The rule's |
|
Approval routing: AWS Marketplace console (shown to buyers as Organization administrator) |
A |
|
Approval routing: email approval chain |
A rule whose |
|
Approval routing: external system |
A rule whose |
|
Email approver |
A |
|
Connected procurement system |
A |
|
Approval chain |
An |
|
Approval level, and the spend amount where a level starts reviewing |
An entry in the workflow's |
|
Mandatory purchase order settings |
A |
|
Procurement administrator message |
The |
|
Prerequisites for buying policies
Before you configure buying policies with the AWS Marketplace Catalog API, complete the following setup.
-
Create the private marketplace integration with AWS Organizations. This one-time setup, from your management account, enables trusted access across your organization and creates the private marketplace service-linked role. If you already created the integration for private marketplace, skip this step. For the steps, see Prerequisites for buying policies in the AWS Marketplace Buyer Guide.
-
Identify the experience to attach your policies to. Every buying policy is attached to an
Experience, and it applies to the accounts in that experience's audience. When you configure buying policies in the AWS Management Console, AWS Marketplace creates an organization-wide experience for you if one doesn't exist. With the API, you attach each policy to an experience yourself:-
To use an existing experience, call
ListEntitieswith anEntityTypeofExperienceand note its identifier. -
To create one, create the experience, associate your organization (or the OUs or accounts that the policy applies to) as its audience, and enable it. For more information, see Creating a private marketplace and Associating principals to experiences.
-
An experience can have at most one policy of each PolicyType, and you
can't change a policy's type after you create it.
Entity types defined by buying policies
The following table lists the entity types used by buying policies, their purpose, and the actions on which each can be specified. For more details on ARN formats, see Catalog API entities.
| Entity | Purpose | Actions |
|---|---|---|
|
With the |
|
|
Stores an approval chain: its approval levels and approvers. |
|
|
Stores an approver: an email approver or a connected procurement system. |
|