Class: AWSCDK::ECS::ExternalTaskDefinitionAttributes
- Inherits:
-
CommonTaskDefinitionAttributes
- Object
- CommonTaskDefinitionAttributes
- AWSCDK::ECS::ExternalTaskDefinitionAttributes
- Defined in:
- ecs/external_task_definition_attributes.rb
Overview
Attributes used to import an existing External task definition.
Instance Attribute Summary collapse
-
#execution_role ⇒ AWSCDK::IAM::IRole?
readonly
The IAM role that grants containers and Fargate agents permission to make AWS API calls on your behalf.
-
#network_mode ⇒ AWSCDK::ECS::NetworkMode?
readonly
The networking mode to use for the containers in the task.
-
#task_definition_arn ⇒ String
readonly
The arn of the task definition.
-
#task_role ⇒ AWSCDK::IAM::IRole?
readonly
The name of the IAM role that grants containers in the task permission to call AWS APIs on your behalf.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(task_definition_arn:, execution_role: nil, network_mode: nil, task_role: nil) ⇒ ExternalTaskDefinitionAttributes
constructor
A new instance of ExternalTaskDefinitionAttributes.
- #to_jsii ⇒ Object
Constructor Details
#initialize(task_definition_arn:, execution_role: nil, network_mode: nil, task_role: nil) ⇒ ExternalTaskDefinitionAttributes
Returns a new instance of ExternalTaskDefinitionAttributes.
11 12 13 14 15 16 17 18 19 20 |
# File 'ecs/external_task_definition_attributes.rb', line 11 def initialize(task_definition_arn:, execution_role: nil, network_mode: nil, task_role: nil) @task_definition_arn = task_definition_arn Jsii::Type.check_type(@task_definition_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "taskDefinitionArn") @execution_role = execution_role Jsii::Type.check_type(@execution_role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "executionRole") unless @execution_role.nil? @network_mode = network_mode Jsii::Type.check_type(@network_mode, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLk5ldHdvcmtNb2RlIn0=")), "networkMode") unless @network_mode.nil? @task_role = task_role Jsii::Type.check_type(@task_role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "taskRole") unless @task_role.nil? end |
Instance Attribute Details
#execution_role ⇒ AWSCDK::IAM::IRole? (readonly)
Default: - undefined
The IAM role that grants containers and Fargate agents permission to make AWS API calls on your behalf.
Some tasks do not have an execution role.
32 33 34 |
# File 'ecs/external_task_definition_attributes.rb', line 32 def execution_role @execution_role end |
#network_mode ⇒ AWSCDK::ECS::NetworkMode? (readonly)
Default: Network mode cannot be provided to the imported task.
The networking mode to use for the containers in the task.
37 38 39 |
# File 'ecs/external_task_definition_attributes.rb', line 37 def network_mode @network_mode end |
#task_definition_arn ⇒ String (readonly)
The arn of the task definition.
25 26 27 |
# File 'ecs/external_task_definition_attributes.rb', line 25 def task_definition_arn @task_definition_arn end |
#task_role ⇒ AWSCDK::IAM::IRole? (readonly)
Default: Permissions cannot be granted to the imported task.
The name of the IAM role that grants containers in the task permission to call AWS APIs on your behalf.
42 43 44 |
# File 'ecs/external_task_definition_attributes.rb', line 42 def task_role @task_role end |
Class Method Details
.jsii_properties ⇒ Object
44 45 46 47 48 49 50 51 |
# File 'ecs/external_task_definition_attributes.rb', line 44 def self.jsii_properties { :task_definition_arn => "taskDefinitionArn", :execution_role => "executionRole", :network_mode => "networkMode", :task_role => "taskRole", } end |
Instance Method Details
#to_jsii ⇒ Object
53 54 55 56 57 58 59 60 61 62 63 |
# File 'ecs/external_task_definition_attributes.rb', line 53 def to_jsii result = {} result.merge!(super) result.merge!({ "taskDefinitionArn" => @task_definition_arn, "executionRole" => @execution_role, "networkMode" => @network_mode, "taskRole" => @task_role, }) result.compact end |