1"use strict";(self.webpackChunkinstavm_docs=self.webpackChunkinstavm_docs||[]).push([[8556],{7738:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>c,contentTitle:()=>r,default:()=>j,frontMatter:()=>i,metadata:()=>l,toc:()=>o});var d=n(4848),t=n(8453);const i={title:"Set Session Egress Policy",description:"Set Session Egress Policy"},r="Set Session Egress Policy",l={id:"api/egress/post-v1-egress-session-session-id",title:"Set Session Egress Policy",description:"Set Session Egress Policy",source:"@site/docs/api/egress/post-v1-egress-session-session-id.md",sourceDirName:"api/egress",slug:"/api/egress/post-v1-egress-session-session-id",permalink:"/docs/api/egress/post-v1-egress-session-session-id",draft:!1,unlisted:!1,editUrl:"https://github.com/instavm/instavm-docs/tree/main/docs/api/egress/post-v1-egress-session-session-id.md",tags:[],version:"current",frontMatter:{title:"Set Session Egress Policy",description:"Set Session Egress Policy"},sidebar:"tutorialSidebar",previous:{title:"Get Vm Egress Policy",permalink:"/docs/api/egress/get-v1-egress-vm-vm-id"},next:{title:"Set Vm Egress Policy",permalink:"/docs/api/egress/post-v1-egress-vm-vm-id"}},c={},o=[{value:"Authentication",id:"authentication",level:2},{value:"Parameters",id:"parameters",level:2},{value:"Request Body",id:"request-body",level:2},{value:"application/json",id:"applicationjson",level:4},{value:"Responses",id:"responses",level:2},{value:"200",id:"200",level:3},{value:"application/json",id:"applicationjson-1",level:4},{value:"422",id:"422",level:3},{value:"application/json",id:"applicationjson-2",level:4}];function h(e){const s={code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",header:"header",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,t.R)(),...e.components};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(s.header,{children:(0,d.jsx)(s.h1,{id:"set-session-egress-policy",children:"Set Session Egress Policy"})}),"\n",(0,d.jsx)(s.pre,{children:(0,d.jsx)(s.code,{children:"POST /v1/egress/session/{session_id}\n"})}),"\n",(0,d.jsx)(s.h2,{id:"authentication",children:"Authentication"}),"\n",(0,d.jsxs)(s.p,{children:["Requires authentication via: ",(0,d.jsx)(s.code,{children:"OAuth2PasswordBearer"}),"."]}),"\n",(0,d.jsx)(s.h2,{id:"parameters",children:"Parameters"}),"\n",(0,d.jsxs)(s.table,{children:[(0,d.jsx)(s.thead,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.th,{children:"Name"}),(0,d.jsx)(s.th,{children:"In"}),(0,d.jsx)(s.th,{children:"Type"}),(0,d.jsx)(s.th,{children:"Required"}),(0,d.jsx)(s.th,{children:"Description"}),(0,d.jsx)(s.th,{children:"Constraints"})]})}),(0,d.jsxs)(s.tbody,{children:[(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"session_id"})}),(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"path"})}),(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"string"})}),(0,d.jsx)(s.td,{children:"Yes"}),(0,d.jsx)(s.td,{}),(0,d.jsx)(s.td,{})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"X-API-Key"})}),(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"header"})}),(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"string | null"})}),(0,d.jsx)(s.td,{children:"No"}),(0,d.jsx)(s.td,{}),(0,d.jsx)(s.td,{children:"nullable"})]})]})]}),"\n",(0,d.jsx)(s.h2,{id:"request-body",children:"Request Body"}),"\n",(0,d.jsx)(s.p,{children:"Required: Yes"}),"\n",(0,d.jsx)(s.h4,{id:"applicationjson",children:"application/json"}),"\n",(0,d.jsx)(s.p,{children:"Resolved schema:"}),"\n",(0,d.jsx)(s.pre,{children:(0,d.jsx)(s.code,{className:"language-json",children:'{\n "properties": {\n "allow_public_repos": {\n "type": "boolean",\n "title": "Allow Public Repos",\n "default": true\n },\n "allow_http": {\n "type": "boolean",\n "title": "Allow Http",\n "default": true\n },\n "allow_https": {\n "type": "boolean",\n "title": "Allow Https",\n "default": true\n },\n "allowed_domains": {\n "items": {\n "type": "string"\n },\n "type": "array",\n "title": "Allowed Domains"\n }
1,\n "allowed_cidrs": {\n "items": {\n "type": "string"\n },\n "type": "array",\n "title": "Allowed Cidrs"\n }\n },\n "type": "object",\n "title": "EgressPolicyRequest"\n}\n'})}),"\n",(0,d.jsx)(s.p,{children:"Field details:"}),"\n",(0,d.jsxs)(s.table,{children:[(0,d.jsx)(s.thead,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.th,{children:"Field"}),(0,d.jsx)(s.th,{children:"Type"}),(0,d.jsx)(s.th,{children:"Required"}),(0,d.jsx)(s.th,{children:"Description"}),(0,d.jsx)(s.th,{children:"Constraints"})]})}),(0,d.jsxs)(s.tbody,{children:[(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"allow_public_repos"})}),(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"boolean"})}),(0,d.jsx)(s.td,{children:"No"}),(0,d.jsx)(s.td,{}),(0,d.jsx)(s.td,{children:"default=true"})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"allow_http"})}),(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"boolean"})}),(0,d.jsx)(s.td,{children:"No"}),(0,d.jsx)(s.td,{}),(0,d.jsx)(s.td,{children:"default=true"})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"allow_https"})}),(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"boolean"})}),(0,d.jsx)(s.td,{children:"No"}),(0,d.jsx)(s.td,{}),(0,d.jsx)(s.td,{children:"default=true"})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"allowed_domains"})}),(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"array<string>"})}),(0,d.jsx)(s.td,{children:"No"}),(0,d.jsx)(s.td,{}),(0,d.jsx)(s.td,{})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"allowed_domains[]"})}),(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"string"})}),(0,d.jsx)(s.td,{children:"No"}),(0,d.jsx)(s.td,{}),(0,d.jsx)(s.td,{})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"allowed_cidrs"})}),(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"array<string>"})}),(0,d.jsx)(s.td,{children:"No"}),(0,d.jsx)(s.td,{}),(0,d.jsx)(s.td,{})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"allowed_cidrs[]"})}),(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"string"})}),(0,d.jsx)(s.td,{children:"No"}),(0,d.jsx)(s.td,{}),(0,d.jsx)(s.td,{})]})]})]}),"\n",(0,d.jsx)(s.h2,{id:"responses",children:"Responses"}),"\n",(0,d.jsx)(s.h3,{id:"200",children:"200"}),"\n",(0,d.jsx)(s.p,{children:"Successful Response"}),"\n",(0,d.jsx)(s.h4,{id:"applicationjson-1",children:"application/json"}),"\n",(0,d.jsx)(s.p,{children:"Resolved schema:"}),"\n",(0,d.jsx)(s.pre,{children:(0,d.jsx)(s.code,{className:"language-json",children:"{}\n"})}),"\n",(0,d.jsx)(s.h3,{id:"422",children:"422"}),"\n",(0,d.jsx)(s.p,{children:"Validation Error"}),"\n",(0,d.jsx)(s.h4,{id:"applicationjson-2",children:"application/json"}),"\n",(0,d.jsx)(s.p,{children:"Resolved schema:"}),"\n",(0,d.jsx)(s.pre,{children:(0,d.jsx)(s.code,{className:"language-json",children:'{\n "properties": {\n "detail": {\n "items": {\n "properties": {\n "loc": {\n "items": {\n "anyOf": [\n {\n "type": "string"\n },\n {\n "type": "integer"\n }\n ]\n },\n "type": "array",\n "title": "Location"\n },\n "msg": {\n "type": "string",\n "title": "Message"\n },\n "type": {\n "type": "string",\n "title": "Error Type"\n }\n },\n "type": "object",\n "required": [\n "loc",\n "msg",\n "type"\n ],\n "title": "ValidationError"\n },\n "type": "array",\n "title": "Detail"\n }\n },\n "type": "object",\n "title": "HTTPValidationError"\n}\n'})}),"\n",(0,d.jsx)(s.p,{children:"Field details:"}),"\n",(0,d.jsxs)(s.table,{children:[(0,d.jsx)(s.thead,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.th,{children:"Field"}),(0,d.jsx)(s.th,{children:"Type"}),(0,d.jsx)(s.th,{children:"Required"}),(0,d.jsx)(s.th,{children:"Description"}),(0,d.jsx)(s.th,{children:"Constraints"})]})}),(0,d.jsxs)(s.tbody,{children:[(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"detail"})}),(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"array<object>"})}),(0,d.jsx)(s.td,{children:"No"}),(0,d.jsx)(s.td,{}),(0,d.jsx)(s.td,{})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"detail[]"})}),(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"object"})}),(0,d.jsx)(s.td,{children:"No"}),(0,d.jsx)(s.td,{}),(0,d.jsx)(s.td,{})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"detail[].loc"})}),(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"array<string | integer>"})}),(0,d.jsx)(s.td,{children:"No"}),(0,d.jsx)(s.td,{}),(0,d.jsx)(s.td,{})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"detail[].loc[]"})}),(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"string | integer"})}),(0,d.jsx)(s.td,{children:"No"}),(0,d.jsx)(s.td,{}),(0,d.jsx)(s.td,{})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"detail[].msg"})}),(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"string"})}),(0,d.jsx)(s.td,{children:"No"}),(0,d.jsx)(s.td,{}),(0,d.jsx)(s.td,{})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"detail[].type"})}),(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"string"})}),(0,d.jsx)(s.td,{children:"No"}),(0,d.jsx)(s.td,{}),(0,d.jsx)(s.td,{})]})]})]})]})}function j(e={}){const{wrapper:s}={...(0,t.R)(),...e.components};return s?(0,d.jsx)(s,{...e,children:(0,d.jsx)(h,{...e})}):h(e)}},8453:(e,s,n)=>{n.d(s,{R:()=>r,x:()=>l});var d=n(6540);const t={},i=d.createContext(t);function r(e){const s=d.useContext(i);return d.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function l(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(e.components),d.createElement(i.Provider,{value:s},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.