Class: AWSCDK::S3::Mixins::BucketVersioning

Inherits:
Mixin
  • Object
show all
Defined in:
s3/mixins/bucket_versioning.rb

Overview

S3-specific mixin for enabling versioning.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(enabled = nil) ⇒ BucketVersioning

Returns a new instance of BucketVersioning.

Parameters:

  • enabled (Boolean, nil) (defaults to: nil)


9
10
11
12
# File 's3/mixins/bucket_versioning.rb', line 9

def initialize(enabled = nil)
  Jsii::Type.check_type(enabled, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "enabled") unless enabled.nil?
  Jsii::Object.instance_method(:initialize).bind(self).call(enabled)
end

Class Method Details

.jsii_overridable_methodsObject



14
15
16
17
18
19
# File 's3/mixins/bucket_versioning.rb', line 14

def self.jsii_overridable_methods
  {
    :apply_to => { kind: :method, name: "applyTo", is_optional: false },
    :supports => { kind: :method, name: "supports", is_optional: false },
  }
end

Instance Method Details

#apply_to(construct) ⇒ void

This method returns an undefined value.

Applies the mixin functionality to the target construct.

Parameters:

  • construct (Constructs::IConstruct)


25
26
27
28
# File 's3/mixins/bucket_versioning.rb', line 25

def apply_to(construct)
  Jsii::Type.check_type(construct, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklDb25zdHJ1Y3QifQ==")), "construct")
  jsii_call_method("applyTo", [construct])
end

#supports(construct) ⇒ Boolean

Determines whether this mixin can be applied to the given construct.

Parameters:

  • construct (Constructs::IConstruct)

Returns:

  • (Boolean)


34
35
36
37
# File 's3/mixins/bucket_versioning.rb', line 34

def supports(construct)
  Jsii::Type.check_type(construct, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklDb25zdHJ1Y3QifQ==")), "construct")
  jsii_call_method("supports", [construct])
end