Module: AWSCDK::ECS::IExternalTaskDefinition
- Includes:
- ITaskDefinition
- Included in:
- ExternalTaskDefinition
- Defined in:
- ecs/i_external_task_definition.rb
Overview
The interface of a task definition run on an External cluster.
Class Method Summary collapse
Instance Method Summary collapse
-
#apply_removal_policy(policy) ⇒ void
Apply the given removal policy to this resource.
-
#compatibility ⇒ AWSCDK::ECS::Compatibility
What launch types this task definition should be compatible with.
-
#env ⇒ AWSCDK::Interfaces::ResourceEnvironment
The environment this resource belongs to.
-
#execution_role ⇒ AWSCDK::IAM::IRole?
Execution role for this task definition.
-
#is_ec2_compatible ⇒ Boolean
Return true if the task definition can be run on an EC2 cluster.
-
#is_external_compatible ⇒ Boolean
Return true if the task definition can be run on a ECS Anywhere cluster.
-
#is_fargate_compatible ⇒ Boolean
Return true if the task definition can be run on a Fargate cluster.
-
#is_managed_instances_compatible ⇒ Boolean
Return true if the task definition can be run on Managed Instances.
-
#network_mode ⇒ AWSCDK::ECS::NetworkMode
The networking mode to use for the containers in the task.
-
#node ⇒ Constructs::Node
The tree node.
-
#stack ⇒ AWSCDK::Stack
The stack in which this resource is defined.
-
#task_definition_arn ⇒ String
ARN of this task definition.
-
#task_definition_ref ⇒ AWSCDK::Interfaces::AWSECS::TaskDefinitionReference
A reference to a TaskDefinition resource.
-
#task_role ⇒ AWSCDK::IAM::IRole
The name of the IAM role that grants containers in the task permission to call AWS APIs on your behalf.
-
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Class Method Details
.jsii_overridable_methods ⇒ Object
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
# File 'ecs/i_external_task_definition.rb', line 138 def self.jsii_overridable_methods { :node => { kind: :property, name: "node", is_optional: false }, :env => { kind: :property, name: "env", is_optional: false }, :stack => { kind: :property, name: "stack", is_optional: false }, :task_definition_ref => { kind: :property, name: "taskDefinitionRef", is_optional: false }, :compatibility => { kind: :property, name: "compatibility", is_optional: false }, :is_ec2_compatible => { kind: :property, name: "isEc2Compatible", is_optional: false }, :is_external_compatible => { kind: :property, name: "isExternalCompatible", is_optional: false }, :is_fargate_compatible => { kind: :property, name: "isFargateCompatible", is_optional: false }, :is_managed_instances_compatible => { kind: :property, name: "isManagedInstancesCompatible", is_optional: false }, :network_mode => { kind: :property, name: "networkMode", is_optional: false }, :task_definition_arn => { kind: :property, name: "taskDefinitionArn", is_optional: false }, :task_role => { kind: :property, name: "taskRole", is_optional: false }, :execution_role => { kind: :property, name: "executionRole", is_optional: true }, :with => { kind: :method, name: "with", is_optional: false }, :apply_removal_policy => { kind: :method, name: "applyRemovalPolicy", is_optional: false }, } end |
Instance Method Details
#apply_removal_policy(policy) ⇒ void
This method returns an undefined value.
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN).
133 134 135 136 |
# File 'ecs/i_external_task_definition.rb', line 133 def apply_removal_policy(policy) Jsii::Type.check_type(policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "policy") jsii_call_method("applyRemovalPolicy", [policy]) end |
#compatibility ⇒ AWSCDK::ECS::Compatibility
What launch types this task definition should be compatible with.
47 48 49 |
# File 'ecs/i_external_task_definition.rb', line 47 def compatibility() jsii_get_property("compatibility") end |
#env ⇒ AWSCDK::Interfaces::ResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed in a Stack (those created by
creating new class instances like new Role(), new Bucket(), etc.), this
is always the same as the environment of the stack they belong to.
For referenced resources (those obtained from referencing methods like
Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be
different than the stack they were imported into.
26 27 28 |
# File 'ecs/i_external_task_definition.rb', line 26 def env() jsii_get_property("env") end |
#execution_role ⇒ AWSCDK::IAM::IRole?
Execution role for this task definition.
103 104 105 |
# File 'ecs/i_external_task_definition.rb', line 103 def execution_role() jsii_get_property("executionRole") end |
#is_ec2_compatible ⇒ Boolean
Return true if the task definition can be run on an EC2 cluster.
54 55 56 |
# File 'ecs/i_external_task_definition.rb', line 54 def is_ec2_compatible() jsii_get_property("isEc2Compatible") end |
#is_external_compatible ⇒ Boolean
Return true if the task definition can be run on a ECS Anywhere cluster.
61 62 63 |
# File 'ecs/i_external_task_definition.rb', line 61 def is_external_compatible() jsii_get_property("isExternalCompatible") end |
#is_fargate_compatible ⇒ Boolean
Return true if the task definition can be run on a Fargate cluster.
68 69 70 |
# File 'ecs/i_external_task_definition.rb', line 68 def is_fargate_compatible() jsii_get_property("isFargateCompatible") end |
#is_managed_instances_compatible ⇒ Boolean
Return true if the task definition can be run on Managed Instances.
75 76 77 |
# File 'ecs/i_external_task_definition.rb', line 75 def is_managed_instances_compatible() jsii_get_property("isManagedInstancesCompatible") end |
#network_mode ⇒ AWSCDK::ECS::NetworkMode
The networking mode to use for the containers in the task.
82 83 84 |
# File 'ecs/i_external_task_definition.rb', line 82 def network_mode() jsii_get_property("networkMode") end |
#node ⇒ Constructs::Node
The tree node.
11 12 13 |
# File 'ecs/i_external_task_definition.rb', line 11 def node() jsii_get_property("node") end |
#stack ⇒ AWSCDK::Stack
The stack in which this resource is defined.
33 34 35 |
# File 'ecs/i_external_task_definition.rb', line 33 def stack() jsii_get_property("stack") end |
#task_definition_arn ⇒ String
ARN of this task definition.
89 90 91 |
# File 'ecs/i_external_task_definition.rb', line 89 def task_definition_arn() jsii_get_property("taskDefinitionArn") end |
#task_definition_ref ⇒ AWSCDK::Interfaces::AWSECS::TaskDefinitionReference
A reference to a TaskDefinition resource.
40 41 42 |
# File 'ecs/i_external_task_definition.rb', line 40 def task_definition_ref() jsii_get_property("taskDefinitionRef") end |
#task_role ⇒ AWSCDK::IAM::IRole
The name of the IAM role that grants containers in the task permission to call AWS APIs on your behalf.
96 97 98 |
# File 'ecs/i_external_task_definition.rb', line 96 def task_role() jsii_get_property("taskRole") 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.
114 115 116 117 118 119 |
# File 'ecs/i_external_task_definition.rb', line 114 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 |