createVpcEndpoint method

Future<CreateVpcEndpointResponse> createVpcEndpoint({
  1. required String domainArn,
  2. required VPCOptions vpcOptions,
  3. String? clientToken,
})

Creates an Amazon OpenSearch Service-managed VPC endpoint.

May throw BaseException. May throw ConflictException. May throw DisabledOperationException. May throw InternalException. May throw LimitExceededException. May throw ValidationException.

Parameter domainArn : The Amazon Resource Name (ARN) of the domain to grant access to.

Parameter vpcOptions : Options to specify the subnets and security groups for the endpoint.

Parameter clientToken : Unique, case-sensitive identifier to ensure idempotency of the request.

Implementation

Future<CreateVpcEndpointResponse> createVpcEndpoint({
  required String domainArn,
  required VPCOptions vpcOptions,
  String? clientToken,
}) async {
  final $payload = <String, dynamic>{
    'DomainArn': domainArn,
    'VpcOptions': vpcOptions,
    if (clientToken != null) 'ClientToken': clientToken,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/2015-01-01/es/vpcEndpoints',
    exceptionFnMap: _exceptionFns,
  );
  return CreateVpcEndpointResponse.fromJson(response);
}