createIpAccessSettings method

Future<CreateIpAccessSettingsResponse> createIpAccessSettings({
  1. required List<IpRule> ipRules,
  2. Map<String, String>? additionalEncryptionContext,
  3. String? clientToken,
  4. String? customerManagedKey,
  5. String? description,
  6. String? displayName,
  7. List<Tag>? tags,
})

Creates an IP access settings resource that can be associated with a web portal.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

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

Parameter additionalEncryptionContext : Additional encryption context 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 returns 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 customerManagedKey : The custom managed key of the IP access settings.

Parameter description : The description of the IP access settings.

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

Parameter tags : The tags to add to the IP access settings resource. A tag is a key-value pair.

Implementation

Future<CreateIpAccessSettingsResponse> createIpAccessSettings({
  required List<IpRule> ipRules,
  Map<String, String>? additionalEncryptionContext,
  String? clientToken,
  String? customerManagedKey,
  String? description,
  String? displayName,
  List<Tag>? tags,
}) async {
  final $payload = <String, dynamic>{
    'ipRules': ipRules,
    if (additionalEncryptionContext != null)
      'additionalEncryptionContext': additionalEncryptionContext,
    'clientToken': clientToken ?? _s.generateIdempotencyToken(),
    if (customerManagedKey != null) 'customerManagedKey': customerManagedKey,
    if (description != null) 'description': description,
    if (displayName != null) 'displayName': displayName,
    if (tags != null) 'tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/ipAccessSettings',
    exceptionFnMap: _exceptionFns,
  );
  return CreateIpAccessSettingsResponse.fromJson(response);
}