java.lang.Object
com.amazonaws.services.config.model.Scope
All Implemented Interfaces:
Serializable, Cloneable

public class Scope extends Object implements Serializable, Cloneable

Defines which resources trigger an evaluation for an AWS Config rule. The scope can include one or more resource types, a combination of a tag key and value, or a combination of one resource type and one resource ID. Specify a scope to constrain which resources trigger an evaluation for a rule. Otherwise, evaluations for the rule are triggered when any resource in your recording group changes in configuration.

See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    boolean
     
    The IDs of the only AWS resource that you want to trigger an evaluation for the rule.
    The resource types of only those AWS resources that you want to trigger an evaluation for the rule.
    The tag key that is applied to only those AWS resources that you want you want to trigger an evaluation for the rule.
    The tag value applied to only those AWS resources that you want to trigger an evaluation for the rule.
    int
     
    void
    setComplianceResourceId(String complianceResourceId)
    The IDs of the only AWS resource that you want to trigger an evaluation for the rule.
    void
    setComplianceResourceTypes(Collection<String> complianceResourceTypes)
    The resource types of only those AWS resources that you want to trigger an evaluation for the rule.
    void
    setTagKey(String tagKey)
    The tag key that is applied to only those AWS resources that you want you want to trigger an evaluation for the rule.
    void
    setTagValue(String tagValue)
    The tag value applied to only those AWS resources that you want to trigger an evaluation for the rule.
    Returns a string representation of this object; useful for testing and debugging.
    withComplianceResourceId(String complianceResourceId)
    The IDs of the only AWS resource that you want to trigger an evaluation for the rule.
    withComplianceResourceTypes(String... complianceResourceTypes)
    The resource types of only those AWS resources that you want to trigger an evaluation for the rule.
    withComplianceResourceTypes(Collection<String> complianceResourceTypes)
    The resource types of only those AWS resources that you want to trigger an evaluation for the rule.
    The tag key that is applied to only those AWS resources that you want you want to trigger an evaluation for the rule.
    withTagValue(String tagValue)
    The tag value applied to only those AWS resources that you want to trigger an evaluation for the rule.

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Scope

      public Scope()
  • Method Details

    • getComplianceResourceTypes

      public List<String> getComplianceResourceTypes()

      The resource types of only those AWS resources that you want to trigger an evaluation for the rule. You can only specify one type if you also specify a resource ID for ComplianceResourceId.

      Returns:
      The resource types of only those AWS resources that you want to trigger an evaluation for the rule. You can only specify one type if you also specify a resource ID for ComplianceResourceId.
    • setComplianceResourceTypes

      public void setComplianceResourceTypes(Collection<String> complianceResourceTypes)

      The resource types of only those AWS resources that you want to trigger an evaluation for the rule. You can only specify one type if you also specify a resource ID for ComplianceResourceId.

      Parameters:
      complianceResourceTypes - The resource types of only those AWS resources that you want to trigger an evaluation for the rule. You can only specify one type if you also specify a resource ID for ComplianceResourceId.
    • withComplianceResourceTypes

      public Scope withComplianceResourceTypes(String... complianceResourceTypes)

      The resource types of only those AWS resources that you want to trigger an evaluation for the rule. You can only specify one type if you also specify a resource ID for ComplianceResourceId.

      NOTE: This method appends the values to the existing list (if any). Use setComplianceResourceTypes(java.util.Collection) or withComplianceResourceTypes(java.util.Collection) if you want to override the existing values.

      Parameters:
      complianceResourceTypes - The resource types of only those AWS resources that you want to trigger an evaluation for the rule. You can only specify one type if you also specify a resource ID for ComplianceResourceId.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • withComplianceResourceTypes

      public Scope withComplianceResourceTypes(Collection<String> complianceResourceTypes)

      The resource types of only those AWS resources that you want to trigger an evaluation for the rule. You can only specify one type if you also specify a resource ID for ComplianceResourceId.

      Parameters:
      complianceResourceTypes - The resource types of only those AWS resources that you want to trigger an evaluation for the rule. You can only specify one type if you also specify a resource ID for ComplianceResourceId.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setTagKey

      public void setTagKey(String tagKey)

      The tag key that is applied to only those AWS resources that you want you want to trigger an evaluation for the rule.

      Parameters:
      tagKey - The tag key that is applied to only those AWS resources that you want you want to trigger an evaluation for the rule.
    • getTagKey

      public String getTagKey()

      The tag key that is applied to only those AWS resources that you want you want to trigger an evaluation for the rule.

      Returns:
      The tag key that is applied to only those AWS resources that you want you want to trigger an evaluation for the rule.
    • withTagKey

      public Scope withTagKey(String tagKey)

      The tag key that is applied to only those AWS resources that you want you want to trigger an evaluation for the rule.

      Parameters:
      tagKey - The tag key that is applied to only those AWS resources that you want you want to trigger an evaluation for the rule.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setTagValue

      public void setTagValue(String tagValue)

      The tag value applied to only those AWS resources that you want to trigger an evaluation for the rule. If you specify a value for TagValue, you must also specify a value for TagKey.

      Parameters:
      tagValue - The tag value applied to only those AWS resources that you want to trigger an evaluation for the rule. If you specify a value for TagValue, you must also specify a value for TagKey.
    • getTagValue

      public String getTagValue()

      The tag value applied to only those AWS resources that you want to trigger an evaluation for the rule. If you specify a value for TagValue, you must also specify a value for TagKey.

      Returns:
      The tag value applied to only those AWS resources that you want to trigger an evaluation for the rule. If you specify a value for TagValue, you must also specify a value for TagKey.
    • withTagValue

      public Scope withTagValue(String tagValue)

      The tag value applied to only those AWS resources that you want to trigger an evaluation for the rule. If you specify a value for TagValue, you must also specify a value for TagKey.

      Parameters:
      tagValue - The tag value applied to only those AWS resources that you want to trigger an evaluation for the rule. If you specify a value for TagValue, you must also specify a value for TagKey.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setComplianceResourceId

      public void setComplianceResourceId(String complianceResourceId)

      The IDs of the only AWS resource that you want to trigger an evaluation for the rule. If you specify a resource ID, you must specify one resource type for ComplianceResourceTypes.

      Parameters:
      complianceResourceId - The IDs of the only AWS resource that you want to trigger an evaluation for the rule. If you specify a resource ID, you must specify one resource type for ComplianceResourceTypes .
    • getComplianceResourceId

      public String getComplianceResourceId()

      The IDs of the only AWS resource that you want to trigger an evaluation for the rule. If you specify a resource ID, you must specify one resource type for ComplianceResourceTypes.

      Returns:
      The IDs of the only AWS resource that you want to trigger an evaluation for the rule. If you specify a resource ID, you must specify one resource type for ComplianceResourceTypes.
    • withComplianceResourceId

      public Scope withComplianceResourceId(String complianceResourceId)

      The IDs of the only AWS resource that you want to trigger an evaluation for the rule. If you specify a resource ID, you must specify one resource type for ComplianceResourceTypes.

      Parameters:
      complianceResourceId - The IDs of the only AWS resource that you want to trigger an evaluation for the rule. If you specify a resource ID, you must specify one resource type for ComplianceResourceTypes .
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • toString

      public String toString()
      Returns a string representation of this object; useful for testing and debugging.
      Overrides:
      toString in class Object
      Returns:
      A string representation of this object.
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public Scope clone()
      Overrides:
      clone in class Object