JavaScript is disabled on your browser.
Skip navigation links

AWS SDK for Java 1.x API Reference - 1.12.795

We announced the upcoming end-of-support for AWS SDK for Java (v1). We recommend that you migrate to AWS SDK for Java v2. For dates, additional details, and information on how to migrate, please refer to the linked announcement.
com.amazonaws.auth.policy

Class Resource

  • Direct Known Subclasses:
    S3BucketResource, S3ObjectResource, SQSQueueResource


    public class Resource
    extends Object 
    Represents a resource involved in an AWS access control policy statement. Resources are the service specific AWS entities owned by your account. Amazon SQS queues, Amazon S3 buckets and objects, and Amazon SNS topics are all examples of AWS resources.

    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 Summary

      Constructors
      Constructor and Description
      Resource (String resource)
      Constructs a new AWS access control policy resource.
    • Method Summary

      All Methods
      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.
    • Constructor Detail

      • Resource

        public Resource(String resource)
        Constructs a new AWS access control policy resource. Resources are typically specified as Amazon Resource Names (ARNs).

        You specify the resource using the following Amazon Resource Name (ARN) format: arn:aws:<vendor>:<region>:<namespace>:<relative-id>

        • vendor identifies the AWS product (e.g., sns)
        • region is the AWS Region the resource resides in (e.g., us-east-1), if any
        • namespace is the AWS account ID with no hyphens (e.g., 123456789012)
        • relative-id is the service specific portion that identifies the specific resource

        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/*

        Parameters:
        resource - The Amazon Resource Name (ARN) uniquely identifying the desired AWS resource.
    • Method Detail

      • getId

        public String getId()
        Returns the resource ID, typically an Amazon Resource Name (ARN), identifying this resource.
        Returns:
        The resource ID, typically an Amazon Resource Name (ARN), identifying this resource.
      • isNotType

        public boolean isNotType()
        Returns whether this Resource is a NotResource element, which explicitly matches everything except the specified list of resources. Note that Statements must include either a Resource or a NotResource element
        Returns:
        the type of the Resource. If true, this resource will be rendered as a NotResource element in the Statement
      • withIsNotType

        public Resource withIsNotType(boolean isNotType)
        Sets whether this resource is a NotResource, which explicitly matches everything except the specified list of resources. Note that Statements must include either a Resource or a NotResource element
        Parameters:
        isNotType - the type. If true, this resource will be rendered as a NotResource element in the Statement
        Returns:
        The updated Resource object so that additional method calls can be chained together.
Skip navigation links

AltStyle によって変換されたページ (->オリジナル) /