getHost method
Returns the host ARN and details such as status, provider type, endpoint, and, if applicable, the VPC configuration.
May throw ResourceNotFoundException. May throw ResourceUnavailableException.
Parameter hostArn
:
The Amazon Resource Name (ARN) of the requested host.
Implementation
Future<GetHostOutput> getHost({
required String hostArn,
}) async {
ArgumentError.checkNotNull(hostArn, 'hostArn');
_s.validateStringLength(
'hostArn',
hostArn,
0,
256,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target':
'com.amazonaws.codestar.connections.CodeStar_connections_20191201.GetHost'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'HostArn': hostArn,
},
);
return GetHostOutput.fromJson(jsonResponse.body);
}