GitHub

RDK

Delete Classes & Instances

You can delete your classes and instances via RDK.

  • You cannot delete more than 10 classes in parallel.
  • You cannot delete more than 10 instances in parallel.

Write methods cannot delete their own instances.

interface DeleteClass {
    classId: string
}


interface DeleteInstance {
    classId: string
    instanceId: string
}


interface DeleteAllInstances {
    classId: string
}


async function deleteClass(input: DeleteClass): Promise<CloudObjectResponse | undefined> {
    // ...
}


async function deleteInstance(input: DeleteInstance): Promise<CloudObjectResponse | undefined> {
    // ...
}


async function deleteAllInstances(input: DeleteAllInstances): Promise<OperationResponse | undefined> {
    // ...
}

Usage

import RDK from '@retter/rdk'


const rdk = new RDK()


await rdk.deleteClass({ classId: 'MyClass' })
await rdk.deleteInstance({ classId: 'MyClass', instanceId: 'myInstanceId' })
await rdk.deleteAllInstances({ classId: 'MyClass' })


await rdk.pipeline()
    .deleteClass({ classId: 'MyClass' })
    .deleteInstance({ classId: 'MyClass', instanceId: 'myInstanceId' })
    .deleteAllInstances({ classId: 'MyClass' })
    .send()

API Reference

Delete Class Input

ParameterTypeRequiredDescription
classIdstringfalseClass ID to delete

Delete Class Output

ParameterTypeRequiredDescription
successbooleantrueReturns true if operation is successful
dataanyfalseSuccessful response
errorstringfalseReason of failure

Delete Instance Input

ParameterTypeRequiredDescription
classIdstringfalseClass ID to delete
instanceIdstringfalseInstance ID to delete

Delete Instance Output

ParameterTypeRequiredDescription
successbooleantrueReturns true if operation is successful
dataanyfalseSuccessful response
errorstringfalseReason of failure

Delete All Instances Input

ParameterTypeRequiredDescription
classIdstringfalseClass ID to delete its instances

Delete All Instance Output

ParameterTypeRequiredDescription
successbooleantrueReturns true if operation is successful
dataanyfalseSuccessful response
errorstringfalseReason of failure
Previous
Cache