Class: AWSCDK::EC2::CfnSnapshotBlockPublicAccessProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ec2/cfn_snapshot_block_public_access_props.rb

Overview

Properties for defining a CfnSnapshotBlockPublicAccess.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(state:) ⇒ CfnSnapshotBlockPublicAccessProps

Returns a new instance of CfnSnapshotBlockPublicAccessProps.

Parameters:

  • state (String)

    The mode in which to enable block public access for snapshots for the Region.



10
11
12
13
# File 'ec2/cfn_snapshot_block_public_access_props.rb', line 10

def initialize(state:)
  @state = state
  Jsii::Type.check_type(@state, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "state")
end

Instance Attribute Details

#stateString (readonly)

The mode in which to enable block public access for snapshots for the Region.

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.


27
28
29
# File 'ec2/cfn_snapshot_block_public_access_props.rb', line 27

def state
  @state
end

Class Method Details

.jsii_propertiesObject



29
30
31
32
33
# File 'ec2/cfn_snapshot_block_public_access_props.rb', line 29

def self.jsii_properties
  {
    :state => "state",
  }
end

Instance Method Details

#to_jsiiObject



35
36
37
38
39
40
41
# File 'ec2/cfn_snapshot_block_public_access_props.rb', line 35

def to_jsii
  result = {}
  result.merge!({
    "state" => @state,
  })
  result.compact
end