getOperation method

Future<GetOperationResponse> getOperation({
  1. required String operationId,
})

Gets information about any operation that returns an operation ID in the response, such as a CreateService request.

May throw InvalidInput. May throw OperationNotFound.

Parameter operationId : The ID of the operation that you want to get more information about.

Implementation

Future<GetOperationResponse> getOperation({
  required String operationId,
}) async {
  ArgumentError.checkNotNull(operationId, 'operationId');
  _s.validateStringLength(
    'operationId',
    operationId,
    0,
    64,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Route53AutoNaming_v20170314.GetOperation'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'OperationId': operationId,
    },
  );

  return GetOperationResponse.fromJson(jsonResponse.body);
}