UNPKG

cdk-iam-floyd

Version:

AWS IAM policy statement generator with fluent interface for AWS CDK

313 lines (312 loc) 11.3 kB
import { AccessLevelList } from '../../shared/access-level'; import { PolicyStatement, Operator } from '../../shared'; import { aws_iam as iam } from "aws-cdk-lib"; /** * Statement provider for service [iot1click](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot1-click.html). * * @param sid [SID](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_sid.html) of the statement */ export declare class Iot1click extends PolicyStatement { servicePrefix: string; /** * 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 */ toAssociateDeviceWithPlacement(): this; /** * 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 */ toClaimDevicesByClaimCode(): this; /** * 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 */ toCreatePlacement(): this; /** * 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 */ toCreateProject(): this; /** * 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 */ toDeletePlacement(): this; /** * Grants permission to delete a project * * Access Level: Write * * https://docs.aws.amazon.com/iot-1-click/latest/projects-apireference/API_DeleteProject.html */ toDeleteProject(): this; /** * Grants permission to describe a device * * Access Level: Read * * https://docs.aws.amazon.com/iot-1-click/1.0/devices-apireference/devices-deviceid.html */ toDescribeDevice(): this; /** * Grants permission to describe a placement * * Access Level: Read * * https://docs.aws.amazon.com/iot-1-click/latest/projects-apireference/API_DescribePlacement.html */ toDescribePlacement(): this; /** * Grants permission to describe a project * * Access Level: Read * * https://docs.aws.amazon.com/iot-1-click/latest/projects-apireference/API_DescribeProject.html */ toDescribeProject(): this; /** * Grants permission to disassociate a device from a placement * * Access Level: Write * * https://docs.aws.amazon.com/iot-1-click/latest/projects-apireference/API_DisassociateDeviceFromPlacement.html */ toDisassociateDeviceFromPlacement(): this; /** * 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 */ toFinalizeDeviceClaim(): this; /** * 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 */ toGetDeviceMethods(): this; /** * 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 */ toGetDevicesInPlacement(): this; /** * 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 */ toInitiateDeviceClaim(): this; /** * 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 */ toInvokeDeviceMethod(): this; /** * 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 */ toListDeviceEvents(): this; /** * Grants permission to list all devices * * Access Level: List * * https://docs.aws.amazon.com/iot-1-click/1.0/devices-apireference/devices.html */ toListDevices(): this; /** * 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 */ toListPlacements(): this; /** * Grants permission to list all projects * * Access Level: List * * https://docs.aws.amazon.com/iot-1-click/latest/projects-apireference/API_ListProjects.html */ toListProjects(): this; /** * 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 */ toListTagsForResource(): this; /** * 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 */ toTagResource(): this; /** * 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 */ toUnclaimDevice(): this; /** * 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 */ toUntagResource(): this; /** * 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 */ toUpdateDeviceState(): this; /** * Grants permission to update a placement * * Access Level: Write * * https://docs.aws.amazon.com/iot-1-click/latest/projects-apireference/API_UpdatePlacement.html */ toUpdatePlacement(): this; /** * Update a project * * Access Level: Write * * https://docs.aws.amazon.com/iot-1-click/latest/projects-apireference/API_UpdateProject.html */ toUpdateProject(): this; protected accessLevelList: AccessLevelList; /** * Adds a resource of type device to the statement * * https://docs.aws.amazon.com/iot-1-click/1.0/devices-apireference/resources.html * * @param deviceId - Identifier for the deviceId. * @param account - Account of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's account. * @param region - Region of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's region. * @param partition - Partition of the AWS account [aws, aws-cn, aws-us-gov]; defaults to `aws`, unless using the CDK, where the default is the current Stack's partition. * * Possible conditions: * - .ifAwsResourceTag() */ onDevice(deviceId: string, account?: string, region?: string, partition?: string): this; /** * Adds a resource of type project to the statement * * https://docs.aws.amazon.com/iot-1-click/latest/projects-apireference/API_Operations.html * * @param projectName - Identifier for the projectName. * @param account - Account of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's account. * @param region - Region of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's region. * @param partition - Partition of the AWS account [aws, aws-cn, aws-us-gov]; defaults to `aws`, unless using the CDK, where the default is the current Stack's partition. * * Possible conditions: * - .ifAwsResourceTag() */ onProject(projectName: string, account?: string, region?: string, partition?: string): this; /** * Filters actions based on the tags that are passed in the request * * https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-requesttag * * Applies to actions: * - .toCreateProject() * - .toFinalizeDeviceClaim() * - .toTagResource() * * @param tagKey The tag key to check * @param value The value(s) to check * @param operator Works with [string operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_String). **Default:** `StringLike` */ ifAwsRequestTag(tagKey: string, value: string | string[], operator?: Operator | string): this; /** * Filters actions based on the tags associated with the resource * * https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-resourcetag * * Applies to resource types: * - device * - project * * @param tagKey The tag key to check * @param value The value(s) to check * @param operator Works with [string operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_String). **Default:** `StringLike` */ ifAwsResourceTag(tagKey: string, value: string | string[], operator?: Operator | string): this; /** * Filters actions based on the tag keys that are passed in the request * * https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-tagkeys * * Applies to actions: * - .toCreateProject() * - .toFinalizeDeviceClaim() * - .toTagResource() * - .toUntagResource() * * @param value The value(s) to check * @param operator Works with [string operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_String). **Default:** `StringLike` */ ifAwsTagKeys(value: string | string[], operator?: Operator | string): this; /** * Statement provider for service [iot1click](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot1-click.html). * */ constructor(props?: iam.PolicyStatementProps); }