registerConnector method
Registers a new custom connector with your Amazon Web Services account. Before you can register the connector, you must deploy the associated AWS lambda function in your account.
May throw AccessDeniedException.
May throw ConflictException.
May throw ConnectorAuthenticationException.
May throw ConnectorServerException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter clientToken :
The clientToken parameter is an idempotency token. It ensures
that your RegisterConnector request completes only once. You
choose the value to pass. For example, if you don't receive a response
from your request, you can safely retry the request with the same
clientToken parameter value.
If you omit a clientToken value, the Amazon Web Services SDK
that you are using inserts a value for you. This way, the SDK can safely
retry requests multiple times after a network error. You must provide your
own value for other use cases.
If you specify input parameters that differ from your first request, an
error occurs. If you use a different value for clientToken,
Amazon AppFlow considers it a new call to RegisterConnector.
The token is active for 8 hours.
Parameter connectorLabel :
The name of the connector. The name is unique for each
ConnectorRegistration in your Amazon Web Services account.
Parameter connectorProvisioningConfig :
The provisioning type of the connector. Currently the only supported value
is LAMBDA.
Parameter connectorProvisioningType :
The provisioning type of the connector. Currently the only supported value
is LAMBDA.
Parameter description :
A description about the connector that's being registered.
Implementation
Future<RegisterConnectorResponse> registerConnector({
String? clientToken,
String? connectorLabel,
ConnectorProvisioningConfig? connectorProvisioningConfig,
ConnectorProvisioningType? connectorProvisioningType,
String? description,
}) async {
final $payload = <String, dynamic>{
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (connectorLabel != null) 'connectorLabel': connectorLabel,
if (connectorProvisioningConfig != null)
'connectorProvisioningConfig': connectorProvisioningConfig,
if (connectorProvisioningType != null)
'connectorProvisioningType': connectorProvisioningType.value,
if (description != null) 'description': description,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/register-connector',
exceptionFnMap: _exceptionFns,
);
return RegisterConnectorResponse.fromJson(response);
}