Class: AWSCDK::ECS::CfnService

Inherits:
CfnResource
  • Object
show all
Includes:
IInspectable, ITaggable, Interfaces::AWSECS::IServiceRef
Defined in:
ecs/cfn_service.rb

Overview

The AWS::ECS::Service resource creates an Amazon Elastic Container Service (Amazon ECS) service that runs and maintains the requested number of tasks and associated load balancers.

The stack update fails if you change any properties that require replacement and at least one Amazon ECS Service Connect ServiceConnectConfiguration property is configured. This is because AWS CloudFormation creates the replacement service first, but each ServiceConnectService must have a name that is unique in the namespace. > Starting April 15, 2023, AWS ; will not onboard new customers to Amazon Elastic Inference (EI), and will help current customers migrate their workloads to options that offer better price and performance. After April 15, 2023, new customers will not be able to launch instances with Amazon EI accelerators in Amazon SageMaker, Amazon ECS , or Amazon EC2 . However, customers who have used Amazon EI at least once during the past 30-day period are considered current customers and will be able to continue using the service. > On June 12, 2025, Amazon ECS launched support for updating capacity provider configuration for Amazon ECS services. With this launch, Amazon ECS also aligned the CloudFormation update behavior for CapacityProviderStrategy parameter with the standard practice. For more information, see Amazon ECS adds support for updating capacity provider configuration for ECS services . Previously Amazon ECS ignored the CapacityProviderStrategy property if it was set to an empty list for example, [] in CloudFormation , because updating capacity provider configuration was not supported. Now, with support for capacity provider updates, customers can remove capacity providers from a service by passing an empty list. When you specify an empty list ( [] ) for the CapacityProviderStrategy property in your CloudFormation template, Amazon ECS will remove any capacity providers associated with the service, as follows:

  • For services created with a capacity provider strategy after the launch:
  • If there's a cluster default strategy set, the service will revert to using that default strategy.
  • If no cluster default strategy exists, you will receive the following error:

No launch type to fall back to for empty capacity provider strategy. Your service was not created with a launch type.

  • For services created with a capacity provider strategy prior to the launch:
  • If CapacityProviderStrategy had FARGATE_SPOT or FARGATE capacity providers, the launch type will be updated to FARGATE and the capacity provider will be removed.
  • If the strategy included Auto Scaling group capacity providers, the service will revert to EC2 launch type, and the Auto Scaling group capacity providers will not be used.

Recommended Actions

If you are currently using CapacityProviderStrategy: [] in your CloudFormation templates, you should take one of the following actions:

  • If you do not intend to update the Capacity Provider Strategy:
  • Remove the CapacityProviderStrategy property entirely from your CloudFormation template
  • Alternatively, use !Ref AWS ::NoValue for the CapacityProviderStrategy property in your template
  • If you intend to maintain or update the Capacity Provider Strategy, specify the actual Capacity Provider Strategy for the service in your CloudFormation template.

If your CloudFormation template had an empty list ([]) for CapacityProviderStrategy prior to the aforementioned launch on June 12, and you are using the same template with CapacityProviderStrategy: [] , you might encounter the following error:

Invalid request provided: When switching from launch type to capacity provider strategy on an existing service, or making a change to a capacity provider strategy on a service that is already using one, you must force a new deployment. (Service: Ecs, Status Code: 400, Request ID: xxx) (SDK Attempt Count: 1)" (RequestToken: xxx HandlerErrorCode: InvalidRequest)

Note that CloudFormation automatically initiates a new deployment when it detects a parameter change, but customers cannot choose to force a deployment through CloudFormation . This is an invalid input scenario that requires one of the remediation actions listed above.

If you are experiencing active production issues related to this change, contact AWS Support or your Technical Account Manager.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(scope, id, props = nil) ⇒ CfnService

Create a new AWS::ECS::Service.

Parameters:

  • scope (Constructs::Construct)

    Scope in which this resource is defined.

  • id (String)

    Construct identifier for this resource (unique in its scope).

  • props (AWSCDK::ECS::CfnServiceProps, nil) (defaults to: nil)

    Resource properties.



47
48
49
50
51
52
53
# File 'ecs/cfn_service.rb', line 47

def initialize(scope, id, props = nil)
  props = props.is_a?(Hash) ? ::AWSCDK::ECS::CfnServiceProps.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("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkNmblNlcnZpY2VQcm9wcyJ9")), "props") unless props.nil?
  Jsii::Object.instance_method(:initialize).bind(self).call(scope, id, props)
end

Class Method Details

.arn_for_service(resource) ⇒ String

Parameters:

Returns:

  • (String)


128
129
130
131
# File 'ecs/cfn_service.rb', line 128

def self.arn_for_service(resource)
  Jsii::Type.check_type(resource, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19lY3MuSVNlcnZpY2VSZWYifQ==")), "resource")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_ecs.CfnService", "arnForService", [resource])
end

.CFN_RESOURCE_TYPE_NAMEString

The CloudFormation resource type name for this resource class.

Returns:

  • (String)


235
236
237
# File 'ecs/cfn_service.rb', line 235

def self.CFN_RESOURCE_TYPE_NAME()
  Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_ecs.CfnService", "CFN_RESOURCE_TYPE_NAME")
end

.is_cfn_service(x) ⇒ Boolean

Checks whether the given object is a CfnService.

Parameters:

  • x (Object)

Returns:

  • (Boolean)


137
138
139
140
# File 'ecs/cfn_service.rb', line 137

def self.is_cfn_service(x)
  Jsii::Type.check_type(x, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "x")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_ecs.CfnService", "isCfnService", [x])
end

.jsii_overridable_methodsObject



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# File 'ecs/cfn_service.rb', line 55

def self.jsii_overridable_methods
  {
    :node => { kind: :property, name: "node", is_optional: false },
    :creation_stack => { kind: :property, name: "creationStack", is_optional: false },
    :logical_id => { kind: :property, name: "logicalId", is_optional: false },
    :stack => { kind: :property, name: "stack", is_optional: false },
    :ref => { kind: :property, name: "ref", is_optional: false },
    :cfn_options => { kind: :property, name: "cfnOptions", is_optional: false },
    :cfn_properties => { kind: :property, name: "cfnProperties", is_optional: false },
    :cfn_property_names => { kind: :property, name: "cfnPropertyNames", is_optional: false },
    :cfn_resource_type => { kind: :property, name: "cfnResourceType", is_optional: false },
    :env => { kind: :property, name: "env", is_optional: false },
    :updated_properites => { kind: :property, name: "updatedProperites", is_optional: false },
    :updated_properties => { kind: :property, name: "updatedProperties", is_optional: false },
    :attr_name => { kind: :property, name: "attrName", is_optional: false },
    :attr_service_arn => { kind: :property, name: "attrServiceArn", is_optional: false },
    :service_ref => { kind: :property, name: "serviceRef", is_optional: false },
    :tags => { kind: :property, name: "tags", is_optional: false },
    :availability_zone_rebalancing => { kind: :property, name: "availabilityZoneRebalancing", is_optional: true },
    :capacity_provider_strategy => { kind: :property, name: "capacityProviderStrategy", is_optional: true },
    :cluster => { kind: :property, name: "cluster", is_optional: true },
    :deployment_configuration => { kind: :property, name: "deploymentConfiguration", is_optional: true },
    :deployment_controller => { kind: :property, name: "deploymentController", is_optional: true },
    :desired_count => { kind: :property, name: "desiredCount", is_optional: true },
    :enable_ecs_managed_tags => { kind: :property, name: "enableEcsManagedTags", is_optional: true },
    :enable_execute_command => { kind: :property, name: "enableExecuteCommand", is_optional: true },
    :force_new_deployment => { kind: :property, name: "forceNewDeployment", is_optional: true },
    :health_check_grace_period_seconds => { kind: :property, name: "healthCheckGracePeriodSeconds", is_optional: true },
    :launch_type => { kind: :property, name: "launchType", is_optional: true },
    :load_balancers => { kind: :property, name: "loadBalancers", is_optional: true },
    :monitoring => { kind: :property, name: "monitoring", is_optional: true },
    :network_configuration => { kind: :property, name: "networkConfiguration", is_optional: true },
    :placement_constraints => { kind: :property, name: "placementConstraints", is_optional: true },
    :placement_strategies => { kind: :property, name: "placementStrategies", is_optional: true },
    :platform_version => { kind: :property, name: "platformVersion", is_optional: true },
    :propagate_tags => { kind: :property, name: "propagateTags", is_optional: true },
    :role => { kind: :property, name: "role", is_optional: true },
    :scheduling_strategy => { kind: :property, name: "schedulingStrategy", is_optional: true },
    :service_connect_configuration => { kind: :property, name: "serviceConnectConfiguration", is_optional: true },
    :service_name => { kind: :property, name: "serviceName", is_optional: true },
    :service_registries => { kind: :property, name: "serviceRegistries", is_optional: true },
    :tags_raw => { kind: :property, name: "tagsRaw", is_optional: true },
    :task_definition => { kind: :property, name: "taskDefinition", is_optional: true },
    :volume_configurations => { kind: :property, name: "volumeConfigurations", is_optional: true },
    :vpc_lattice_configurations => { kind: :property, name: "vpcLatticeConfigurations", is_optional: true },
    :to_string => { kind: :method, name: "toString", is_optional: false },
    :with => { kind: :method, name: "with", is_optional: false },
    :override_logical_id => { kind: :method, name: "overrideLogicalId", is_optional: false },
    :add_deletion_override => { kind: :method, name: "addDeletionOverride", is_optional: false },
    :add_dependency => { kind: :method, name: "addDependency", is_optional: false },
    :add_depends_on => { kind: :method, name: "addDependsOn", is_optional: false },
    :add_metadata => { kind: :method, name: "addMetadata", is_optional: false },
    :add_override => { kind: :method, name: "addOverride", is_optional: false },
    :add_property_deletion_override => { kind: :method, name: "addPropertyDeletionOverride", is_optional: false },
    :add_property_override => { kind: :method, name: "addPropertyOverride", is_optional: false },
    :apply_cross_stack_reference_strength => { kind: :method, name: "applyCrossStackReferenceStrength", is_optional: false },
    :apply_removal_policy => { kind: :method, name: "applyRemovalPolicy", is_optional: false },
    :cfn_property_name => { kind: :method, name: "cfnPropertyName", is_optional: false },
    :get_att => { kind: :method, name: "getAtt", is_optional: false },
    :get_metadata => { kind: :method, name: "getMetadata", is_optional: false },
    :obtain_dependencies => { kind: :method, name: "obtainDependencies", is_optional: false },
    :obtain_resource_dependencies => { kind: :method, name: "obtainResourceDependencies", is_optional: false },
    :remove_dependency => { kind: :method, name: "removeDependency", is_optional: false },
    :render_properties => { kind: :method, name: "renderProperties", is_optional: false },
    :replace_dependency => { kind: :method, name: "replaceDependency", is_optional: false },
    :should_synthesize => { kind: :method, name: "shouldSynthesize", is_optional: false },
    :validate_properties => { kind: :method, name: "validateProperties", is_optional: false },
    :inspect => { kind: :method, name: "inspect", is_optional: false },
  }
end

Instance Method Details

#add_deletion_override(path) ⇒ void

This method returns an undefined value.

Syntactic sugar for addOverride(path, undefined).

Parameters:

  • path (String)

    The path of the value to delete.



638
639
640
641
# File 'ecs/cfn_service.rb', line 638

def add_deletion_override(path)
  Jsii::Type.check_type(path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "path")
  jsii_call_method("addDeletionOverride", [path])
end

#add_dependency(target) ⇒ void

This method returns an undefined value.

Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

Parameters:



650
651
652
653
# File 'ecs/cfn_service.rb', line 650

def add_dependency(target)
  Jsii::Type.check_type(target, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5DZm5SZXNvdXJjZSJ9")), "target")
  jsii_call_method("addDependency", [target])
end

#add_depends_on(target) ⇒ void

Deprecated.

use addDependency

This method returns an undefined value.

Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

Parameters:



660
661
662
663
# File 'ecs/cfn_service.rb', line 660

def add_depends_on(target)
  Jsii::Type.check_type(target, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5DZm5SZXNvdXJjZSJ9")), "target")
  jsii_call_method("addDependsOn", [target])
end

#add_metadata(key, value) ⇒ void

This method returns an undefined value.

Add a value to the CloudFormation Resource Metadata.



671
672
673
674
675
# File 'ecs/cfn_service.rb', line 671

def (key, value)
  Jsii::Type.check_type(key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "key")
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "value")
  jsii_call_method("addMetadata", [key, value])
end

#add_override(path, value) ⇒ void

This method returns an undefined value.

Adds an override to the synthesized CloudFormation resource.

To add a property override, either use add_property_override or prefix path with "Properties." (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example,

# Example automatically generated from non-compiling source. May contain errors.
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"])
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")

would add the overrides

"Properties": {
  "GlobalSecondaryIndexes": [
    {
      "Projection": {
        "NonKeyAttributes": [ "myattribute" ]
        ...
      }
      ...
    },
    {
      "ProjectionType": "INCLUDE"
      ...
    },
  ]
  ...
}

The value argument to add_override will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.

Parameters:

  • path (String)
    • The path of the property, you can use dot notation to override values in complex types.
  • value (Object)
    • The value.


728
729
730
731
732
# File 'ecs/cfn_service.rb', line 728

def add_override(path, value)
  Jsii::Type.check_type(path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "path")
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "value")
  jsii_call_method("addOverride", [path, value])
end

#add_property_deletion_override(property_path) ⇒ void

This method returns an undefined value.

Adds an override that deletes the value of a property from the resource definition.

Parameters:

  • property_path (String)

    The path to the property.



738
739
740
741
# File 'ecs/cfn_service.rb', line 738

def add_property_deletion_override(property_path)
  Jsii::Type.check_type(property_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "propertyPath")
  jsii_call_method("addPropertyDeletionOverride", [property_path])
end

#add_property_override(property_path, value) ⇒ void

This method returns an undefined value.

Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

Parameters:

  • property_path (String)

    The path of the property.

  • value (Object)

    The value.



750
751
752
753
754
# File 'ecs/cfn_service.rb', line 750

def add_property_override(property_path, value)
  Jsii::Type.check_type(property_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "propertyPath")
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "value")
  jsii_call_method("addPropertyOverride", [property_path, value])
end

#apply_cross_stack_reference_strength(strength) ⇒ void

This method returns an undefined value.

Sets the cross-stack reference strength for this resource.

When set, any cross-stack reference to this resource will use the specified strength instead of the global default from the consuming stack's context.

Parameters:



763
764
765
766
# File 'ecs/cfn_service.rb', line 763

def apply_cross_stack_reference_strength(strength)
  Jsii::Type.check_type(strength, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZWZlcmVuY2VTdHJlbmd0aCJ9")), "strength")
  jsii_call_method("applyCrossStackReferenceStrength", [strength])
end

#apply_removal_policy(policy = nil, options = nil) ⇒ void

This method returns an undefined value.

Sets the deletion policy of the resource based on the removal policy specified.

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). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT). A list of resources that support this policy can be found in the following link:



785
786
787
788
789
790
# File 'ecs/cfn_service.rb', line 785

def apply_removal_policy(policy = nil, options = nil)
  Jsii::Type.check_type(policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "policy") unless policy.nil?
  options = options.is_a?(Hash) ? ::AWSCDK::RemovalPolicyOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5T3B0aW9ucyJ9")), "options") unless options.nil?
  jsii_call_method("applyRemovalPolicy", [policy, options])
end

#attr_nameString

The name of the Amazon ECS service, such as sample-webapp .

Returns:

  • (String)


242
243
244
# File 'ecs/cfn_service.rb', line 242

def attr_name()
  jsii_get_property("attrName")
end

#attr_service_arnString

The ARN that identifies the service.

For more information about the ARN format, see Amazon Resource Name (ARN) in the Amazon ECS Developer Guide .

Returns:

  • (String)


251
252
253
# File 'ecs/cfn_service.rb', line 251

def attr_service_arn()
  jsii_get_property("attrServiceArn")
end

#availability_zone_rebalancingString?

Indicates whether to use Availability Zone rebalancing for the service.

Returns:

  • (String, nil)


272
273
274
# File 'ecs/cfn_service.rb', line 272

def availability_zone_rebalancing()
  jsii_get_property("availabilityZoneRebalancing")
end

#availability_zone_rebalancing=(value) ⇒ Object



276
277
278
279
# File 'ecs/cfn_service.rb', line 276

def availability_zone_rebalancing=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "availabilityZoneRebalancing") unless value.nil?
  jsii_set_property("availabilityZoneRebalancing", value)
end

#capacity_provider_strategyAWSCDK::IResolvable, ...

The capacity provider strategy to use for the service.



284
285
286
# File 'ecs/cfn_service.rb', line 284

def capacity_provider_strategy()
  jsii_get_property("capacityProviderStrategy")
end

#capacity_provider_strategy=(value) ⇒ Object



288
289
290
291
# File 'ecs/cfn_service.rb', line 288

def capacity_provider_strategy=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkNmblNlcnZpY2UuQ2FwYWNpdHlQcm92aWRlclN0cmF0ZWd5SXRlbVByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "capacityProviderStrategy") unless value.nil?
  jsii_set_property("capacityProviderStrategy", value)
end

#cfn_optionsAWSCDK::ICfnResourceOptions

Options for this resource, such as condition, update policy etc.



188
189
190
# File 'ecs/cfn_service.rb', line 188

def cfn_options()
  jsii_get_property("cfnOptions")
end

#cfn_propertiesHash{String => Object}

Returns:

  • (Hash{String => Object})


193
194
195
# File 'ecs/cfn_service.rb', line 193

def cfn_properties()
  jsii_get_property("cfnProperties")
end

#cfn_property_name(cdk_property_name) ⇒ String?

Parameters:

  • cdk_property_name (String)

Returns:

  • (String, nil)


794
795
796
797
# File 'ecs/cfn_service.rb', line 794

def cfn_property_name(cdk_property_name)
  Jsii::Type.check_type(cdk_property_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "cdkPropertyName")
  jsii_call_method("cfnPropertyName", [cdk_property_name])
end

#cfn_property_namesHash{String => String}

Returns:

  • (Hash{String => String})


198
199
200
# File 'ecs/cfn_service.rb', line 198

def cfn_property_names()
  jsii_get_property("cfnPropertyNames")
end

#cfn_resource_typeString

AWS resource type.

Returns:

  • (String)


205
206
207
# File 'ecs/cfn_service.rb', line 205

def cfn_resource_type()
  jsii_get_property("cfnResourceType")
end

#clusterString?

The short name or full Amazon Resource Name (ARN) of the cluster that you run your service on.

Returns:

  • (String, nil)


296
297
298
# File 'ecs/cfn_service.rb', line 296

def cluster()
  jsii_get_property("cluster")
end

#cluster=(value) ⇒ Object



300
301
302
303
# File 'ecs/cfn_service.rb', line 300

def cluster=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "cluster") unless value.nil?
  jsii_set_property("cluster", value)
end

#creation_stackArray<String>

Returns:

  • (Array<String>)


150
151
152
# File 'ecs/cfn_service.rb', line 150

def creation_stack()
  jsii_get_property("creationStack")
end

#deployment_configurationAWSCDK::IResolvable, ...

Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.



308
309
310
# File 'ecs/cfn_service.rb', line 308

def deployment_configuration()
  jsii_get_property("deploymentConfiguration")
end

#deployment_configuration=(value) ⇒ Object



312
313
314
315
316
# File 'ecs/cfn_service.rb', line 312

def deployment_configuration=(value)
  value = value.is_a?(Hash) ? ::AWSCDK::ECS::CfnService::DeploymentConfigurationProperty.new(**value.transform_keys(&:to_sym)) : value
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lY3MuQ2ZuU2VydmljZS5EZXBsb3ltZW50Q29uZmlndXJhdGlvblByb3BlcnR5In1dfX0=")), "deploymentConfiguration") unless value.nil?
  jsii_set_property("deploymentConfiguration", value)
end

#deployment_controllerAWSCDK::IResolvable, ...

The deployment controller to use for the service.



321
322
323
# File 'ecs/cfn_service.rb', line 321

def deployment_controller()
  jsii_get_property("deploymentController")
end

#deployment_controller=(value) ⇒ Object



325
326
327
328
329
# File 'ecs/cfn_service.rb', line 325

def deployment_controller=(value)
  value = value.is_a?(Hash) ? ::AWSCDK::ECS::CfnService::DeploymentControllerProperty.new(**value.transform_keys(&:to_sym)) : value
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lY3MuQ2ZuU2VydmljZS5EZXBsb3ltZW50Q29udHJvbGxlclByb3BlcnR5In1dfX0=")), "deploymentController") unless value.nil?
  jsii_set_property("deploymentController", value)
end

#desired_countNumeric?

The number of instantiations of the specified task definition to place and keep running in your service.

Returns:

  • (Numeric, nil)


334
335
336
# File 'ecs/cfn_service.rb', line 334

def desired_count()
  jsii_get_property("desiredCount")
end

#desired_count=(value) ⇒ Object



338
339
340
341
# File 'ecs/cfn_service.rb', line 338

def desired_count=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "desiredCount") unless value.nil?
  jsii_set_property("desiredCount", value)
end

#enable_ecs_managed_tagsBoolean, ...

Specifies whether to turn on Amazon ECS managed tags for the tasks within the service.

Returns:



346
347
348
# File 'ecs/cfn_service.rb', line 346

def enable_ecs_managed_tags()
  jsii_get_property("enableEcsManagedTags")
end

#enable_ecs_managed_tags=(value) ⇒ Object



350
351
352
353
# File 'ecs/cfn_service.rb', line 350

def enable_ecs_managed_tags=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enableEcsManagedTags") unless value.nil?
  jsii_set_property("enableEcsManagedTags", value)
end

#enable_execute_commandBoolean, ...

Determines whether the execute command functionality is turned on for the service.

Returns:



358
359
360
# File 'ecs/cfn_service.rb', line 358

def enable_execute_command()
  jsii_get_property("enableExecuteCommand")
end

#enable_execute_command=(value) ⇒ Object



362
363
364
365
# File 'ecs/cfn_service.rb', line 362

def enable_execute_command=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enableExecuteCommand") unless value.nil?
  jsii_set_property("enableExecuteCommand", value)
end

#envAWSCDK::Interfaces::ResourceEnvironment



210
211
212
# File 'ecs/cfn_service.rb', line 210

def env()
  jsii_get_property("env")
end

#force_new_deploymentAWSCDK::IResolvable, ...

Determines whether to force a new deployment of the service.



370
371
372
# File 'ecs/cfn_service.rb', line 370

def force_new_deployment()
  jsii_get_property("forceNewDeployment")
end

#force_new_deployment=(value) ⇒ Object



374
375
376
377
378
# File 'ecs/cfn_service.rb', line 374

def force_new_deployment=(value)
  value = value.is_a?(Hash) ? ::AWSCDK::ECS::CfnService::ForceNewDeploymentProperty.new(**value.transform_keys(&:to_sym)) : value
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lY3MuQ2ZuU2VydmljZS5Gb3JjZU5ld0RlcGxveW1lbnRQcm9wZXJ0eSJ9XX19")), "forceNewDeployment") unless value.nil?
  jsii_set_property("forceNewDeployment", value)
end

#get_att(attribute_name, type_hint = nil) ⇒ AWSCDK::Reference

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

Parameters:

Returns:



807
808
809
810
811
# File 'ecs/cfn_service.rb', line 807

def get_att(attribute_name, type_hint = nil)
  Jsii::Type.check_type(attribute_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "attributeName")
  Jsii::Type.check_type(type_hint, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZXNvbHV0aW9uVHlwZUhpbnQifQ==")), "typeHint") unless type_hint.nil?
  jsii_call_method("getAtt", [attribute_name, type_hint])
end

#get_metadata(key) ⇒ Object

Retrieve a value value from the CloudFormation Resource Metadata.



818
819
820
821
# File 'ecs/cfn_service.rb', line 818

def (key)
  Jsii::Type.check_type(key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "key")
  jsii_call_method("getMetadata", [key])
end

#health_check_grace_period_secondsNumeric?

The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing, VPC Lattice, and container health checks after a task has first started.

Returns:

  • (Numeric, nil)


383
384
385
# File 'ecs/cfn_service.rb', line 383

def health_check_grace_period_seconds()
  jsii_get_property("healthCheckGracePeriodSeconds")
end

#health_check_grace_period_seconds=(value) ⇒ Object



387
388
389
390
# File 'ecs/cfn_service.rb', line 387

def health_check_grace_period_seconds=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "healthCheckGracePeriodSeconds") unless value.nil?
  jsii_set_property("healthCheckGracePeriodSeconds", value)
end

#inspect(inspector) ⇒ void

This method returns an undefined value.

Examines the CloudFormation resource and discloses attributes.

Parameters:



888
889
890
891
# File 'ecs/cfn_service.rb', line 888

def inspect(inspector)
  Jsii::Type.check_type(inspector, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5UcmVlSW5zcGVjdG9yIn0=")), "inspector")
  jsii_call_method("inspect", [inspector])
end

#launch_typeString?

The launch type on which to run your service.

Returns:

  • (String, nil)


395
396
397
# File 'ecs/cfn_service.rb', line 395

def launch_type()
  jsii_get_property("launchType")
end

#launch_type=(value) ⇒ Object



399
400
401
402
# File 'ecs/cfn_service.rb', line 399

def launch_type=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "launchType") unless value.nil?
  jsii_set_property("launchType", value)
end

#load_balancersAWSCDK::IResolvable, ...

A list of load balancer objects to associate with the service.



407
408
409
# File 'ecs/cfn_service.rb', line 407

def load_balancers()
  jsii_get_property("loadBalancers")
end

#load_balancers=(value) ⇒ Object



411
412
413
414
# File 'ecs/cfn_service.rb', line 411

def load_balancers=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkNmblNlcnZpY2UuTG9hZEJhbGFuY2VyUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "loadBalancers") unless value.nil?
  jsii_set_property("loadBalancers", value)
end

#logical_idString

The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use override_logical_id(new_logical_id).

Returns:

  • (String)


162
163
164
# File 'ecs/cfn_service.rb', line 162

def logical_id()
  jsii_get_property("logicalId")
end

#monitoringAWSCDK::IResolvable, ...



417
418
419
# File 'ecs/cfn_service.rb', line 417

def monitoring()
  jsii_get_property("monitoring")
end

#monitoring=(value) ⇒ Object



421
422
423
424
425
# File 'ecs/cfn_service.rb', line 421

def monitoring=(value)
  value = value.is_a?(Hash) ? ::AWSCDK::ECS::CfnService::MonitoringConfigurationProperty.new(**value.transform_keys(&:to_sym)) : value
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lY3MuQ2ZuU2VydmljZS5Nb25pdG9yaW5nQ29uZmlndXJhdGlvblByb3BlcnR5In1dfX0=")), "monitoring") unless value.nil?
  jsii_set_property("monitoring", value)
end

#network_configurationAWSCDK::IResolvable, ...

The network configuration for the service.



430
431
432
# File 'ecs/cfn_service.rb', line 430

def network_configuration()
  jsii_get_property("networkConfiguration")
end

#network_configuration=(value) ⇒ Object



434
435
436
437
438
# File 'ecs/cfn_service.rb', line 434

def network_configuration=(value)
  value = value.is_a?(Hash) ? ::AWSCDK::ECS::CfnService::NetworkConfigurationProperty.new(**value.transform_keys(&:to_sym)) : value
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lY3MuQ2ZuU2VydmljZS5OZXR3b3JrQ29uZmlndXJhdGlvblByb3BlcnR5In1dfX0=")), "networkConfiguration") unless value.nil?
  jsii_set_property("networkConfiguration", value)
end

#nodeConstructs::Node

The tree node.

Returns:

  • (Constructs::Node)


145
146
147
# File 'ecs/cfn_service.rb', line 145

def node()
  jsii_get_property("node")
end

#obtain_dependenciesArray<AWSCDK::CfnResource, AWSCDK::Stack>

Retrieves an array of resources this resource depends on.

This assembles dependencies on resources across stacks (including nested stacks) automatically.

Returns:



829
830
831
# File 'ecs/cfn_service.rb', line 829

def obtain_dependencies()
  jsii_call_method("obtainDependencies", [])
end

#obtain_resource_dependenciesArray<AWSCDK::CfnResource>

Get a shallow copy of dependencies between this resource and other resources in the same stack.

Returns:



836
837
838
# File 'ecs/cfn_service.rb', line 836

def obtain_resource_dependencies()
  jsii_call_method("obtainResourceDependencies", [])
end

#override_logical_id(new_logical_id) ⇒ void

This method returns an undefined value.

Overrides the auto-generated logical ID with a specific ID.

Parameters:

  • new_logical_id (String)

    The new logical ID to use for this stack element.



629
630
631
632
# File 'ecs/cfn_service.rb', line 629

def override_logical_id(new_logical_id)
  Jsii::Type.check_type(new_logical_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "newLogicalId")
  jsii_call_method("overrideLogicalId", [new_logical_id])
end

#placement_constraintsAWSCDK::IResolvable, ...

An array of placement constraint objects to use for tasks in your service.



443
444
445
# File 'ecs/cfn_service.rb', line 443

def placement_constraints()
  jsii_get_property("placementConstraints")
end

#placement_constraints=(value) ⇒ Object



447
448
449
450
# File 'ecs/cfn_service.rb', line 447

def placement_constraints=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkNmblNlcnZpY2UuUGxhY2VtZW50Q29uc3RyYWludFByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "placementConstraints") unless value.nil?
  jsii_set_property("placementConstraints", value)
end

#placement_strategiesAWSCDK::IResolvable, ...

The placement strategy objects to use for tasks in your service.



455
456
457
# File 'ecs/cfn_service.rb', line 455

def placement_strategies()
  jsii_get_property("placementStrategies")
end

#placement_strategies=(value) ⇒ Object



459
460
461
462
# File 'ecs/cfn_service.rb', line 459

def placement_strategies=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkNmblNlcnZpY2UuUGxhY2VtZW50U3RyYXRlZ3lQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "placementStrategies") unless value.nil?
  jsii_set_property("placementStrategies", value)
end

#platform_versionString?

The platform version that your tasks in the service are running on.

Returns:

  • (String, nil)


467
468
469
# File 'ecs/cfn_service.rb', line 467

def platform_version()
  jsii_get_property("platformVersion")
end

#platform_version=(value) ⇒ Object



471
472
473
474
# File 'ecs/cfn_service.rb', line 471

def platform_version=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "platformVersion") unless value.nil?
  jsii_set_property("platformVersion", value)
end

#propagate_tagsString?

Specifies whether to propagate the tags from the task definition to the task.

Returns:

  • (String, nil)


479
480
481
# File 'ecs/cfn_service.rb', line 479

def propagate_tags()
  jsii_get_property("propagateTags")
end

#propagate_tags=(value) ⇒ Object



483
484
485
486
# File 'ecs/cfn_service.rb', line 483

def propagate_tags=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "propagateTags") unless value.nil?
  jsii_set_property("propagateTags", value)
end

#refString

Return a string that will be resolved to a CloudFormation { Ref } for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

Returns:

  • (String)


181
182
183
# File 'ecs/cfn_service.rb', line 181

def ref()
  jsii_get_property("ref")
end

#remove_dependency(target) ⇒ void

This method returns an undefined value.

Indicates that this resource no longer depends on another resource.

This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.

Parameters:



847
848
849
850
# File 'ecs/cfn_service.rb', line 847

def remove_dependency(target)
  Jsii::Type.check_type(target, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5DZm5SZXNvdXJjZSJ9")), "target")
  jsii_call_method("removeDependency", [target])
end

#render_properties(props) ⇒ Hash{String => Object}

Parameters:

  • props (Hash{String => Object})

Returns:

  • (Hash{String => Object})


854
855
856
857
# File 'ecs/cfn_service.rb', line 854

def render_properties(props)
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6ImFueSJ9LCJraW5kIjoibWFwIn19")), "props")
  jsii_call_method("renderProperties", [props])
end

#replace_dependency(target, new_target) ⇒ void

This method returns an undefined value.

Replaces one dependency with another.

Parameters:



864
865
866
867
868
# File 'ecs/cfn_service.rb', line 864

def replace_dependency(target, new_target)
  Jsii::Type.check_type(target, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5DZm5SZXNvdXJjZSJ9")), "target")
  Jsii::Type.check_type(new_target, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5DZm5SZXNvdXJjZSJ9")), "newTarget")
  jsii_call_method("replaceDependency", [target, new_target])
end

#roleString?

The name or full Amazon Resource Name (ARN) of the IAM role that allows Amazon ECS to make calls to your load balancer on your behalf.

Returns:

  • (String, nil)


491
492
493
# File 'ecs/cfn_service.rb', line 491

def role()
  jsii_get_property("role")
end

#role=(value) ⇒ Object



495
496
497
498
# File 'ecs/cfn_service.rb', line 495

def role=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "role") unless value.nil?
  jsii_set_property("role", value)
end

#scheduling_strategyString?

The scheduling strategy to use for the service.

For more information, see Services .

Returns:

  • (String, nil)


505
506
507
# File 'ecs/cfn_service.rb', line 505

def scheduling_strategy()
  jsii_get_property("schedulingStrategy")
end

#scheduling_strategy=(value) ⇒ Object



509
510
511
512
# File 'ecs/cfn_service.rb', line 509

def scheduling_strategy=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "schedulingStrategy") unless value.nil?
  jsii_set_property("schedulingStrategy", value)
end

#service_connect_configurationAWSCDK::IResolvable, ...

The configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace.



517
518
519
# File 'ecs/cfn_service.rb', line 517

def service_connect_configuration()
  jsii_get_property("serviceConnectConfiguration")
end

#service_connect_configuration=(value) ⇒ Object



521
522
523
524
525
# File 'ecs/cfn_service.rb', line 521

def service_connect_configuration=(value)
  value = value.is_a?(Hash) ? ::AWSCDK::ECS::CfnService::ServiceConnectConfigurationProperty.new(**value.transform_keys(&:to_sym)) : value
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lY3MuQ2ZuU2VydmljZS5TZXJ2aWNlQ29ubmVjdENvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "serviceConnectConfiguration") unless value.nil?
  jsii_set_property("serviceConnectConfiguration", value)
end

#service_nameString?

The name of your service.

Returns:

  • (String, nil)


530
531
532
# File 'ecs/cfn_service.rb', line 530

def service_name()
  jsii_get_property("serviceName")
end

#service_name=(value) ⇒ Object



534
535
536
537
# File 'ecs/cfn_service.rb', line 534

def service_name=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serviceName") unless value.nil?
  jsii_set_property("serviceName", value)
end

#service_refAWSCDK::Interfaces::AWSECS::ServiceReference

A reference to a Service resource.



258
259
260
# File 'ecs/cfn_service.rb', line 258

def service_ref()
  jsii_get_property("serviceRef")
end

#service_registriesAWSCDK::IResolvable, ...

The details of the service discovery registry to associate with this service.

For more information, see Service discovery .



544
545
546
# File 'ecs/cfn_service.rb', line 544

def service_registries()
  jsii_get_property("serviceRegistries")
end

#service_registries=(value) ⇒ Object



548
549
550
551
# File 'ecs/cfn_service.rb', line 548

def service_registries=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkNmblNlcnZpY2UuU2VydmljZVJlZ2lzdHJ5UHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "serviceRegistries") unless value.nil?
  jsii_set_property("serviceRegistries", value)
end

#should_synthesizeBoolean

Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.

Returns:

  • (Boolean)

    true if the resource should be included or false is the resource should be omitted.



873
874
875
# File 'ecs/cfn_service.rb', line 873

def should_synthesize()
  jsii_call_method("shouldSynthesize", [])
end

#stackAWSCDK::Stack

The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

Returns:



171
172
173
# File 'ecs/cfn_service.rb', line 171

def stack()
  jsii_get_property("stack")
end

#tagsAWSCDK::TagManager

Tag Manager which manages the tags for this resource.

Returns:



265
266
267
# File 'ecs/cfn_service.rb', line 265

def tags()
  jsii_get_property("tags")
end

#tags_rawArray<AWSCDK::CfnTag>?

The metadata that you apply to the service to help you categorize and organize them.

Returns:



556
557
558
# File 'ecs/cfn_service.rb', line 556

def tags_raw()
  jsii_get_property("tagsRaw")
end

#tags_raw=(value) ⇒ Object



560
561
562
563
564
# File 'ecs/cfn_service.rb', line 560

def tags_raw=(value)
  value = value.is_a?(Array) ? value.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : value
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tagsRaw") unless value.nil?
  jsii_set_property("tagsRaw", value)
end

#task_definitionString?

The family and revision ( family:revision ) or full ARN of the task definition to run in your service.

Returns:

  • (String, nil)


569
570
571
# File 'ecs/cfn_service.rb', line 569

def task_definition()
  jsii_get_property("taskDefinition")
end

#task_definition=(value) ⇒ Object



573
574
575
576
# File 'ecs/cfn_service.rb', line 573

def task_definition=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "taskDefinition") unless value.nil?
  jsii_set_property("taskDefinition", value)
end

#to_stringString

Returns a string representation of this construct.

Returns:

  • (String)

    a string representation of this resource



605
606
607
# File 'ecs/cfn_service.rb', line 605

def to_string()
  jsii_call_method("toString", [])
end

#updated_properitesHash{String => Object}

Deprecated.

use updatedProperties Return properties modified after initiation Resources that expose mutable properties should override this function to collect and return the properties object for this resource.

Deprecated.

Returns:

  • (Hash{String => Object})


218
219
220
# File 'ecs/cfn_service.rb', line 218

def updated_properites()
  jsii_get_property("updatedProperites")
end

#updated_propertiesHash{String => Object}

Return properties modified after initiation.

Resources that expose mutable properties should override this function to collect and return the properties object for this resource.

Returns:

  • (Hash{String => Object})


228
229
230
# File 'ecs/cfn_service.rb', line 228

def updated_properties()
  jsii_get_property("updatedProperties")
end

#validate_properties(_properties) ⇒ void

This method returns an undefined value.

Parameters:

  • _properties (Object)


879
880
881
882
# File 'ecs/cfn_service.rb', line 879

def validate_properties(_properties)
  Jsii::Type.check_type(_properties, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "_properties")
  jsii_call_method("validateProperties", [_properties])
end

#volume_configurationsAWSCDK::IResolvable, ...

The configuration for a volume specified in the task definition as a volume that is configured at launch time.



581
582
583
# File 'ecs/cfn_service.rb', line 581

def volume_configurations()
  jsii_get_property("volumeConfigurations")
end

#volume_configurations=(value) ⇒ Object



585
586
587
588
# File 'ecs/cfn_service.rb', line 585

def volume_configurations=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkNmblNlcnZpY2UuU2VydmljZVZvbHVtZUNvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "volumeConfigurations") unless value.nil?
  jsii_set_property("volumeConfigurations", value)
end

#vpc_lattice_configurationsAWSCDK::IResolvable, ...

The VPC Lattice configuration for the service being created.



593
594
595
# File 'ecs/cfn_service.rb', line 593

def vpc_lattice_configurations()
  jsii_get_property("vpcLatticeConfigurations")
end

#vpc_lattice_configurations=(value) ⇒ Object



597
598
599
600
# File 'ecs/cfn_service.rb', line 597

def vpc_lattice_configurations=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkNmblNlcnZpY2UuVnBjTGF0dGljZUNvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "vpcLatticeConfigurations") unless value.nil?
  jsii_set_property("vpcLatticeConfigurations", value)
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.

Parameters:

  • mixins (Array<Constructs::IMixin>)

Returns:

  • (Constructs::IConstruct)


618
619
620
621
622
623
# File 'ecs/cfn_service.rb', line 618

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