Class: AWSCDK::ECS::ManagedInstancesCapacityProvider
- Inherits:
-
Constructs::Construct
- Object
- Constructs::Construct
- AWSCDK::ECS::ManagedInstancesCapacityProvider
- Includes:
- AWSCDK::EC2::IConnectable
- Defined in:
- ecs/managed_instances_capacity_provider.rb
Overview
A Managed Instances Capacity Provider.
This allows an ECS cluster to use Managed Instances for task placement with managed infrastructure.
Class Method Summary collapse
- .jsii_overridable_methods ⇒ Object
-
.PROPERTY_INJECTION_ID ⇒ String
Uniquely identifies this class.
Instance Method Summary collapse
-
#bind(cluster) ⇒ void
Associates the capacity provider with the specified cluster.
-
#capacity_provider_name ⇒ String
Capacity provider name.
-
#cluster ⇒ AWSCDK::ECS::ICluster?
The cluster this capacity provider is associated with.
-
#connections ⇒ AWSCDK::EC2::Connections
The network connections associated with this resource.
-
#ec2_instance_profile ⇒ AWSCDK::IAM::IInstanceProfile
The EC2 instance profile attached to instances launched by this capacity provider.
-
#infrastructure_role ⇒ AWSCDK::IAM::IRole
The IAM role that ECS uses to manage the infrastructure for the capacity provider.
-
#initialize(scope, id, props) ⇒ ManagedInstancesCapacityProvider
constructor
A new instance of ManagedInstancesCapacityProvider.
-
#node ⇒ Constructs::Node
The tree node.
-
#to_string ⇒ String
Returns a string representation of this construct.
-
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Constructor Details
#initialize(scope, id, props) ⇒ ManagedInstancesCapacityProvider
Returns a new instance of ManagedInstancesCapacityProvider.
15 16 17 18 19 20 21 |
# File 'ecs/managed_instances_capacity_provider.rb', line 15 def initialize(scope, id, props) props = props.is_a?(Hash) ? ::AWSCDK::ECS::ManagedInstancesCapacityProviderProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope") Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLk1hbmFnZWRJbnN0YW5jZXNDYXBhY2l0eVByb3ZpZGVyUHJvcHMifQ==")), "props") Jsii::Object.instance_method(:initialize).bind(self).call(scope, id, props) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'ecs/managed_instances_capacity_provider.rb', line 23 def self.jsii_overridable_methods { :node => { kind: :property, name: "node", is_optional: false }, :capacity_provider_name => { kind: :property, name: "capacityProviderName", is_optional: false }, :connections => { kind: :property, name: "connections", is_optional: false }, :ec2_instance_profile => { kind: :property, name: "ec2InstanceProfile", is_optional: false }, :infrastructure_role => { kind: :property, name: "infrastructureRole", is_optional: false }, :cluster => { kind: :property, name: "cluster", is_optional: true }, :to_string => { kind: :method, name: "toString", is_optional: false }, :with => { kind: :method, name: "with", is_optional: false }, :bind => { kind: :method, name: "bind", is_optional: false }, } end |
.PROPERTY_INJECTION_ID ⇒ String
Uniquely identifies this class.
47 48 49 |
# File 'ecs/managed_instances_capacity_provider.rb', line 47 def self.PROPERTY_INJECTION_ID() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_ecs.ManagedInstancesCapacityProvider", "PROPERTY_INJECTION_ID") end |
Instance Method Details
#bind(cluster) ⇒ void
This method returns an undefined value.
Associates the capacity provider with the specified cluster.
This method is called by the cluster when adding the capacity provider.
115 116 117 118 |
# File 'ecs/managed_instances_capacity_provider.rb', line 115 def bind(cluster) Jsii::Type.check_type(cluster, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLklDbHVzdGVyIn0=")), "cluster") jsii_call_method("bind", [cluster]) end |
#capacity_provider_name ⇒ String
Capacity provider name.
54 55 56 |
# File 'ecs/managed_instances_capacity_provider.rb', line 54 def capacity_provider_name() jsii_get_property("capacityProviderName") end |
#cluster ⇒ AWSCDK::ECS::ICluster?
The cluster this capacity provider is associated with.
82 83 84 |
# File 'ecs/managed_instances_capacity_provider.rb', line 82 def cluster() jsii_get_property("cluster") end |
#connections ⇒ AWSCDK::EC2::Connections
The network connections associated with this resource.
61 62 63 |
# File 'ecs/managed_instances_capacity_provider.rb', line 61 def connections() jsii_get_property("connections") end |
#ec2_instance_profile ⇒ AWSCDK::IAM::IInstanceProfile
The EC2 instance profile attached to instances launched by this capacity provider.
68 69 70 |
# File 'ecs/managed_instances_capacity_provider.rb', line 68 def ec2_instance_profile() jsii_get_property("ec2InstanceProfile") end |
#infrastructure_role ⇒ AWSCDK::IAM::IRole
The IAM role that ECS uses to manage the infrastructure for the capacity provider.
75 76 77 |
# File 'ecs/managed_instances_capacity_provider.rb', line 75 def infrastructure_role() jsii_get_property("infrastructureRole") end |
#node ⇒ Constructs::Node
The tree node.
40 41 42 |
# File 'ecs/managed_instances_capacity_provider.rb', line 40 def node() jsii_get_property("node") end |
#to_string ⇒ String
Returns a string representation of this construct.
89 90 91 |
# File 'ecs/managed_instances_capacity_provider.rb', line 89 def to_string() jsii_call_method("toString", []) end |
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple with() calls if subsequent mixins should apply to added
constructs.
102 103 104 105 106 107 |
# File 'ecs/managed_instances_capacity_provider.rb', line 102 def with(*mixins) mixins.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklNaXhpbiJ9")), "mixins[#{index}]") end jsii_call_method("with", [*mixins]) end |