getCampaignVersion method

Future<GetCampaignVersionResponse> getCampaignVersion({
  1. required String applicationId,
  2. required String campaignId,
  3. required String version,
})

Retrieves information about the status, configuration, and other settings for a specific version of a campaign.

May throw BadRequestException. May throw InternalServerErrorException. May throw PayloadTooLargeException. May throw ForbiddenException. May throw NotFoundException. May throw MethodNotAllowedException. May throw TooManyRequestsException.

Parameter applicationId : The unique identifier for the application. This identifier is displayed as the Project ID on the Amazon Pinpoint console.

Parameter campaignId : The unique identifier for the campaign.

Parameter version : The unique version number (Version property) for the campaign version.

Implementation

Future<GetCampaignVersionResponse> getCampaignVersion({
  required String applicationId,
  required String campaignId,
  required String version,
}) async {
  ArgumentError.checkNotNull(applicationId, 'applicationId');
  ArgumentError.checkNotNull(campaignId, 'campaignId');
  ArgumentError.checkNotNull(version, 'version');
  final response = await _protocol.sendRaw(
    payload: null,
    method: 'GET',
    requestUri:
        '/v1/apps/${Uri.encodeComponent(applicationId)}/campaigns/${Uri.encodeComponent(campaignId)}/versions/${Uri.encodeComponent(version)}',
    exceptionFnMap: _exceptionFns,
  );
  final $json = await _s.jsonFromResponse(response);
  return GetCampaignVersionResponse(
    campaignResponse: CampaignResponse.fromJson($json),
  );
}