authorizeVpcEndpointAccess method

Future<AuthorizeVpcEndpointAccessResponse> authorizeVpcEndpointAccess({
  1. required String domainName,
  2. String? account,
  3. AWSServicePrincipal? service,
  4. ServiceOptions? serviceOptions,
})

Provides access to an Amazon OpenSearch Service domain through the use of an interface VPC endpoint.

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

Parameter domainName : The name of the OpenSearch Service domain to provide access to.

Parameter account : The Amazon Web Services account ID to grant access to.

Parameter service : The Amazon Web Services service SP to grant access to.

Parameter serviceOptions : The options for the service, including the supported Regions for the endpoint access.

Implementation

Future<AuthorizeVpcEndpointAccessResponse> authorizeVpcEndpointAccess({
  required String domainName,
  String? account,
  AWSServicePrincipal? service,
  ServiceOptions? serviceOptions,
}) async {
  final $payload = <String, dynamic>{
    if (account != null) 'Account': account,
    if (service != null) 'Service': service.value,
    if (serviceOptions != null) 'ServiceOptions': serviceOptions,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/2021-01-01/opensearch/domain/${Uri.encodeComponent(domainName)}/authorizeVpcEndpointAccess',
    exceptionFnMap: _exceptionFns,
  );
  return AuthorizeVpcEndpointAccessResponse.fromJson(response);
}