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
5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 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 | |