import { AccessLevelList } from '../shared/access-level' ; import { PolicyStatement } from '../shared' ; param sid export class Iot1click extends PolicyStatement { public servicePrefix = 'iot1click' ; param sid constructor ( sid ? ) { super ( sid ) ; } /**
     * Grants permission to associate a device to a placement
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/iot-1-click/latest/projects-apireference/API_AssociateDeviceWithPlacement.html
     */ public toAssociateDeviceWithPlacement ( ) { return this . to ( 'AssociateDeviceWithPlacement' ) ; } /**
     * Grants permission to claim a batch of devices with a claim code
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/iot-1-click/1.0/devices-apireference/claims-claimcode.html
     */ public toClaimDevicesByClaimCode ( ) { return this . to ( 'ClaimDevicesByClaimCode' ) ; } /**
     * Grants permission to create a new placement in a project
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/iot-1-click/latest/projects-apireference/API_CreatePlacement.html
     */ public toCreatePlacement ( ) { return this . to ( 'CreatePlacement' ) ; } /**
     * Grants permission to create a new project
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     *
     * https://docs.aws.amazon.com/iot-1-click/latest/projects-apireference/API_CreateProject.html
     */ public toCreateProject ( ) { return this . to ( 'CreateProject' ) ; } /**
     * Grants permission to delete a placement from a project
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/iot-1-click/latest/projects-apireference/API_DeletePlacement.html
     */ public toDeletePlacement ( ) { return this . to ( 'DeletePlacement' ) ; } /**
     * Grants permission to delete a project
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/iot-1-click/latest/projects-apireference/API_DeleteProject.html
     */ public toDeleteProject ( ) { return this . to ( 'DeleteProject' ) ; } /**
     * Grants permission to describe a device
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/iot-1-click/1.0/devices-apireference/devices-deviceid.html
     */ public toDescribeDevice ( ) { return this . to ( 'DescribeDevice' ) ; } /**
     * Grants permission to describe a placement
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/iot-1-click/latest/projects-apireference/API_DescribePlacement.html
     */ public toDescribePlacement ( ) { return this . to ( 'DescribePlacement' ) ; } /**
     * Grants permission to describe a project
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/iot-1-click/latest/projects-apireference/API_DescribeProject.html
     */ public toDescribeProject ( ) { return this . to ( 'DescribeProject' ) ; } /**
     * Grants permission to disassociate a device from a placement
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/iot-1-click/latest/projects-apireference/API_DissacociateDeviceFromPlacement.html
     */ public toDisassociateDeviceFromPlacement ( ) { return this . to ( 'DisassociateDeviceFromPlacement' ) ; } /**
     * Grants permission to finalize a device claim
     *
     * Access Level: Read
     *
     * Possible conditions:
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     *
     * https://docs.aws.amazon.com/iot-1-click/1.0/devices-apireference/devices-deviceid-finalize-claim.html
     */ public toFinalizeDeviceClaim ( ) { return this . to ( 'FinalizeDeviceClaim' ) ; } /**
     * Grants permission to get available methods of a device
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/iot-1-click/1.0/devices-apireference/devices-deviceid-methods.html
     */ public toGetDeviceMethods ( ) { return this . to ( 'GetDeviceMethods' ) ; } /**
     * Grants permission to get devices associated to a placement
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/iot-1-click/latest/projects-apireference/API_GetDevicesInPlacement.html
     */ public toGetDevicesInPlacement ( ) { return this . to ( 'GetDevicesInPlacement' ) ; } /**
     * Grants permission to initialize a device claim
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/iot-1-click/1.0/devices-apireference/devices-deviceid-initiate-claim.html
     */ public toInitiateDeviceClaim ( ) { return this . to ( 'InitiateDeviceClaim' ) ; } /**
     * Grants permission to invoke a device method
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/iot-1-click/1.0/devices-apireference/devices-deviceid-methods.html
     */ public toInvokeDeviceMethod ( ) { return this . to ( 'InvokeDeviceMethod' ) ; } /**
     * Grants permission to list past events published by a device
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/iot-1-click/1.0/devices-apireference/devices-deviceid-events.html
     */ public toListDeviceEvents ( ) { return this . to ( 'ListDeviceEvents' ) ; } /**
     * Grants permission to list all devices
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/iot-1-click/1.0/devices-apireference/devices.html
     */ public toListDevices ( ) { return this . to ( 'ListDevices' ) ; } /**
     * Grants permission to list placements in a project
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/iot-1-click/latest/projects-apireference/API_ListPlacements.html
     */ public toListPlacements ( ) { return this . to ( 'ListPlacements' ) ; } /**
     * Grants permission to list all projects
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/iot-1-click/latest/projects-apireference/API_ListProjects.html
     */ public toListProjects ( ) { return this . to ( 'ListProjects' ) ; } /**
     * Grants permission to lists the tags for a resource
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/iot-1-click/latest/projects-apireference/API_ListTagsForResource.html
     */ public toListTagsForResource ( ) { return this . to ( 'ListTagsForResource' ) ; } /**
     * Grants permission to add or modify the tags of a resource
     *
     * Access Level: Tagging
     *
     * Possible conditions:
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     *
     * https://docs.aws.amazon.com/iot-1-click/latest/projects-apireference/API_TagResource.html
     */ public toTagResource ( ) { return this . to ( 'TagResource' ) ; } /**
     * Grants permission to unclaim a device
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/iot-1-click/1.0/devices-apireference/devices-deviceid-unclaim.html
     */ public toUnclaimDevice ( ) { return this . to ( 'UnclaimDevice' ) ; } /**
     * Grants permission to remove the given tags (metadata) from a resource
     *
     * Access Level: Tagging
     *
     * Possible conditions:
     * - .ifAwsTagKeys()
     *
     * https://docs.aws.amazon.com/iot-1-click/latest/projects-apireference/API_UntagResource.html
     */ public toUntagResource ( ) { return this . to ( 'UntagResource' ) ; } /**
     * Grants permission to update device state
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/iot-1-click/1.0/devices-apireference/devices-deviceid-state.html
     */ public toUpdateDeviceState ( ) { return this . to ( 'UpdateDeviceState' ) ; } /**
     * Grants permission to update a placement
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/iot-1-click/latest/projects-apireference/API_UpdatePlacement.html
     */ public toUpdatePlacement ( ) { return this . to ( 'UpdatePlacement' ) ; } /**
     * Update a project
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/iot-1-click/latest/projects-apireference/API_UpdateProject.html
     */ public toUpdateProject ( ) { return this . to ( 'UpdateProject' ) ; } protected accessLevelList : AccessLevelList = { Write : [ 'AssociateDeviceWithPlacement' , 'CreatePlacement' , 'CreateProject' , 'DeletePlacement' , 'DeleteProject' , 'DisassociateDeviceFromPlacement' , 'InvokeDeviceMethod' , 'UpdateDeviceState' , 'UpdatePlacement' , 'UpdateProject' ] , Read : [ 'ClaimDevicesByClaimCode' , 'DescribeDevice' , 'DescribePlacement' , 'DescribeProject' , 'FinalizeDeviceClaim' , 'GetDeviceMethods' , 'GetDevicesInPlacement' , 'InitiateDeviceClaim' , 'ListDeviceEvents' , 'ListPlacements' , 'ListTagsForResource' , 'UnclaimDevice' ] , List : [ 'ListDevices' , 'ListProjects' ] , Tagging : [ 'TagResource' , 'UntagResource' ] } ; param deviceId param account param region param partition public onDevice ( deviceId , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:iot1click:${ region || '*' }:${ account || '*' }:devices/${ deviceId }` ) ; } param projectName param account param region param partition public onProject ( projectName , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:iot1click:${ region || '*' }:${ account || '*' }:projects/${ projectName }` ) ; } }