Patch ExecutionEnvironment
curl --request PATCH \
--url https://api.ravion.com/execution-environments/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"awsAccountId": "<string>",
"givenId": "<string>",
"name": "<string>",
"region": "<string>",
"sandboxes": {
"allowPublicRepositories": true,
"capacityTypes": [],
"idleShutdownSeconds": 43200,
"instanceTypes": [
{
"diskGiB": 8207,
"diskIops": 9500,
"diskThroughputMBps": 562,
"type": "<string>"
}
],
"maxHostAgeHours": 4380,
"unusedTerminateMinutes": 21600
},
"securityGroupId": "<string>",
"subnetId": "<string>",
"type": "AWS",
"vpcId": "<string>"
}
}
'import requests
url = "https://api.ravion.com/execution-environments/{id}"
payload = { "data": {
"awsAccountId": "<string>",
"givenId": "<string>",
"name": "<string>",
"region": "<string>",
"sandboxes": {
"allowPublicRepositories": True,
"capacityTypes": [],
"idleShutdownSeconds": 43200,
"instanceTypes": [
{
"diskGiB": 8207,
"diskIops": 9500,
"diskThroughputMBps": 562,
"type": "<string>"
}
],
"maxHostAgeHours": 4380,
"unusedTerminateMinutes": 21600
},
"securityGroupId": "<string>",
"subnetId": "<string>",
"type": "AWS",
"vpcId": "<string>"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: {
awsAccountId: '<string>',
givenId: '<string>',
name: '<string>',
region: '<string>',
sandboxes: {
allowPublicRepositories: true,
capacityTypes: [],
idleShutdownSeconds: 43200,
instanceTypes: [{diskGiB: 8207, diskIops: 9500, diskThroughputMBps: 562, type: '<string>'}],
maxHostAgeHours: 4380,
unusedTerminateMinutes: 21600
},
securityGroupId: '<string>',
subnetId: '<string>',
type: 'AWS',
vpcId: '<string>'
}
})
};
fetch('https://api.ravion.com/execution-environments/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ravion.com/execution-environments/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'awsAccountId' => '<string>',
'givenId' => '<string>',
'name' => '<string>',
'region' => '<string>',
'sandboxes' => [
'allowPublicRepositories' => true,
'capacityTypes' => [
],
'idleShutdownSeconds' => 43200,
'instanceTypes' => [
[
'diskGiB' => 8207,
'diskIops' => 9500,
'diskThroughputMBps' => 562,
'type' => '<string>'
]
],
'maxHostAgeHours' => 4380,
'unusedTerminateMinutes' => 21600
],
'securityGroupId' => '<string>',
'subnetId' => '<string>',
'type' => 'AWS',
'vpcId' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.ravion.com/execution-environments/{id}"
payload := strings.NewReader("{\n \"data\": {\n \"awsAccountId\": \"<string>\",\n \"givenId\": \"<string>\",\n \"name\": \"<string>\",\n \"region\": \"<string>\",\n \"sandboxes\": {\n \"allowPublicRepositories\": true,\n \"capacityTypes\": [],\n \"idleShutdownSeconds\": 43200,\n \"instanceTypes\": [\n {\n \"diskGiB\": 8207,\n \"diskIops\": 9500,\n \"diskThroughputMBps\": 562,\n \"type\": \"<string>\"\n }\n ],\n \"maxHostAgeHours\": 4380,\n \"unusedTerminateMinutes\": 21600\n },\n \"securityGroupId\": \"<string>\",\n \"subnetId\": \"<string>\",\n \"type\": \"AWS\",\n \"vpcId\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.ravion.com/execution-environments/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"awsAccountId\": \"<string>\",\n \"givenId\": \"<string>\",\n \"name\": \"<string>\",\n \"region\": \"<string>\",\n \"sandboxes\": {\n \"allowPublicRepositories\": true,\n \"capacityTypes\": [],\n \"idleShutdownSeconds\": 43200,\n \"instanceTypes\": [\n {\n \"diskGiB\": 8207,\n \"diskIops\": 9500,\n \"diskThroughputMBps\": 562,\n \"type\": \"<string>\"\n }\n ],\n \"maxHostAgeHours\": 4380,\n \"unusedTerminateMinutes\": 21600\n },\n \"securityGroupId\": \"<string>\",\n \"subnetId\": \"<string>\",\n \"type\": \"AWS\",\n \"vpcId\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ravion.com/execution-environments/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"awsAccountId\": \"<string>\",\n \"givenId\": \"<string>\",\n \"name\": \"<string>\",\n \"region\": \"<string>\",\n \"sandboxes\": {\n \"allowPublicRepositories\": true,\n \"capacityTypes\": [],\n \"idleShutdownSeconds\": 43200,\n \"instanceTypes\": [\n {\n \"diskGiB\": 8207,\n \"diskIops\": 9500,\n \"diskThroughputMBps\": 562,\n \"type\": \"<string>\"\n }\n ],\n \"maxHostAgeHours\": 4380,\n \"unusedTerminateMinutes\": 21600\n },\n \"securityGroupId\": \"<string>\",\n \"subnetId\": \"<string>\",\n \"type\": \"AWS\",\n \"vpcId\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"awsAccountId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"givenId": "<string>",
"id": "<string>",
"name": "<string>",
"organizationId": "<string>",
"region": "<string>",
"sandboxDefaults": {
"capacityTypes": [
"ON_DEMAND"
],
"hostStorage": "PERSISTENT",
"idleShutdownSeconds": 123,
"instanceTypes": [
{
"diskGiB": 8207,
"diskIops": 9500,
"diskThroughputMBps": 562,
"type": "<string>"
}
],
"maxHostAgeHours": 123,
"reservePolicy": {
"type": "PEAK",
"value": 1,
"windowDays": 45
},
"unusedTerminateMinutes": 123
},
"securityGroupId": "<string>",
"subnetId": "<string>",
"type": "AWS",
"updatedAt": "2023-11-07T05:31:56Z",
"vpcId": "<string>",
"sandboxes": {
"allowPublicRepositories": true,
"capacityTypes": [
"ON_DEMAND"
],
"hostStorage": "PERSISTENT",
"idleShutdownSeconds": 43200,
"instanceTypes": [
{
"diskGiB": 8207,
"diskIops": 9500,
"diskThroughputMBps": 562,
"type": "<string>"
}
],
"maxHostAgeHours": 4380,
"reservePolicy": {
"type": "PEAK",
"value": 1,
"windowDays": 45
},
"unusedTerminateMinutes": 21600
}
}
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}ExecutionEnvironments
Patch ExecutionEnvironment
Update an existing AWS execution environment by ID. Only the fields you supply are modified; returns the updated AWS execution environment.
PATCH
/
execution-environments
/
{id}
Patch ExecutionEnvironment
curl --request PATCH \
--url https://api.ravion.com/execution-environments/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"awsAccountId": "<string>",
"givenId": "<string>",
"name": "<string>",
"region": "<string>",
"sandboxes": {
"allowPublicRepositories": true,
"capacityTypes": [],
"idleShutdownSeconds": 43200,
"instanceTypes": [
{
"diskGiB": 8207,
"diskIops": 9500,
"diskThroughputMBps": 562,
"type": "<string>"
}
],
"maxHostAgeHours": 4380,
"unusedTerminateMinutes": 21600
},
"securityGroupId": "<string>",
"subnetId": "<string>",
"type": "AWS",
"vpcId": "<string>"
}
}
'import requests
url = "https://api.ravion.com/execution-environments/{id}"
payload = { "data": {
"awsAccountId": "<string>",
"givenId": "<string>",
"name": "<string>",
"region": "<string>",
"sandboxes": {
"allowPublicRepositories": True,
"capacityTypes": [],
"idleShutdownSeconds": 43200,
"instanceTypes": [
{
"diskGiB": 8207,
"diskIops": 9500,
"diskThroughputMBps": 562,
"type": "<string>"
}
],
"maxHostAgeHours": 4380,
"unusedTerminateMinutes": 21600
},
"securityGroupId": "<string>",
"subnetId": "<string>",
"type": "AWS",
"vpcId": "<string>"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: {
awsAccountId: '<string>',
givenId: '<string>',
name: '<string>',
region: '<string>',
sandboxes: {
allowPublicRepositories: true,
capacityTypes: [],
idleShutdownSeconds: 43200,
instanceTypes: [{diskGiB: 8207, diskIops: 9500, diskThroughputMBps: 562, type: '<string>'}],
maxHostAgeHours: 4380,
unusedTerminateMinutes: 21600
},
securityGroupId: '<string>',
subnetId: '<string>',
type: 'AWS',
vpcId: '<string>'
}
})
};
fetch('https://api.ravion.com/execution-environments/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ravion.com/execution-environments/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'awsAccountId' => '<string>',
'givenId' => '<string>',
'name' => '<string>',
'region' => '<string>',
'sandboxes' => [
'allowPublicRepositories' => true,
'capacityTypes' => [
],
'idleShutdownSeconds' => 43200,
'instanceTypes' => [
[
'diskGiB' => 8207,
'diskIops' => 9500,
'diskThroughputMBps' => 562,
'type' => '<string>'
]
],
'maxHostAgeHours' => 4380,
'unusedTerminateMinutes' => 21600
],
'securityGroupId' => '<string>',
'subnetId' => '<string>',
'type' => 'AWS',
'vpcId' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.ravion.com/execution-environments/{id}"
payload := strings.NewReader("{\n \"data\": {\n \"awsAccountId\": \"<string>\",\n \"givenId\": \"<string>\",\n \"name\": \"<string>\",\n \"region\": \"<string>\",\n \"sandboxes\": {\n \"allowPublicRepositories\": true,\n \"capacityTypes\": [],\n \"idleShutdownSeconds\": 43200,\n \"instanceTypes\": [\n {\n \"diskGiB\": 8207,\n \"diskIops\": 9500,\n \"diskThroughputMBps\": 562,\n \"type\": \"<string>\"\n }\n ],\n \"maxHostAgeHours\": 4380,\n \"unusedTerminateMinutes\": 21600\n },\n \"securityGroupId\": \"<string>\",\n \"subnetId\": \"<string>\",\n \"type\": \"AWS\",\n \"vpcId\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.ravion.com/execution-environments/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"awsAccountId\": \"<string>\",\n \"givenId\": \"<string>\",\n \"name\": \"<string>\",\n \"region\": \"<string>\",\n \"sandboxes\": {\n \"allowPublicRepositories\": true,\n \"capacityTypes\": [],\n \"idleShutdownSeconds\": 43200,\n \"instanceTypes\": [\n {\n \"diskGiB\": 8207,\n \"diskIops\": 9500,\n \"diskThroughputMBps\": 562,\n \"type\": \"<string>\"\n }\n ],\n \"maxHostAgeHours\": 4380,\n \"unusedTerminateMinutes\": 21600\n },\n \"securityGroupId\": \"<string>\",\n \"subnetId\": \"<string>\",\n \"type\": \"AWS\",\n \"vpcId\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ravion.com/execution-environments/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"awsAccountId\": \"<string>\",\n \"givenId\": \"<string>\",\n \"name\": \"<string>\",\n \"region\": \"<string>\",\n \"sandboxes\": {\n \"allowPublicRepositories\": true,\n \"capacityTypes\": [],\n \"idleShutdownSeconds\": 43200,\n \"instanceTypes\": [\n {\n \"diskGiB\": 8207,\n \"diskIops\": 9500,\n \"diskThroughputMBps\": 562,\n \"type\": \"<string>\"\n }\n ],\n \"maxHostAgeHours\": 4380,\n \"unusedTerminateMinutes\": 21600\n },\n \"securityGroupId\": \"<string>\",\n \"subnetId\": \"<string>\",\n \"type\": \"AWS\",\n \"vpcId\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"awsAccountId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"givenId": "<string>",
"id": "<string>",
"name": "<string>",
"organizationId": "<string>",
"region": "<string>",
"sandboxDefaults": {
"capacityTypes": [
"ON_DEMAND"
],
"hostStorage": "PERSISTENT",
"idleShutdownSeconds": 123,
"instanceTypes": [
{
"diskGiB": 8207,
"diskIops": 9500,
"diskThroughputMBps": 562,
"type": "<string>"
}
],
"maxHostAgeHours": 123,
"reservePolicy": {
"type": "PEAK",
"value": 1,
"windowDays": 45
},
"unusedTerminateMinutes": 123
},
"securityGroupId": "<string>",
"subnetId": "<string>",
"type": "AWS",
"updatedAt": "2023-11-07T05:31:56Z",
"vpcId": "<string>",
"sandboxes": {
"allowPublicRepositories": true,
"capacityTypes": [
"ON_DEMAND"
],
"hostStorage": "PERSISTENT",
"idleShutdownSeconds": 43200,
"instanceTypes": [
{
"diskGiB": 8207,
"diskIops": 9500,
"diskThroughputMBps": 562,
"type": "<string>"
}
],
"maxHostAgeHours": 4380,
"reservePolicy": {
"type": "PEAK",
"value": 1,
"windowDays": 45
},
"unusedTerminateMinutes": 21600
}
}
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}Was this page helpful?