registerConnectionType method
- required ConnectionPropertiesConfiguration connectionProperties,
- required String connectionType,
- required ConnectorAuthenticationConfiguration connectorAuthenticationConfiguration,
- required IntegrationType integrationType,
- required RestConfiguration restConfiguration,
- String? description,
- Map<
String, String> ? tags,
Registers a custom connection type in Glue based on the configuration provided. This operation enables customers to configure custom connectors for any data source with REST-based APIs, eliminating the need for building custom Lambda connectors.
The registered connection type stores details about how requests and responses are interpreted by REST sources, including connection properties, authentication configuration, and REST configuration with entity definitions. Once registered, customers can create connections using this connection type and work with them the same way as natively supported Glue connectors.
Supports multiple authentication types including Basic, OAuth2 (Client Credentials, JWT Bearer, Authorization Code), and Custom Auth configurations.
May throw AccessDeniedException.
May throw InternalServiceException.
May throw InvalidInputException.
May throw OperationTimeoutException.
May throw ResourceNumberLimitExceededException.
May throw ValidationException.
Parameter connectionProperties :
Defines the base URL and additional request parameters needed during
connection creation for this connection type.
Parameter connectionType :
The name of the connection type. Must be between 1 and 255 characters and
must be prefixed with "REST-" to indicate it is a REST-based connector.
Parameter connectorAuthenticationConfiguration :
Defines the supported authentication types and required properties for
this connection type, including Basic, OAuth2, and Custom authentication
methods.
Parameter integrationType :
The integration type for the connection. Currently only "REST" protocol is
supported.
Parameter restConfiguration :
Defines the HTTP request and response configuration, validation endpoint,
and entity configurations for REST API interactions.
Parameter description :
A description of the connection type. Can be up to 2048 characters and
provides details about the purpose and functionality of the connection
type.
Parameter tags :
The tags you assign to the connection type.
Implementation
Future<RegisterConnectionTypeResponse> registerConnectionType({
required ConnectionPropertiesConfiguration connectionProperties,
required String connectionType,
required ConnectorAuthenticationConfiguration
connectorAuthenticationConfiguration,
required IntegrationType integrationType,
required RestConfiguration restConfiguration,
String? description,
Map<String, String>? tags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSGlue.RegisterConnectionType'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ConnectionProperties': connectionProperties,
'ConnectionType': connectionType,
'ConnectorAuthenticationConfiguration':
connectorAuthenticationConfiguration,
'IntegrationType': integrationType.value,
'RestConfiguration': restConfiguration,
if (description != null) 'Description': description,
if (tags != null) 'Tags': tags,
},
);
return RegisterConnectionTypeResponse.fromJson(jsonResponse.body);
}