Class: AWSCDK::Lightsail::CfnCertificateProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
lightsail/cfn_certificate_props.rb

Overview

Properties for defining a CfnCertificate.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(certificate_name:, domain_name:, subject_alternative_names: nil, tags: nil) ⇒ CfnCertificateProps

Returns a new instance of CfnCertificateProps.

Parameters:

  • certificate_name (String)

    The name of the certificate.

  • domain_name (String)

    The domain name of the certificate.

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

    An array of strings that specify the alternate domains (such as example.org ) and subdomains (such as blog.example.com ) of the certificate.

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

    An array of key-value pairs to apply to this resource.



13
14
15
16
17
18
19
20
21
22
# File 'lightsail/cfn_certificate_props.rb', line 13

def initialize(certificate_name:, domain_name:, subject_alternative_names: nil, tags: nil)
  @certificate_name = certificate_name
  Jsii::Type.check_type(@certificate_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "certificateName")
  @domain_name = domain_name
  Jsii::Type.check_type(@domain_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "domainName")
  @subject_alternative_names = subject_alternative_names
  Jsii::Type.check_type(@subject_alternative_names, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "subjectAlternativeNames") unless @subject_alternative_names.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

#certificate_nameString (readonly)

The name of the certificate.



28
29
30
# File 'lightsail/cfn_certificate_props.rb', line 28

def certificate_name
  @certificate_name
end

#domain_nameString (readonly)

The domain name of the certificate.



33
34
35
# File 'lightsail/cfn_certificate_props.rb', line 33

def domain_name
  @domain_name
end

#subject_alternative_namesArray<String>? (readonly)

An array of strings that specify the alternate domains (such as example.org ) and subdomains (such as blog.example.com ) of the certificate.



38
39
40
# File 'lightsail/cfn_certificate_props.rb', line 38

def subject_alternative_names
  @subject_alternative_names
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

An array of key-value pairs to apply to this resource.

For more information, see Tag in the AWS CloudFormation User Guide .

The Value of Tags is optional for Lightsail resources.



47
48
49
# File 'lightsail/cfn_certificate_props.rb', line 47

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



49
50
51
52
53
54
55
56
# File 'lightsail/cfn_certificate_props.rb', line 49

def self.jsii_properties
  {
    :certificate_name => "certificateName",
    :domain_name => "domainName",
    :subject_alternative_names => "subjectAlternativeNames",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



58
59
60
61
62
63
64
65
66
67
# File 'lightsail/cfn_certificate_props.rb', line 58

def to_jsii
  result = {}
  result.merge!({
    "certificateName" => @certificate_name,
    "domainName" => @domain_name,
    "subjectAlternativeNames" => @subject_alternative_names,
    "tags" => @tags,
  })
  result.compact
end