Class ImageActionService

Hierarchy

  • ImageActionService

Constructors

Methods

  • Convert an image (a backup for example) to a snapshot

    Example

    import { DigitalOcean } from 'digitalocean-js';

    const client = new DigitalOcean('your-api-key');
    const action = await client.imageActions.convertImageToSnapshot('image-id');

    Parameters

    • imageId: number

    Returns Promise<Action>

  • Retrieve the status of an image action

    Example

    import { DigitalOcean } from 'digitalocean-js';

    const client = new DigitalOcean('your-api-key');
    const action = await client.imageActions.getExistingImageAction('image-id', 'action-id');

    Parameters

    • imageId: number
    • actionId: number

    Returns Promise<Action>

  • Transfer an image to another region

    Example

    import { DigitalOcean } from 'digitalocean-js';

    const client = new DigitalOcean('your-api-key');
    const action = await client.imageActions.transferImage('image-id', 'nyc1');

    Parameters

    • imageId: number
    • region: string

    Returns Promise<Action>

Generated using TypeDoc