import { AccessLevelList } from '../shared/access-level' ; import { PolicyStatement } from '../shared' ; param sid export class GreengrassV2 extends PolicyStatement { public servicePrefix = 'greengrass' ; param sid constructor ( sid ? ) { super ( sid ) ; } /**
     * Grants permission to associate a list of client devices with a core device
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/greengrass/v2/APIReference/API_BatchAssociateClientDeviceWithCoreDevice.html
     */ public toBatchAssociateClientDeviceWithCoreDevice ( ) { return this . to ( 'BatchAssociateClientDeviceWithCoreDevice' ) ; } /**
     * Grants permission to disassociate a list of client devices from a core device
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/greengrass/v2/APIReference/API_BatchDisassociateClientDeviceFromCoreDevice.html
     */ public toBatchDisassociateClientDeviceFromCoreDevice ( ) { return this . to ( 'BatchDisassociateClientDeviceFromCoreDevice' ) ; } /**
     * Grants permission to cancel a deployment
     *
     * Access Level: Write
     *
     * Dependent actions:
     * - iot:CancelJob
     * - iot:DeleteThingShadow
     * - iot:DescribeJob
     * - iot:DescribeThing
     * - iot:DescribeThingGroup
     * - iot:GetThingShadow
     * - iot:UpdateJob
     * - iot:UpdateThingShadow
     *
     * https://docs.aws.amazon.com/greengrass/v2/APIReference/API_CancelDeployment.html
     */ public toCancelDeployment ( ) { return this . to ( 'CancelDeployment' ) ; } /**
     * Grants permission to create a component
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     *
     * https://docs.aws.amazon.com/greengrass/v2/APIReference/API_CreateComponentVersion.html
     */ public toCreateComponentVersion ( ) { return this . to ( 'CreateComponentVersion' ) ; } /**
     * Grants permission to create a deployment
     *
     * Access Level: Write
     *
     * Possible conditions:
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     *
     * Dependent actions:
     * - iot:CancelJob
     * - iot:CreateJob
     * - iot:DeleteThingShadow
     * - iot:DescribeJob
     * - iot:DescribeThing
     * - iot:DescribeThingGroup
     * - iot:GetThingShadow
     * - iot:UpdateJob
     * - iot:UpdateThingShadow
     *
     * https://docs.aws.amazon.com/greengrass/v2/APIReference/API_CreateDeployment.html
     */ public toCreateDeployment ( ) { return this . to ( 'CreateDeployment' ) ; } /**
     * Grants permission to delete a component
     *
     * Access Level: Write
     *
     * https://docs.aws.amazon.com/greengrass/v2/APIReference/API_DeleteComponent.html
     */ public toDeleteComponent ( ) { return this . to ( 'DeleteComponent' ) ; } /**
     * Grants permission to delete a AWS IoT Greengrass core device, which is an AWS IoT thing. This operation removes the core device from the list of core devices. This operation doesn't delete the AWS IoT thing
     *
     * Access Level: Write
     *
     * Dependent actions:
     * - iot:DescribeJobExecution
     *
     * https://docs.aws.amazon.com/greengrass/v2/APIReference/API_DeleteCoreDevice.html
     */ public toDeleteCoreDevice ( ) { return this . to ( 'DeleteCoreDevice' ) ; } /**
     * Grants permission to retrieve metadata for a version of a component
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/greengrass/v2/APIReference/API_DescribeComponent.html
     */ public toDescribeComponent ( ) { return this . to ( 'DescribeComponent' ) ; } /**
     * Grants permission to get the recipe for a version of a component
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/greengrass/v2/APIReference/API_GetComponent.html
     */ public toGetComponent ( ) { return this . to ( 'GetComponent' ) ; } /**
     * Grants permission to get the pre-signed URL to download a public component artifact
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/greengrass/v2/APIReference/API_GetComponentVersionArtifact.html
     */ public toGetComponentVersionArtifact ( ) { return this . to ( 'GetComponentVersionArtifact' ) ; } /**
     * Grants permission to retrieves metadata for a AWS IoT Greengrass core device
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/greengrass/v2/APIReference/API_GetCoreDevice.html
     */ public toGetCoreDevice ( ) { return this . to ( 'GetCoreDevice' ) ; } /**
     * Grants permission to get a deployment
     *
     * Access Level: Read
     *
     * Dependent actions:
     * - iot:DescribeJob
     * - iot:DescribeThing
     * - iot:DescribeThingGroup
     * - iot:GetThingShadow
     *
     * https://docs.aws.amazon.com/greengrass/v2/APIReference/API_GetDeployment.html
     */ public toGetDeployment ( ) { return this . to ( 'GetDeployment' ) ; } /**
     * Grants permission to retrieve a paginated list of client devices associated to a AWS IoT Greengrass core device
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/greengrass/v2/APIReference/API_ListClientDevicesAssociatedWithCoreDevice.html
     */ public toListClientDevicesAssociatedWithCoreDevice ( ) { return this . to ( 'ListClientDevicesAssociatedWithCoreDevice' ) ; } /**
     * Grants permission to retrieve a paginated list of all versions for a component
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/greengrass/v2/APIReference/API_ListComponentVersions.html
     */ public toListComponentVersions ( ) { return this . to ( 'ListComponentVersions' ) ; } /**
     * Grants permission to retrieve a paginated list of component summaries
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/greengrass/v2/APIReference/API_ListComponents.html
     */ public toListComponents ( ) { return this . to ( 'ListComponents' ) ; } /**
     * Grants permission to retrieve a paginated list of AWS IoT Greengrass core devices
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/greengrass/v2/APIReference/API_ListCoreDevices.html
     */ public toListCoreDevices ( ) { return this . to ( 'ListCoreDevices' ) ; } /**
     * Grants permission to retrieves a paginated list of deployments
     *
     * Access Level: List
     *
     * Dependent actions:
     * - iot:DescribeJob
     * - iot:DescribeThing
     * - iot:DescribeThingGroup
     * - iot:GetThingShadow
     *
     * https://docs.aws.amazon.com/greengrass/v2/APIReference/API_ListDeployments.html
     */ public toListDeployments ( ) { return this . to ( 'ListDeployments' ) ; } /**
     * Grants permission to retrieves a paginated list of deployment jobs that AWS IoT Greengrass sends to AWS IoT Greengrass core devices
     *
     * Access Level: List
     *
     * Dependent actions:
     * - iot:DescribeJob
     * - iot:DescribeJobExecution
     * - iot:DescribeThing
     * - iot:DescribeThingGroup
     * - iot:GetThingShadow
     *
     * https://docs.aws.amazon.com/greengrass/v2/APIReference/API_ListEffectiveDeployments.html
     */ public toListEffectiveDeployments ( ) { return this . to ( 'ListEffectiveDeployments' ) ; } /**
     * Grants permission to retrieve a paginated list of the components that a AWS IoT Greengrass core device runs
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/greengrass/v2/APIReference/API_ListInstalledComponents.html
     */ public toListInstalledComponents ( ) { return this . to ( 'ListInstalledComponents' ) ; } /**
     * Grants permission to list the tags for a resource
     *
     * Access Level: Read
     *
     * Possible conditions:
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     *
     * https://docs.aws.amazon.com/greengrass/v2/APIReference/API_ListTagsForResource.html
     */ public toListTagsForResource ( ) { return this . to ( 'ListTagsForResource' ) ; } /**
     * Grants permission to list components that meet the component, version, and platform requirements of a deployment
     *
     * Access Level: List
     *
     * https://docs.aws.amazon.com/greengrass/v2/APIReference/API_ResolveComponentCandidates.html
     */ public toResolveComponentCandidates ( ) { return this . to ( 'ResolveComponentCandidates' ) ; } /**
     * Grants permission to add tags to a resource
     *
     * Access Level: Tagging
     *
     * Possible conditions:
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     *
     * https://docs.aws.amazon.com/greengrass/v2/APIReference/API_TagResource.html
     */ public toTagResource ( ) { return this . to ( 'TagResource' ) ; } /**
     * Grants permission to remove tags from a resource
     *
     * Access Level: Tagging
     *
     * Possible conditions:
     * - .ifAwsRequestTag()
     * - .ifAwsTagKeys()
     *
     * https://docs.aws.amazon.com/greengrass/v2/APIReference/API_UntagResource.html
     */ public toUntagResource ( ) { return this . to ( 'UntagResource' ) ; } protected accessLevelList : AccessLevelList = { Write : [ 'BatchAssociateClientDeviceWithCoreDevice' , 'BatchDisassociateClientDeviceFromCoreDevice' , 'CancelDeployment' , 'CreateComponentVersion' , 'CreateDeployment' , 'DeleteComponent' , 'DeleteCoreDevice' ] , Read : [ 'DescribeComponent' , 'GetComponent' , 'GetComponentVersionArtifact' , 'GetCoreDevice' , 'GetDeployment' , 'ListTagsForResource' ] , List : [ 'ListClientDevicesAssociatedWithCoreDevice' , 'ListComponentVersions' , 'ListComponents' , 'ListCoreDevices' , 'ListDeployments' , 'ListEffectiveDeployments' , 'ListInstalledComponents' , 'ResolveComponentCandidates' ] , Tagging : [ 'TagResource' , 'UntagResource' ] } ; param componentName param account param region param partition public onComponent ( componentName , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:greengrass:${ region || '*' }:${ account || '*' }:components:${ componentName }` ) ; } param componentName param componentVersion param account param region param partition public onComponentVersion ( componentName , componentVersion , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:greengrass:${ region || '*' }:${ account || '*' }:components:${ componentName }:versions:${ componentVersion }` ) ; } param coreDeviceThingName param account param region param partition public onCoreDevice ( coreDeviceThingName , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:greengrass:${ region || '*' }:${ account || '*' }:coreDevices:${ coreDeviceThingName }` ) ; } param deploymentId param account param region param partition public onDeployment ( deploymentId , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:greengrass:${ region || '*' }:${ account || '*' }:deployments:${ deploymentId }` ) ; } }