createConnectorDefinitionVersion method
Creates a version of a connector definition which has already been defined.
May throw BadRequestException.
Parameter connectorDefinitionId
:
The ID of the connector definition.
Parameter amznClientToken
:
A client token used to correlate requests and responses.
Parameter connectors
:
A list of references to connectors in this version, with their
corresponding configuration settings.
Implementation
Future<CreateConnectorDefinitionVersionResponse>
createConnectorDefinitionVersion({
required String connectorDefinitionId,
String? amznClientToken,
List<Connector>? connectors,
}) async {
ArgumentError.checkNotNull(connectorDefinitionId, 'connectorDefinitionId');
final headers = <String, String>{
if (amznClientToken != null)
'X-Amzn-Client-Token': amznClientToken.toString(),
};
final $payload = <String, dynamic>{
if (connectors != null) 'Connectors': connectors,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/greengrass/definition/connectors/${Uri.encodeComponent(connectorDefinitionId)}/versions',
headers: headers,
exceptionFnMap: _exceptionFns,
);
return CreateConnectorDefinitionVersionResponse.fromJson(response);
}