import { AccessLevelList } from '../shared/access-level' ; import { PolicyStatement , Operator } from '../shared' ; param sid export class Batch extends PolicyStatement { public servicePrefix = 'batch' ; param sid constructor ( sid ? ) { super ( sid ) ; } /**
     * Grants permission to cancel a job in an AWS Batch job queue in your account
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/batch/latest/APIReference/API_CancelJob.html
     */ public toCancelJob ( ) { return this . to ( 'CancelJob' ) ; } /**
     * Grants permission to create an AWS Batch compute environment in your account
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     *
     * https://docs.aws.amazon.com/batch/latest/APIReference/API_CreateComputeEnvironment.html
     */ public toCreateComputeEnvironment ( ) { return this . to ( 'CreateComputeEnvironment' ) ; } /**
     * Grants permission to create an AWS Batch job queue in your account
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     *
     * https://docs.aws.amazon.com/batch/latest/APIReference/API_CreateJobQueue.html
     */ public toCreateJobQueue ( ) { return this . to ( 'CreateJobQueue' ) ; } /**
     * Grants permission to create an AWS Batch scheduling policy in your account
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     *
     * https://docs.aws.amazon.com/batch/latest/APIReference/API_CreateSchedulingPolicy.html
     */ public toCreateSchedulingPolicy ( ) { return this . to ( 'CreateSchedulingPolicy' ) ; } /**
     * Grants permission to delete an AWS Batch compute environment in your account
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/batch/latest/APIReference/API_DeleteComputeEnvironment.html
     */ public toDeleteComputeEnvironment ( ) { return this . to ( 'DeleteComputeEnvironment' ) ; } /**
     * Grants permission to delete an AWS Batch job queue in your account
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/batch/latest/APIReference/API_DeleteJobQueue.html
     */ public toDeleteJobQueue ( ) { return this . to ( 'DeleteJobQueue' ) ; } /**
     * Grants permission to delete an AWS Batch scheduling policy in your account
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/batch/latest/APIReference/API_DeleteSchedulingPolicy.html
     */ public toDeleteSchedulingPolicy ( ) { return this . to ( 'DeleteSchedulingPolicy' ) ; } /**
     * Grants permission to deregister an AWS Batch job definition in your account
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/batch/latest/APIReference/API_DeregisterJobDefinition.html
     */ public toDeregisterJobDefinition ( ) { return this . to ( 'DeregisterJobDefinition' ) ; } /**
     * Grants permission to describe one or more AWS Batch compute environments in your account
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/batch/latest/APIReference/API_DescribeComputeEnvironments.html
     */ public toDescribeComputeEnvironments ( ) { return this . to ( 'DescribeComputeEnvironments' ) ; } /**
     * Grants permission to describe one or more AWS Batch job definitions in your account
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/batch/latest/APIReference/API_DescribeJobDefinitions.html
     */ public toDescribeJobDefinitions ( ) { return this . to ( 'DescribeJobDefinitions' ) ; } /**
     * Grants permission to describe one or more AWS Batch job queues in your account
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/batch/latest/APIReference/API_DescribeJobQueues.html
     */ public toDescribeJobQueues ( ) { return this . to ( 'DescribeJobQueues' ) ; } /**
     * Grants permission to describe a list of AWS Batch jobs in your account
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/batch/latest/APIReference/API_DescribeJobs.html
     */ public toDescribeJobs ( ) { return this . to ( 'DescribeJobs' ) ; } /**
     * Grants permission to describe one or more AWS Batch scheduling policies in your account
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/batch/latest/APIReference/API_DescribeSchedulingPolicies.html
     */ public toDescribeSchedulingPolicies ( ) { return this . to ( 'DescribeSchedulingPolicies' ) ; } /**
     * Grants permission to list jobs for a specified AWS Batch job queue in your account
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/batch/latest/APIReference/API_ListJobs.html
     */ public toListJobs ( ) { return this . to ( 'ListJobs' ) ; } /**
     * Grants permission to list AWS Batch scheduling policies in your account
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/batch/latest/APIReference/API_ListSchedulingPolicies.html
     */ public toListSchedulingPolicies ( ) { return this . to ( 'ListSchedulingPolicies' ) ; } /**
     * Grants permission to list tags for an AWS Batch resource in your account
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/batch/latest/APIReference/API_ListTagsForResource.html
     */ public toListTagsForResource ( ) { return this . to ( 'ListTagsForResource' ) ; } /**
     * Grants permission to register an AWS Batch job definition in your account
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifUser()
     * - .ifPrivileged()
     * - .ifImage()
     * - .ifLogDriver()
     * - .ifAWSLogsGroup()
     * - .ifAWSLogsRegion()
     * - .ifAWSLogsStreamPrefix()
     * - .ifAWSLogsCreateGroup()
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     *
     * https://docs.aws.amazon.com/batch/latest/APIReference/API_RegisterJobDefinition.html
     */ public toRegisterJobDefinition ( ) { return this . to ( 'RegisterJobDefinition' ) ; } /**
     * Grants permission to submit an AWS Batch job from a job definition in your account
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     * - .ifShareIdentifier()
     *
     * https://docs.aws.amazon.com/batch/latest/APIReference/API_SubmitJob.html
     */ public toSubmitJob ( ) { return this . to ( 'SubmitJob' ) ; } /**
     * Grants permission to tag an AWS Batch resource in your account
     *
     * Access Level: Tagging
     *
     * Possible conditions:
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     *
     * https://docs.aws.amazon.com/batch/latest/APIReference/API_TagResource.html
     */ public toTagResource ( ) { return this . to ( 'TagResource' ) ; } /**
     * Grants permission to terminate a job in an AWS Batch job queue in your account
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/batch/latest/APIReference/API_TerminateJob.html
     */ public toTerminateJob ( ) { return this . to ( 'TerminateJob' ) ; } /**
     * Grants permission to untag an AWS Batch resource in your account
     *
     * Access Level: Tagging
     *
     * Possible conditions:
     * - .ifAwsTagKeys()
     *
     * https://docs.aws.amazon.com/batch/latest/APIReference/API_UntagResource.html
     */ public toUntagResource ( ) { return this . to ( 'UntagResource' ) ; } /**
     * Grants permission to update an AWS Batch compute environment in your account
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/batch/latest/APIReference/API_UpdateComputeEnvironment.html
     */ public toUpdateComputeEnvironment ( ) { return this . to ( 'UpdateComputeEnvironment' ) ; } /**
     * Grants permission to update an AWS Batch job queue in your account
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/batch/latest/APIReference/API_UpdateJobQueue.html
     */ public toUpdateJobQueue ( ) { return this . to ( 'UpdateJobQueue' ) ; } /**
     * Grants permission to update an AWS Batch scheduling policy in your account
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/batch/latest/APIReference/API_UpdateSchedulingPolicy.html
     */ public toUpdateSchedulingPolicy ( ) { return this . to ( 'UpdateSchedulingPolicy' ) ; } protected accessLevelList : AccessLevelList = { Write : [ 'CancelJob' , 'CreateComputeEnvironment' , 'CreateJobQueue' , 'CreateSchedulingPolicy' , 'DeleteComputeEnvironment' , 'DeleteJobQueue' , 'DeleteSchedulingPolicy' , 'DeregisterJobDefinition' , 'RegisterJobDefinition' , 'SubmitJob' , 'TerminateJob' , 'UpdateComputeEnvironment' , 'UpdateJobQueue' , 'UpdateSchedulingPolicy' ] , Read : [ 'DescribeComputeEnvironments' , 'DescribeJobDefinitions' , 'DescribeJobQueues' , 'DescribeJobs' , 'DescribeSchedulingPolicies' , 'ListSchedulingPolicies' , 'ListTagsForResource' ] , List : [ 'ListJobs' ] , Tagging : [ 'TagResource' , 'UntagResource' ] } ; param computeEnvironmentName param account param region param partition public onComputeEnvironment ( computeEnvironmentName , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:batch:${ region || '*' }:${ account || '*' }:compute-environment/${ computeEnvironmentName }` ) ; } param jobQueueName param account param region param partition public onJobQueue ( jobQueueName , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:batch:${ region || '*' }:${ account || '*' }:job-queue/${ jobQueueName }` ) ; } param jobDefinitionName param revision param account param region param partition public onJobDefinition ( jobDefinitionName , revision , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:batch:${ region || '*' }:${ account || '*' }:job-definition/${ jobDefinitionName }:${ revision }` ) ; } param jobId param account param region param partition public onJob ( jobId , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:batch:${ region || '*' }:${ account || '*' }:job/${ jobId }` ) ; } param schedulingPolicyName param account param region param partition public onSchedulingPolicy ( schedulingPolicyName , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:batch:${ region || '*' }:${ account || '*' }:scheduling-policy/${ schedulingPolicyName }` ) ; } param value public ifAWSLogsCreateGroup ( value ? ) { return this . if ( `AWSLogsCreateGroup` , ( typeof value !== 'undefined' ? value : true ) , 'Bool' ) ; } param value param operator public ifAWSLogsGroup ( value , operator ? ) { return this . if ( `AWSLogsGroup` , value , operator || 'StringLike' ) ; } param value param operator public ifAWSLogsRegion ( value , operator ? ) { return this . if ( `AWSLogsRegion` , value , operator || 'StringLike' ) ; } param value param operator public ifAWSLogsStreamPrefix ( value , operator ? ) { return this . if ( `AWSLogsStreamPrefix` , value , operator || 'StringLike' ) ; } param value param operator public ifImage ( value , operator ? ) { return this . if ( `Image` , value , operator || 'StringLike' ) ; } param value param operator public ifLogDriver ( value , operator ? ) { return this . if ( `LogDriver` , value , operator || 'StringLike' ) ; } param value public ifPrivileged ( value ? ) { return this . if ( `Privileged` , ( typeof value !== 'undefined' ? value : true ) , 'Bool' ) ; } param value param operator public ifShareIdentifier ( value , operator ? ) { return this . if ( `ShareIdentifier` , value , operator || 'StringLike' ) ; } param value param operator public ifUser ( value , operator ? ) { return this . if ( `User` , value , operator || 'StringLike' ) ; } }