update_express_gateway_service
async
¶
update_express_gateway_service(
service_arn: String,
*,
config_overrides: Optional[AsyncECSClientConfig] = None,
execution_role_arn: Optional[String] = None,
health_check_path: Optional[String] = None,
primary_container: Optional[ExpressGatewayContainer] = None,
task_role_arn: Optional[String] = None,
network_configuration: Optional[ExpressGatewayServiceNetworkConfiguration] = None,
cpu: Optional[String] = None,
memory: Optional[String] = None,
cpu_architecture: Optional[ExpressCpuArchitecture] = None,
scaling_target: Optional[ExpressGatewayScalingTarget] = None,
task_definition_arn: Optional[String] = None,
) -> UpdateExpressGatewayServiceResponse
Updates an existing Express service configuration. Modifies container settings, resource allocation, auto-scaling configuration, and other service parameters without recreating the service.
Amazon ECS creates a new service revision with updated configuration and performs a rolling deployment to replace existing tasks. The service remains available during updates, ensuring zero-downtime deployments.
Some parameters like the infrastructure role cannot be modified after service creation and require creating a new service.
Parameters:
-
service_arn(String) –The Amazon Resource Name (ARN) of the Express service to update.
-
execution_role_arn(Optional[String], default:None) –The Amazon Resource Name (ARN) of the task execution role for the Express service.
-
health_check_path(Optional[String], default:None) –The path on the container for Application Load Balancer health checks.
-
primary_container(Optional[ExpressGatewayContainer], default:None) –The primary container configuration for the Express service.
-
task_role_arn(Optional[String], default:None) –The Amazon Resource Name (ARN) of the IAM role for containers in this task.
-
network_configuration(Optional[ExpressGatewayServiceNetworkConfiguration], default:None) –The network configuration for the Express service tasks. By default, the network configuration for an Express service uses the default VPC.
-
cpu(Optional[String], default:None) –The number of CPU units used by the task.
-
memory(Optional[String], default:None) –The amount of memory (in MiB) used by the task.
-
cpu_architecture(Optional[ExpressCpuArchitecture], default:None) –The CPU architecture that the task runs on. If you don't specify a value, the service keeps its current architecture.
Valid values:
-
X86_64- The x86 64-bit architecture. -
ARM64- The 64-bit ARM architecture.
Changing the architecture starts a new deployment that replaces the running tasks. Ensure that the container image you specify supports the architecture you choose. The operating system family for an Express service is always
LINUX.You can't specify
cpuArchitecturetogether withtaskDefinitionArn. -
-
scaling_target(Optional[ExpressGatewayScalingTarget], default:None) –The auto-scaling configuration for the Express service.
-
task_definition_arn(Optional[String], default:None) –The Amazon Resource Name (ARN) of a task definition to use to update the Express Gateway service. This allows you to manage your own task definition, giving you more control over the service configuration such as adding sidecar containers.
The task definition must have a container named
Mainwith a single TCP port mapping that includes a container port and port name. The task definition must also haveFARGATEcompatibility.If you provide a task definition ARN, you cannot also specify
primaryContainer,executionRoleArn,taskRoleArn,cpu,memory, orcpuArchitecture.
Raises:
-
AccessDeniedException–You don't have authorization to perform the requested action.
-
ClientException–These errors are usually caused by a client action. This client action might be using an action or resource on behalf of a user that doesn't have permissions to use the action or resource. Or, it might be specifying an identifier that isn't valid.
-
ClusterNotFoundException–The specified cluster wasn't found. You can view your available clusters with ListClusters. Amazon ECS clusters are Region specific.
-
InvalidParameterException–The specified parameter isn't valid. Review the available parameters for the API request.
For more information about service event errors, see Amazon ECS service event messages.
-
ServerException–These errors are usually caused by a server issue.
-
ServiceNotActiveException–The specified service isn't active. You can't update a service that's inactive. If you have previously deleted a service, you can re-create it with CreateService.
-
ServiceNotFoundException–The specified service wasn't found. You can view your available services with ListServices. Amazon ECS services are cluster specific and Region specific.
-
UnsupportedFeatureException–The specified task isn't supported in this Region.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ecs/_services/async_ecs.py
5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 | |