Skip to main content

scheduling_policies

Creates, updates, deletes or gets a scheduling_policy resource or lists scheduling_policies in a region

Overview

Namescheduling_policies
TypeResource
DescriptionResource Type definition for AWS::Batch::SchedulingPolicy
Idawscc.batch.scheduling_policies

Fields

NameDatatypeDescription
namestringName of Scheduling Policy.
arnstringARN of the Scheduling Policy.
fairshare_policyobjectFair Share Policy for the Job Queue.
tagsobjectA key-value pair to associate with a resource.
regionstringAWS region.

For more information, see AWS::Batch::SchedulingPolicy.

Methods

NameResourceAccessible byRequired Params
create_resourcescheduling_policiesINSERTregion
delete_resourcescheduling_policiesDELETEIdentifier, region
update_resourcescheduling_policiesUPDATEIdentifier, PatchDocument, region
list_resourcesscheduling_policies_list_onlySELECTregion
get_resourcescheduling_policiesSELECTIdentifier, region

SELECT examples

Gets all properties from an individual scheduling_policy.

SELECT
region,
name,
arn,
fairshare_policy,
tags
FROM awscc.batch.scheduling_policies
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';

INSERT example

Use the following StackQL query and manifest file to create a new scheduling_policy resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.batch.scheduling_policies (
Name,
FairsharePolicy,
Tags,
region
)
SELECT
'{{ name }}',
'{{ fairshare_policy }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

Use the following StackQL query and manifest file to update a scheduling_policy resource, using stack-deploy.

/*+ update */
UPDATE awscc.batch.scheduling_policies
SET PatchDocument = string('{{ {
"FairsharePolicy": fairshare_policy
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.batch.scheduling_policies
WHERE
Identifier = '{{ arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

To operate on the scheduling_policies resource, the following permissions are required:

Batch:CreateSchedulingPolicy,
Batch:TagResource