updateElasticIp method

Future<void> updateElasticIp({
  1. required String elasticIp,
  2. String? name,
})

Updates a registered Elastic IP address's name. For more information, see Resource Management.

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 elasticIp : The IP address for which you want to update the name.

Parameter name : The new name.

Implementation

Future<void> updateElasticIp({
  required String elasticIp,
  String? name,
}) async {
  ArgumentError.checkNotNull(elasticIp, 'elasticIp');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'OpsWorks_20130218.UpdateElasticIp'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ElasticIp': elasticIp,
      if (name != null) 'Name': name,
    },
  );
}