public class Resource extends Object implements Serializable, Cloneable
Specifies the type and name of a resource referenced by an event.
Constructor and Description |
---|
Resource() |
Modifier and Type | Method and Description |
---|---|
Resource |
clone() |
boolean |
equals(Object obj) |
String |
getResourceName()
The name of the resource referenced by the event returned.
|
String |
getResourceType()
The type of a resource referenced by the event returned.
|
int |
hashCode() |
void |
setResourceName(String resourceName)
The name of the resource referenced by the event returned.
|
void |
setResourceType(String resourceType)
The type of a resource referenced by the event returned.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Resource |
withResourceName(String resourceName)
The name of the resource referenced by the event returned.
|
Resource |
withResourceType(String resourceType)
The type of a resource referenced by the event returned.
|
public String getResourceType()
public void setResourceType(String resourceType)
resourceType
- The type of a resource referenced by the event returned. When the
resource type cannot be determined, null is returned. Some examples of
resource types are: Instance for EC2, Trail for
CloudTrail, DBInstance for RDS, and AccessKey for IAM.
For a list of resource types supported for event lookup, see Resource
Types Supported for Event Lookup.public Resource withResourceType(String resourceType)
Returns a reference to this object so that method calls can be chained together.
resourceType
- The type of a resource referenced by the event returned. When the
resource type cannot be determined, null is returned. Some examples of
resource types are: Instance for EC2, Trail for
CloudTrail, DBInstance for RDS, and AccessKey for IAM.
For a list of resource types supported for event lookup, see Resource
Types Supported for Event Lookup.public String getResourceName()
public void setResourceName(String resourceName)
resourceName
- The name of the resource referenced by the event returned. These are
user-created names whose values will depend on the environment. For
example, the resource name might be "auto-scaling-test-group" for an
Auto Scaling Group or "i-1234567" for an EC2 Instance.public Resource withResourceName(String resourceName)
Returns a reference to this object so that method calls can be chained together.
resourceName
- The name of the resource referenced by the event returned. These are
user-created names whose values will depend on the environment. For
example, the resource name might be "auto-scaling-test-group" for an
Auto Scaling Group or "i-1234567" for an EC2 Instance.public String toString()
toString
in class Object
Object.toString()
Copyright © 2015. All rights reserved.