createWirelessGatewayTaskDefinition method
Creates a gateway task definition.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter autoCreateTasks :
Whether to automatically create tasks using this task definition for all
gateways with the specified current version. If false, the
task must me created by calling CreateWirelessGatewayTask.
Parameter clientRequestToken :
Each resource must have a unique client request token. The client token is
used to implement idempotency. It ensures that the request completes no
more than one time. If you retry a request with the same token and the
same parameters, the request will complete successfully. However, if you
try to create a new resource using the same token but different
parameters, an HTTP 409 conflict occurs. If you omit this value, AWS SDKs
will automatically generate a unique client request. For more information
about idempotency, see Ensuring
idempotency in Amazon EC2 API requests.
Parameter name :
The name of the new resource.
Parameter tags :
The tags to attach to the specified resource. Tags are metadata that you
can use to manage a resource.
Parameter update :
Information about the gateways to update.
Implementation
Future<CreateWirelessGatewayTaskDefinitionResponse>
createWirelessGatewayTaskDefinition({
required bool autoCreateTasks,
String? clientRequestToken,
String? name,
List<Tag>? tags,
UpdateWirelessGatewayTaskCreate? update,
}) async {
final $payload = <String, dynamic>{
'AutoCreateTasks': autoCreateTasks,
'ClientRequestToken': clientRequestToken ?? _s.generateIdempotencyToken(),
if (name != null) 'Name': name,
if (tags != null) 'Tags': tags,
if (update != null) 'Update': update,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/wireless-gateway-task-definitions',
exceptionFnMap: _exceptionFns,
);
return CreateWirelessGatewayTaskDefinitionResponse.fromJson(response);
}