createConnectorV2 method

Future<CreateConnectorV2Response> createConnectorV2({
  1. required String name,
  2. required ProviderConfiguration provider,
  3. String? clientToken,
  4. String? description,
  5. String? kmsKeyArn,
  6. Map<String, String>? tags,
})

Grants permission to create a connectorV2 based on input parameters.

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

Parameter name : The unique name of the connectorV2.

Parameter provider : The third-party provider’s service configuration.

Parameter clientToken : A unique identifier used to ensure idempotency.

Parameter description : The description of the connectorV2.

Parameter kmsKeyArn : The Amazon Resource Name (ARN) of KMS key used to encrypt secrets for the connectorV2.

Parameter tags : The tags to add to the connectorV2 when you create.

Implementation

Future<CreateConnectorV2Response> createConnectorV2({
  required String name,
  required ProviderConfiguration provider,
  String? clientToken,
  String? description,
  String? kmsKeyArn,
  Map<String, String>? tags,
}) async {
  final $payload = <String, dynamic>{
    'Name': name,
    'Provider': provider,
    'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
    if (description != null) 'Description': description,
    if (kmsKeyArn != null) 'KmsKeyArn': kmsKeyArn,
    if (tags != null) 'Tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/connectorsv2',
    exceptionFnMap: _exceptionFns,
  );
  return CreateConnectorV2Response.fromJson(response);
}