public class Resource extends Object
The standard way of specifying an AWS resource is with an Amazon Resource Name (ARN).
The resource is C in the statement "A has permission to do B to C where D applies."
Constructor and Description |
---|
Resource(String resource)
Constructs a new AWS access control policy resource.
|
Modifier and Type | Method and Description |
---|---|
String |
getId()
Returns the resource ID, typically an Amazon Resource Name (ARN),
identifying this resource.
|
boolean |
isNotType()
Returns whether this Resource is a NotResource element, which explicitly matches everything except the specified
list of resources.
|
Resource |
withIsNotType(boolean isNotType)
Sets whether this resource is a NotResource, which explicitly matches everything except the specified list
of resources.
|
public Resource(String resource)
You specify the resource using the following Amazon Resource Name (ARN) format: arn:aws:<vendor>:<region>:<namespace>:<relative-id>
For example, an Amazon SQS queue might be addressed with the following ARN: arn:aws:sqs:us-east-1:987654321000:MyQueue
Some resources may not use every field in an ARN. For example, resources in Amazon S3 are global, so they omit the region field: arn:aws:s3:::bucket/*
resource
- The Amazon Resource Name (ARN) uniquely identifying the
desired AWS resource.public String getId()
public boolean isNotType()
public Resource withIsNotType(boolean isNotType)
isNotType
- the type. If true, this resource will be rendered as a NotResource element in the StatementCopyright © 2021. All rights reserved.