Class ConditionKeysIndex

java.lang.Object
software.amazon.smithy.aws.iam.traits.ConditionKeysIndex
All Implemented Interfaces:
KnowledgeIndex

public final class ConditionKeysIndex extends Object implements KnowledgeIndex
Provides an index of condition keys for a service, including any condition keys inferred from resource identifiers.
  • Constructor Details

    • ConditionKeysIndex

      public ConditionKeysIndex(Model model)
  • Method Details

    • of

      public static ConditionKeysIndex of(Model model)
    • getDefinedConditionKeys

      public Map<String,ConditionKeyDefinition> getDefinedConditionKeys(ToShapeId service)
      Get all of the explicit and inferred condition keys used in the entire service.

      The result does not include global condition keys like "aws:accountId". Use getConditionKeyNames(software.amazon.smithy.model.shapes.ToShapeId) to find all of the condition keys used but not necessarily defined for a service.

      Parameters:
      service - Service shape/shapeId to get.
      Returns:
      Returns the conditions keys of the service or an empty map when not found.
    • getConditionKeyNames

      public Set<String> getConditionKeyNames(ToShapeId service)
      Get all of the condition key names used in a service.
      Parameters:
      service - Service shape/shapeId use to scope the result.
      Returns:
      Returns the conditions keys of the service or an empty map when not found.
    • getConditionKeyNames

      public Set<String> getConditionKeyNames(ToShapeId service, ToShapeId resourceOrOperation)
      Get all of the defined condition keys used in an operation or resource, including any inferred keys and keys inherited by parent resource bindings.
      Parameters:
      service - Service shape/shapeId use to scope the result.
      resourceOrOperation - Resource or operation shape/shapeId
      Returns:
      Returns the conditions keys of the service or an empty map when not found.
    • getDefinedConditionKeys

      public Map<String,ConditionKeyDefinition> getDefinedConditionKeys(ToShapeId service, ToShapeId resourceOrOperation)
      Get all of the defined condition keys used in an operation or resource, including any inferred keys and keys inherited by parent resource bindings.

      The result does not include global condition keys like "aws:accountId". Use getConditionKeyNames(software.amazon.smithy.model.shapes.ToShapeId) to find all of the condition keys used but not necessarily defined for a resource or operation.

      Parameters:
      service - Service shape/shapeId use to scope the result.
      resourceOrOperation - Resource or operation shape/shapeId
      Returns:
      Returns the conditions keys of the service or an empty map when not found.