createIngressPoint method

Future<CreateIngressPointResponse> createIngressPoint({
  1. required String ingressPointName,
  2. required String ruleSetId,
  3. required String trafficPolicyId,
  4. required IngressPointType type,
  5. String? clientToken,
  6. IngressPointConfiguration? ingressPointConfiguration,
  7. NetworkConfiguration? networkConfiguration,
  8. List<Tag>? tags,
  9. TlsPolicy? tlsPolicy,
})

Provision a new ingress endpoint resource.

May throw ConflictException. May throw ServiceQuotaExceededException. May throw ValidationException.

Parameter ingressPointName : A user friendly name for an ingress endpoint resource.

Parameter ruleSetId : The identifier of an existing rule set that you attach to an ingress endpoint resource.

Parameter trafficPolicyId : The identifier of an existing traffic policy that you attach to an ingress endpoint resource.

Parameter type : The type of the ingress endpoint to create.

Parameter clientToken : A unique token that Amazon SES uses to recognize subsequent retries of the same request.

Parameter ingressPointConfiguration : If you choose an Authenticated ingress endpoint, you must configure either an SMTP password or a secret ARN.

Parameter networkConfiguration : Specifies the network configuration for the ingress point. This allows you to create an IPv4-only, Dual-Stack, or PrivateLink type of ingress point. If not specified, the default network type is IPv4-only.

Parameter tags : The tags used to organize, track, or control access for the resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.

Parameter tlsPolicy : The Transport Layer Security (TLS) policy for the ingress point. The FIPS value is only valid in US and Canada regions.

Implementation

Future<CreateIngressPointResponse> createIngressPoint({
  required String ingressPointName,
  required String ruleSetId,
  required String trafficPolicyId,
  required IngressPointType type,
  String? clientToken,
  IngressPointConfiguration? ingressPointConfiguration,
  NetworkConfiguration? networkConfiguration,
  List<Tag>? tags,
  TlsPolicy? tlsPolicy,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'MailManagerSvc.CreateIngressPoint'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'IngressPointName': ingressPointName,
      'RuleSetId': ruleSetId,
      'TrafficPolicyId': trafficPolicyId,
      'Type': type.value,
      'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
      if (ingressPointConfiguration != null)
        'IngressPointConfiguration': ingressPointConfiguration,
      if (networkConfiguration != null)
        'NetworkConfiguration': networkConfiguration,
      if (tags != null) 'Tags': tags,
      if (tlsPolicy != null) 'TlsPolicy': tlsPolicy.value,
    },
  );

  return CreateIngressPointResponse.fromJson(jsonResponse.body);
}