ECS / Client / delete_express_gateway_service
delete_express_gateway_service¶
- ECS.Client.delete_express_gateway_service(**kwargs)¶
Deletes an Express service and removes all associated Amazon Web Services 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
DRAININGstate 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.
See also: AWS API Documentation
Request Syntax
response = client.delete_express_gateway_service( serviceArn='string' )
- Parameters:
serviceArn (string) –
[REQUIRED]
The Amazon Resource Name (ARN) of the Express service to delete. The ARN uniquely identifies the service within your Amazon Web Services account and region.
- Return type:
dict
- Returns:
Response Syntax
{ 'service': { 'cluster': 'string', 'serviceName': 'string', 'serviceArn': 'string', 'infrastructureRoleArn': 'string', 'status': { 'statusCode': 'ACTIVE'|'DRAINING'|'INACTIVE', 'statusReason': 'string' }, 'currentDeployment': 'string', 'activeConfigurations': [ { 'serviceRevisionArn': 'string', 'executionRoleArn': 'string', 'taskRoleArn': 'string', 'cpu': 'string', 'memory': 'string', 'networkConfiguration': { 'securityGroups': [ 'string', ], 'subnets': [ 'string', ] }, 'healthCheckPath': 'string', 'primaryContainer': { 'image': 'string', 'containerPort': 123, 'awsLogsConfiguration': { 'logGroup': 'string', 'logStreamPrefix': 'string' }, 'repositoryCredentials': { 'credentialsParameter': 'string' }, 'command': [ 'string', ], 'environment': [ { 'name': 'string', 'value': 'string' }, ], 'secrets': [ { 'name': 'string', 'valueFrom': 'string' }, ] }, 'scalingTarget': { 'minTaskCount': 123, 'maxTaskCount': 123, 'autoScalingMetric': 'AVERAGE_CPU'|'AVERAGE_MEMORY'|'REQUEST_COUNT_PER_TARGET', 'autoScalingTargetValue': 123 }, 'ingressPaths': [ { 'accessType': 'PUBLIC'|'PRIVATE', 'endpoint': 'string' }, ], 'createdAt': datetime(2015, 1, 1) }, ], 'tags': [ { 'key': 'string', 'value': 'string' }, ], 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1) } }
Response Structure
(dict) –
service (dict) –
The full description of the deleted express service.
cluster (string) –
The short name or full ARN of the cluster that hosts the Express service.
serviceName (string) –
The name of the Express service.
serviceArn (string) –
The ARN that identifies the Express service.
infrastructureRoleArn (string) –
The ARN of the infrastructure role that manages Amazon Web Services resources for the Express service.
status (dict) –
The current status of the Express service.
statusCode (string) –
The status of the Express service.
statusReason (string) –
Information about why the Express service is in the current status.
currentDeployment (string) –
The current deployment configuration for the Express service.
activeConfigurations (list) –
The list of active service configurations for the Express service.
(dict) –
Represents a specific configuration revision of an Express service, containing all the settings and parameters for that revision.
serviceRevisionArn (string) –
The ARN of the service revision.
executionRoleArn (string) –
The ARN of the task execution role for the service revision.
taskRoleArn (string) –
The ARN of the task role for the service revision.
cpu (string) –
The CPU allocation for tasks in this service revision.
memory (string) –
The memory allocation for tasks in this service revision.
networkConfiguration (dict) –
The network configuration for tasks in this service revision.
securityGroups (list) –
The IDs of the security groups associated with the Express service.
(string) –
subnets (list) –
The IDs of the subnets associated with the Express service.
(string) –
healthCheckPath (string) –
The health check path for this service revision.
primaryContainer (dict) –
The primary container configuration for this service revision.
image (string) –
The image used to start a container. This string is passed directly to the Docker daemon. Images in the Docker Hub registry are available by default. Other repositories are specified with either
repository-url/image:tagorrepository-url/image@digest.For Express services, the image typically contains a web application that listens on the specified container port. The image can be stored in Amazon ECR, Docker Hub, or any other container registry accessible to your execution role.
containerPort (integer) –
The port number on the container that receives traffic from the load balancer. Default is 80.
awsLogsConfiguration (dict) –
The log configuration for the container.
logGroup (string) –
The name of the CloudWatch Logs log group to send container logs to.
logStreamPrefix (string) –
The prefix for the CloudWatch Logs log stream names. The default for an Express service is
ecs.
repositoryCredentials (dict) –
The configuration for repository credentials for private registry authentication.
credentialsParameter (string) –
The Amazon Resource Name (ARN) of the secret containing the private repository credentials.
command (list) –
The command that is passed to the container.
(string) –
environment (list) –
The environment variables to pass to the container.
(dict) –
A key-value pair object.
name (string) –
The name of the key-value pair. For environment variables, this is the name of the environment variable.
value (string) –
The value of the key-value pair. For environment variables, this is the value of the environment variable.
secrets (list) –
The secrets to pass to the container.
(dict) –
An object representing the secret to expose to your container. Secrets can be exposed to a container in the following ways:
To inject sensitive data into your containers as environment variables, use the
secretscontainer definition parameter.To reference sensitive information in the log configuration of a container, use the
secretOptionscontainer definition parameter.
For more information, see Specifying sensitive data in the Amazon Elastic Container Service Developer Guide.
name (string) –
The name of the secret.
valueFrom (string) –
The secret to expose to the container. The supported values are either the full ARN of the Secrets Manager secret or the full ARN of the parameter in the SSM Parameter Store.
For information about the require Identity and Access Management permissions, see Required IAM permissions for Amazon ECS secrets (for Secrets Manager) or Required IAM permissions for Amazon ECS secrets (for Systems Manager Parameter store) in the Amazon Elastic Container Service Developer Guide.
Note
If the SSM Parameter Store parameter exists in the same Region as the task you’re launching, then you can use either the full ARN or name of the parameter. If the parameter exists in a different Region, then the full ARN must be specified.
scalingTarget (dict) –
The auto-scaling configuration for this service revision.
minTaskCount (integer) –
The minimum number of tasks to run in the Express service.
maxTaskCount (integer) –
The maximum number of tasks to run in the Express service.
autoScalingMetric (string) –
The metric used for auto-scaling decisions. The default metric used for an Express service is
CPUUtilization.autoScalingTargetValue (integer) –
The target value for the auto-scaling metric. The default value for an Express service is 60.
ingressPaths (list) –
The entry point into this service revision.
(dict) –
The entry point into an Express service.
accessType (string) –
The type of access to the endpoint for the Express service.
endpoint (string) –
The endpoint for access to the service.
createdAt (datetime) –
The Unix timestamp for when this service revision was created.
tags (list) –
The metadata applied to the Express service.
(dict) –
The metadata that you apply to a resource to help you categorize and organize them. Each tag consists of a key and an optional value. You define them.
The following basic restrictions apply to tags:
Maximum number of tags per resource - 50
For each resource, each tag key must be unique, and each tag key can have only one value.
Maximum key length - 128 Unicode characters in UTF-8
Maximum value length - 256 Unicode characters in UTF-8
If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
Tag keys and values are case-sensitive.
Do not use
aws:,AWS:, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
key (string) –
One part of a key-value pair that make up a tag. A
keyis a general label that acts like a category for more specific tag values.value (string) –
The optional part of a key-value pair that make up a tag. A
valueacts as a descriptor within a tag category (key).
createdAt (datetime) –
The Unix timestamp for when the Express service was created.
updatedAt (datetime) –
The Unix timestamp for when the Express service was last updated.
Exceptions
ECS.Client.exceptions.AccessDeniedExceptionECS.Client.exceptions.ClientExceptionECS.Client.exceptions.ClusterNotFoundExceptionECS.Client.exceptions.InvalidParameterExceptionECS.Client.exceptions.ServerExceptionECS.Client.exceptions.ServiceNotFoundExceptionECS.Client.exceptions.ServiceNotActiveExceptionECS.Client.exceptions.UnsupportedFeatureException