getEngagement method

Future<GetEngagementResponse> getEngagement({
  1. required String catalog,
  2. required String identifier,
})

Use this action to retrieve the engagement record for a given EngagementIdentifier.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter catalog : Specifies the catalog related to the engagement request. Valid values are AWS and Sandbox.

Parameter identifier : Specifies the identifier of the Engagement record to retrieve.

Implementation

Future<GetEngagementResponse> getEngagement({
  required String catalog,
  required String identifier,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'AWSPartnerCentralSelling.GetEngagement'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Catalog': catalog,
      'Identifier': identifier,
    },
  );

  return GetEngagementResponse.fromJson(jsonResponse.body);
}