• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  *  http://aws.amazon.com/apache2.0
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 package software.amazon.awssdk.core.auth.policy;
17 
18 /**
19  * An access control policy action identifies a specific action in a service
20  * that can be performed on a resource. For example, sending a message to a
21  * queue.
22  * <p>
23  * Actions allow you to limit what your access control policy statement affects.
24  * For example, you could create a policy statement that enables a certain group
25  * of users to send messages to your queue, but not allow them to perform any
26  * other actions on your queue.
27  * <p>
28  * The action is B in the statement
29  * "A has permission to do B to C where D applies."
30  * <p>
31  * Free form access control policy actions may include a wildcard (*) to match
32  * multiple actions.
33  */
34 public class Action {
35 
36     private final String name;
37 
Action(String name)38     public Action(String name) {
39         this.name = name;
40     }
41 
42     /**
43      * Returns the name of this action. For example, 'sqs:SendMessage' is the
44      * name corresponding to the SQS action that enables users to send a message
45      * to an SQS queue.
46      *
47      * @return The name of this action.
48      */
getActionName()49     public String getActionName() {
50         return name;
51     }
52 }
53