describeArchive method

Future<DescribeArchiveResponse> describeArchive({
  1. required String archiveName,
})

Retrieves details about an archive.

May throw ResourceAlreadyExistsException. May throw ResourceNotFoundException. May throw InternalException.

Parameter archiveName : The name of the archive to retrieve.

Implementation

Future<DescribeArchiveResponse> describeArchive({
  required String archiveName,
}) async {
  ArgumentError.checkNotNull(archiveName, 'archiveName');
  _s.validateStringLength(
    'archiveName',
    archiveName,
    1,
    48,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSEvents.DescribeArchive'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ArchiveName': archiveName,
    },
  );

  return DescribeArchiveResponse.fromJson(jsonResponse.body);
}