@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class ShareRule extends Object implements Serializable, Cloneable, StructuredPojo
[Custom snapshot policies only] Specifies a rule for sharing snapshots across Amazon Web Services accounts.
Constructor and Description |
---|
ShareRule() |
Modifier and Type | Method and Description |
---|---|
ShareRule |
clone() |
boolean |
equals(Object obj) |
List<String> |
getTargetAccounts()
The IDs of the Amazon Web Services accounts with which to share the snapshots.
|
Integer |
getUnshareInterval()
The period after which snapshots that are shared with other Amazon Web Services accounts are automatically
unshared.
|
String |
getUnshareIntervalUnit()
The unit of time for the automatic unsharing interval.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setTargetAccounts(Collection<String> targetAccounts)
The IDs of the Amazon Web Services accounts with which to share the snapshots.
|
void |
setUnshareInterval(Integer unshareInterval)
The period after which snapshots that are shared with other Amazon Web Services accounts are automatically
unshared.
|
void |
setUnshareIntervalUnit(String unshareIntervalUnit)
The unit of time for the automatic unsharing interval.
|
String |
toString()
Returns a string representation of this object.
|
ShareRule |
withTargetAccounts(Collection<String> targetAccounts)
The IDs of the Amazon Web Services accounts with which to share the snapshots.
|
ShareRule |
withTargetAccounts(String... targetAccounts)
The IDs of the Amazon Web Services accounts with which to share the snapshots.
|
ShareRule |
withUnshareInterval(Integer unshareInterval)
The period after which snapshots that are shared with other Amazon Web Services accounts are automatically
unshared.
|
ShareRule |
withUnshareIntervalUnit(RetentionIntervalUnitValues unshareIntervalUnit)
The unit of time for the automatic unsharing interval.
|
ShareRule |
withUnshareIntervalUnit(String unshareIntervalUnit)
The unit of time for the automatic unsharing interval.
|
public List<String> getTargetAccounts()
The IDs of the Amazon Web Services accounts with which to share the snapshots.
public void setTargetAccounts(Collection<String> targetAccounts)
The IDs of the Amazon Web Services accounts with which to share the snapshots.
targetAccounts
- The IDs of the Amazon Web Services accounts with which to share the snapshots.public ShareRule withTargetAccounts(String... targetAccounts)
The IDs of the Amazon Web Services accounts with which to share the snapshots.
NOTE: This method appends the values to the existing list (if any). Use
setTargetAccounts(java.util.Collection)
or withTargetAccounts(java.util.Collection)
if you want
to override the existing values.
targetAccounts
- The IDs of the Amazon Web Services accounts with which to share the snapshots.public ShareRule withTargetAccounts(Collection<String> targetAccounts)
The IDs of the Amazon Web Services accounts with which to share the snapshots.
targetAccounts
- The IDs of the Amazon Web Services accounts with which to share the snapshots.public void setUnshareInterval(Integer unshareInterval)
The period after which snapshots that are shared with other Amazon Web Services accounts are automatically unshared.
unshareInterval
- The period after which snapshots that are shared with other Amazon Web Services accounts are automatically
unshared.public Integer getUnshareInterval()
The period after which snapshots that are shared with other Amazon Web Services accounts are automatically unshared.
public ShareRule withUnshareInterval(Integer unshareInterval)
The period after which snapshots that are shared with other Amazon Web Services accounts are automatically unshared.
unshareInterval
- The period after which snapshots that are shared with other Amazon Web Services accounts are automatically
unshared.public void setUnshareIntervalUnit(String unshareIntervalUnit)
The unit of time for the automatic unsharing interval.
unshareIntervalUnit
- The unit of time for the automatic unsharing interval.RetentionIntervalUnitValues
public String getUnshareIntervalUnit()
The unit of time for the automatic unsharing interval.
RetentionIntervalUnitValues
public ShareRule withUnshareIntervalUnit(String unshareIntervalUnit)
The unit of time for the automatic unsharing interval.
unshareIntervalUnit
- The unit of time for the automatic unsharing interval.RetentionIntervalUnitValues
public ShareRule withUnshareIntervalUnit(RetentionIntervalUnitValues unshareIntervalUnit)
The unit of time for the automatic unsharing interval.
unshareIntervalUnit
- The unit of time for the automatic unsharing interval.RetentionIntervalUnitValues
public String toString()
toString
in class Object
Object.toString()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.