describeElasticIps method
Describes Elastic IP addresses. 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 include this parameter,
DescribeElasticIps
returns a description of the Elastic IP
addresses associated with the specified instance.
Parameter ips
:
An array of Elastic IP addresses to be described. If you include this
parameter, DescribeElasticIps
returns a description of the
specified Elastic IP addresses. Otherwise, it returns a description of
every Elastic IP address.
Parameter stackId
:
A stack ID. If you include this parameter, DescribeElasticIps
returns a description of the Elastic IP addresses that are registered with
the specified stack.
Implementation
Future<DescribeElasticIpsResult> describeElasticIps({
String? instanceId,
List<String>? ips,
String? stackId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'OpsWorks_20130218.DescribeElasticIps'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (instanceId != null) 'InstanceId': instanceId,
if (ips != null) 'Ips': ips,
if (stackId != null) 'StackId': stackId,
},
);
return DescribeElasticIpsResult.fromJson(jsonResponse.body);
}