cdk-iam-floyd
Version:
AWS IAM policy statement generator with fluent interface for AWS CDK
244 lines (243 loc) • 9.27 kB
TypeScript
import { AccessLevelList } from '../../shared/access-level';
import { PolicyStatement, Operator } from '../../shared';
import { aws_iam as iam } from "aws-cdk-lib";
/**
* Statement provider for service [sqs](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonsqs.html).
*
* @param sid [SID](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_sid.html) of the statement
*/
export declare class Sqs extends PolicyStatement {
servicePrefix: string;
/**
* Grants permission to a queue for a specific principal
*
* Access Level: Permissions management
*
* https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_AddPermission.html
*/
toAddPermission(): this;
/**
* Grants permission to cancel an in progress message move task
*
* Access Level: Write
*
* https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_CancelMessageMoveTask.html
*/
toCancelMessageMoveTask(): this;
/**
* Grants permission to change the visibility timeout of a specified message in a queue to a new value
*
* Access Level: Write
*
* https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_ChangeMessageVisibility.html
*/
toChangeMessageVisibility(): this;
/**
* Grants permission to create a new queue, or returns the URL of an existing one
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsRequestTag()
* - .ifAwsTagKeys()
*
* https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_CreateQueue.html
*/
toCreateQueue(): this;
/**
* Grants permission to delete the specified message from the specified queue
*
* Access Level: Write
*
* https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_DeleteMessage.html
*/
toDeleteMessage(): this;
/**
* Grants permission to delete the queue specified by the queue URL, regardless of whether the queue is empty
*
* Access Level: Write
*
* https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_DeleteQueue.html
*/
toDeleteQueue(): this;
/**
* Grants permission to get attributes for the specified queue
*
* Access Level: Read
*
* https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_GetQueueAttributes.html
*/
toGetQueueAttributes(): this;
/**
* Grants permission to return the URL of an existing queue
*
* Access Level: Read
*
* https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_GetQueueUrl.html
*/
toGetQueueUrl(): this;
/**
* Grants permission to return a list of your queues that have the RedrivePolicy queue attribute configured with a dead letter queue
*
* Access Level: Read
*
* https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_ListDeadLetterSourceQueues.html
*/
toListDeadLetterSourceQueues(): this;
/**
* Grants permission to list message move tasks
*
* Access Level: Read
*
* https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_ListMessageMoveTasks.html
*/
toListMessageMoveTasks(): this;
/**
* Grants permission to list tags added to an SQS queue
*
* Access Level: Read
*
* https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_ListQueueTags.html
*/
toListQueueTags(): this;
/**
* Grants permission to return a list of your queues
*
* Access Level: Read
*
* https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_ListQueues.html
*/
toListQueues(): this;
/**
* Grants permission to delete the messages in a queue specified by the queue URL
*
* Access Level: Write
*
* https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_PurgeQueue.html
*/
toPurgeQueue(): this;
/**
* Grants permission to retrieve one or more messages, with a maximum limit of 10 messages, from the specified queue
*
* Access Level: Read
*
* https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_ReceiveMessage.html
*/
toReceiveMessage(): this;
/**
* Grants permission to revoke any permissions in the queue policy that matches the specified Label parameter
*
* Access Level: Permissions management
*
* https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_RemovePermission.html
*/
toRemovePermission(): this;
/**
* Grants permission to deliver a message to the specified queue
*
* Access Level: Write
*
* https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SendMessage.html
*/
toSendMessage(): this;
/**
* Grants permission to set the value of one or more queue attributes
*
* Access Level: Write
*
* https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SetQueueAttributes.html
*/
toSetQueueAttributes(): this;
/**
* Grants permission to start a message move task
*
* Access Level: Write
*
* https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_StartMessageMoveTask.html
*/
toStartMessageMoveTask(): this;
/**
* Grants permission to add tags to the specified SQS queue
*
* Access Level: Tagging
*
* Possible conditions:
* - .ifAwsRequestTag()
* - .ifAwsTagKeys()
*
* https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_TagQueue.html
*/
toTagQueue(): this;
/**
* Grants permission to remove tags from the specified SQS queue
*
* Access Level: Tagging
*
* Possible conditions:
* - .ifAwsTagKeys()
*
* https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_UntagQueue.html
*/
toUntagQueue(): this;
protected accessLevelList: AccessLevelList;
/**
* Adds a resource of type queue to the statement
*
* https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-queue-types.html
*
* @param queueName - Identifier for the queueName.
* @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()
*/
onQueue(queueName: string, account?: string, region?: string, partition?: string): this;
/**
* Filters access by 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:
* - .toCreateQueue()
* - .toTagQueue()
*
* @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 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:
* - queue
*
* @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 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:
* - .toCreateQueue()
* - .toTagQueue()
* - .toUntagQueue()
*
* @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 [sqs](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonsqs.html).
*
*/
constructor(props?: iam.PolicyStatementProps);
}