// Deletes the specified capacity provider. The FARGATE and FARGATE_SPOT capacity
// providers are reserved and cannot be deleted. You can disassociate them from a
// cluster using either the PutClusterCapacityProviders API 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 are not
// associated with a cluster can be deleted. To remove a capacity provider from a
// cluster, you can either use PutClusterCapacityProviders or delete the cluster.
Deletes the specified capacity provider. The FARGATE and FARGATE_SPOT capacity
providers are reserved and cannot be deleted. You can disassociate them from a
cluster using either the PutClusterCapacityProviders API 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 are not
associated with a cluster can be deleted. To remove a capacity provider from a
cluster, you can either use PutClusterCapacityProviders or delete the cluster.
// Deletes the specified capacity provider . The FARGATE and FARGATE_SPOT capacity // providers are reserved and cannot be deleted . You can disassociate them from a // cluster using either the PutClusterCapacityProviders API 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 are not // associated with a cluster can be deleted . To remove a capacity provider from a // cluster you can either use PutClusterCapacityProviders or delete the cluster .
func (c *Client) DeleteCapacityProvider(ctx context.Context, params *DeleteCapacityProviderInput, optFns ...func(*Options)) (*DeleteCapacityProviderOutput, error) {
	if params == nil {
		params = &DeleteCapacityProviderInput{}
	}
	result, metadata, err := c.invokeOperation(ctx, "DeleteCapacityProvider", params, optFns, addOperationDeleteCapacityProviderMiddlewares)
	if err != nil {
		return nil, err
	}
	out := result.(*DeleteCapacityProviderOutput)
	out.ResultMetadata = metadata
	return out, nil
}
func ( c * Client ) DeleteCapacityProvider ( ctx context . Context , params * DeleteCapacityProviderInput , optFns ... func ( * Options ) ) ( * DeleteCapacityProviderOutput , error ) { if params == nil { params = & DeleteCapacityProviderInput { } } result , metadata , err := c . invokeOperation ( ctx , " " , params , optFns , addOperationDeleteCapacityProviderMiddlewares ) if err != nil { return nil , err } out := result . ( * DeleteCapacityProviderOutput ) out . ResultMetadata = metadata return out , nil }
Deletes the specified capacity provider.
Deletes the specified capacity provider .