AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Container for the parameters to the DeleteCapacityProvider operation.
Deletes the specified capacity provider.
The FARGATE
and FARGATE_SPOT
capacity providers are reserved and can't
be deleted. You can disassociate them from a cluster using either PutClusterCapacityProviders
or by deleting the cluster.
Prior to a capacity provider being deleted, the capacity provider must be removed
from the capacity provider strategy from all services. The UpdateService
API can be used to remove a capacity provider from a service's capacity provider strategy.
When updating a service, the forceNewDeployment
option can be used to ensure
that any tasks using the Amazon EC2 instance capacity provided by the capacity provider
are transitioned to use the capacity from the remaining capacity providers. Only capacity
providers that aren't associated with a cluster can be deleted. To remove a capacity
provider from a cluster, you can either use PutClusterCapacityProviders
or delete the cluster.
Namespace: Amazon.ECS.Model
Assembly: AWSSDK.ECS.dll
Version: 3.x.y.z
public class DeleteCapacityProviderRequest : AmazonECSRequest IAmazonWebServiceRequest
The DeleteCapacityProviderRequest type exposes the following members
Name | Description | |
---|---|---|
![]() |
DeleteCapacityProviderRequest() |
Name | Type | Description | |
---|---|---|---|
![]() |
CapacityProvider | System.String |
Gets and sets the property CapacityProvider. The short name or full Amazon Resource Name (ARN) of the capacity provider to delete. |
This example deletes a specified capacity provider.
var client = new AmazonECSClient(); var response = client.DeleteCapacityProvider(new DeleteCapacityProviderRequest { CapacityProvider = "arn:aws:ecs:us-west-2:123456789012:capacity-provider/ExampleCapacityProvider" }); CapacityProvider capacityProvider = response.CapacityProvider;
.NET:
Supported in: 8.0 and newer, Core 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5 and newer, 3.5