Skip to content

Latest commit

 

History

History
95 lines (89 loc) · 2.09 KB

README.md

File metadata and controls

95 lines (89 loc) · 2.09 KB

vpc

create-vpc

original documentation

try {
  const input = {
    description: '', // string
    ip_range: '', // string
    is_default: true, // bool
    name: '', // string
    region: '', // string
  };
  const {data:{vpc}} = await dots.vpc.createVpc(input)
  console.log(vpc);
} catch (error) {
  console.log(error);
}

get-vpc

original documentation

try {
  const input = {
    vpc_id: '', // string
  };
  const {data:{vpc}} = await dots.vpc.getVpc(input)
  console.log(vpc);
} catch (error) {
  console.log(error);
}

list-vpcs

original documentation

try {
  const input = {
    page: 1, // number
    per_page: 1, // mumber
  };
  const {data:{vpcs}} = await dots.vpc.listVpcs(input)
  console.log(vpcs);
} catch (error) {
  console.log(error);
}

update-vpc

original documentation

try {
  const input = {
    description: '', // string
    is_default: true, // bool
    name: '', // string
  };
  const {data:{vpc}} = await dots.vpc.updateVpc(input)
  console.log(vpc);
} catch (error) {
  console.log(error);
}

list-vpc-resources

original documentation

try {
  const input = {
    page: 1, // number
    per_page: 25, // number
    vpc_id: '', // string
    resource_type: '', // string
  };
  const {data:{members}} = await dots.project.listVpcResources(input);
  console.log(members);
} catch (error) {
  console.log(error);
}

delete-vpc

original documentation

try {
  const input = {
    vpc_id: '', // string
  };
  const {status} = await dots.vpc.deleteVpc(input)
  console.log(status);
} catch (error) {
  console.log(error);
}