Class 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:
    Serialized Form
    • Constructor Detail

      • Scope

        public Scope()
    • Method Detail

      • 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:
        Object.toString()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object