Class: AWSCDK::ECS::ClusterProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ECS::ClusterProps
- Defined in:
- ecs/cluster_props.rb
Overview
The properties used to define an ECS cluster.
Instance Attribute Summary collapse
-
#capacity ⇒ AWSCDK::ECS::AddCapacityOptions?
readonly
The ec2 capacity to add to the cluster.
-
#cluster_name ⇒ String?
readonly
The name for the cluster.
-
#container_insights ⇒ Boolean?
readonly
deprecated
Deprecated.
See {@link containerInsightsV2 }
-
#container_insights_v2 ⇒ AWSCDK::ECS::ContainerInsights?
readonly
The CloudWatch Container Insights configuration for the cluster.
-
#default_cloud_map_namespace ⇒ AWSCDK::ECS::CloudMapNamespaceOptions?
readonly
The service discovery namespace created in this cluster.
-
#enable_fargate_capacity_providers ⇒ Boolean?
readonly
Whether to enable Fargate Capacity Providers.
-
#execute_command_configuration ⇒ AWSCDK::ECS::ExecuteCommandConfiguration?
readonly
The execute command configuration for the cluster.
-
#managed_storage_configuration ⇒ AWSCDK::ECS::ManagedStorageConfiguration?
readonly
Encryption configuration for ECS Managed storage.
-
#vpc ⇒ AWSCDK::EC2::IVPC?
readonly
The VPC where your ECS instances will be running or your ENIs will be deployed.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(capacity: nil, cluster_name: nil, container_insights: nil, container_insights_v2: nil, default_cloud_map_namespace: nil, enable_fargate_capacity_providers: nil, execute_command_configuration: nil, managed_storage_configuration: nil, vpc: nil) ⇒ ClusterProps
constructor
A new instance of ClusterProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(capacity: nil, cluster_name: nil, container_insights: nil, container_insights_v2: nil, default_cloud_map_namespace: nil, enable_fargate_capacity_providers: nil, execute_command_configuration: nil, managed_storage_configuration: nil, vpc: nil) ⇒ ClusterProps
Returns a new instance of ClusterProps.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'ecs/cluster_props.rb', line 16 def initialize(capacity: nil, cluster_name: nil, container_insights: nil, container_insights_v2: nil, default_cloud_map_namespace: nil, enable_fargate_capacity_providers: nil, execute_command_configuration: nil, managed_storage_configuration: nil, vpc: nil) @capacity = capacity.is_a?(Hash) ? ::AWSCDK::ECS::AddCapacityOptions.new(**capacity.transform_keys(&:to_sym)) : capacity Jsii::Type.check_type(@capacity, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkFkZENhcGFjaXR5T3B0aW9ucyJ9")), "capacity") unless @capacity.nil? @cluster_name = cluster_name Jsii::Type.check_type(@cluster_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "clusterName") unless @cluster_name.nil? @container_insights = container_insights Jsii::Type.check_type(@container_insights, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "containerInsights") unless @container_insights.nil? @container_insights_v2 = container_insights_v2 Jsii::Type.check_type(@container_insights_v2, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkNvbnRhaW5lckluc2lnaHRzIn0=")), "containerInsightsV2") unless @container_insights_v2.nil? @default_cloud_map_namespace = default_cloud_map_namespace.is_a?(Hash) ? ::AWSCDK::ECS::CloudMapNamespaceOptions.new(**default_cloud_map_namespace.transform_keys(&:to_sym)) : default_cloud_map_namespace Jsii::Type.check_type(@default_cloud_map_namespace, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkNsb3VkTWFwTmFtZXNwYWNlT3B0aW9ucyJ9")), "defaultCloudMapNamespace") unless @default_cloud_map_namespace.nil? @enable_fargate_capacity_providers = enable_fargate_capacity_providers Jsii::Type.check_type(@enable_fargate_capacity_providers, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "enableFargateCapacityProviders") unless @enable_fargate_capacity_providers.nil? @execute_command_configuration = execute_command_configuration.is_a?(Hash) ? ::AWSCDK::ECS::ExecuteCommandConfiguration.new(**execute_command_configuration.transform_keys(&:to_sym)) : execute_command_configuration Jsii::Type.check_type(@execute_command_configuration, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkV4ZWN1dGVDb21tYW5kQ29uZmlndXJhdGlvbiJ9")), "executeCommandConfiguration") unless @execute_command_configuration.nil? @managed_storage_configuration = managed_storage_configuration.is_a?(Hash) ? ::AWSCDK::ECS::ManagedStorageConfiguration.new(**managed_storage_configuration.transform_keys(&:to_sym)) : managed_storage_configuration Jsii::Type.check_type(@managed_storage_configuration, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLk1hbmFnZWRTdG9yYWdlQ29uZmlndXJhdGlvbiJ9")), "managedStorageConfiguration") unless @managed_storage_configuration.nil? @vpc = vpc Jsii::Type.check_type(@vpc, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklWcGMifQ==")), "vpc") unless @vpc.nil? end |
Instance Attribute Details
#capacity ⇒ AWSCDK::ECS::AddCapacityOptions? (readonly)
Default: - no EC2 capacity will be added, you can use addCapacity to add capacity later.
The ec2 capacity to add to the cluster.
41 42 43 |
# File 'ecs/cluster_props.rb', line 41 def capacity @capacity end |
#cluster_name ⇒ String? (readonly)
Default: CloudFormation-generated name
The name for the cluster.
46 47 48 |
# File 'ecs/cluster_props.rb', line 46 def cluster_name @cluster_name end |
#container_insights ⇒ Boolean? (readonly)
See {@link containerInsightsV2 }
Default: - Container Insights will be disabled for this cluster.
If true CloudWatch Container Insights will be enabled for the cluster.
52 53 54 |
# File 'ecs/cluster_props.rb', line 52 def container_insights @container_insights end |
#container_insights_v2 ⇒ AWSCDK::ECS::ContainerInsights? (readonly)
Default: {@link ContainerInsights.DISABLED } This may be overridden by ECS account level settings.
The CloudWatch Container Insights configuration for the cluster.
57 58 59 |
# File 'ecs/cluster_props.rb', line 57 def container_insights_v2 @container_insights_v2 end |
#default_cloud_map_namespace ⇒ AWSCDK::ECS::CloudMapNamespaceOptions? (readonly)
Default: - no service discovery namespace created, you can use addDefaultCloudMapNamespace to add a default service discovery namespace later.
The service discovery namespace created in this cluster.
62 63 64 |
# File 'ecs/cluster_props.rb', line 62 def default_cloud_map_namespace @default_cloud_map_namespace end |
#enable_fargate_capacity_providers ⇒ Boolean? (readonly)
Default: false
Whether to enable Fargate Capacity Providers.
67 68 69 |
# File 'ecs/cluster_props.rb', line 67 def enable_fargate_capacity_providers @enable_fargate_capacity_providers end |
#execute_command_configuration ⇒ AWSCDK::ECS::ExecuteCommandConfiguration? (readonly)
Default: - no configuration will be provided.
The execute command configuration for the cluster.
72 73 74 |
# File 'ecs/cluster_props.rb', line 72 def execute_command_configuration @execute_command_configuration end |
#managed_storage_configuration ⇒ AWSCDK::ECS::ManagedStorageConfiguration? (readonly)
Default: - no encryption will be applied.
Encryption configuration for ECS Managed storage.
77 78 79 |
# File 'ecs/cluster_props.rb', line 77 def managed_storage_configuration @managed_storage_configuration end |
#vpc ⇒ AWSCDK::EC2::IVPC? (readonly)
Default: - creates a new VPC with two AZs
The VPC where your ECS instances will be running or your ENIs will be deployed.
82 83 84 |
# File 'ecs/cluster_props.rb', line 82 def vpc @vpc end |
Class Method Details
.jsii_properties ⇒ Object
84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'ecs/cluster_props.rb', line 84 def self.jsii_properties { :capacity => "capacity", :cluster_name => "clusterName", :container_insights => "containerInsights", :container_insights_v2 => "containerInsightsV2", :default_cloud_map_namespace => "defaultCloudMapNamespace", :enable_fargate_capacity_providers => "enableFargateCapacityProviders", :execute_command_configuration => "executeCommandConfiguration", :managed_storage_configuration => "managedStorageConfiguration", :vpc => "vpc", } end |
Instance Method Details
#to_jsii ⇒ Object
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'ecs/cluster_props.rb', line 98 def to_jsii result = {} result.merge!({ "capacity" => @capacity, "clusterName" => @cluster_name, "containerInsights" => @container_insights, "containerInsightsV2" => @container_insights_v2, "defaultCloudMapNamespace" => @default_cloud_map_namespace, "enableFargateCapacityProviders" => @enable_fargate_capacity_providers, "executeCommandConfiguration" => @execute_command_configuration, "managedStorageConfiguration" => @managed_storage_configuration, "vpc" => @vpc, }) result.compact end |