@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class PutResourcePolicyRequest extends AmazonWebServiceRequest implements Serializable, Cloneable
NOOP| Constructor and Description |
|---|
PutResourcePolicyRequest() |
| Modifier and Type | Method and Description |
|---|---|
PutResourcePolicyRequest |
clone()
Creates a shallow clone of this object for all fields except the handler context.
|
boolean |
equals(Object obj) |
String |
getPolicy()
The policy to create or update.
|
String |
getResourceArn()
The Amazon Resource Name (ARN) of the account to create or update a resource policy for.
|
int |
hashCode() |
void |
setPolicy(String policy)
The policy to create or update.
|
void |
setResourceArn(String resourceArn)
The Amazon Resource Name (ARN) of the account to create or update a resource policy for.
|
String |
toString()
Returns a string representation of this object.
|
PutResourcePolicyRequest |
withPolicy(String policy)
The policy to create or update.
|
PutResourcePolicyRequest |
withResourceArn(String resourceArn)
The Amazon Resource Name (ARN) of the account to create or update a resource policy for.
|
addHandlerContext, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getHandlerContext, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestCredentialsProvider, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeoutpublic void setPolicy(String policy)
The policy to create or update. For example, the following policy grants a user authorization to restore a snapshot.
"{\"Version\": \"2012-10-17\", \"Statement\" : [{ \"Sid\": \"AllowUserRestoreFromSnapshot\", \"Principal\":{\"AWS\": [\"739247239426\"]}, \"Action\": [\"redshift-serverless:RestoreFromSnapshot\"] , \"Effect\": \"Allow\" }]}"
policy - The policy to create or update. For example, the following policy grants a user authorization to restore a
snapshot.
"{\"Version\": \"2012-10-17\", \"Statement\" : [{ \"Sid\": \"AllowUserRestoreFromSnapshot\", \"Principal\":{\"AWS\": [\"739247239426\"]}, \"Action\": [\"redshift-serverless:RestoreFromSnapshot\"] , \"Effect\": \"Allow\" }]}"
public String getPolicy()
The policy to create or update. For example, the following policy grants a user authorization to restore a snapshot.
"{\"Version\": \"2012-10-17\", \"Statement\" : [{ \"Sid\": \"AllowUserRestoreFromSnapshot\", \"Principal\":{\"AWS\": [\"739247239426\"]}, \"Action\": [\"redshift-serverless:RestoreFromSnapshot\"] , \"Effect\": \"Allow\" }]}"
"{\"Version\": \"2012-10-17\", \"Statement\" : [{ \"Sid\": \"AllowUserRestoreFromSnapshot\", \"Principal\":{\"AWS\": [\"739247239426\"]}, \"Action\": [\"redshift-serverless:RestoreFromSnapshot\"] , \"Effect\": \"Allow\" }]}"
public PutResourcePolicyRequest withPolicy(String policy)
The policy to create or update. For example, the following policy grants a user authorization to restore a snapshot.
"{\"Version\": \"2012-10-17\", \"Statement\" : [{ \"Sid\": \"AllowUserRestoreFromSnapshot\", \"Principal\":{\"AWS\": [\"739247239426\"]}, \"Action\": [\"redshift-serverless:RestoreFromSnapshot\"] , \"Effect\": \"Allow\" }]}"
policy - The policy to create or update. For example, the following policy grants a user authorization to restore a
snapshot.
"{\"Version\": \"2012-10-17\", \"Statement\" : [{ \"Sid\": \"AllowUserRestoreFromSnapshot\", \"Principal\":{\"AWS\": [\"739247239426\"]}, \"Action\": [\"redshift-serverless:RestoreFromSnapshot\"] , \"Effect\": \"Allow\" }]}"
public void setResourceArn(String resourceArn)
The Amazon Resource Name (ARN) of the account to create or update a resource policy for.
resourceArn - The Amazon Resource Name (ARN) of the account to create or update a resource policy for.public String getResourceArn()
The Amazon Resource Name (ARN) of the account to create or update a resource policy for.
public PutResourcePolicyRequest withResourceArn(String resourceArn)
The Amazon Resource Name (ARN) of the account to create or update a resource policy for.
resourceArn - The Amazon Resource Name (ARN) of the account to create or update a resource policy for.public String toString()
toString in class ObjectObject.toString()public PutResourcePolicyRequest clone()
AmazonWebServiceRequestclone in class AmazonWebServiceRequestObject.clone()