Class: AWSCDK::Lightsail::CfnContainerProps

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

Overview

Properties for defining a CfnContainer.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(power:, scale:, service_name:, container_service_deployment: nil, is_disabled: nil, private_registry_access: nil, public_domain_names: nil, tags: nil) ⇒ CfnContainerProps

Returns a new instance of CfnContainerProps.

Parameters:



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lightsail/cfn_container_props.rb', line 17

def initialize(power:, scale:, service_name:, container_service_deployment: nil, is_disabled: nil, private_registry_access: nil, public_domain_names: nil, tags: nil)
  @power = power
  Jsii::Type.check_type(@power, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "power")
  @scale = scale
  Jsii::Type.check_type(@scale, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "scale")
  @service_name = service_name
  Jsii::Type.check_type(@service_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serviceName")
  @container_service_deployment = container_service_deployment.is_a?(Hash) ? ::AWSCDK::Lightsail::CfnContainer::ContainerServiceDeploymentProperty.new(**container_service_deployment.transform_keys(&:to_sym)) : container_service_deployment
  Jsii::Type.check_type(@container_service_deployment, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19saWdodHNhaWwuQ2ZuQ29udGFpbmVyLkNvbnRhaW5lclNlcnZpY2VEZXBsb3ltZW50UHJvcGVydHkifV19fQ==")), "containerServiceDeployment") unless @container_service_deployment.nil?
  @is_disabled = is_disabled
  Jsii::Type.check_type(@is_disabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "isDisabled") unless @is_disabled.nil?
  @private_registry_access = private_registry_access.is_a?(Hash) ? ::AWSCDK::Lightsail::CfnContainer::PrivateRegistryAccessProperty.new(**private_registry_access.transform_keys(&:to_sym)) : private_registry_access
  Jsii::Type.check_type(@private_registry_access, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19saWdodHNhaWwuQ2ZuQ29udGFpbmVyLlByaXZhdGVSZWdpc3RyeUFjY2Vzc1Byb3BlcnR5In1dfX0=")), "privateRegistryAccess") unless @private_registry_access.nil?
  @public_domain_names = public_domain_names
  Jsii::Type.check_type(@public_domain_names, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGlnaHRzYWlsLkNmbkNvbnRhaW5lci5QdWJsaWNEb21haW5OYW1lUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "publicDomainNames") unless @public_domain_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

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

An object that describes the current container deployment of the container service.



59
60
61
# File 'lightsail/cfn_container_props.rb', line 59

def container_service_deployment
  @container_service_deployment
end

#is_disabledBoolean, ... (readonly)

A Boolean value indicating whether the container service is disabled.



64
65
66
# File 'lightsail/cfn_container_props.rb', line 64

def is_disabled
  @is_disabled
end

#powerString (readonly)

The power specification of the container service.

The power specifies the amount of RAM, the number of vCPUs, and the base price of the container service.



42
43
44
# File 'lightsail/cfn_container_props.rb', line 42

def power
  @power
end

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

An object that describes the configuration for the container service to access private container image repositories, such as ( Amazon ECR ) private repositories.

For more information, see Configuring access to an Amazon ECR private repository for an Amazon Lightsail container service in the Amazon Lightsail Developer Guide .



71
72
73
# File 'lightsail/cfn_container_props.rb', line 71

def private_registry_access
  @private_registry_access
end

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

The public domain name of the container service, such as example.com and www.example.com .

You can specify up to four public domain names for a container service. The domain names that you specify are used when you create a deployment with a container that is configured as the public endpoint of your container service.

If you don't specify public domain names, then you can use the default domain of the container service.

You must create and validate an SSL/TLS certificate before you can use public domain names with your container service. Use the AWS::Lightsail::Certificate resource to create a certificate for the public domain names that you want to use with your container service.



82
83
84
# File 'lightsail/cfn_container_props.rb', line 82

def public_domain_names
  @public_domain_names
end

#scaleNumeric (readonly)

The scale specification of the container service.

The scale specifies the allocated compute nodes of the container service.



49
50
51
# File 'lightsail/cfn_container_props.rb', line 49

def scale
  @scale
end

#service_nameString (readonly)

The name of the container service.



54
55
56
# File 'lightsail/cfn_container_props.rb', line 54

def service_name
  @service_name
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.



91
92
93
# File 'lightsail/cfn_container_props.rb', line 91

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



93
94
95
96
97
98
99
100
101
102
103
104
# File 'lightsail/cfn_container_props.rb', line 93

def self.jsii_properties
  {
    :power => "power",
    :scale => "scale",
    :service_name => "serviceName",
    :container_service_deployment => "containerServiceDeployment",
    :is_disabled => "isDisabled",
    :private_registry_access => "privateRegistryAccess",
    :public_domain_names => "publicDomainNames",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



106
107
108
109
110
111
112
113
114
115
116
117
118
119
# File 'lightsail/cfn_container_props.rb', line 106

def to_jsii
  result = {}
  result.merge!({
    "power" => @power,
    "scale" => @scale,
    "serviceName" => @service_name,
    "containerServiceDeployment" => @container_service_deployment,
    "isDisabled" => @is_disabled,
    "privateRegistryAccess" => @private_registry_access,
    "publicDomainNames" => @public_domain_names,
    "tags" => @tags,
  })
  result.compact
end