Class: AWSCDK::CloudFront::KeyGroupProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cloud_front/key_group_props.rb

Overview

Properties for creating a Public Key.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(items:, comment: nil, key_group_name: nil) ⇒ KeyGroupProps

Returns a new instance of KeyGroupProps.

Parameters:

  • items (Array<AWSCDK::Interfaces::AWSCloudfront::IPublicKeyRef>)

    A list of public keys to add to the key group.

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

    A comment to describe the key group.

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

    A name to identify the key group.



10
11
12
13
14
15
16
17
# File 'cloud_front/key_group_props.rb', line 10

def initialize(items:, comment: nil, key_group_name: nil)
  @items = items
  Jsii::Type.check_type(@items, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmludGVyZmFjZXMuYXdzX2Nsb3VkZnJvbnQuSVB1YmxpY0tleVJlZiJ9LCJraW5kIjoiYXJyYXkifX0=")), "items")
  @comment = comment
  Jsii::Type.check_type(@comment, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "comment") unless @comment.nil?
  @key_group_name = key_group_name
  Jsii::Type.check_type(@key_group_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "keyGroupName") unless @key_group_name.nil?
end

Instance Attribute Details

#commentString? (readonly)

Note:

Default: - no comment

A comment to describe the key group.

Returns:

  • (String, nil)


27
28
29
# File 'cloud_front/key_group_props.rb', line 27

def comment
  @comment
end

#itemsArray<AWSCDK::Interfaces::AWSCloudfront::IPublicKeyRef> (readonly)

A list of public keys to add to the key group.



22
23
24
# File 'cloud_front/key_group_props.rb', line 22

def items
  @items
end

#key_group_nameString? (readonly)

Note:

Default: - generated from the id

A name to identify the key group.

Returns:

  • (String, nil)


32
33
34
# File 'cloud_front/key_group_props.rb', line 32

def key_group_name
  @key_group_name
end

Class Method Details

.jsii_propertiesObject



34
35
36
37
38
39
40
# File 'cloud_front/key_group_props.rb', line 34

def self.jsii_properties
  {
    :items => "items",
    :comment => "comment",
    :key_group_name => "keyGroupName",
  }
end

Instance Method Details

#to_jsiiObject



42
43
44
45
46
47
48
49
50
# File 'cloud_front/key_group_props.rb', line 42

def to_jsii
  result = {}
  result.merge!({
    "items" => @items,
    "comment" => @comment,
    "keyGroupName" => @key_group_name,
  })
  result.compact
end