import { AccessLevelList } from '../shared/access-level' ; import { PolicyStatement } from '../shared' ; param sid export class SnowDeviceManagement extends PolicyStatement { public servicePrefix = 'snow-device-management' ; param sid constructor ( sid ? ) { super ( sid ) ; } /**
     * Grants permission to cancel tasks on remote devices
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/snowball/latest/snowcone-guide/sdms-cli-cancel-task.html
     */ public toCancelTask ( ) { return this . to ( 'CancelTask' ) ; } /**
     * Grants permission to create tasks on remote devices
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     *
     * https://docs.aws.amazon.com/snowball/latest/snowcone-guide/sdms-cli-create-task.html
     */ public toCreateTask ( ) { return this . to ( 'CreateTask' ) ; } /**
     * Grants permission to describe a remotely-managed device
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/snowball/latest/snowcone-guide/sdms-cli-describe-device.html
     */ public toDescribeDevice ( ) { return this . to ( 'DescribeDevice' ) ; } /**
     * Grants permission to describe a remotely-managed device's EC2 instances
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/snowball/latest/snowcone-guide/sdms-cli-describe-ec2-instances.html
     */ public toDescribeDeviceEc2Instances ( ) { return this . to ( 'DescribeDeviceEc2Instances' ) ; } /**
     * Grants permission to describe task executions
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/snowball/latest/snowcone-guide/sdms-cli-describe-execution.html
     */ public toDescribeExecution ( ) { return this . to ( 'DescribeExecution' ) ; } /**
     * Grants permission to describe a task
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/snowball/latest/snowcone-guide/sdms-cli-describe-task.html
     */ public toDescribeTask ( ) { return this . to ( 'DescribeTask' ) ; } /**
     * Grants permission to list a remotely-managed device's resources
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/snowball/latest/snowcone-guide/sdms-cli-list-device-resources.html
     */ public toListDeviceResources ( ) { return this . to ( 'ListDeviceResources' ) ; } /**
     * Grants permission to list remotely-managed devices
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/snowball/latest/snowcone-guide/sdms-cli-list-devices.html
     */ public toListDevices ( ) { return this . to ( 'ListDevices' ) ; } /**
     * Grants permission to list task executions
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/snowball/latest/snowcone-guide/sdms-cli-list-executions.html
     */ public toListExecutions ( ) { return this . to ( 'ListExecutions' ) ; } /**
     * Grants permission to list the tags for a resource (device or task)
     *
     * Access Level: Read
     *
     * Possible conditions:
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     *
     * https://docs.aws.amazon.com/snowball/latest/snowcone-guide/sdms-cli-list-tags-for-resource.html
     */ public toListTagsForResource ( ) { return this . to ( 'ListTagsForResource' ) ; } /**
     * Grants permission to list tasks
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/snowball/latest/snowcone-guide/sdms-cli-list-tasks.html
     */ public toListTasks ( ) { return this . to ( 'ListTasks' ) ; } /**
     * Grants permission to tag a resource
     *
     * Access Level: Tagging
     *
     * Possible conditions:
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     *
     * https://docs.aws.amazon.com/snowball/latest/snowcone-guide/sdms-cli-tag-resource.html
     */ public toTagResource ( ) { return this . to ( 'TagResource' ) ; } /**
     * Grants permission to untag a resource
     *
     * Access Level: Tagging
     *
     * Possible conditions:
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     *
     * https://docs.aws.amazon.com/snowball/latest/snowcone-guide/sdms-cli-untag-resources.html
     */ public toUntagResource ( ) { return this . to ( 'UntagResource' ) ; } protected accessLevelList : AccessLevelList = { Write : [ 'CancelTask' , 'CreateTask' ] , Read : [ 'DescribeDevice' , 'DescribeDeviceEc2Instances' , 'DescribeExecution' , 'DescribeTask' , 'ListTagsForResource' ] , List : [ 'ListDeviceResources' , 'ListDevices' , 'ListExecutions' , 'ListTasks' ] , Tagging : [ 'TagResource' , 'UntagResource' ] } ; param resourceId param account param region param partition public onManagedDevice ( resourceId , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:snow-device-management:${ region || '*' }:${ account || '*' }:managed-device/${ resourceId }` ) ; } param resourceId param account param region param partition public onTask ( resourceId , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:snow-device-management:${ region || '*' }:${ account || '*' }:task/${ resourceId }` ) ; } }