Class: AWSCDK::RedshiftServerless::CfnSnapshotProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
redshift_serverless/cfn_snapshot_props.rb

Overview

Properties for defining a CfnSnapshot.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(snapshot_name:, namespace_name: nil, retention_period: nil, tags: nil) ⇒ CfnSnapshotProps

Returns a new instance of CfnSnapshotProps.

Parameters:

  • snapshot_name (String)

    The name of the snapshot.

  • namespace_name (String, nil) (defaults to: nil)

    The name of the namepsace.

  • retention_period (Numeric, nil) (defaults to: nil)

    The retention period of the snapshot created by the scheduled action.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    An array of Tag objects to associate with the snapshot.



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 = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#namespace_nameString? (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_periodNumeric? (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_nameString (readonly)

The name of the snapshot.



28
29
30
# File 'redshift_serverless/cfn_snapshot_props.rb', line 28

def snapshot_name
  @snapshot_name
end

#tagsArray<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
  @tags
end

Class Method Details

.jsii_propertiesObject



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_jsiiObject



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