describeRaidArrays method

Future<DescribeRaidArraysResult> describeRaidArrays({
  1. String? instanceId,
  2. List<String>? raidArrayIds,
  3. String? stackId,
})

Describe an instance's RAID arrays. 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.

May throw ValidationException. May throw ResourceNotFoundException.

Parameter instanceId : The instance ID. If you use this parameter, DescribeRaidArrays returns descriptions of the RAID arrays associated with the specified instance.

Parameter raidArrayIds : An array of RAID array IDs. If you use this parameter, DescribeRaidArrays returns descriptions of the specified arrays. Otherwise, it returns a description of every array.

Parameter stackId : The stack ID.

Implementation

Future<DescribeRaidArraysResult> describeRaidArrays({
  String? instanceId,
  List<String>? raidArrayIds,
  String? stackId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'OpsWorks_20130218.DescribeRaidArrays'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (instanceId != null) 'InstanceId': instanceId,
      if (raidArrayIds != null) 'RaidArrayIds': raidArrayIds,
      if (stackId != null) 'StackId': stackId,
    },
  );

  return DescribeRaidArraysResult.fromJson(jsonResponse.body);
}