Class: AWSCDK::RedshiftServerless::CfnSnapshotProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::RedshiftServerless::CfnSnapshotProps
- Defined in:
- redshift_serverless/cfn_snapshot_props.rb
Overview
Properties for defining a CfnSnapshot.
Instance Attribute Summary collapse
-
#namespace_name ⇒ String?
readonly
The name of the namepsace.
-
#retention_period ⇒ Numeric?
readonly
The retention period of the snapshot created by the scheduled action.
-
#snapshot_name ⇒ String
readonly
The name of the snapshot.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
An array of Tag objects to associate with the snapshot.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(snapshot_name:, namespace_name: nil, retention_period: nil, tags: nil) ⇒ CfnSnapshotProps
constructor
A new instance of CfnSnapshotProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(snapshot_name:, namespace_name: nil, retention_period: nil, tags: nil) ⇒ CfnSnapshotProps
Returns a new instance of CfnSnapshotProps.
13 14 15 16 17 18 19 20 21 22 |
# File 'redshift_serverless/cfn_snapshot_props.rb', line 13 def initialize(snapshot_name:, namespace_name: nil, retention_period: nil, tags: nil) @snapshot_name = snapshot_name Jsii::Type.check_type(@snapshot_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "snapshotName") @namespace_name = namespace_name Jsii::Type.check_type(@namespace_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "namespaceName") unless @namespace_name.nil? @retention_period = retention_period Jsii::Type.check_type(@retention_period, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "retentionPeriod") unless @retention_period.nil? @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? end |
Instance Attribute Details
#namespace_name ⇒ String? (readonly)
The name of the namepsace.
33 34 35 |
# File 'redshift_serverless/cfn_snapshot_props.rb', line 33 def namespace_name @namespace_name end |
#retention_period ⇒ Numeric? (readonly)
The retention period of the snapshot created by the scheduled action.
38 39 40 |
# File 'redshift_serverless/cfn_snapshot_props.rb', line 38 def retention_period @retention_period end |
#snapshot_name ⇒ String (readonly)
The name of the snapshot.
28 29 30 |
# File 'redshift_serverless/cfn_snapshot_props.rb', line 28 def snapshot_name @snapshot_name end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
An array of Tag objects to associate with the snapshot.
43 44 45 |
# File 'redshift_serverless/cfn_snapshot_props.rb', line 43 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
45 46 47 48 49 50 51 52 |
# File 'redshift_serverless/cfn_snapshot_props.rb', line 45 def self.jsii_properties { :snapshot_name => "snapshotName", :namespace_name => "namespaceName", :retention_period => "retentionPeriod", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
54 55 56 57 58 59 60 61 62 63 |
# File 'redshift_serverless/cfn_snapshot_props.rb', line 54 def to_jsii result = {} result.merge!({ "snapshotName" => @snapshot_name, "namespaceName" => @namespace_name, "retentionPeriod" => @retention_period, "tags" => @tags, }) result.compact end |