Class CfnSnapshotBlockPublicAccessProps.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.CfnSnapshotBlockPublicAccessProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnSnapshotBlockPublicAccessProps>
- Enclosing interface:
CfnSnapshotBlockPublicAccessProps
@Stability(Stable)
public static final class CfnSnapshotBlockPublicAccessProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnSnapshotBlockPublicAccessProps>
A builder for
CfnSnapshotBlockPublicAccessProps
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofCfnSnapshotBlockPublicAccessProps.getState()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
state
Sets the value ofCfnSnapshotBlockPublicAccessProps.getState()
- Parameters:
state
- The mode in which to enable block public access for snapshots for the Region. This parameter is required. Specify one of the following values:block-all-sharing
- Prevents all public sharing of snapshots in the Region. Users in the account will no longer be able to request new public sharing. Additionally, snapshots that are already publicly shared are treated as private and they are no longer publicly available.
If you enable block public access for snapshots in
block-all-sharing
mode, it does not change the permissions for snapshots that are already publicly shared. Instead, it prevents these snapshots from be publicly visible and publicly accessible. Therefore, the attributes for these snapshots still indicate that they are publicly shared, even though they are not publicly available.block-new-sharing
- Prevents only new public sharing of snapshots in the Region. Users in the account will no longer be able to request new public sharing. However, snapshots that are already publicly shared, remain publicly available.
- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnSnapshotBlockPublicAccessProps>
- Returns:
- a new instance of
CfnSnapshotBlockPublicAccessProps
- Throws:
NullPointerException
- if any required attribute was not provided
-