UNPKG

cdk-iam-floyd

Version:

AWS IAM policy statement generator with fluent interface for AWS CDK

505 lines (504 loc) 20 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 [kinesis](https://docs.aws.amazon.com/service-authorization/latest/reference/list_kinesis.html). * * @param sid [SID](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_sid.html) of the statement */ export declare class Kinesis extends PolicyStatement { servicePrefix: string; /** * Grants permission to add or update tags for the specified Amazon Kinesis stream. Each stream can have up to 50 tags * * Access Level: Tagging, Write * * https://docs.aws.amazon.com/kinesis/latest/APIReference/API_AddTagsToStream.html */ toAddTagsToStream(): this; /** * Grants permission to create a Amazon Kinesis stream * * Access Level: Write * * https://docs.aws.amazon.com/kinesis/latest/APIReference/API_CreateStream.html */ toCreateStream(): this; /** * Grants permission to decrease the stream's retention period, which is the length of time data records are accessible after they are added to the stream * * Access Level: Write * * https://docs.aws.amazon.com/kinesis/latest/APIReference/API_DecreaseStreamRetentionPeriod.html */ toDecreaseStreamRetentionPeriod(): this; /** * Grants permission to delete a resource policy associated with a specified stream or consumer * * Access Level: Write * * https://docs.aws.amazon.com/kinesis/latest/APIReference/API_DeleteResourcePolicy.html */ toDeleteResourcePolicy(): this; /** * Grants permission to delete a stream and all its shards and data * * Access Level: Write * * https://docs.aws.amazon.com/kinesis/latest/APIReference/API_DeleteStream.html */ toDeleteStream(): this; /** * Grants permission to deregister a stream consumer with a Kinesis data stream * * Access Level: Write * * https://docs.aws.amazon.com/kinesis/latest/APIReference/API_DeregisterStreamConsumer.html */ toDeregisterStreamConsumer(): this; /** * Grants permission to describe the account-level settings for Amazon Kinesis Data Streams * * Access Level: Read * * https://docs.aws.amazon.com/kinesis/latest/APIReference/API_DescribeAccountSettings.html */ toDescribeAccountSettings(): this; /** * Grants permission to describe the shard limits and usage for the account * * Access Level: Read * * https://docs.aws.amazon.com/kinesis/latest/APIReference/API_DescribeLimits.html */ toDescribeLimits(): this; /** * Grants permission to describe the specified stream * * Access Level: Read * * https://docs.aws.amazon.com/kinesis/latest/APIReference/API_DescribeStream.html */ toDescribeStream(): this; /** * Grants permission to get the description of a registered stream consumer * * Access Level: Read * * https://docs.aws.amazon.com/kinesis/latest/APIReference/API_DescribeStreamConsumer.html */ toDescribeStreamConsumer(): this; /** * Grants permission to provide a summarized description of the specified Kinesis data stream without the shard list * * Access Level: Read * * https://docs.aws.amazon.com/kinesis/latest/APIReference/API_DescribeStreamSummary.html */ toDescribeStreamSummary(): this; /** * Grants permission to disables enhanced monitoring * * Access Level: Write * * https://docs.aws.amazon.com/kinesis/latest/APIReference/API_DisableEnhancedMonitoring.html */ toDisableEnhancedMonitoring(): this; /** * Grants permission to enable enhanced Kinesis data stream monitoring for shard-level metrics * * Access Level: Write * * https://docs.aws.amazon.com/kinesis/latest/APIReference/API_EnableEnhancedMonitoring.html */ toEnableEnhancedMonitoring(): this; /** * Grants permission to get data records from a shard * * Access Level: Read * * https://docs.aws.amazon.com/kinesis/latest/APIReference/API_GetRecords.html */ toGetRecords(): this; /** * Grants permission to get a resource policy associated with a specified stream or consumer * * Access Level: Read * * https://docs.aws.amazon.com/kinesis/latest/APIReference/API_GetResourcePolicy.html */ toGetResourcePolicy(): this; /** * Grants permission to get a shard iterator. A shard iterator expires five minutes after it is returned to the requester * * Access Level: Read * * https://docs.aws.amazon.com/kinesis/latest/APIReference/API_GetShardIterator.html */ toGetShardIterator(): this; /** * Grants permission to increase the stream's retention period, which is the length of time data records are accessible after they are added to the stream * * Access Level: Write * * https://docs.aws.amazon.com/kinesis/latest/APIReference/API_IncreaseStreamRetentionPeriod.html */ toIncreaseStreamRetentionPeriod(): this; /** * Grants permission to list the shards in a stream and provides information about each shard * * Access Level: List * * https://docs.aws.amazon.com/kinesis/latest/APIReference/API_ListShards.html */ toListShards(): this; /** * Grants permission to list the stream consumers registered to receive data from a Kinesis stream using enhanced fan-out, and provides information about each consumer * * Access Level: List * * https://docs.aws.amazon.com/kinesis/latest/APIReference/API_ListStreamConsumers.html */ toListStreamConsumers(): this; /** * Grants permission to list your streams * * Access Level: List * * https://docs.aws.amazon.com/kinesis/latest/APIReference/API_ListStreams.html */ toListStreams(): this; /** * Grants permission to list the tags for the specified Amazon Kinesis resource * * Access Level: Read * * https://docs.aws.amazon.com/kinesis/latest/APIReference/API_ListTagsForResource.html */ toListTagsForResource(): this; /** * Grants permission to list the tags for the specified Amazon Kinesis stream * * Access Level: Read * * https://docs.aws.amazon.com/kinesis/latest/APIReference/API_ListTagsForStream.html */ toListTagsForStream(): this; /** * Grants permission to merge two adjacent shards in a stream and combines them into a single shard to reduce the stream's capacity to ingest and transport data * * Access Level: Write * * https://docs.aws.amazon.com/kinesis/latest/APIReference/API_MergeShards.html */ toMergeShards(): this; /** * Grants permission to write a single data record from a producer into an Amazon Kinesis stream * * Access Level: Write * * https://docs.aws.amazon.com/kinesis/latest/APIReference/API_PutRecord.html */ toPutRecord(): this; /** * Grants permission to write multiple data records from a producer into an Amazon Kinesis stream in a single call (also referred to as a PutRecords request) * * Access Level: Write * * https://docs.aws.amazon.com/kinesis/latest/APIReference/API_PutRecords.html */ toPutRecords(): this; /** * Grants permission to attach a resource policy to a specified stream or consumer * * Access Level: Write * * https://docs.aws.amazon.com/kinesis/latest/APIReference/API_PutResourcePolicy.html */ toPutResourcePolicy(): this; /** * Grants permission to register a stream consumer with a Kinesis data stream * * Access Level: Write * * https://docs.aws.amazon.com/kinesis/latest/APIReference/API_RegisterStreamConsumer.html */ toRegisterStreamConsumer(): this; /** * Grants permission to remove tags from the specified Kinesis data stream. Removed tags are deleted and cannot be recovered after this operation successfully completes * * Access Level: Tagging, Write * * https://docs.aws.amazon.com/kinesis/latest/APIReference/API_RemoveTagsFromStream.html */ toRemoveTagsFromStream(): this; /** * Grants permission to split a shard into two new shards in the Kinesis data stream, to increase the stream's capacity to ingest and transport data * * Access Level: Write * * https://docs.aws.amazon.com/kinesis/latest/APIReference/API_SplitShard.html */ toSplitShard(): this; /** * Grants permission to enable or update server-side encryption using an AWS KMS key for a specified stream * * Access Level: Write * * https://docs.aws.amazon.com/kinesis/latest/APIReference/API_StartStreamEncryption.html */ toStartStreamEncryption(): this; /** * Grants permission to disable server-side encryption for a specified stream * * Access Level: Write * * https://docs.aws.amazon.com/kinesis/latest/APIReference/API_StopStreamEncryption.html */ toStopStreamEncryption(): this; /** * Grants permission to listen to a specific shard with enhanced fan-out * * Access Level: Read * * https://docs.aws.amazon.com/kinesis/latest/APIReference/API_SubscribeToShard.html */ toSubscribeToShard(): this; /** * Grants permission to add or update tags for the specified Amazon Kinesis resource. Each resource can have up to 50 tags * * Access Level: Tagging, Write * * https://docs.aws.amazon.com/kinesis/latest/APIReference/API_TagResource.html */ toTagResource(): this; /** * Grants permission to remove tags from the specified Kinesis data resource. Removed tags are deleted and cannot be recovered after this operation successfully completes * * Access Level: Tagging, Write * * https://docs.aws.amazon.com/kinesis/latest/APIReference/API_UntagResource.html */ toUntagResource(): this; /** * Grants permission to update the account-level settings for Amazon Kinesis Data Streams * * Access Level: Write * * https://docs.aws.amazon.com/kinesis/latest/APIReference/API_UpdateAccountSettings.html */ toUpdateAccountSettings(): this; /** * Grants permission to update the maximum record size for a Kinesis data stream * * Access Level: Write * * https://docs.aws.amazon.com/kinesis/latest/APIReference/API_UpdateMaxRecordSize.html */ toUpdateMaxRecordSize(): this; /** * Grants permission to update the shard count of the specified stream to the specified number of shards * * Access Level: Write * * https://docs.aws.amazon.com/kinesis/latest/APIReference/API_UpdateShardCount.html */ toUpdateShardCount(): this; /** * Grants permission to update the capacity mode of the data stream * * Access Level: Write * * https://docs.aws.amazon.com/kinesis/latest/APIReference/API_UpdateStreamMode.html */ toUpdateStreamMode(): this; /** * Grants permission to update the warm throughput for a Kinesis on-demand data stream * * Access Level: Write * * https://docs.aws.amazon.com/kinesis/latest/APIReference/API_UpdateStreamWarmThroughput.html */ toUpdateStreamWarmThroughput(): this; /** * Grants permission to temporarily inject errors for target API requests * * Access Level: Write * * Possible conditions: * - .ifFisActionId() * - .ifFisInjectPercentage() * - .ifFisTargetArns() * * https://docs.aws.amazon.com/fis/latest/userguide/fis-actions-reference.html */ toInjectApiError(): this; protected accessLevelList: AccessLevelList; /** * Adds a resource of type consumer to the statement * * https://docs.aws.amazon.com/streams/latest/dev/key-concepts.html#enabled-application * * @param streamType - Identifier for the streamType. * @param streamName - Identifier for the streamName. * @param consumerName - Identifier for the consumerName. * @param consumerCreationTimpstamp - Identifier for the consumerCreationTimpstamp. * @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() */ onConsumer(streamType: string, streamName: string, consumerName: string, consumerCreationTimpstamp: string, account?: string, region?: string, partition?: string): this; /** * Adds a resource of type kmsKey to the statement * * https://docs.aws.amazon.com/streams/latest/dev/server-side-encryption.html * * @param keyId - Identifier for the keyId. * @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() */ onKmsKey(keyId: string, account?: string, region?: string, partition?: string): this; /** * Adds a resource of type stream to the statement * * https://docs.aws.amazon.com/streams/latest/dev/key-concepts.html#stream * * @param streamName - Identifier for the streamName. * @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() */ onStream(streamName: string, account?: string, region?: string, partition?: string): this; /** * Filters access by the presence of tag key-value pairs in the request * * https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-requesttag * * Applies to actions: * - .toAddTagsToStream() * - .toCreateStream() * - .toRegisterStreamConsumer() * - .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 access by tag key-value pairs attached to the resource * * https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-resourcetag * * Applies to actions: * - .toAddTagsToStream() * - .toCreateStream() * - .toDecreaseStreamRetentionPeriod() * - .toDeleteResourcePolicy() * - .toDeleteStream() * - .toDeregisterStreamConsumer() * - .toDescribeStream() * - .toDescribeStreamConsumer() * - .toDescribeStreamSummary() * - .toGetRecords() * - .toGetResourcePolicy() * - .toGetShardIterator() * - .toIncreaseStreamRetentionPeriod() * - .toListShards() * - .toListStreamConsumers() * - .toListTagsForResource() * - .toListTagsForStream() * - .toMergeShards() * - .toPutRecord() * - .toPutRecords() * - .toPutResourcePolicy() * - .toRegisterStreamConsumer() * - .toRemoveTagsFromStream() * - .toSplitShard() * - .toStartStreamEncryption() * - .toStopStreamEncryption() * - .toSubscribeToShard() * - .toTagResource() * - .toUntagResource() * - .toUpdateMaxRecordSize() * - .toUpdateStreamWarmThroughput() * * Applies to resource types: * - consumer * - kmsKey * - stream * * @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 access by the presence of tag keys in the request * * https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-tagkeys * * Applies to actions: * - .toAddTagsToStream() * - .toCreateStream() * - .toRegisterStreamConsumer() * - .toRemoveTagsFromStream() * - .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; /** * Filters access by the ID of an AWS FIS action * * https://docs.aws.amazon.com/fis/latest/userguide/fis-actions-reference.html * * Applies to actions: * - .toInjectApiError() * * @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` */ ifFisActionId(value: string | string[], operator?: Operator | string): this; /** * Filters access by the percentage of calls being affected by an AWS FIS action * * https://docs.aws.amazon.com/fis/latest/userguide/fis-actions-reference.html * * Applies to actions: * - .toInjectApiError() * * @param value The value(s) to check * @param operator Works with [numeric operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_Numeric). **Default:** `NumericEquals` */ ifFisInjectPercentage(value: number | number[], operator?: Operator | string): this; /** * Filters access by the ARN of an AWS FIS target * * https://docs.aws.amazon.com/fis/latest/userguide/fis-actions-reference.html * * Applies to actions: * - .toInjectApiError() * * @param value The value(s) to check * @param operator Works with [arn operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_ARN). **Default:** `ArnLike` */ ifFisTargetArns(value: string | string[], operator?: Operator | string): this; /** * Statement provider for service [kinesis](https://docs.aws.amazon.com/service-authorization/latest/reference/list_kinesis.html). * */ constructor(props?: iam.PolicyStatementProps); }