updateIpAccessSettings method

Future<UpdateIpAccessSettingsResponse> updateIpAccessSettings({
  1. required String ipAccessSettingsArn,
  2. String? clientToken,
  3. String? description,
  4. String? displayName,
  5. List<IpRule>? ipRules,
})

Updates IP access settings.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter ipAccessSettingsArn : The ARN of the IP access settings.

Parameter clientToken : A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, subsequent retries with the same client token return the result from the original successful request.

If you do not specify a client token, one is automatically generated by the Amazon Web Services SDK.

Parameter description : The description of the IP access settings.

Parameter displayName : The display name of the IP access settings.

Parameter ipRules : The updated IP rules of the IP access settings.

Implementation

Future<UpdateIpAccessSettingsResponse> updateIpAccessSettings({
  required String ipAccessSettingsArn,
  String? clientToken,
  String? description,
  String? displayName,
  List<IpRule>? ipRules,
}) async {
  final $payload = <String, dynamic>{
    'clientToken': clientToken ?? _s.generateIdempotencyToken(),
    if (description != null) 'description': description,
    if (displayName != null) 'displayName': displayName,
    if (ipRules != null) 'ipRules': ipRules,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri:
        '/ipAccessSettings/${ipAccessSettingsArn.split('/').map(Uri.encodeComponent).join('/')}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateIpAccessSettingsResponse.fromJson(response);
}