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
6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 | |