Firewall
API for firewall operations
Version: 0.1.0
Server
- URL:
https://api.kopernik.us/v0- Kopernik.us API server
Paths
/resource/firewall/{providerUid}
GET
List firewalls
List firewalls 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 firewalls, if there are more items to fetch |
| maxResults | query | integer | ❌ | Maximum number of firewalls 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:
-
200: Firewalls data
- Content Type:
application/json- Schema: FirewallPagedResourceResponse
- Content Type:
-
400: Argument validation error
- Content Type:
application/json- Schema: ErrorResponse
- Content Type:
-
404: Provider not found
- Content Type:
application/json- Schema: ErrorResponse
- Content Type:
POST
Create firewall
Create a new firewall
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| providerUid | path | ProviderId | ✅ | Unique identifier of the provider |
Request Body:
Content Type: application/json
Schema: FirewallCreate
Responses:
-
200: Firewall created successfully
- Content Type:
application/json- Schema: FirewallResourceResponse
- Content Type:
-
400: Argument validation error
- Content Type:
application/json- Schema: ErrorResponse
- Content Type:
-
404: Provider not found
- Content Type:
application/json- Schema: ErrorResponse
- Content Type:
/resource/firewall/{providerUid}/{resourceUid}
GET
Get firewall
Get firewall data
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| providerUid | path | ProviderId | ✅ | Unique identifier of the provider |
| resourceUid | path | string | ✅ | Unique identifier of the firewall |
Responses:
-
200: Firewall data
- Content Type:
application/json- Schema: FirewallResourceResponse
- Content Type:
-
400: Argument validation error
- Content Type:
application/json- Schema: ErrorResponse
- Content Type:
-
404: Firewall not found
- Content Type:
application/json- Schema: ErrorResponse
- Content Type:
Schemas
Action
Action to apply if the rule is matched
Type: enum
Values:
allowdeny
FirewallRule
Rule which controls traffic to or from a set of peers; when policy is unspecified, traffic is allowed
Type: object
Properties:
| Name | Type | Required | Description |
|---|---|---|---|
| protocol | Protocol | ✅ | |
| name | string | ❌ | Name of the rule |
| description | string | ❌ | Description of the rule |
| ports | string | ❌ | Ports for the rule, either a single port or a range of ports |
| peers | array<Peer> | ✅ | Peers for the rule |
FirewallCustomPolicyRule
Rule which controls traffic to or from a set of peers with a policy
Composition: allOf
Type: object
Properties:
| Name | Type | Required | Description |
|---|---|---|---|
| policy | Action | ❌ |
Firewall
Firewall
Composition: allOf
Type: object
Properties:
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | ❌ | Name of the firewall |
| description | string | ❌ | Description of the firewall |
| status | string | ❌ | Status of the firewall |
| vpcUid | string | ❌ | ID of the VPC the firewall is associated with; empty for non-VPC firewalls |
| inboundRules | array<FirewallCustomPolicyRule> | ❌ | Rules for incoming traffic |
| outboundRules | array<FirewallCustomPolicyRule> | ❌ | Rules for outgoing traffic |
| defaultInboundPolicy | Action | ❌ | |
| defaultOutboundPolicy | Action | ❌ | |
| tags | array |
❌ | Tags of the firewall |
Peer
Peer for the rule
Type: object
Properties:
| Name | Type | Required | Description |
|---|---|---|---|
| type | PeerType | ✅ | |
| uids | array |
✅ | Peer identifiers |
PeerType
Type of the peer
Type: enum
Values:
ipv4ipv6other
Protocol
Protocol for the rule
Type: enum
Values:
tcpudpicmpipencapother
FirewallResourceResponse
Response with firewall
Composition: allOf
Type: object
Properties:
| Name | Type | Required | Description |
|---|---|---|---|
| resource | Firewall | ✅ |
FirewallPagedResourceResponse
Response with paged firewalls
Composition: allOf
Type: object
Properties:
| Name | Type | Required | Description |
|---|---|---|---|
| resources | array<Firewall> | ✅ |
FirewallCreate
Request to create a new firewall; default policy is to deny all traffic
Type: object
Properties:
| Name | Type | Required | Description |
|---|---|---|---|
| regionUid | string | ❌ | Region identifier where the firewall will be created |
| name | string | ❌ | Name of the firewall |
| description | string | ❌ | Description of the firewall |
| vpcUid | string | ❌ | VPC identifier to associate the firewall with; omit for non-VPC firewalls |
| inboundRules | array<FirewallRule> | ❌ | Rules to allow incoming traffic |
| outboundRules | array<FirewallRule> | ❌ | Rules to allow outgoing traffic |
| tags | array |
❌ | Tags for the firewall |