describeRdsDbInstances method
Describes Amazon RDS instances.
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 stackId
:
The ID of the stack with which the instances are registered. The operation
returns descriptions of all registered Amazon RDS instances.
Parameter rdsDbInstanceArns
:
An array containing the ARNs of the instances to be described.
Implementation
Future<DescribeRdsDbInstancesResult> describeRdsDbInstances({
required String stackId,
List<String>? rdsDbInstanceArns,
}) async {
ArgumentError.checkNotNull(stackId, 'stackId');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'OpsWorks_20130218.DescribeRdsDbInstances'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'StackId': stackId,
if (rdsDbInstanceArns != null) 'RdsDbInstanceArns': rdsDbInstanceArns,
},
);
return DescribeRdsDbInstancesResult.fromJson(jsonResponse.body);
}