getHostnameSuggestion method
Gets a generated host name for the specified layer, based on the current host name theme.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
May throw ValidationException. May throw ResourceNotFoundException.
Parameter layerId
:
The layer ID.
Implementation
Future<GetHostnameSuggestionResult> getHostnameSuggestion({
required String layerId,
}) async {
ArgumentError.checkNotNull(layerId, 'layerId');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'OpsWorks_20130218.GetHostnameSuggestion'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'LayerId': layerId,
},
);
return GetHostnameSuggestionResult.fromJson(jsonResponse.body);
}