← Back

VPC

API for VPC operations

Version: 0.1.0

Server

  • URL: https://api.kopernik.us/v0
    • Kopernik.us API server

Paths

/resource/vpc/{providerUid}

GET

List VPCs

List VPCs for the specified provider

Parameters:

Name In Type Required Description
providerUid path ProviderId Unique identifier of the provider
nextToken query string Token for the next page of VPCs, if there are more items to fetch
maxResults query integer Maximum number of VPCs to fetch
jq query string JQ filter expression to filter the results. Only resources where the expression evaluates to a truthy value are included. The expression is applied to each resource’s JSON representation. Uses jq 1.7 syntax.

Responses:

POST

Create VPC

Create a new VPC for the specified provider

Parameters:

Name In Type Required Description
providerUid path ProviderId Unique identifier of the provider

Request Body:

Content Type: application/json

Schema: VpcCreate

Responses:

  • 200: VPC created

  • 400: Argument validation error

/resource/vpc/{providerUid}/{resourceUid}

GET

Get VPC

Get VPC details

Parameters:

Name In Type Required Description
providerUid path ProviderId Unique identifier of the provider
resourceUid path string Unique identifier of the VPC

Responses:

  • 200: VPC details

  • 400: Argument validation error

  • 404: VPC not found

DELETE

Delete VPC

Delete VPC by its UID

Parameters:

Name In Type Required Description
providerUid path ProviderId Unique identifier of the provider
resourceUid path string Unique identifier of the VPC to delete
subnets query boolean If true, delete all subnets before deleting the VPC

Responses:

  • 200: VPC deleted

  • 400: Argument validation error

  • 404: VPC not found

Schemas

Vpc

VPC

Composition: allOf

Type: object

Properties:

Name Type Required Description
name string Name of the VPC
description string Description of the VPC
cidrBlock string CIDR block of the VPC; for providers that do not support CIDR blocks at VPC level, this field is set to the address with least possible scope to include all VPC subnets
subnets array<Subnet> Subnets of the VPC
default boolean Whether the VPC is the default VPC in its region
tags array Tags of the VPC

Subnet

Subnet

Type: object

Properties:

Name Type Required Description
uid string Unique identifier of the subnet
address string Address of the subnet (CIDR block)
name string Name of the subnet
availabilityZone string Availability zone for the subnet, if applicable

VpcCreate

Request to create a new VPC

Type: object

Properties:

Name Type Required Description
regionUid string Region identifier where the VPC will be created
subnets array Subnets to create within the VPC
cidrBlock string CIDR block for the VPC; for providers that do not support CIDR blocks at VPC level, this field is set to the address with least possible scope to include all VPC subnets
name string Name of the VPC
description string Description of the VPC
tags array Tags for the VPC

VpcResourceResponse

Response with VPC

Composition: allOf

Type: object

Properties:

Name Type Required Description
resource Vpc

VpcPagedResourceResponse

Response with paged VPCs

Composition: allOf

Type: object

Properties:

Name Type Required Description
resources array<Vpc>