getEnvironment method

Future<GetEnvironmentResponse> getEnvironment({
  1. required String environmentId,
})

Returns a description of the specified environment.

May throw ResourceNotFoundException. May throw ValidationException.

Parameter environmentId : A unique ID for the environment.

Implementation

Future<GetEnvironmentResponse> getEnvironment({
  required String environmentId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'AmazonElasticVMwareService.GetEnvironment'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'environmentId': environmentId,
    },
  );

  return GetEnvironmentResponse.fromJson(jsonResponse.body);
}