Class Scope
- 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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Scope()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Scope
clone()
boolean
equals(Object obj)
String
getComplianceResourceId()
The IDs of the only AWS resource that you want to trigger an evaluation for the rule.List<String>
getComplianceResourceTypes()
The resource types of only those AWS resources that you want to trigger an evaluation for the rule.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.String
getTagValue()
The tag value applied to only those AWS resources that you want to trigger an evaluation for the rule.int
hashCode()
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.String
toString()
Returns a string representation of this object; useful for testing and debugging.Scope
withComplianceResourceId(String complianceResourceId)
The IDs of the only AWS resource that you want to trigger an evaluation for the rule.Scope
withComplianceResourceTypes(String... complianceResourceTypes)
The resource types of only those AWS resources that you want to trigger an evaluation for the rule.Scope
withComplianceResourceTypes(Collection<String> complianceResourceTypes)
The resource types of only those AWS resources that you want to trigger an evaluation for the rule.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.Scope
withTagValue(String tagValue)
The tag value applied to only those AWS resources that you want to trigger an evaluation for the rule.
-
-
-
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 forComplianceResourceId
.
-
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)
orwithComplianceResourceTypes(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 forComplianceResourceId
.- 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 forComplianceResourceId
.- 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 forTagKey
.- 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 forTagValue
, you must also specify a value forTagKey
.
-
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 forTagKey
.- 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 forTagKey
.
-
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 forTagKey
.- 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 forTagValue
, you must also specify a value forTagKey
.- 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 forComplianceResourceTypes
.
-
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 forComplianceResourceTypes
.- 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 classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
-