Class: AWSCDK::MSK::CfnConfigurationProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
msk/cfn_configuration_props.rb

Overview

Properties for defining a CfnConfiguration.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, server_properties:, description: nil, kafka_versions_list: nil, latest_revision: nil) ⇒ CfnConfigurationProps

Returns a new instance of CfnConfigurationProps.

Parameters:

  • name (String)

    The name of the configuration.

  • server_properties (String)

    Contents of the server.properties file. When using the console, the SDK, or the AWS CLI , the contents of server.properties can be in plaintext.

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

    The description of the configuration.

  • kafka_versions_list (Array<String>, nil) (defaults to: nil)

    The versions of Apache Kafka with which you can use this MSK configuration.

  • latest_revision (AWSCDK::IResolvable, AWSCDK::MSK::CfnConfiguration::LatestRevisionProperty, nil) (defaults to: nil)

    Latest revision of the MSK configuration.



14
15
16
17
18
19
20
21
22
23
24
25
# File 'msk/cfn_configuration_props.rb', line 14

def initialize(name:, server_properties:, description: nil, kafka_versions_list: nil, latest_revision: nil)
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @server_properties = server_properties
  Jsii::Type.check_type(@server_properties, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serverProperties")
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @kafka_versions_list = kafka_versions_list
  Jsii::Type.check_type(@kafka_versions_list, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "kafkaVersionsList") unless @kafka_versions_list.nil?
  @latest_revision = latest_revision.is_a?(Hash) ? ::AWSCDK::MSK::CfnConfiguration::LatestRevisionProperty.new(**latest_revision.transform_keys(&:to_sym)) : latest_revision
  Jsii::Type.check_type(@latest_revision, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19tc2suQ2ZuQ29uZmlndXJhdGlvbi5MYXRlc3RSZXZpc2lvblByb3BlcnR5In1dfX0=")), "latestRevision") unless @latest_revision.nil?
end

Instance Attribute Details

#descriptionString? (readonly)

The description of the configuration.



43
44
45
# File 'msk/cfn_configuration_props.rb', line 43

def description
  @description
end

#kafka_versions_listArray<String>? (readonly)

The versions of Apache Kafka with which you can use this MSK configuration.

When you update the KafkaVersionsList property, CloudFormation recreates a new configuration with the updated property before deleting the old configuration. Such an update requires a resource replacement . To successfully update KafkaVersionsList , you must also update the Name property in the same operation.

If your configuration is attached with any clusters created using the AWS Management Console or AWS CLI , you'll need to manually delete the old configuration from the console after the update completes.

For more information, see Can’t update KafkaVersionsList in MSK configuration in the Amazon MSK Developer Guide .



54
55
56
# File 'msk/cfn_configuration_props.rb', line 54

def kafka_versions_list
  @kafka_versions_list
end

#latest_revisionAWSCDK::IResolvable, ... (readonly)

Latest revision of the MSK configuration.



59
60
61
# File 'msk/cfn_configuration_props.rb', line 59

def latest_revision
  @latest_revision
end

#nameString (readonly)

The name of the configuration.

Configuration names are strings that match the regex "^[0-9A-Za-z][0-9A-Za-z-]0,$".



33
34
35
# File 'msk/cfn_configuration_props.rb', line 33

def name
  @name
end

#server_propertiesString (readonly)

Contents of the server.properties file. When using the console, the SDK, or the AWS CLI , the contents of server.properties can be in plaintext.



38
39
40
# File 'msk/cfn_configuration_props.rb', line 38

def server_properties
  @server_properties
end

Class Method Details

.jsii_propertiesObject



61
62
63
64
65
66
67
68
69
# File 'msk/cfn_configuration_props.rb', line 61

def self.jsii_properties
  {
    :name => "name",
    :server_properties => "serverProperties",
    :description => "description",
    :kafka_versions_list => "kafkaVersionsList",
    :latest_revision => "latestRevision",
  }
end

Instance Method Details

#to_jsiiObject



71
72
73
74
75
76
77
78
79
80
81
# File 'msk/cfn_configuration_props.rb', line 71

def to_jsii
  result = {}
  result.merge!({
    "name" => @name,
    "serverProperties" => @server_properties,
    "description" => @description,
    "kafkaVersionsList" => @kafka_versions_list,
    "latestRevision" => @latest_revision,
  })
  result.compact
end