import Runloop from '@runloop/api-client';
const client = new Runloop({
bearerToken: process.env['RUNLOOP_API_KEY'], // This is the default and can be omitted
});
const networkPolicyView = await client.networkPolicies.delete('id');
console.log(networkPolicyView.id);{
"id": "<string>",
"name": "<string>",
"egress": {
"allow_all": true,
"allow_devbox_to_devbox": true,
"allowed_hostnames": [
"<string>"
]
},
"create_time_ms": 123,
"update_time_ms": 123,
"description": "<string>"
}Delete an existing NetworkPolicy. This action is irreversible.
import Runloop from '@runloop/api-client';
const client = new Runloop({
bearerToken: process.env['RUNLOOP_API_KEY'], // This is the default and can be omitted
});
const networkPolicyView = await client.networkPolicies.delete('id');
console.log(networkPolicyView.id);{
"id": "<string>",
"name": "<string>",
"egress": {
"allow_all": true,
"allow_devbox_to_devbox": true,
"allowed_hostnames": [
"<string>"
]
},
"create_time_ms": 123,
"update_time_ms": 123,
"description": "<string>"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The unique identifier of the NetworkPolicy to delete.
The body is of type object.
NetworkPolicy deleted successfully.
A NetworkPolicy defines egress network access rules for devboxes. Policies can be applied to blueprints, devboxes, and snapshot resumes.
The unique identifier of the NetworkPolicy.
The human-readable name of the NetworkPolicy. Unique per account.
The egress rules for this policy.
Show child attributes
The creation time of the NetworkPolicy (Unix timestamp in milliseconds).
Last update time of the NetworkPolicy (Unix timestamp in milliseconds).
Optional description of the NetworkPolicy.
Was this page helpful?