Class: AWSCDK::ECR::Mixins::RepositoryAutoDeleteImages

Inherits:
Mixin
  • Object
show all
Defined in:
ecr/mixins/repository_auto_delete_images.rb

Overview

ECR-specific Mixin to force-delete all images from a repository when the repository is removed from the stack or when the stack is deleted.

Sets the empty_on_delete property on the repository.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeRepositoryAutoDeleteImages

Returns a new instance of RepositoryAutoDeleteImages.



10
11
12
# File 'ecr/mixins/repository_auto_delete_images.rb', line 10

def initialize
  Jsii::Object.instance_method(:initialize).bind(self).call
end

Class Method Details

.jsii_overridable_methodsObject



14
15
16
17
18
19
# File 'ecr/mixins/repository_auto_delete_images.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 'ecr/mixins/repository_auto_delete_images.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 'ecr/mixins/repository_auto_delete_images.rb', line 34

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