Class: AWSCDK::ECS::ServiceConnectProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ECS::ServiceConnectProps
- Defined in:
- ecs/service_connect_props.rb
Overview
Interface for Service Connect configuration.
Instance Attribute Summary collapse
-
#access_log_configuration ⇒ AWSCDK::ECS::ServiceConnectAccessLogConfiguration?
readonly
The configuration for Service Connect access logs.
-
#log_driver ⇒ AWSCDK::ECS::LogDriver?
readonly
The log driver configuration to use for the Service Connect agent logs.
-
#namespace ⇒ String?
readonly
The cloudmap namespace to register this service into.
-
#services ⇒ Array<AWSCDK::ECS::ServiceConnectService>?
readonly
The list of Services, including a port mapping, terse client alias, and optional intermediate DNS name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(access_log_configuration: nil, log_driver: nil, namespace: nil, services: nil) ⇒ ServiceConnectProps
constructor
A new instance of ServiceConnectProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(access_log_configuration: nil, log_driver: nil, namespace: nil, services: nil) ⇒ ServiceConnectProps
Returns a new instance of ServiceConnectProps.
11 12 13 14 15 16 17 18 19 20 |
# File 'ecs/service_connect_props.rb', line 11 def initialize(access_log_configuration: nil, log_driver: nil, namespace: nil, services: nil) @access_log_configuration = access_log_configuration.is_a?(Hash) ? ::AWSCDK::ECS::ServiceConnectAccessLogConfiguration.new(**access_log_configuration.transform_keys(&:to_sym)) : access_log_configuration Jsii::Type.check_type(@access_log_configuration, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLlNlcnZpY2VDb25uZWN0QWNjZXNzTG9nQ29uZmlndXJhdGlvbiJ9")), "accessLogConfiguration") unless @access_log_configuration.nil? @log_driver = log_driver Jsii::Type.check_type(@log_driver, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkxvZ0RyaXZlciJ9")), "logDriver") unless @log_driver.nil? @namespace = namespace Jsii::Type.check_type(@namespace, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "namespace") unless @namespace.nil? @services = services.is_a?(Array) ? services.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::ECS::ServiceConnectService.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : services Jsii::Type.check_type(@services, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lY3MuU2VydmljZUNvbm5lY3RTZXJ2aWNlIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "services") unless @services.nil? end |
Instance Attribute Details
#access_log_configuration ⇒ AWSCDK::ECS::ServiceConnectAccessLogConfiguration? (readonly)
Default: undefined - AWS ECS default is disabled, which means that access logs are not recorded
The configuration for Service Connect access logs.
Access logs provide detailed telemetry about individual requests processed by the Service Connect proxy.
28 29 30 |
# File 'ecs/service_connect_props.rb', line 28 def access_log_configuration @access_log_configuration end |
#log_driver ⇒ AWSCDK::ECS::LogDriver? (readonly)
Default: - none
The log driver configuration to use for the Service Connect agent logs.
33 34 35 |
# File 'ecs/service_connect_props.rb', line 33 def log_driver @log_driver end |
#namespace ⇒ String? (readonly)
Default: the cloudmap namespace specified on the cluster.
The cloudmap namespace to register this service into.
38 39 40 |
# File 'ecs/service_connect_props.rb', line 38 def namespace @namespace end |
#services ⇒ Array<AWSCDK::ECS::ServiceConnectService>? (readonly)
Default: none
The list of Services, including a port mapping, terse client alias, and optional intermediate DNS name.
This property may be left blank if the current ECS service does not need to advertise any ports via Service Connect.
45 46 47 |
# File 'ecs/service_connect_props.rb', line 45 def services @services end |
Class Method Details
.jsii_properties ⇒ Object
47 48 49 50 51 52 53 54 |
# File 'ecs/service_connect_props.rb', line 47 def self.jsii_properties { :access_log_configuration => "accessLogConfiguration", :log_driver => "logDriver", :namespace => "namespace", :services => "services", } end |
Instance Method Details
#to_jsii ⇒ Object
56 57 58 59 60 61 62 63 64 65 |
# File 'ecs/service_connect_props.rb', line 56 def to_jsii result = {} result.merge!({ "accessLogConfiguration" => @access_log_configuration, "logDriver" => @log_driver, "namespace" => @namespace, "services" => @services, }) result.compact end |