createPrivateConnection method

Future<CreatePrivateConnectionOutput> createPrivateConnection({
  1. required PrivateConnectionMode mode,
  2. required String privateConnectionName,
  3. Map<String, String>? tags,
})

Creates a private connection for reaching a self-hosted provider instance over private networking using Amazon VPC Lattice.

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

Parameter mode : The configuration for the private connection. Specify either a service-managed or a self-managed mode.

Parameter privateConnectionName : A unique name for the private connection within your account.

Parameter tags : The tags to attach to the private connection.

Implementation

Future<CreatePrivateConnectionOutput> createPrivateConnection({
  required PrivateConnectionMode mode,
  required String privateConnectionName,
  Map<String, String>? tags,
}) async {
  final $payload = <String, dynamic>{
    'mode': mode,
    'privateConnectionName': privateConnectionName,
    if (tags != null) 'tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/CreatePrivateConnection',
    exceptionFnMap: _exceptionFns,
  );
  return CreatePrivateConnectionOutput.fromJson(response);
}