Deployments - Delete

Deletes the deployment specified by the given deployment-id.

DELETE {endpoint}/openai/deployments/{deployment-id}?api-version=2022-12-01

URI Parameters

Name In Required Type Description
deployment-id
path True
  • string

The identifier of the deployment.

endpoint
path True
  • string
url

Supported Cognitive Services endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace "aoairesource" with your Azure OpenAI account name).

api-version
query True
  • string

The requested API version.

Request Header

Name Required Type Description
api-key True
  • string

Provide your Cognitive Services Azure OpenAI account key here.

Responses

Name Type Description
204 No Content

The deployment was successfully deleted.

Other Status Codes

An error occurred.

Security

api-key

Provide your Cognitive Services Azure OpenAI account key here.

Type: apiKey
In: header

Examples

Deleting a deployment.

Sample Request

DELETE https://aoairesource.openai.azure.com/openai/deployments/deployment-afa0669ca01e4693ae3a93baf40f26d6?api-version=2022-12-01

Sample Response

Definitions

Error

Error

ErrorCode

ErrorCode

ErrorResponse

ErrorResponse

InnerError

InnerError

InnerErrorCode

InnerErrorCode

Error

Error

Name Type Description
code

ErrorCode
Error codes as defined in the Microsoft REST guidelines (https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses).

details

The error details if available.

innererror

InnerError
Inner error as defined in the Microsoft REST guidelines (https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses).

message
  • string

The message of this error.

target
  • string

The location where the error happened if available.

ErrorCode

ErrorCode

Name Type Description
conflict
  • string

The requested operation conflicts with the current resource state.

fileImportFailed
  • string

Import of file failed.

forbidden
  • string

The operation is forbidden for the current user/api key.

internalFailure
  • string

Internal error. Please retry.

invalidPayload
  • string

The request data is invalid for this operation.

itemDoesAlreadyExist
  • string

The item does already exist.

jsonlValidationFailed
  • string

Validation of jsonl data failed.

notFound
  • string

The resource is not found.

quotaExceeded
  • string

Quota exceeded.

serviceUnavailable
  • string

The service is currently not available.

unexpectedEntityState
  • string

The operation cannot be executed in the current resource's state.

ErrorResponse

ErrorResponse

Name Type Description
error

Error
Error content as defined in the Microsoft REST guidelines (https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses).

InnerError

InnerError

Name Type Description
code

InnerErrorCode
Inner error codes as defined in the Microsoft REST guidelines (https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses).

innererror

InnerError
Inner error as defined in the Microsoft REST guidelines (https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses).

InnerErrorCode

InnerErrorCode

Name Type Description
invalidPayload
  • string

The request data is invalid for this operation.