associateOpportunity method
Enables you to create a formal association between an
Opportunity and various related entities, enriching the
context and details of the opportunity for better collaboration and
decision making. You can associate an opportunity with the following
entity types:
- Partner Solution: A software product or consulting practice created and delivered by Partners. Partner Solutions help customers address business challenges using Amazon Web Services services.
- Amazon Web Services Products: Amazon Web Services offers many products and services that provide scalable, reliable, and cost-effective infrastructure solutions. For the latest list of Amazon Web Services products, see Amazon Web Services products.
- Amazon Web Services Marketplace private offer: Allows Amazon Web Services Marketplace sellers to extend custom pricing and terms to individual Amazon Web Services customers. Sellers can negotiate custom prices, payment schedules, and end user license terms through private offers, enabling Amazon Web Services customers to acquire software solutions tailored to their specific needs. For more information, see Private offers in Amazon Web Services Marketplace.
-
Solution: Use the
ListSolutionsoperation. - AWS Products: For the latest list of Amazon Web Services products, see Amazon Web Services products.
-
Amazon Web Services Marketplace private offer: Use the Using
the Amazon Web Services Marketplace Catalog API to list entities.
Specifically, use the
ListEntitiesoperation to retrieve a list of private offers. The request returns the details of available private offers. For more information, see ListEntities.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter catalog :
Specifies the catalog associated with the request. This field takes a
string value from a predefined list: AWS or
Sandbox. The catalog determines which environment the
opportunity association is made in. Use AWS to associate
opportunities in the Amazon Web Services catalog, and Sandbox
for testing in secure, isolated environments.
Parameter opportunityIdentifier :
Requires the Opportunity's unique identifier when you want to
associate it with a related entity. Provide the correct identifier so the
intended opportunity is updated with the association.
Parameter relatedEntityIdentifier :
Requires the related entity's unique identifier when you want to associate
it with the Opportunity. For Amazon Web Services Marketplace
entities, provide the Amazon Resource Name (ARN). Use the
Amazon Web Services Marketplace API to obtain the ARN.
Parameter relatedEntityType :
Specifies the entity type that you're associating with the
Opportunity. This helps to categorize and properly process the
association.
Implementation
Future<void> associateOpportunity({
required String catalog,
required String opportunityIdentifier,
required String relatedEntityIdentifier,
required RelatedEntityType relatedEntityType,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'AWSPartnerCentralSelling.AssociateOpportunity'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Catalog': catalog,
'OpportunityIdentifier': opportunityIdentifier,
'RelatedEntityIdentifier': relatedEntityIdentifier,
'RelatedEntityType': relatedEntityType.value,
},
);
}