createEngagement method
The CreateEngagement action allows you to create an
Engagement, which serves as a collaborative space between
different parties such as AWS Partners and AWS Sellers. This action
automatically adds the caller's AWS account as an active member of the
newly created Engagement.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter catalog :
The CreateEngagementRequest$Catalog parameter specifies the
catalog related to the engagement. Accepted values are AWS
and Sandbox, which determine the environment in which the
engagement is managed.
Parameter description :
Provides a description of the Engagement.
Parameter title :
Specifies the title of the Engagement.
Parameter clientToken :
The CreateEngagementRequest$ClientToken parameter specifies a
unique, case-sensitive identifier to ensure that the request is handled
exactly once. The value must not exceed sixty-four alphanumeric
characters.
Parameter contexts :
The Contexts field is a required array of objects, with a
maximum of 5 contexts allowed, specifying detailed information about
customer projects associated with the Engagement. Each context object
contains a Type field indicating the context type, which must
be CustomerProject in this version, and a
Payload field containing the CustomerProject
details. The CustomerProject object is composed of two main
components: Customer and Project. The
Customer object includes information such as
CompanyName, WebsiteUrl, Industry,
and CountryCode, providing essential details about the
customer. The Project object contains Title,
BusinessProblem, and TargetCompletionDate,
offering insights into the specific project associated with the customer.
This structure allows comprehensive context to be included within the
Engagement, facilitating effective collaboration between parties by
providing relevant customer and project information.
Implementation
Future<CreateEngagementResponse> createEngagement({
required String catalog,
required String description,
required String title,
String? clientToken,
List<EngagementContextDetails>? contexts,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'AWSPartnerCentralSelling.CreateEngagement'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Catalog': catalog,
'Description': description,
'Title': title,
'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
if (contexts != null) 'Contexts': contexts,
},
);
return CreateEngagementResponse.fromJson(jsonResponse.body);
}