Module: AWSCDK::ICfnResourceOptions

Defined in:
i_cfn_resource_options.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.jsii_overridable_methodsObject



129
130
131
132
133
134
135
136
137
138
139
140
# File 'i_cfn_resource_options.rb', line 129

def self.jsii_overridable_methods
  {
    :condition => { kind: :property, name: "condition", is_optional: true },
    :creation_policy => { kind: :property, name: "creationPolicy", is_optional: true },
    :deletion_policy => { kind: :property, name: "deletionPolicy", is_optional: true },
    :description => { kind: :property, name: "description", is_optional: true },
    :metadata => { kind: :property, name: "metadata", is_optional: true },
    :update_policy => { kind: :property, name: "updatePolicy", is_optional: true },
    :update_replace_policy => { kind: :property, name: "updateReplacePolicy", is_optional: true },
    :version => { kind: :property, name: "version", is_optional: true },
  }
end

Instance Method Details

#conditionAWSCDK::CfnCondition?

A condition to associate with this resource.

This means that only if the condition evaluates to 'true' when the stack is deployed, the resource will be included. This is provided to allow CDK projects to produce legacy templates, but normally there is no need to use it in CDK projects.

Returns:



13
14
15
# File 'i_cfn_resource_options.rb', line 13

def condition()
  jsii_get_property("condition")
end

#condition=(value) ⇒ Object



17
18
19
20
# File 'i_cfn_resource_options.rb', line 17

def condition=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5DZm5Db25kaXRpb24ifQ==")), "condition") unless value.nil?
  jsii_set_property("condition", value)
end

#creation_policyAWSCDK::CfnCreationPolicy?

Associate the CreationPolicy attribute with a resource to prevent its status from reaching create complete until AWS CloudFormation receives a specified number of success signals or the timeout period is exceeded.

To signal a resource, you can use the cfn-signal helper script or SignalResource API. AWS CloudFormation publishes valid signals to the stack events so that you track the number of signals sent.

Returns:



29
30
31
# File 'i_cfn_resource_options.rb', line 29

def creation_policy()
  jsii_get_property("creationPolicy")
end

#creation_policy=(value) ⇒ Object



33
34
35
36
37
# File 'i_cfn_resource_options.rb', line 33

def creation_policy=(value)
  value = value.is_a?(Hash) ? ::AWSCDK::CfnCreationPolicy.new(**value.transform_keys(&:to_sym)) : value
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5DZm5DcmVhdGlvblBvbGljeSJ9")), "creationPolicy") unless value.nil?
  jsii_set_property("creationPolicy", value)
end

#deletion_policyAWSCDK::CfnDeletionPolicy?

With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted.

You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default. Note that this capability also applies to update operations that lead to resources being removed.

Returns:



46
47
48
# File 'i_cfn_resource_options.rb', line 46

def deletion_policy()
  jsii_get_property("deletionPolicy")
end

#deletion_policy=(value) ⇒ Object



50
51
52
53
# File 'i_cfn_resource_options.rb', line 50

def deletion_policy=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5DZm5EZWxldGlvblBvbGljeSJ9")), "deletionPolicy") unless value.nil?
  jsii_set_property("deletionPolicy", value)
end

#descriptionString?

The description of this resource.

Used for informational purposes only, is not processed in any way (and stays with the CloudFormation template, is not passed to the underlying resource, even if it does have a 'description' property).

Returns:

  • (String, nil)


62
63
64
# File 'i_cfn_resource_options.rb', line 62

def description()
  jsii_get_property("description")
end

#description=(value) ⇒ Object



66
67
68
69
# File 'i_cfn_resource_options.rb', line 66

def description=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless value.nil?
  jsii_set_property("description", value)
end

#metadataHash{String => Object}?

Metadata associated with the CloudFormation resource.

This is not the same as the construct metadata which can be added using construct.addMetadata(), but would not appear in the CloudFormation template automatically.

Returns:

  • (Hash{String => Object}, nil)


77
78
79
# File 'i_cfn_resource_options.rb', line 77

def ()
  jsii_get_property("metadata")
end

#metadata=(value) ⇒ Object



81
82
83
84
# File 'i_cfn_resource_options.rb', line 81

def metadata=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6ImFueSJ9LCJraW5kIjoibWFwIn19")), "metadata") unless value.nil?
  jsii_set_property("metadata", value)
end

#update_policyAWSCDK::CfnUpdatePolicy?

Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource.

AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.

Returns:



92
93
94
# File 'i_cfn_resource_options.rb', line 92

def update_policy()
  jsii_get_property("updatePolicy")
end

#update_policy=(value) ⇒ Object



96
97
98
99
100
# File 'i_cfn_resource_options.rb', line 96

def update_policy=(value)
  value = value.is_a?(Hash) ? ::AWSCDK::CfnUpdatePolicy.new(**value.transform_keys(&:to_sym)) : value
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5DZm5VcGRhdGVQb2xpY3kifQ==")), "updatePolicy") unless value.nil?
  jsii_set_property("updatePolicy", value)
end

#update_replace_policyAWSCDK::CfnDeletionPolicy?

Use the UpdateReplacePolicy attribute to retain or (in some cases) backup the existing physical instance of a resource when it is replaced during a stack update operation.

Returns:



105
106
107
# File 'i_cfn_resource_options.rb', line 105

def update_replace_policy()
  jsii_get_property("updateReplacePolicy")
end

#update_replace_policy=(value) ⇒ Object



109
110
111
112
# File 'i_cfn_resource_options.rb', line 109

def update_replace_policy=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5DZm5EZWxldGlvblBvbGljeSJ9")), "updateReplacePolicy") unless value.nil?
  jsii_set_property("updateReplacePolicy", value)
end

#versionString?

The version of this resource.

Used only for custom CloudFormation resources.



120
121
122
# File 'i_cfn_resource_options.rb', line 120

def version()
  jsii_get_property("version")
end

#version=(value) ⇒ Object



124
125
126
127
# File 'i_cfn_resource_options.rb', line 124

def version=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "version") unless value.nil?
  jsii_set_property("version", value)
end