Class QueueGrants
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.sqs.QueueGrants
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-20T23:37:30.688Z")
@Stability(Stable)
public class QueueGrants
extends software.amazon.jsii.JsiiObject
Collection of grant methods for a IQueueRef.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.sqs.*; import software.amazon.awscdk.interfaces.sqs.*; IQueueRef queueRef; QueueGrants queueGrants = QueueGrants.fromQueue(queueRef);
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedQueueGrants(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedQueueGrants(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionconsumeMessages(IGrantable grantee) Grant permissions to consume messages from a queue.static QueueGrantsCreates grants for QueueGrants.protected IEncryptedResourceprotected IResourceWithPolicyV2protected IQueueRefpurge(IGrantable grantee) Grants purge permissions.sendMessages(IGrantable grantee) Grant access to send messages to a queue to the given identity.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
QueueGrants
protected QueueGrants(software.amazon.jsii.JsiiObjectRef objRef) -
QueueGrants
protected QueueGrants(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
-
Method Details
-
fromQueue
Creates grants for QueueGrants.- Parameters:
resource- This parameter is required.
-
consumeMessages
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
- Parameters:
grantee- This parameter is required.
-
purge
Grants purge permissions.- Parameters:
grantee- This parameter is required.
-
sendMessages
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*
- Parameters:
grantee- This parameter is required.
-
getResource
-
getEncryptedResource
-
getPolicyResource
-