@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) |
Boolean |
getBlockPublicPolicy()
(Optional) If you set the parameter,
BlockPublicPolicy to true, then you block resource-based
policies that allow broad access to the secret. |
String |
getResourcePolicy()
A JSON-formatted string constructed according to the grammar and syntax for an AWS resource-based policy.
|
String |
getSecretId()
Specifies the secret that you want to attach the resource-based policy.
|
int |
hashCode() |
Boolean |
isBlockPublicPolicy()
(Optional) If you set the parameter,
BlockPublicPolicy to true, then you block resource-based
policies that allow broad access to the secret. |
void |
setBlockPublicPolicy(Boolean blockPublicPolicy)
(Optional) If you set the parameter,
BlockPublicPolicy to true, then you block resource-based
policies that allow broad access to the secret. |
void |
setResourcePolicy(String resourcePolicy)
A JSON-formatted string constructed according to the grammar and syntax for an AWS resource-based policy.
|
void |
setSecretId(String secretId)
Specifies the secret that you want to attach the resource-based policy.
|
String |
toString()
Returns a string representation of this object.
|
PutResourcePolicyRequest |
withBlockPublicPolicy(Boolean blockPublicPolicy)
(Optional) If you set the parameter,
BlockPublicPolicy to true, then you block resource-based
policies that allow broad access to the secret. |
PutResourcePolicyRequest |
withResourcePolicy(String resourcePolicy)
A JSON-formatted string constructed according to the grammar and syntax for an AWS resource-based policy.
|
PutResourcePolicyRequest |
withSecretId(String secretId)
Specifies the secret that you want to attach the resource-based policy.
|
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, withSdkRequestTimeout
public void setSecretId(String secretId)
Specifies the secret that you want to attach the resource-based policy. You can specify either the ARN or the friendly name of the secret.
If you specify an ARN, we generally recommend that you specify a complete ARN. You can specify a partial ARN too—for example, if you don’t include the final hyphen and six random characters that Secrets Manager adds at the end of the ARN when you created the secret. A partial ARN match can work as long as it uniquely matches only one secret. However, if your secret has a name that ends in a hyphen followed by six characters (before Secrets Manager adds the hyphen and six characters to the ARN) and you try to use that as a partial ARN, then those characters cause Secrets Manager to assume that you’re specifying a complete ARN. This confusion can cause unexpected results. To avoid this situation, we recommend that you don’t create secret names ending with a hyphen followed by six characters.
If you specify an incomplete ARN without the random suffix, and instead provide the 'friendly name', you must not include the random suffix. If you do include the random suffix added by Secrets Manager, you receive either a ResourceNotFoundException or an AccessDeniedException error, depending on your permissions.
secretId
- Specifies the secret that you want to attach the resource-based policy. You can specify either the ARN or
the friendly name of the secret. If you specify an ARN, we generally recommend that you specify a complete ARN. You can specify a partial ARN too—for example, if you don’t include the final hyphen and six random characters that Secrets Manager adds at the end of the ARN when you created the secret. A partial ARN match can work as long as it uniquely matches only one secret. However, if your secret has a name that ends in a hyphen followed by six characters (before Secrets Manager adds the hyphen and six characters to the ARN) and you try to use that as a partial ARN, then those characters cause Secrets Manager to assume that you’re specifying a complete ARN. This confusion can cause unexpected results. To avoid this situation, we recommend that you don’t create secret names ending with a hyphen followed by six characters.
If you specify an incomplete ARN without the random suffix, and instead provide the 'friendly name', you must not include the random suffix. If you do include the random suffix added by Secrets Manager, you receive either a ResourceNotFoundException or an AccessDeniedException error, depending on your permissions.
public String getSecretId()
Specifies the secret that you want to attach the resource-based policy. You can specify either the ARN or the friendly name of the secret.
If you specify an ARN, we generally recommend that you specify a complete ARN. You can specify a partial ARN too—for example, if you don’t include the final hyphen and six random characters that Secrets Manager adds at the end of the ARN when you created the secret. A partial ARN match can work as long as it uniquely matches only one secret. However, if your secret has a name that ends in a hyphen followed by six characters (before Secrets Manager adds the hyphen and six characters to the ARN) and you try to use that as a partial ARN, then those characters cause Secrets Manager to assume that you’re specifying a complete ARN. This confusion can cause unexpected results. To avoid this situation, we recommend that you don’t create secret names ending with a hyphen followed by six characters.
If you specify an incomplete ARN without the random suffix, and instead provide the 'friendly name', you must not include the random suffix. If you do include the random suffix added by Secrets Manager, you receive either a ResourceNotFoundException or an AccessDeniedException error, depending on your permissions.
If you specify an ARN, we generally recommend that you specify a complete ARN. You can specify a partial ARN too—for example, if you don’t include the final hyphen and six random characters that Secrets Manager adds at the end of the ARN when you created the secret. A partial ARN match can work as long as it uniquely matches only one secret. However, if your secret has a name that ends in a hyphen followed by six characters (before Secrets Manager adds the hyphen and six characters to the ARN) and you try to use that as a partial ARN, then those characters cause Secrets Manager to assume that you’re specifying a complete ARN. This confusion can cause unexpected results. To avoid this situation, we recommend that you don’t create secret names ending with a hyphen followed by six characters.
If you specify an incomplete ARN without the random suffix, and instead provide the 'friendly name', you must not include the random suffix. If you do include the random suffix added by Secrets Manager, you receive either a ResourceNotFoundException or an AccessDeniedException error, depending on your permissions.
public PutResourcePolicyRequest withSecretId(String secretId)
Specifies the secret that you want to attach the resource-based policy. You can specify either the ARN or the friendly name of the secret.
If you specify an ARN, we generally recommend that you specify a complete ARN. You can specify a partial ARN too—for example, if you don’t include the final hyphen and six random characters that Secrets Manager adds at the end of the ARN when you created the secret. A partial ARN match can work as long as it uniquely matches only one secret. However, if your secret has a name that ends in a hyphen followed by six characters (before Secrets Manager adds the hyphen and six characters to the ARN) and you try to use that as a partial ARN, then those characters cause Secrets Manager to assume that you’re specifying a complete ARN. This confusion can cause unexpected results. To avoid this situation, we recommend that you don’t create secret names ending with a hyphen followed by six characters.
If you specify an incomplete ARN without the random suffix, and instead provide the 'friendly name', you must not include the random suffix. If you do include the random suffix added by Secrets Manager, you receive either a ResourceNotFoundException or an AccessDeniedException error, depending on your permissions.
secretId
- Specifies the secret that you want to attach the resource-based policy. You can specify either the ARN or
the friendly name of the secret. If you specify an ARN, we generally recommend that you specify a complete ARN. You can specify a partial ARN too—for example, if you don’t include the final hyphen and six random characters that Secrets Manager adds at the end of the ARN when you created the secret. A partial ARN match can work as long as it uniquely matches only one secret. However, if your secret has a name that ends in a hyphen followed by six characters (before Secrets Manager adds the hyphen and six characters to the ARN) and you try to use that as a partial ARN, then those characters cause Secrets Manager to assume that you’re specifying a complete ARN. This confusion can cause unexpected results. To avoid this situation, we recommend that you don’t create secret names ending with a hyphen followed by six characters.
If you specify an incomplete ARN without the random suffix, and instead provide the 'friendly name', you must not include the random suffix. If you do include the random suffix added by Secrets Manager, you receive either a ResourceNotFoundException or an AccessDeniedException error, depending on your permissions.
public void setResourcePolicy(String resourcePolicy)
A JSON-formatted string constructed according to the grammar and syntax for an AWS resource-based policy. The policy in the string identifies who can access or manage this secret and its versions. For information on how to format a JSON parameter for the various command line tool environments, see Using JSON for Parameters in the AWS CLI User Guide.
resourcePolicy
- A JSON-formatted string constructed according to the grammar and syntax for an AWS resource-based policy.
The policy in the string identifies who can access or manage this secret and its versions. For information
on how to format a JSON parameter for the various command line tool environments, see Using
JSON for Parameters in the AWS CLI User Guide.public String getResourcePolicy()
A JSON-formatted string constructed according to the grammar and syntax for an AWS resource-based policy. The policy in the string identifies who can access or manage this secret and its versions. For information on how to format a JSON parameter for the various command line tool environments, see Using JSON for Parameters in the AWS CLI User Guide.
public PutResourcePolicyRequest withResourcePolicy(String resourcePolicy)
A JSON-formatted string constructed according to the grammar and syntax for an AWS resource-based policy. The policy in the string identifies who can access or manage this secret and its versions. For information on how to format a JSON parameter for the various command line tool environments, see Using JSON for Parameters in the AWS CLI User Guide.
resourcePolicy
- A JSON-formatted string constructed according to the grammar and syntax for an AWS resource-based policy.
The policy in the string identifies who can access or manage this secret and its versions. For information
on how to format a JSON parameter for the various command line tool environments, see Using
JSON for Parameters in the AWS CLI User Guide.public void setBlockPublicPolicy(Boolean blockPublicPolicy)
(Optional) If you set the parameter, BlockPublicPolicy
to true, then you block resource-based
policies that allow broad access to the secret.
blockPublicPolicy
- (Optional) If you set the parameter, BlockPublicPolicy
to true, then you block resource-based
policies that allow broad access to the secret.public Boolean getBlockPublicPolicy()
(Optional) If you set the parameter, BlockPublicPolicy
to true, then you block resource-based
policies that allow broad access to the secret.
BlockPublicPolicy
to true, then you block
resource-based policies that allow broad access to the secret.public PutResourcePolicyRequest withBlockPublicPolicy(Boolean blockPublicPolicy)
(Optional) If you set the parameter, BlockPublicPolicy
to true, then you block resource-based
policies that allow broad access to the secret.
blockPublicPolicy
- (Optional) If you set the parameter, BlockPublicPolicy
to true, then you block resource-based
policies that allow broad access to the secret.public Boolean isBlockPublicPolicy()
(Optional) If you set the parameter, BlockPublicPolicy
to true, then you block resource-based
policies that allow broad access to the secret.
BlockPublicPolicy
to true, then you block
resource-based policies that allow broad access to the secret.public String toString()
toString
in class Object
Object.toString()
public PutResourcePolicyRequest clone()
AmazonWebServiceRequest
clone
in class AmazonWebServiceRequest
Object.clone()