createWorkerConfiguration method
Creates a worker configuration using the specified properties.
May throw BadRequestException.
May throw ConflictException.
May throw ForbiddenException.
May throw InternalServerErrorException.
May throw NotFoundException.
May throw ServiceUnavailableException.
May throw TooManyRequestsException.
May throw UnauthorizedException.
Parameter name :
The name of the worker configuration.
Parameter propertiesFileContent :
Base64 encoded contents of connect-distributed.properties file.
Parameter description :
A summary description of the worker configuration.
Parameter tags :
The tags you want to attach to the worker configuration.
Implementation
Future<CreateWorkerConfigurationResponse> createWorkerConfiguration({
required String name,
required String propertiesFileContent,
String? description,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'name': name,
'propertiesFileContent': propertiesFileContent,
if (description != null) 'description': description,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/v1/worker-configurations',
exceptionFnMap: _exceptionFns,
);
return CreateWorkerConfigurationResponse.fromJson(response);
}