DeleteCapacityProviderSession
Deletes a session associated with a capacity provider in Amazon Bedrock AgentCore and makes the session unavailable for further use. To delete a capacity provider session, specify both the capacity provider identifier and the session ID. After you delete a session, you cannot restart it.
Request Syntax
DELETE /capacity-providers/capacityProviderId/sessions/sessionId HTTP/1.1
URI Request Parameters
The request uses the following URI parameters.
- capacityProviderId
-
The unique identifier of the capacity provider associated with the session.
Length Constraints: Minimum length of 12. Maximum length of 59.
Pattern:
[a-zA-Z][a-zA-Z0-9_]{0,47}-[a-zA-Z0-9]{10}Required: Yes
- sessionId
-
The unique identifier of the capacity provider session to delete.
Length Constraints: Minimum length of 1. Maximum length of 100.
Pattern:
[a-zA-Z0-9][a-zA-Z0-9-_]*Required: Yes
Request Body
The request does not have a request body.
Response Syntax
HTTP/1.1 202
Content-type: application/json
{
"capacityProviderArn": "string",
"sessionId": "string",
"status": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 202 response.
The following data is returned in JSON format by the service.
- capacityProviderArn
-
The Amazon Resource Name (ARN) of the capacity provider associated with the deleted session.
Type: String
Pattern:
arn:aws(-[^:]+)?:bedrock-agentcore:[a-z0-9-]+:[0-9]{12}:capacity-provider/[a-zA-Z][a-zA-Z0-9_]{0,47}-[a-zA-Z0-9]{10} - sessionId
-
The unique identifier of the deleted capacity provider session.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 100.
Pattern:
[a-zA-Z0-9][a-zA-Z0-9-_]* - status
-
The current status of the capacity provider session. When the status is
Deleting, the session is being deleted and is not available. When the status isDeleted, the session is no longer available.Type: String
Valid Values:
Provisioning | Deprovisioning | Active | Deleting | Deleted | Stopped
Errors
For information about the errors that are common to all actions, see Common Error Types.
- AccessDeniedException
-
The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
HTTP Status Code: 403
- InternalServerException
-
The exception that occurs when the service encounters an unexpected internal error. This is a temporary condition that will resolve itself with retries. We recommend implementing exponential backoff retry logic in your application.
HTTP Status Code: 500
- ResourceNotFoundException
-
The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
HTTP Status Code: 404
- ThrottlingException
-
The exception that occurs when the request was denied due to request throttling. This happens when you exceed the allowed request rate for an operation. Reduce the frequency of requests or implement exponential backoff retry logic in your application.
HTTP Status Code: 429
- ValidationException
-
The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: