Class: AWSCDK::MissingRemovalPolicies
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::MissingRemovalPolicies
- Defined in:
- missing_removal_policies.rb
Overview
Manages removal policies for resources without existing policies within a construct scope.
Class Method Summary collapse
- .jsii_overridable_methods ⇒ Object
-
.of(scope) ⇒ AWSCDK::MissingRemovalPolicies
Returns the missing removal policies API for the given scope.
Instance Method Summary collapse
-
#apply(policy, props = nil) ⇒ void
Apply a removal policy only to resources without existing policies within this scope.
-
#destroy(props = nil) ⇒ void
Apply DESTROY removal policy only to resources without existing policies within this scope.
-
#initialize(*args) ⇒ MissingRemovalPolicies
constructor
A new instance of MissingRemovalPolicies.
-
#retain(props = nil) ⇒ void
Apply RETAIN removal policy only to resources without existing policies within this scope.
-
#retain_on_update_or_delete(props = nil) ⇒ void
Apply RETAIN_ON_UPDATE_OR_DELETE removal policy only to resources without existing policies within this scope.
-
#snapshot(props = nil) ⇒ void
Apply SNAPSHOT removal policy only to resources without existing policies within this scope.
Constructor Details
#initialize(*args) ⇒ MissingRemovalPolicies
Returns a new instance of MissingRemovalPolicies.
8 9 10 |
# File 'missing_removal_policies.rb', line 8 def initialize(*args) raise NoMethodError, "aws-cdk-lib.MissingRemovalPolicies does not have a visible constructor; use the provided factory methods" end |
Class Method Details
.jsii_overridable_methods ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'missing_removal_policies.rb', line 12 def self.jsii_overridable_methods { :apply => { kind: :method, name: "apply", is_optional: false }, :destroy => { kind: :method, name: "destroy", is_optional: false }, :retain => { kind: :method, name: "retain", is_optional: false }, :retain_on_update_or_delete => { kind: :method, name: "retainOnUpdateOrDelete", is_optional: false }, :snapshot => { kind: :method, name: "snapshot", is_optional: false }, } end |
.of(scope) ⇒ AWSCDK::MissingRemovalPolicies
Returns the missing removal policies API for the given scope.
26 27 28 29 |
# File 'missing_removal_policies.rb', line 26 def self.of(scope) Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklDb25zdHJ1Y3QifQ==")), "scope") Jsii::Kernel.instance.call_static("aws-cdk-lib.MissingRemovalPolicies", "of", [scope]) end |
Instance Method Details
#apply(policy, props = nil) ⇒ void
This method returns an undefined value.
Apply a removal policy only to resources without existing policies within this scope.
36 37 38 39 40 41 |
# File 'missing_removal_policies.rb', line 36 def apply(policy, props = nil) Jsii::Type.check_type(policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "policy") props = props.is_a?(Hash) ? ::AWSCDK::RemovalPolicyProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5UHJvcHMifQ==")), "props") unless props.nil? jsii_call_method("apply", [policy, props]) end |
#destroy(props = nil) ⇒ void
This method returns an undefined value.
Apply DESTROY removal policy only to resources without existing policies within this scope.
47 48 49 50 51 |
# File 'missing_removal_policies.rb', line 47 def destroy(props = nil) props = props.is_a?(Hash) ? ::AWSCDK::RemovalPolicyProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5UHJvcHMifQ==")), "props") unless props.nil? jsii_call_method("destroy", [props]) end |
#retain(props = nil) ⇒ void
This method returns an undefined value.
Apply RETAIN removal policy only to resources without existing policies within this scope.
57 58 59 60 61 |
# File 'missing_removal_policies.rb', line 57 def retain(props = nil) props = props.is_a?(Hash) ? ::AWSCDK::RemovalPolicyProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5UHJvcHMifQ==")), "props") unless props.nil? jsii_call_method("retain", [props]) end |
#retain_on_update_or_delete(props = nil) ⇒ void
This method returns an undefined value.
Apply RETAIN_ON_UPDATE_OR_DELETE removal policy only to resources without existing policies within this scope.
67 68 69 70 71 |
# File 'missing_removal_policies.rb', line 67 def retain_on_update_or_delete(props = nil) props = props.is_a?(Hash) ? ::AWSCDK::RemovalPolicyProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5UHJvcHMifQ==")), "props") unless props.nil? jsii_call_method("retainOnUpdateOrDelete", [props]) end |
#snapshot(props = nil) ⇒ void
This method returns an undefined value.
Apply SNAPSHOT removal policy only to resources without existing policies within this scope.
77 78 79 80 81 |
# File 'missing_removal_policies.rb', line 77 def snapshot(props = nil) props = props.is_a?(Hash) ? ::AWSCDK::RemovalPolicyProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5UHJvcHMifQ==")), "props") unless props.nil? jsii_call_method("snapshot", [props]) end |