Class CfnResourcePolicy.Builder
java.lang.Object
software.amazon.awscdk.services.secretsmanager.CfnResourcePolicy.Builder
- All Implemented Interfaces:
- software.amazon.jsii.Builder<CfnResourcePolicy>
- Enclosing class:
- CfnResourcePolicy
@Stability(Stable)
public static final class CfnResourcePolicy.Builder
extends Object
implements software.amazon.jsii.Builder<CfnResourcePolicy>
A fluent builder for 
CfnResourcePolicy.- 
Method SummaryModifier and TypeMethodDescriptionblockPublicPolicy(Boolean blockPublicPolicy) Specifies whether to block resource-based policies that allow broad access to the secret.blockPublicPolicy(IResolvable blockPublicPolicy) Specifies whether to block resource-based policies that allow broad access to the secret.build()static CfnResourcePolicy.BuilderresourcePolicy(Object resourcePolicy) A JSON-formatted string for an AWS resource-based policy.The ARN or name of the secret to attach the resource-based policy.
- 
Method Details- 
create- Parameters:
- scope-- scope in which this resource is defined.
 
- id-- scoped id of the resource.
 
- Returns:
- a new instance of CfnResourcePolicy.Builder.
 
- 
resourcePolicyA JSON-formatted string for an AWS resource-based policy.For example policies, see Permissions policy examples . - Parameters:
- resourcePolicy- A JSON-formatted string for an AWS resource-based policy. This parameter is required.
- Returns:
- this
 
- 
secretIdThe ARN or name of the secret to attach the resource-based policy.For an ARN, we recommend that you specify a complete ARN rather than a partial ARN. - Parameters:
- secretId- The ARN or name of the secret to attach the resource-based policy. This parameter is required.
- Returns:
- this
 
- 
blockPublicPolicySpecifies 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. - Parameters:
- blockPublicPolicy- Specifies whether to block resource-based policies that allow broad access to the secret. This parameter is required.
- Returns:
- this
 
- 
blockPublicPolicy@Stability(Stable) public CfnResourcePolicy.Builder blockPublicPolicy(IResolvable 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. - Parameters:
- blockPublicPolicy- Specifies whether to block resource-based policies that allow broad access to the secret. This parameter is required.
- Returns:
- this
 
- 
build- Specified by:
- buildin interface- software.amazon.jsii.Builder<CfnResourcePolicy>
- Returns:
- a newly built instance of CfnResourcePolicy.
 
 
-