DeleteExpressGatewayService
Deletes an Express service and removes all associated AWS resources. This operation stops service tasks, removes the Application Load Balancer, target groups, security groups, auto-scaling policies, and other managed infrastructure components.
The service enters a DRAINING state where existing tasks complete current
requests without starting new tasks. After all tasks stop, the service and infrastructure
are permanently removed.
This operation cannot be reversed. Back up important data and verify the service is no longer needed before deletion.
Request Syntax
{
"serviceArn": "string"
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
- serviceArn
-
The Amazon Resource Name (ARN) of the Express service to delete. The ARN uniquely identifies the service within your AWS account and region.
Type: String
Required: Yes
Response Syntax
{
"service": {
"activeConfigurations": [
{
"cpu": "string",
"createdAt": number,
"executionRoleArn": "string",
"healthCheckPath": "string",
"ingressPaths": [
{
"accessType": "string",
"endpoint": "string"
}
],
"memory": "string",
"networkConfiguration": {
"securityGroups": [ "string" ],
"subnets": [ "string" ]
},
"primaryContainer": {
"awsLogsConfiguration": {
"logGroup": "string",
"logStreamPrefix": "string"
},
"command": [ "string" ],
"containerPort": number,
"environment": [
{
"name": "string",
"value": "string"
}
],
"image": "string",
"repositoryCredentials": {
"credentialsParameter": "string"
},
"secrets": [
{
"name": "string",
"valueFrom": "string"
}
]
},
"scalingTarget": {
"autoScalingMetric": "string",
"autoScalingTargetValue": number,
"maxTaskCount": number,
"minTaskCount": number
},
"serviceRevisionArn": "string",
"taskRoleArn": "string"
}
],
"cluster": "string",
"createdAt": number,
"currentDeployment": "string",
"infrastructureRoleArn": "string",
"serviceArn": "string",
"serviceName": "string",
"status": {
"statusCode": "string",
"statusReason": "string"
},
"tags": [
{
"key": "string",
"value": "string"
}
],
"updatedAt": number
}
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- service
-
The full description of the deleted express service.
Type: ECSExpressGatewayService object
Errors
For information about the errors that are common to all actions, see Common Errors.
- AccessDeniedException
-
You don't have authorization to perform the requested action.
HTTP Status Code: 400
- 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.
- message
-
Message that describes the cause of the exception.
HTTP Status Code: 400
- ClusterNotFoundException
-
The specified cluster wasn't found. You can view your available clusters with ListClusters. Amazon ECS clusters are Region specific.
HTTP Status Code: 400
- 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.
HTTP Status Code: 400
- ServerException
-
These errors are usually caused by a server issue.
- message
-
Message that describes the cause of the exception.
HTTP Status Code: 500
- 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.
HTTP Status Code: 400
- ServiceNotFoundException
-
The specified service wasn't found. You can view your available services with ListServices. Amazon ECS services are cluster specific and Region specific.
HTTP Status Code: 400
- UnsupportedFeatureException
-
The specified task isn't supported in this Region.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: