Delete Environment
client.Beta.Environments.Delete(ctx, environmentID, body) (*BetaEnvironmentDeleteResponse, error)DELETE/v1/environments/{environment_id}
Delete an environment by ID. Returns a confirmation of the deletion.
Delete Environment
package main
import (
"context"
"fmt"
"github.com/anthropics/anthropic-sdk-go"
"github.com/anthropics/anthropic-sdk-go/option"
)
func main() {
client := anthropic.NewClient(
option.WithAPIKey("my-anthropic-api-key"),
)
betaEnvironmentDeleteResponse, err := client.Beta.Environments.Delete(
context.TODO(),
"env_011CZkZ9X2dpNyB7HsEFoRfW",
anthropic.BetaEnvironmentDeleteParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", betaEnvironmentDeleteResponse.ID)
}{
"id": "env_011CZkZ9X2dpNyB7HsEFoRfW",
"type": "environment_deleted"
}Returns Examples
{
"id": "env_011CZkZ9X2dpNyB7HsEFoRfW",
"type": "environment_deleted"
}