describeServiceErrors method
Describes AWS OpsWorks Stacks service errors.
Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information about user permissions, see Managing User Permissions.
This call accepts only one resource-identifying parameter.
May throw ValidationException. May throw ResourceNotFoundException.
Parameter instanceId
:
The instance ID. If you use this parameter,
DescribeServiceErrors
returns descriptions of the errors
associated with the specified instance.
Parameter serviceErrorIds
:
An array of service error IDs. If you use this parameter,
DescribeServiceErrors
returns descriptions of the specified
errors. Otherwise, it returns a description of every error.
Parameter stackId
:
The stack ID. If you use this parameter,
DescribeServiceErrors
returns descriptions of the errors
associated with the specified stack.
Implementation
Future<DescribeServiceErrorsResult> describeServiceErrors({
String? instanceId,
List<String>? serviceErrorIds,
String? stackId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'OpsWorks_20130218.DescribeServiceErrors'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (instanceId != null) 'InstanceId': instanceId,
if (serviceErrorIds != null) 'ServiceErrorIds': serviceErrorIds,
if (stackId != null) 'StackId': stackId,
},
);
return DescribeServiceErrorsResult.fromJson(jsonResponse.body);
}