updateQueue method
- required String farmId,
- required String queueId,
- List<
String> ? allowedStorageProfileIdsToAdd, - List<
String> ? allowedStorageProfileIdsToRemove, - String? clientToken,
- DefaultQueueBudgetAction? defaultBudgetAction,
- String? description,
- String? displayName,
- JobAttachmentSettings? jobAttachmentSettings,
- JobRunAsUser? jobRunAsUser,
- List<
String> ? requiredFileSystemLocationNamesToAdd, - List<
String> ? requiredFileSystemLocationNamesToRemove, - String? roleArn,
- SchedulingConfiguration? schedulingConfiguration,
Updates a queue.
May throw AccessDeniedException.
May throw InternalServerErrorException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter farmId :
The farm ID to update in the queue.
Parameter queueId :
The queue ID to update.
Parameter allowedStorageProfileIdsToAdd :
The storage profile IDs to add.
Parameter allowedStorageProfileIdsToRemove :
The storage profile ID to remove.
Parameter clientToken :
The idempotency token to update in the queue.
Parameter defaultBudgetAction :
The default action to take for a queue update if a budget isn't
configured.
Parameter description :
The description of the queue to update.
Parameter displayName :
The display name of the queue to update.
Parameter jobAttachmentSettings :
The job attachment settings to update for the queue.
Parameter jobRunAsUser :
Update the jobs in the queue to run as a specified POSIX user.
Parameter requiredFileSystemLocationNamesToAdd :
The required file system location names to add to the queue.
Parameter requiredFileSystemLocationNamesToRemove :
The required file system location names to remove from the queue.
Parameter roleArn :
The IAM role ARN that's used to run jobs from this queue.
Parameter schedulingConfiguration :
The scheduling configuration for the queue. This configuration determines
how workers are assigned to jobs in the queue.
When updating the scheduling configuration, the entire configuration is replaced.
In-progress tasks run to completion before the new scheduling configuration takes effect.
Implementation
Future<void> updateQueue({
required String farmId,
required String queueId,
List<String>? allowedStorageProfileIdsToAdd,
List<String>? allowedStorageProfileIdsToRemove,
String? clientToken,
DefaultQueueBudgetAction? defaultBudgetAction,
String? description,
String? displayName,
JobAttachmentSettings? jobAttachmentSettings,
JobRunAsUser? jobRunAsUser,
List<String>? requiredFileSystemLocationNamesToAdd,
List<String>? requiredFileSystemLocationNamesToRemove,
String? roleArn,
SchedulingConfiguration? schedulingConfiguration,
}) async {
final headers = <String, String>{
if (clientToken != null) 'X-Amz-Client-Token': clientToken.toString(),
};
final $payload = <String, dynamic>{
if (allowedStorageProfileIdsToAdd != null)
'allowedStorageProfileIdsToAdd': allowedStorageProfileIdsToAdd,
if (allowedStorageProfileIdsToRemove != null)
'allowedStorageProfileIdsToRemove': allowedStorageProfileIdsToRemove,
if (defaultBudgetAction != null)
'defaultBudgetAction': defaultBudgetAction.value,
if (description != null) 'description': description,
if (displayName != null) 'displayName': displayName,
if (jobAttachmentSettings != null)
'jobAttachmentSettings': jobAttachmentSettings,
if (jobRunAsUser != null) 'jobRunAsUser': jobRunAsUser,
if (requiredFileSystemLocationNamesToAdd != null)
'requiredFileSystemLocationNamesToAdd':
requiredFileSystemLocationNamesToAdd,
if (requiredFileSystemLocationNamesToRemove != null)
'requiredFileSystemLocationNamesToRemove':
requiredFileSystemLocationNamesToRemove,
if (roleArn != null) 'roleArn': roleArn,
if (schedulingConfiguration != null)
'schedulingConfiguration': schedulingConfiguration,
};
final response = await _protocol.send(
payload: $payload,
method: 'PATCH',
requestUri:
'/2023-10-12/farms/${Uri.encodeComponent(farmId)}/queues/${Uri.encodeComponent(queueId)}',
headers: headers,
exceptionFnMap: _exceptionFns,
);
}