dots

image

convert-image-to-snapshot

original documentation

try {
  const input = {
    image_id: 123, // number
  };
  const {data:{action}} = await dots.image.convertImageToSnapshot(input);
  console.log(action);
} catch (error) {
  console.log(error);
}

create-custom-image

original documentation

try {
  const input = {
    description: '', // string
    distribution: '', // string
    name: '', // string
    region: '', // string
    tags: [''], // string[]
    url: '', // string
  };
  const {data:{image}} = await dots.image.createCustomImage(input);
  console.log(image);
} catch (error) {
  console.log(error);
}

delete-image

original documentation

try {
  const input = {
    image_id: 123, // number
  };
  const {status} = await dots.image.deleteImage(input);
  console.log(status);
} catch (error) {
  console.log(error);
}

get-image

original documentation┬╣

original documentation┬▓

try {
  const input = {
    image_id: 123, // number
  };
  const {data:{image}} = await dots.image.getImage(input);
  console.log(image);
} catch (error) {
  console.log(error);
}

get-image-action

original documentation

try {
  const input = {
    image_id: 123, // number
    action_id: 123, // number
  };
  const {data:{action}} = await dots.image.getImageAction(input);
  console.log(action);
} catch (error) {
  console.log(error);
}

list-image-actions

original documentation

try {
  const input = {
    image_id: 123, // number
  };
  const {data:{actions}} = await dots.image.listImageActions(input);
  console.log(actions);
} catch (error) {
  console.log(error);
}

list-images

original documentation

try {
  const input = {
    per_page: 100, // number;
  };
  const {data:{images}} = await dots.image.listImages(input);
  console.log(images);
} catch (error) {
  console.log(error);
}

transfer-image

original documentation

try {
  const input = {
    image_id: 123, // number
    region: 'region', // string
  };
  const {data:{action}} = await dots.image.transferImage(input);
  console.log(action);
} catch (error) {
  console.log(error);
}

update-image

original documentation

try {
  const input = {
    image_id: 123, // number
  };
  const {data:{image}} = await dots.image.updateImage(input);
  console.log(image);
} catch (error) {
  console.log(error);
}