@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:41.986Z") public class QueuePolicy extends Resource
Policies define the operations that are allowed on this resource.
You almost never need to define this construct directly.
All AWS resources that support resource policies have a method called
addToResourcePolicy()
, which will automatically create a new resource
policy if one doesn't exist yet, otherwise it will add to the existing
policy.
Prefer to use addToResourcePolicy()
instead.
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.*; Queue queue; QueuePolicy queuePolicy = QueuePolicy.Builder.create(this, "MyQueuePolicy") .queues(List.of(queue)) .build();
Modifier and Type | Class and Description |
---|---|
static class |
QueuePolicy.Builder
A fluent builder for
QueuePolicy . |
IResource.Jsii$Default
Modifier | Constructor and Description |
---|---|
protected |
QueuePolicy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
QueuePolicy(software.amazon.jsii.JsiiObjectRef objRef) |
|
QueuePolicy(software.constructs.Construct scope,
java.lang.String id,
QueuePolicyProps props) |
Modifier and Type | Method and Description |
---|---|
PolicyDocument |
getDocument()
The IAM policy document for this policy.
|
java.lang.String |
getQueuePolicyId()
Not currently supported by AWS CloudFormation.
|
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResource
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getNode
protected QueuePolicy(software.amazon.jsii.JsiiObjectRef objRef)
protected QueuePolicy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public QueuePolicy(software.constructs.Construct scope, java.lang.String id, QueuePolicyProps props)
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.public PolicyDocument getDocument()
public java.lang.String getQueuePolicyId()
This attribute temporarily existed in CloudFormation, and then was removed again.