Class: AWSCDK::ECS::CfnExpressGatewayServiceProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ecs/cfn_express_gateway_service_props.rb

Overview

Properties for defining a CfnExpressGatewayService.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(execution_role_arn:, infrastructure_role_arn:, primary_container:, cluster: nil, cpu: nil, health_check_path: nil, memory: nil, network_configuration: nil, scaling_target: nil, service_name: nil, tags: nil, task_role_arn: nil) ⇒ CfnExpressGatewayServiceProps

Returns a new instance of CfnExpressGatewayServiceProps.

Parameters:

  • execution_role_arn (String)

    The ARN of the task execution role for the service revision.

  • infrastructure_role_arn (String)

    The ARN of the infrastructure role that manages AWS resources for the Express service.

  • primary_container (AWSCDK::IResolvable, AWSCDK::ECS::CfnExpressGatewayService::ExpressGatewayContainerProperty)

    The primary container configuration for this service revision.

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

    The short name or full ARN of the cluster that hosts the Express service.

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

    The CPU allocation for tasks in this service revision.

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

    The health check path for this service revision.

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

    The memory allocation for tasks in this service revision.

  • network_configuration (AWSCDK::IResolvable, AWSCDK::ECS::CfnExpressGatewayService::ExpressGatewayServiceNetworkConfigurationProperty, nil) (defaults to: nil)

    The network configuration for tasks in this service revision.

  • scaling_target (AWSCDK::IResolvable, AWSCDK::ECS::CfnExpressGatewayService::ExpressGatewayScalingTargetProperty, nil) (defaults to: nil)

    The auto-scaling configuration for this service revision.

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

    The name of the Express service.

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

    The metadata applied to the Express service.

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

    The ARN of the task role for the service revision.



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'ecs/cfn_express_gateway_service_props.rb', line 21

def initialize(execution_role_arn:, infrastructure_role_arn:, primary_container:, cluster: nil, cpu: nil, health_check_path: nil, memory: nil, network_configuration: nil, scaling_target: nil, service_name: nil, tags: nil, task_role_arn: nil)
  @execution_role_arn = execution_role_arn
  Jsii::Type.check_type(@execution_role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "executionRoleArn")
  @infrastructure_role_arn = infrastructure_role_arn
  Jsii::Type.check_type(@infrastructure_role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "infrastructureRoleArn")
  @primary_container = primary_container.is_a?(Hash) ? ::AWSCDK::ECS::CfnExpressGatewayService::ExpressGatewayContainerProperty.new(**primary_container.transform_keys(&:to_sym)) : primary_container
  Jsii::Type.check_type(@primary_container, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lY3MuQ2ZuRXhwcmVzc0dhdGV3YXlTZXJ2aWNlLkV4cHJlc3NHYXRld2F5Q29udGFpbmVyUHJvcGVydHkifV19fQ==")), "primaryContainer")
  @cluster = cluster
  Jsii::Type.check_type(@cluster, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "cluster") unless @cluster.nil?
  @cpu = cpu
  Jsii::Type.check_type(@cpu, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "cpu") unless @cpu.nil?
  @health_check_path = health_check_path
  Jsii::Type.check_type(@health_check_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "healthCheckPath") unless @health_check_path.nil?
  @memory = memory
  Jsii::Type.check_type(@memory, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "memory") unless @memory.nil?
  @network_configuration = network_configuration.is_a?(Hash) ? ::AWSCDK::ECS::CfnExpressGatewayService::ExpressGatewayServiceNetworkConfigurationProperty.new(**network_configuration.transform_keys(&:to_sym)) : network_configuration
  Jsii::Type.check_type(@network_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lY3MuQ2ZuRXhwcmVzc0dhdGV3YXlTZXJ2aWNlLkV4cHJlc3NHYXRld2F5U2VydmljZU5ldHdvcmtDb25maWd1cmF0aW9uUHJvcGVydHkifV19fQ==")), "networkConfiguration") unless @network_configuration.nil?
  @scaling_target = scaling_target.is_a?(Hash) ? ::AWSCDK::ECS::CfnExpressGatewayService::ExpressGatewayScalingTargetProperty.new(**scaling_target.transform_keys(&:to_sym)) : scaling_target
  Jsii::Type.check_type(@scaling_target, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lY3MuQ2ZuRXhwcmVzc0dhdGV3YXlTZXJ2aWNlLkV4cHJlc3NHYXRld2F5U2NhbGluZ1RhcmdldFByb3BlcnR5In1dfX0=")), "scalingTarget") unless @scaling_target.nil?
  @service_name = service_name
  Jsii::Type.check_type(@service_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serviceName") unless @service_name.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?
  @task_role_arn = task_role_arn
  Jsii::Type.check_type(@task_role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "taskRoleArn") unless @task_role_arn.nil?
end

Instance Attribute Details

#clusterString? (readonly)

Note:

Default: - "default"

The short name or full ARN of the cluster that hosts the Express service.



68
69
70
# File 'ecs/cfn_express_gateway_service_props.rb', line 68

def cluster
  @cluster
end

#cpuString? (readonly)

Note:

Default: - "256"

The CPU allocation for tasks in this service revision.



74
75
76
# File 'ecs/cfn_express_gateway_service_props.rb', line 74

def cpu
  @cpu
end

#execution_role_arnString (readonly)

The ARN of the task execution role for the service revision.



52
53
54
# File 'ecs/cfn_express_gateway_service_props.rb', line 52

def execution_role_arn
  @execution_role_arn
end

#health_check_pathString? (readonly)

Note:

Default: - "HTTP:80/ping"

The health check path for this service revision.



80
81
82
# File 'ecs/cfn_express_gateway_service_props.rb', line 80

def health_check_path
  @health_check_path
end

#infrastructure_role_arnString (readonly)

The ARN of the infrastructure role that manages AWS resources for the Express service.



57
58
59
# File 'ecs/cfn_express_gateway_service_props.rb', line 57

def infrastructure_role_arn
  @infrastructure_role_arn
end

#memoryString? (readonly)

Note:

Default: - "512"

The memory allocation for tasks in this service revision.



86
87
88
# File 'ecs/cfn_express_gateway_service_props.rb', line 86

def memory
  @memory
end

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

The network configuration for tasks in this service revision.



91
92
93
# File 'ecs/cfn_express_gateway_service_props.rb', line 91

def network_configuration
  @network_configuration
end

#primary_containerAWSCDK::IResolvable, AWSCDK::ECS::CfnExpressGatewayService::ExpressGatewayContainerProperty (readonly)

The primary container configuration for this service revision.



62
63
64
# File 'ecs/cfn_express_gateway_service_props.rb', line 62

def primary_container
  @primary_container
end

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

The auto-scaling configuration for this service revision.



96
97
98
# File 'ecs/cfn_express_gateway_service_props.rb', line 96

def scaling_target
  @scaling_target
end

#service_nameString? (readonly)

The name of the Express service.



101
102
103
# File 'ecs/cfn_express_gateway_service_props.rb', line 101

def service_name
  @service_name
end

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

The metadata applied to the Express service.



106
107
108
# File 'ecs/cfn_express_gateway_service_props.rb', line 106

def tags
  @tags
end

#task_role_arnString? (readonly)

The ARN of the task role for the service revision.



111
112
113
# File 'ecs/cfn_express_gateway_service_props.rb', line 111

def task_role_arn
  @task_role_arn
end

Class Method Details

.jsii_propertiesObject



113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# File 'ecs/cfn_express_gateway_service_props.rb', line 113

def self.jsii_properties
  {
    :execution_role_arn => "executionRoleArn",
    :infrastructure_role_arn => "infrastructureRoleArn",
    :primary_container => "primaryContainer",
    :cluster => "cluster",
    :cpu => "cpu",
    :health_check_path => "healthCheckPath",
    :memory => "memory",
    :network_configuration => "networkConfiguration",
    :scaling_target => "scalingTarget",
    :service_name => "serviceName",
    :tags => "tags",
    :task_role_arn => "taskRoleArn",
  }
end

Instance Method Details

#to_jsiiObject



130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
# File 'ecs/cfn_express_gateway_service_props.rb', line 130

def to_jsii
  result = {}
  result.merge!({
    "executionRoleArn" => @execution_role_arn,
    "infrastructureRoleArn" => @infrastructure_role_arn,
    "primaryContainer" => @primary_container,
    "cluster" => @cluster,
    "cpu" => @cpu,
    "healthCheckPath" => @health_check_path,
    "memory" => @memory,
    "networkConfiguration" => @network_configuration,
    "scalingTarget" => @scaling_target,
    "serviceName" => @service_name,
    "tags" => @tags,
    "taskRoleArn" => @task_role_arn,
  })
  result.compact
end