createConnectorProfile method
Creates a new connector profile associated with your Amazon Web Services account. There is a soft quota of 100 connector profiles per Amazon Web Services account. If you need more connector profiles than this quota allows, you can submit a request to the Amazon AppFlow team through the Amazon AppFlow support channel. In each connector profile that you create, you can provide the credentials and properties for only one connector.
May throw ConflictException.
May throw ConnectorAuthenticationException.
May throw InternalServerException.
May throw ServiceQuotaExceededException.
May throw ValidationException.
Parameter connectionMode :
Indicates the connection mode and specifies whether it is public or
private. Private flows use Amazon Web Services PrivateLink to route data
over Amazon Web Services infrastructure without exposing it to the public
internet.
Parameter connectorProfileConfig :
Defines the connector-specific configuration and credentials.
Parameter connectorProfileName :
The name of the connector profile. The name is unique for each
ConnectorProfile in your Amazon Web Services account.
Parameter connectorType :
The type of connector, such as Salesforce, Amplitude, and so on.
Parameter clientToken :
The clientToken parameter is an idempotency token. It ensures
that your CreateConnectorProfile 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
CreateConnectorProfile. The token is active for 8 hours.
Parameter connectorLabel :
The label of the connector. The label is unique for each
ConnectorRegistration in your Amazon Web Services account.
Only needed if calling for CUSTOMCONNECTOR connector type/.
Parameter kmsArn :
The ARN (Amazon Resource Name) of the Key Management Service (KMS) key you
provide for encryption. This is required if you do not want to use the
Amazon AppFlow-managed KMS key. If you don't provide anything here, Amazon
AppFlow uses the Amazon AppFlow-managed KMS key.
Implementation
Future<CreateConnectorProfileResponse> createConnectorProfile({
required ConnectionMode connectionMode,
required ConnectorProfileConfig connectorProfileConfig,
required String connectorProfileName,
required ConnectorType connectorType,
String? clientToken,
String? connectorLabel,
String? kmsArn,
}) async {
final $payload = <String, dynamic>{
'connectionMode': connectionMode.value,
'connectorProfileConfig': connectorProfileConfig,
'connectorProfileName': connectorProfileName,
'connectorType': connectorType.value,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (connectorLabel != null) 'connectorLabel': connectorLabel,
if (kmsArn != null) 'kmsArn': kmsArn,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/create-connector-profile',
exceptionFnMap: _exceptionFns,
);
return CreateConnectorProfileResponse.fromJson(response);
}