Class IamActionTrait
- java.lang.Object
 - 
- software.amazon.smithy.model.traits.AbstractTrait
 - 
- software.amazon.smithy.aws.iam.traits.IamActionTrait
 
 
 
- 
- All Implemented Interfaces:
 FromSourceLocation,ToNode,ToShapeId,Trait,ToSmithyBuilder<IamActionTrait>
public final class IamActionTrait extends AbstractTrait implements ToSmithyBuilder<IamActionTrait>
Indicates properties of a Smithy operation as an IAM action. 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIamActionTrait.Builderstatic classIamActionTrait.Provider 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IamActionTrait.Builderbuilder()protected NodecreateNode()The result of toNode is used for hashCodes and equality.java.util.List<java.lang.String>getCreatesResources()Gets the resources that performing this IAM action will create.java.util.Optional<java.lang.String>getDocumentation()Gets the description of what granting the user permission to invoke an operation would entail.java.util.Optional<java.lang.String>getName()Get the AWS IAM resource name.java.util.Optional<java.lang.String>getRelativeDocumentation()Gets the relative URL path for the action within a set of IAM-related documentation.java.util.List<java.lang.String>getRequiredActions()Gets other actions that the invoker must be authorized to perform when executing the targeted operation.java.util.Optional<ActionResources>getResources()Gets the resources an IAM action can be authorized against.static java.lang.StringresolveActionDocumentation(OperationShape operation)Resolves the IAM action documentation for the given operation.static java.lang.StringresolveActionName(OperationShape operation)Resolves the IAM action name for the given operation.static java.util.List<java.lang.String>resolveRequiredActions(OperationShape operation)Resolves the IAM action required actions for the given operation.SmithyBuilder<IamActionTrait>toBuilder()Take this object and create a builder that contains all of the current property values of this object.- 
Methods inherited from class software.amazon.smithy.model.traits.AbstractTrait
equals, getSourceLocation, hashCode, setNodeCache, toNode, toShapeId, toString 
- 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait 
- 
Methods inherited from interface software.amazon.smithy.model.traits.Trait
isSynthetic 
 - 
 
 - 
 
- 
- 
Field Detail
- 
ID
public static final ShapeId ID
 
 - 
 
- 
Method Detail
- 
getName
public java.util.Optional<java.lang.String> getName()
Get the AWS IAM resource name.- Returns:
 - Returns the name.
 
 
- 
resolveActionName
public static java.lang.String resolveActionName(OperationShape operation)
Resolves the IAM action name for the given operation. Uses the following resolution order:- Value of the 
@iamActiontrait'snameproperty - Value of the 
@actionNametrait - The operation's name
 
- Parameters:
 operation- the operation to resolve a name for.- Returns:
 - The resolved action name.
 
 - Value of the 
 
- 
getDocumentation
public java.util.Optional<java.lang.String> getDocumentation()
Gets the description of what granting the user permission to invoke an operation would entail.- Returns:
 - Returns the documentation.
 
 
- 
resolveActionDocumentation
public static java.lang.String resolveActionDocumentation(OperationShape operation)
Resolves the IAM action documentation for the given operation. Uses the following resolution order:- Value of the 
@iamActiontrait'sdocumentationproperty - Value of the 
@actionPermissionDescriptiontrait - Value of the 
@documentationtrait 
- Parameters:
 operation- the operation to resolve documentation for.- Returns:
 - The resolved action documentation.
 
 - Value of the 
 
- 
getRelativeDocumentation
public java.util.Optional<java.lang.String> getRelativeDocumentation()
Gets the relative URL path for the action within a set of IAM-related documentation.- Returns:
 - Returns the relative URL path to documentation.
 
 
- 
getRequiredActions
public java.util.List<java.lang.String> getRequiredActions()
Gets other actions that the invoker must be authorized to perform when executing the targeted operation.- Returns:
 - Returns the list of required actions.
 
 
- 
resolveRequiredActions
public static java.util.List<java.lang.String> resolveRequiredActions(OperationShape operation)
Resolves the IAM action required actions for the given operation. Uses the following resolution order:- Value of the 
@iamActiontrait'srequiredActionsproperty - Value of the 
@requiredActionstrait - An empty list.
 
- Parameters:
 operation- the operation to resolve required actions for.- Returns:
 - The resolved required actions.
 
 - Value of the 
 
- 
getResources
public java.util.Optional<ActionResources> getResources()
Gets the resources an IAM action can be authorized against.- Returns:
 - Returns the action's resources.
 
 
- 
getCreatesResources
public java.util.List<java.lang.String> getCreatesResources()
Gets the resources that performing this IAM action will create.- Returns:
 - Returns the resources created by the action.
 
 
- 
builder
public static IamActionTrait.Builder builder()
 
- 
createNode
protected Node createNode()
Description copied from class:AbstractTraitThe result of toNode is used for hashCodes and equality. Subclasses must implement createNode to turn the trait into a Node. This is then cached for subsequent retrievals.- Specified by:
 createNodein classAbstractTrait- Returns:
 - Returns the trait as a node.
 
 
- 
toBuilder
public SmithyBuilder<IamActionTrait> toBuilder()
Description copied from interface:ToSmithyBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
 toBuilderin interfaceToSmithyBuilder<IamActionTrait>- Returns:
 - a builder for type T
 
 
 - 
 
 -