Class CfnResourcePolicyProps.Builder
java.lang.Object
software.amazon.awscdk.services.secretsmanager.CfnResourcePolicyProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnResourcePolicyProps>
- Enclosing interface:
CfnResourcePolicyProps
@Stability(Stable)
public static final class CfnResourcePolicyProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnResourcePolicyProps>
A builder for
CfnResourcePolicyProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionblockPublicPolicy
(Boolean blockPublicPolicy) Sets the value ofCfnResourcePolicyProps.getBlockPublicPolicy()
blockPublicPolicy
(IResolvable blockPublicPolicy) Sets the value ofCfnResourcePolicyProps.getBlockPublicPolicy()
build()
Builds the configured instance.resourcePolicy
(Object resourcePolicy) Sets the value ofCfnResourcePolicyProps.getResourcePolicy()
Sets the value ofCfnResourcePolicyProps.getSecretId()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
resourcePolicy
Sets the value ofCfnResourcePolicyProps.getResourcePolicy()
- Parameters:
resourcePolicy
- A JSON-formatted string for an AWS resource-based policy. This parameter is required. For example policies, see Permissions policy examples .- Returns:
this
-
secretId
Sets the value ofCfnResourcePolicyProps.getSecretId()
- Parameters:
secretId
- The ARN or name of the secret to attach the resource-based policy. This parameter is required. For an ARN, we recommend that you specify a complete ARN rather than a partial ARN.- Returns:
this
-
blockPublicPolicy
@Stability(Stable) public CfnResourcePolicyProps.Builder blockPublicPolicy(Boolean blockPublicPolicy) Sets the value ofCfnResourcePolicyProps.getBlockPublicPolicy()
- Parameters:
blockPublicPolicy
- Specifies whether to block resource-based policies that allow broad access to the secret. By default, Secrets Manager blocks policies that allow broad access, for example those that use a wildcard for the principal.- Returns:
this
-
blockPublicPolicy
@Stability(Stable) public CfnResourcePolicyProps.Builder blockPublicPolicy(IResolvable blockPublicPolicy) Sets the value ofCfnResourcePolicyProps.getBlockPublicPolicy()
- Parameters:
blockPublicPolicy
- Specifies whether to block resource-based policies that allow broad access to the secret. By default, Secrets Manager blocks policies that allow broad access, for example those that use a wildcard for the principal.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnResourcePolicyProps>
- Returns:
- a new instance of
CfnResourcePolicyProps
- Throws:
NullPointerException
- if any required attribute was not provided
-