@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class ResourceTag extends Object implements Serializable, Cloneable, StructuredPojo
The resource tags that Firewall Manager uses to determine if a particular resource should be included or excluded from the Firewall Manager policy. Tags enable you to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. Each tag consists of a key and an optional value. Firewall Manager combines the tags with "AND" so that, if you add more than one tag to a policy scope, a resource must have all the specified tags to be included or excluded. For more information, see Working with Tag Editor.
Every resource tag must have a string value, either a non-empty string or an empty string. If you don't provide a value for a resource tag, Firewall Manager saves the value as an empty string: "". When Firewall Manager compares tags, it only matches two tags if they have the same key and the same value. A tag with an empty string value only matches with tags that also have an empty string value.
Constructor and Description |
---|
ResourceTag() |
Modifier and Type | Method and Description |
---|---|
ResourceTag |
clone() |
boolean |
equals(Object obj) |
String |
getKey()
The resource tag key.
|
String |
getValue()
The resource tag value.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setKey(String key)
The resource tag key.
|
void |
setValue(String value)
The resource tag value.
|
String |
toString()
Returns a string representation of this object.
|
ResourceTag |
withKey(String key)
The resource tag key.
|
ResourceTag |
withValue(String value)
The resource tag value.
|
public void setKey(String key)
The resource tag key.
key
- The resource tag key.public String getKey()
The resource tag key.
public ResourceTag withKey(String key)
The resource tag key.
key
- The resource tag key.public void setValue(String value)
The resource tag value. To specify an empty string value, either don't provide this or specify it as "".
value
- The resource tag value. To specify an empty string value, either don't provide this or specify it as "".public String getValue()
The resource tag value. To specify an empty string value, either don't provide this or specify it as "".
public ResourceTag withValue(String value)
The resource tag value. To specify an empty string value, either don't provide this or specify it as "".
value
- The resource tag value. To specify an empty string value, either don't provide this or specify it as "".public String toString()
toString
in class Object
Object.toString()
public ResourceTag clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.