aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
57 lines (56 loc) • 1.79 kB
TypeScript
import * as sqs from "./sqs.generated";
import * as iam from "../../aws-iam";
/**
* Collection of grant methods for a IQueueRef
*/
export declare class QueueGrants {
/**
* Creates grants for QueueGrants
*/
static fromQueue(resource: sqs.IQueueRef): QueueGrants;
protected readonly resource: sqs.IQueueRef;
protected readonly encryptedResource?: iam.IEncryptedResource;
protected readonly policyResource?: iam.IResourceWithPolicyV2;
private constructor();
/**
* Grant permissions to consume messages from a queue
*
* This will grant the following permissions:
*
* - sqs:ChangeMessageVisibility
* - sqs:DeleteMessage
* - sqs:ReceiveMessage
* - sqs:GetQueueAttributes
* - sqs:GetQueueUrl
*
* If encryption is used, permission to use the key to decrypt the contents of the queue will also be granted to the same principal.
*
* This will grant the following KMS permissions:
*
* - kms:Decrypt
*/
consumeMessages(grantee: iam.IGrantable): iam.Grant;
/**
* Grant access to send messages to a queue to the given identity.
*
* This will grant the following permissions:
*
* - sqs:SendMessage
* - sqs:GetQueueAttributes
* - sqs:GetQueueUrl
*
* If encryption is used, permission to use the key to encrypt/decrypt the contents of the queue will also be granted to the same principal.
*
* This will grant the following KMS permissions:
*
* - kms:Decrypt
* - kms:Encrypt
* - kms:ReEncrypt*
* - kms:GenerateDataKey*
*/
sendMessages(grantee: iam.IGrantable): iam.Grant;
/**
* Grants purge permissions
*/
purge(grantee: iam.IGrantable): iam.Grant;
}