createVpcEndpoint method
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 create the endpoint for.
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: '/2021-01-01/opensearch/vpcEndpoints',
exceptionFnMap: _exceptionFns,
);
return CreateVpcEndpointResponse.fromJson(response);
}