createOtaTaskConfiguration method

Future<CreateOtaTaskConfigurationResponse> createOtaTaskConfiguration({
  1. String? clientToken,
  2. String? description,
  3. String? name,
  4. PushConfig? pushConfig,
})

Create a configuraiton for the over-the-air (OTA) task.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ThrottlingException. May throw ValidationException.

Parameter clientToken : An idempotency token. If you retry a request that completed successfully initially using the same client token and parameters, then the retry attempt will succeed without performing any further actions.

Parameter description : A description of the over-the-air (OTA) task configuration.

Parameter name : The name of the over-the-air (OTA) task.

Parameter pushConfig : Describes the type of configuration used for the over-the-air (OTA) task.

Implementation

Future<CreateOtaTaskConfigurationResponse> createOtaTaskConfiguration({
  String? clientToken,
  String? description,
  String? name,
  PushConfig? pushConfig,
}) async {
  final $payload = <String, dynamic>{
    'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
    if (description != null) 'Description': description,
    if (name != null) 'Name': name,
    if (pushConfig != null) 'PushConfig': pushConfig,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/ota-task-configurations',
    exceptionFnMap: _exceptionFns,
  );
  return CreateOtaTaskConfigurationResponse.fromJson(response);
}