@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class ResourcePolicy extends Object implements Serializable, Cloneable, StructuredPojo
The resource policy object. Currently, you can use policies to share snapshots across Amazon Web Services accounts.
Constructor and Description |
---|
ResourcePolicy() |
Modifier and Type | Method and Description |
---|---|
ResourcePolicy |
clone() |
boolean |
equals(Object obj) |
String |
getPolicy()
The resource policy.
|
String |
getResourceArn()
The Amazon Resource Name (ARN) of the policy.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setPolicy(String policy)
The resource policy.
|
void |
setResourceArn(String resourceArn)
The Amazon Resource Name (ARN) of the policy.
|
String |
toString()
Returns a string representation of this object.
|
ResourcePolicy |
withPolicy(String policy)
The resource policy.
|
ResourcePolicy |
withResourceArn(String resourceArn)
The Amazon Resource Name (ARN) of the policy.
|
public void setPolicy(String policy)
The resource policy.
policy
- The resource policy.public String getPolicy()
The resource policy.
public ResourcePolicy withPolicy(String policy)
The resource policy.
policy
- The resource policy.public void setResourceArn(String resourceArn)
The Amazon Resource Name (ARN) of the policy.
resourceArn
- The Amazon Resource Name (ARN) of the policy.public String getResourceArn()
The Amazon Resource Name (ARN) of the policy.
public ResourcePolicy withResourceArn(String resourceArn)
The Amazon Resource Name (ARN) of the policy.
resourceArn
- The Amazon Resource Name (ARN) of the policy.public String toString()
toString
in class Object
Object.toString()
public ResourcePolicy clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.