update_express_gateway_service
¶
update_express_gateway_service(
service_arn: String,
*,
config_overrides: Optional[ECSClientConfig] = 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/ecs.py
5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 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 | |