Class: AWSCDK::ECS::EC2ServiceAttributes
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ECS::EC2ServiceAttributes
- Defined in:
- ecs/ec2_service_attributes.rb
Overview
The properties to import from the service using the EC2 launch type.
Instance Attribute Summary collapse
-
#cluster ⇒ AWSCDK::ECS::ICluster
readonly
The cluster that hosts the service.
-
#service_arn ⇒ String?
readonly
The service ARN.
-
#service_name ⇒ String?
readonly
The name of the service.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(cluster:, service_arn: nil, service_name: nil) ⇒ EC2ServiceAttributes
constructor
A new instance of EC2ServiceAttributes.
- #to_jsii ⇒ Object
Constructor Details
#initialize(cluster:, service_arn: nil, service_name: nil) ⇒ EC2ServiceAttributes
Returns a new instance of EC2ServiceAttributes.
10 11 12 13 14 15 16 17 |
# File 'ecs/ec2_service_attributes.rb', line 10 def initialize(cluster:, service_arn: nil, service_name: nil) @cluster = cluster Jsii::Type.check_type(@cluster, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLklDbHVzdGVyIn0=")), "cluster") @service_arn = service_arn Jsii::Type.check_type(@service_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serviceArn") unless @service_arn.nil? @service_name = service_name Jsii::Type.check_type(@service_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serviceName") unless @service_name.nil? end |
Instance Attribute Details
#cluster ⇒ AWSCDK::ECS::ICluster (readonly)
The cluster that hosts the service.
22 23 24 |
# File 'ecs/ec2_service_attributes.rb', line 22 def cluster @cluster end |
#service_arn ⇒ String? (readonly)
Note:
Default: - either this, or serviceName, is required
The service ARN.
27 28 29 |
# File 'ecs/ec2_service_attributes.rb', line 27 def service_arn @service_arn end |
#service_name ⇒ String? (readonly)
Note:
Default: - either this, or serviceArn, is required
The name of the service.
32 33 34 |
# File 'ecs/ec2_service_attributes.rb', line 32 def service_name @service_name end |
Class Method Details
.jsii_properties ⇒ Object
34 35 36 37 38 39 40 |
# File 'ecs/ec2_service_attributes.rb', line 34 def self.jsii_properties { :cluster => "cluster", :service_arn => "serviceArn", :service_name => "serviceName", } end |
Instance Method Details
#to_jsii ⇒ Object
42 43 44 45 46 47 48 49 50 |
# File 'ecs/ec2_service_attributes.rb', line 42 def to_jsii result = {} result.merge!({ "cluster" => @cluster, "serviceArn" => @service_arn, "serviceName" => @service_name, }) result.compact end |