AmazonMWAA
POST
CreateCliToken
{{baseUrl}}/clitoken/:Name
QUERY PARAMS
Name
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/clitoken/:Name");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/clitoken/:Name")
require "http/client"
url = "{{baseUrl}}/clitoken/:Name"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/clitoken/:Name"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/clitoken/:Name");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/clitoken/:Name"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/clitoken/:Name HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/clitoken/:Name")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/clitoken/:Name"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/clitoken/:Name")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/clitoken/:Name")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/clitoken/:Name');
xhr.send(data);
import axios from 'axios';
const options = {method: 'POST', url: '{{baseUrl}}/clitoken/:Name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/clitoken/:Name';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/clitoken/:Name',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/clitoken/:Name")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/clitoken/:Name',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'POST', url: '{{baseUrl}}/clitoken/:Name'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/clitoken/:Name');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'POST', url: '{{baseUrl}}/clitoken/:Name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/clitoken/:Name';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/clitoken/:Name"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/clitoken/:Name" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/clitoken/:Name",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/clitoken/:Name');
echo $response->getBody();
setUrl('{{baseUrl}}/clitoken/:Name');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/clitoken/:Name');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/clitoken/:Name' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/clitoken/:Name' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/clitoken/:Name")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/clitoken/:Name"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/clitoken/:Name"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/clitoken/:Name")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/clitoken/:Name') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/clitoken/:Name";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/clitoken/:Name
http POST {{baseUrl}}/clitoken/:Name
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/clitoken/:Name
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/clitoken/:Name")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
CreateEnvironment
{{baseUrl}}/environments/:Name
QUERY PARAMS
Name
BODY json
{
"AirflowConfigurationOptions": {},
"AirflowVersion": "",
"DagS3Path": "",
"EnvironmentClass": "",
"ExecutionRoleArn": "",
"KmsKey": "",
"LoggingConfiguration": {
"DagProcessingLogs": "",
"SchedulerLogs": "",
"TaskLogs": "",
"WebserverLogs": "",
"WorkerLogs": ""
},
"MaxWorkers": 0,
"MinWorkers": 0,
"NetworkConfiguration": {
"SecurityGroupIds": "",
"SubnetIds": ""
},
"PluginsS3ObjectVersion": "",
"PluginsS3Path": "",
"RequirementsS3ObjectVersion": "",
"RequirementsS3Path": "",
"Schedulers": 0,
"SourceBucketArn": "",
"StartupScriptS3ObjectVersion": "",
"StartupScriptS3Path": "",
"Tags": {},
"WebserverAccessMode": "",
"WeeklyMaintenanceWindowStart": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/environments/:Name");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"AirflowConfigurationOptions\": {},\n \"AirflowVersion\": \"\",\n \"DagS3Path\": \"\",\n \"EnvironmentClass\": \"\",\n \"ExecutionRoleArn\": \"\",\n \"KmsKey\": \"\",\n \"LoggingConfiguration\": {\n \"DagProcessingLogs\": \"\",\n \"SchedulerLogs\": \"\",\n \"TaskLogs\": \"\",\n \"WebserverLogs\": \"\",\n \"WorkerLogs\": \"\"\n },\n \"MaxWorkers\": 0,\n \"MinWorkers\": 0,\n \"NetworkConfiguration\": {\n \"SecurityGroupIds\": \"\",\n \"SubnetIds\": \"\"\n },\n \"PluginsS3ObjectVersion\": \"\",\n \"PluginsS3Path\": \"\",\n \"RequirementsS3ObjectVersion\": \"\",\n \"RequirementsS3Path\": \"\",\n \"Schedulers\": 0,\n \"SourceBucketArn\": \"\",\n \"StartupScriptS3ObjectVersion\": \"\",\n \"StartupScriptS3Path\": \"\",\n \"Tags\": {},\n \"WebserverAccessMode\": \"\",\n \"WeeklyMaintenanceWindowStart\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/environments/:Name" {:content-type :json
:form-params {:AirflowConfigurationOptions {}
:AirflowVersion ""
:DagS3Path ""
:EnvironmentClass ""
:ExecutionRoleArn ""
:KmsKey ""
:LoggingConfiguration {:DagProcessingLogs ""
:SchedulerLogs ""
:TaskLogs ""
:WebserverLogs ""
:WorkerLogs ""}
:MaxWorkers 0
:MinWorkers 0
:NetworkConfiguration {:SecurityGroupIds ""
:SubnetIds ""}
:PluginsS3ObjectVersion ""
:PluginsS3Path ""
:RequirementsS3ObjectVersion ""
:RequirementsS3Path ""
:Schedulers 0
:SourceBucketArn ""
:StartupScriptS3ObjectVersion ""
:StartupScriptS3Path ""
:Tags {}
:WebserverAccessMode ""
:WeeklyMaintenanceWindowStart ""}})
require "http/client"
url = "{{baseUrl}}/environments/:Name"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"AirflowConfigurationOptions\": {},\n \"AirflowVersion\": \"\",\n \"DagS3Path\": \"\",\n \"EnvironmentClass\": \"\",\n \"ExecutionRoleArn\": \"\",\n \"KmsKey\": \"\",\n \"LoggingConfiguration\": {\n \"DagProcessingLogs\": \"\",\n \"SchedulerLogs\": \"\",\n \"TaskLogs\": \"\",\n \"WebserverLogs\": \"\",\n \"WorkerLogs\": \"\"\n },\n \"MaxWorkers\": 0,\n \"MinWorkers\": 0,\n \"NetworkConfiguration\": {\n \"SecurityGroupIds\": \"\",\n \"SubnetIds\": \"\"\n },\n \"PluginsS3ObjectVersion\": \"\",\n \"PluginsS3Path\": \"\",\n \"RequirementsS3ObjectVersion\": \"\",\n \"RequirementsS3Path\": \"\",\n \"Schedulers\": 0,\n \"SourceBucketArn\": \"\",\n \"StartupScriptS3ObjectVersion\": \"\",\n \"StartupScriptS3Path\": \"\",\n \"Tags\": {},\n \"WebserverAccessMode\": \"\",\n \"WeeklyMaintenanceWindowStart\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/environments/:Name"),
Content = new StringContent("{\n \"AirflowConfigurationOptions\": {},\n \"AirflowVersion\": \"\",\n \"DagS3Path\": \"\",\n \"EnvironmentClass\": \"\",\n \"ExecutionRoleArn\": \"\",\n \"KmsKey\": \"\",\n \"LoggingConfiguration\": {\n \"DagProcessingLogs\": \"\",\n \"SchedulerLogs\": \"\",\n \"TaskLogs\": \"\",\n \"WebserverLogs\": \"\",\n \"WorkerLogs\": \"\"\n },\n \"MaxWorkers\": 0,\n \"MinWorkers\": 0,\n \"NetworkConfiguration\": {\n \"SecurityGroupIds\": \"\",\n \"SubnetIds\": \"\"\n },\n \"PluginsS3ObjectVersion\": \"\",\n \"PluginsS3Path\": \"\",\n \"RequirementsS3ObjectVersion\": \"\",\n \"RequirementsS3Path\": \"\",\n \"Schedulers\": 0,\n \"SourceBucketArn\": \"\",\n \"StartupScriptS3ObjectVersion\": \"\",\n \"StartupScriptS3Path\": \"\",\n \"Tags\": {},\n \"WebserverAccessMode\": \"\",\n \"WeeklyMaintenanceWindowStart\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/environments/:Name");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"AirflowConfigurationOptions\": {},\n \"AirflowVersion\": \"\",\n \"DagS3Path\": \"\",\n \"EnvironmentClass\": \"\",\n \"ExecutionRoleArn\": \"\",\n \"KmsKey\": \"\",\n \"LoggingConfiguration\": {\n \"DagProcessingLogs\": \"\",\n \"SchedulerLogs\": \"\",\n \"TaskLogs\": \"\",\n \"WebserverLogs\": \"\",\n \"WorkerLogs\": \"\"\n },\n \"MaxWorkers\": 0,\n \"MinWorkers\": 0,\n \"NetworkConfiguration\": {\n \"SecurityGroupIds\": \"\",\n \"SubnetIds\": \"\"\n },\n \"PluginsS3ObjectVersion\": \"\",\n \"PluginsS3Path\": \"\",\n \"RequirementsS3ObjectVersion\": \"\",\n \"RequirementsS3Path\": \"\",\n \"Schedulers\": 0,\n \"SourceBucketArn\": \"\",\n \"StartupScriptS3ObjectVersion\": \"\",\n \"StartupScriptS3Path\": \"\",\n \"Tags\": {},\n \"WebserverAccessMode\": \"\",\n \"WeeklyMaintenanceWindowStart\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/environments/:Name"
payload := strings.NewReader("{\n \"AirflowConfigurationOptions\": {},\n \"AirflowVersion\": \"\",\n \"DagS3Path\": \"\",\n \"EnvironmentClass\": \"\",\n \"ExecutionRoleArn\": \"\",\n \"KmsKey\": \"\",\n \"LoggingConfiguration\": {\n \"DagProcessingLogs\": \"\",\n \"SchedulerLogs\": \"\",\n \"TaskLogs\": \"\",\n \"WebserverLogs\": \"\",\n \"WorkerLogs\": \"\"\n },\n \"MaxWorkers\": 0,\n \"MinWorkers\": 0,\n \"NetworkConfiguration\": {\n \"SecurityGroupIds\": \"\",\n \"SubnetIds\": \"\"\n },\n \"PluginsS3ObjectVersion\": \"\",\n \"PluginsS3Path\": \"\",\n \"RequirementsS3ObjectVersion\": \"\",\n \"RequirementsS3Path\": \"\",\n \"Schedulers\": 0,\n \"SourceBucketArn\": \"\",\n \"StartupScriptS3ObjectVersion\": \"\",\n \"StartupScriptS3Path\": \"\",\n \"Tags\": {},\n \"WebserverAccessMode\": \"\",\n \"WeeklyMaintenanceWindowStart\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/environments/:Name HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 734
{
"AirflowConfigurationOptions": {},
"AirflowVersion": "",
"DagS3Path": "",
"EnvironmentClass": "",
"ExecutionRoleArn": "",
"KmsKey": "",
"LoggingConfiguration": {
"DagProcessingLogs": "",
"SchedulerLogs": "",
"TaskLogs": "",
"WebserverLogs": "",
"WorkerLogs": ""
},
"MaxWorkers": 0,
"MinWorkers": 0,
"NetworkConfiguration": {
"SecurityGroupIds": "",
"SubnetIds": ""
},
"PluginsS3ObjectVersion": "",
"PluginsS3Path": "",
"RequirementsS3ObjectVersion": "",
"RequirementsS3Path": "",
"Schedulers": 0,
"SourceBucketArn": "",
"StartupScriptS3ObjectVersion": "",
"StartupScriptS3Path": "",
"Tags": {},
"WebserverAccessMode": "",
"WeeklyMaintenanceWindowStart": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/environments/:Name")
.setHeader("content-type", "application/json")
.setBody("{\n \"AirflowConfigurationOptions\": {},\n \"AirflowVersion\": \"\",\n \"DagS3Path\": \"\",\n \"EnvironmentClass\": \"\",\n \"ExecutionRoleArn\": \"\",\n \"KmsKey\": \"\",\n \"LoggingConfiguration\": {\n \"DagProcessingLogs\": \"\",\n \"SchedulerLogs\": \"\",\n \"TaskLogs\": \"\",\n \"WebserverLogs\": \"\",\n \"WorkerLogs\": \"\"\n },\n \"MaxWorkers\": 0,\n \"MinWorkers\": 0,\n \"NetworkConfiguration\": {\n \"SecurityGroupIds\": \"\",\n \"SubnetIds\": \"\"\n },\n \"PluginsS3ObjectVersion\": \"\",\n \"PluginsS3Path\": \"\",\n \"RequirementsS3ObjectVersion\": \"\",\n \"RequirementsS3Path\": \"\",\n \"Schedulers\": 0,\n \"SourceBucketArn\": \"\",\n \"StartupScriptS3ObjectVersion\": \"\",\n \"StartupScriptS3Path\": \"\",\n \"Tags\": {},\n \"WebserverAccessMode\": \"\",\n \"WeeklyMaintenanceWindowStart\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/environments/:Name"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"AirflowConfigurationOptions\": {},\n \"AirflowVersion\": \"\",\n \"DagS3Path\": \"\",\n \"EnvironmentClass\": \"\",\n \"ExecutionRoleArn\": \"\",\n \"KmsKey\": \"\",\n \"LoggingConfiguration\": {\n \"DagProcessingLogs\": \"\",\n \"SchedulerLogs\": \"\",\n \"TaskLogs\": \"\",\n \"WebserverLogs\": \"\",\n \"WorkerLogs\": \"\"\n },\n \"MaxWorkers\": 0,\n \"MinWorkers\": 0,\n \"NetworkConfiguration\": {\n \"SecurityGroupIds\": \"\",\n \"SubnetIds\": \"\"\n },\n \"PluginsS3ObjectVersion\": \"\",\n \"PluginsS3Path\": \"\",\n \"RequirementsS3ObjectVersion\": \"\",\n \"RequirementsS3Path\": \"\",\n \"Schedulers\": 0,\n \"SourceBucketArn\": \"\",\n \"StartupScriptS3ObjectVersion\": \"\",\n \"StartupScriptS3Path\": \"\",\n \"Tags\": {},\n \"WebserverAccessMode\": \"\",\n \"WeeklyMaintenanceWindowStart\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"AirflowConfigurationOptions\": {},\n \"AirflowVersion\": \"\",\n \"DagS3Path\": \"\",\n \"EnvironmentClass\": \"\",\n \"ExecutionRoleArn\": \"\",\n \"KmsKey\": \"\",\n \"LoggingConfiguration\": {\n \"DagProcessingLogs\": \"\",\n \"SchedulerLogs\": \"\",\n \"TaskLogs\": \"\",\n \"WebserverLogs\": \"\",\n \"WorkerLogs\": \"\"\n },\n \"MaxWorkers\": 0,\n \"MinWorkers\": 0,\n \"NetworkConfiguration\": {\n \"SecurityGroupIds\": \"\",\n \"SubnetIds\": \"\"\n },\n \"PluginsS3ObjectVersion\": \"\",\n \"PluginsS3Path\": \"\",\n \"RequirementsS3ObjectVersion\": \"\",\n \"RequirementsS3Path\": \"\",\n \"Schedulers\": 0,\n \"SourceBucketArn\": \"\",\n \"StartupScriptS3ObjectVersion\": \"\",\n \"StartupScriptS3Path\": \"\",\n \"Tags\": {},\n \"WebserverAccessMode\": \"\",\n \"WeeklyMaintenanceWindowStart\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/environments/:Name")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/environments/:Name")
.header("content-type", "application/json")
.body("{\n \"AirflowConfigurationOptions\": {},\n \"AirflowVersion\": \"\",\n \"DagS3Path\": \"\",\n \"EnvironmentClass\": \"\",\n \"ExecutionRoleArn\": \"\",\n \"KmsKey\": \"\",\n \"LoggingConfiguration\": {\n \"DagProcessingLogs\": \"\",\n \"SchedulerLogs\": \"\",\n \"TaskLogs\": \"\",\n \"WebserverLogs\": \"\",\n \"WorkerLogs\": \"\"\n },\n \"MaxWorkers\": 0,\n \"MinWorkers\": 0,\n \"NetworkConfiguration\": {\n \"SecurityGroupIds\": \"\",\n \"SubnetIds\": \"\"\n },\n \"PluginsS3ObjectVersion\": \"\",\n \"PluginsS3Path\": \"\",\n \"RequirementsS3ObjectVersion\": \"\",\n \"RequirementsS3Path\": \"\",\n \"Schedulers\": 0,\n \"SourceBucketArn\": \"\",\n \"StartupScriptS3ObjectVersion\": \"\",\n \"StartupScriptS3Path\": \"\",\n \"Tags\": {},\n \"WebserverAccessMode\": \"\",\n \"WeeklyMaintenanceWindowStart\": \"\"\n}")
.asString();
const data = JSON.stringify({
AirflowConfigurationOptions: {},
AirflowVersion: '',
DagS3Path: '',
EnvironmentClass: '',
ExecutionRoleArn: '',
KmsKey: '',
LoggingConfiguration: {
DagProcessingLogs: '',
SchedulerLogs: '',
TaskLogs: '',
WebserverLogs: '',
WorkerLogs: ''
},
MaxWorkers: 0,
MinWorkers: 0,
NetworkConfiguration: {
SecurityGroupIds: '',
SubnetIds: ''
},
PluginsS3ObjectVersion: '',
PluginsS3Path: '',
RequirementsS3ObjectVersion: '',
RequirementsS3Path: '',
Schedulers: 0,
SourceBucketArn: '',
StartupScriptS3ObjectVersion: '',
StartupScriptS3Path: '',
Tags: {},
WebserverAccessMode: '',
WeeklyMaintenanceWindowStart: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/environments/:Name');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/environments/:Name',
headers: {'content-type': 'application/json'},
data: {
AirflowConfigurationOptions: {},
AirflowVersion: '',
DagS3Path: '',
EnvironmentClass: '',
ExecutionRoleArn: '',
KmsKey: '',
LoggingConfiguration: {
DagProcessingLogs: '',
SchedulerLogs: '',
TaskLogs: '',
WebserverLogs: '',
WorkerLogs: ''
},
MaxWorkers: 0,
MinWorkers: 0,
NetworkConfiguration: {SecurityGroupIds: '', SubnetIds: ''},
PluginsS3ObjectVersion: '',
PluginsS3Path: '',
RequirementsS3ObjectVersion: '',
RequirementsS3Path: '',
Schedulers: 0,
SourceBucketArn: '',
StartupScriptS3ObjectVersion: '',
StartupScriptS3Path: '',
Tags: {},
WebserverAccessMode: '',
WeeklyMaintenanceWindowStart: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/environments/:Name';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"AirflowConfigurationOptions":{},"AirflowVersion":"","DagS3Path":"","EnvironmentClass":"","ExecutionRoleArn":"","KmsKey":"","LoggingConfiguration":{"DagProcessingLogs":"","SchedulerLogs":"","TaskLogs":"","WebserverLogs":"","WorkerLogs":""},"MaxWorkers":0,"MinWorkers":0,"NetworkConfiguration":{"SecurityGroupIds":"","SubnetIds":""},"PluginsS3ObjectVersion":"","PluginsS3Path":"","RequirementsS3ObjectVersion":"","RequirementsS3Path":"","Schedulers":0,"SourceBucketArn":"","StartupScriptS3ObjectVersion":"","StartupScriptS3Path":"","Tags":{},"WebserverAccessMode":"","WeeklyMaintenanceWindowStart":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/environments/:Name',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "AirflowConfigurationOptions": {},\n "AirflowVersion": "",\n "DagS3Path": "",\n "EnvironmentClass": "",\n "ExecutionRoleArn": "",\n "KmsKey": "",\n "LoggingConfiguration": {\n "DagProcessingLogs": "",\n "SchedulerLogs": "",\n "TaskLogs": "",\n "WebserverLogs": "",\n "WorkerLogs": ""\n },\n "MaxWorkers": 0,\n "MinWorkers": 0,\n "NetworkConfiguration": {\n "SecurityGroupIds": "",\n "SubnetIds": ""\n },\n "PluginsS3ObjectVersion": "",\n "PluginsS3Path": "",\n "RequirementsS3ObjectVersion": "",\n "RequirementsS3Path": "",\n "Schedulers": 0,\n "SourceBucketArn": "",\n "StartupScriptS3ObjectVersion": "",\n "StartupScriptS3Path": "",\n "Tags": {},\n "WebserverAccessMode": "",\n "WeeklyMaintenanceWindowStart": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"AirflowConfigurationOptions\": {},\n \"AirflowVersion\": \"\",\n \"DagS3Path\": \"\",\n \"EnvironmentClass\": \"\",\n \"ExecutionRoleArn\": \"\",\n \"KmsKey\": \"\",\n \"LoggingConfiguration\": {\n \"DagProcessingLogs\": \"\",\n \"SchedulerLogs\": \"\",\n \"TaskLogs\": \"\",\n \"WebserverLogs\": \"\",\n \"WorkerLogs\": \"\"\n },\n \"MaxWorkers\": 0,\n \"MinWorkers\": 0,\n \"NetworkConfiguration\": {\n \"SecurityGroupIds\": \"\",\n \"SubnetIds\": \"\"\n },\n \"PluginsS3ObjectVersion\": \"\",\n \"PluginsS3Path\": \"\",\n \"RequirementsS3ObjectVersion\": \"\",\n \"RequirementsS3Path\": \"\",\n \"Schedulers\": 0,\n \"SourceBucketArn\": \"\",\n \"StartupScriptS3ObjectVersion\": \"\",\n \"StartupScriptS3Path\": \"\",\n \"Tags\": {},\n \"WebserverAccessMode\": \"\",\n \"WeeklyMaintenanceWindowStart\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/environments/:Name")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/environments/:Name',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
AirflowConfigurationOptions: {},
AirflowVersion: '',
DagS3Path: '',
EnvironmentClass: '',
ExecutionRoleArn: '',
KmsKey: '',
LoggingConfiguration: {
DagProcessingLogs: '',
SchedulerLogs: '',
TaskLogs: '',
WebserverLogs: '',
WorkerLogs: ''
},
MaxWorkers: 0,
MinWorkers: 0,
NetworkConfiguration: {SecurityGroupIds: '', SubnetIds: ''},
PluginsS3ObjectVersion: '',
PluginsS3Path: '',
RequirementsS3ObjectVersion: '',
RequirementsS3Path: '',
Schedulers: 0,
SourceBucketArn: '',
StartupScriptS3ObjectVersion: '',
StartupScriptS3Path: '',
Tags: {},
WebserverAccessMode: '',
WeeklyMaintenanceWindowStart: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/environments/:Name',
headers: {'content-type': 'application/json'},
body: {
AirflowConfigurationOptions: {},
AirflowVersion: '',
DagS3Path: '',
EnvironmentClass: '',
ExecutionRoleArn: '',
KmsKey: '',
LoggingConfiguration: {
DagProcessingLogs: '',
SchedulerLogs: '',
TaskLogs: '',
WebserverLogs: '',
WorkerLogs: ''
},
MaxWorkers: 0,
MinWorkers: 0,
NetworkConfiguration: {SecurityGroupIds: '', SubnetIds: ''},
PluginsS3ObjectVersion: '',
PluginsS3Path: '',
RequirementsS3ObjectVersion: '',
RequirementsS3Path: '',
Schedulers: 0,
SourceBucketArn: '',
StartupScriptS3ObjectVersion: '',
StartupScriptS3Path: '',
Tags: {},
WebserverAccessMode: '',
WeeklyMaintenanceWindowStart: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/environments/:Name');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
AirflowConfigurationOptions: {},
AirflowVersion: '',
DagS3Path: '',
EnvironmentClass: '',
ExecutionRoleArn: '',
KmsKey: '',
LoggingConfiguration: {
DagProcessingLogs: '',
SchedulerLogs: '',
TaskLogs: '',
WebserverLogs: '',
WorkerLogs: ''
},
MaxWorkers: 0,
MinWorkers: 0,
NetworkConfiguration: {
SecurityGroupIds: '',
SubnetIds: ''
},
PluginsS3ObjectVersion: '',
PluginsS3Path: '',
RequirementsS3ObjectVersion: '',
RequirementsS3Path: '',
Schedulers: 0,
SourceBucketArn: '',
StartupScriptS3ObjectVersion: '',
StartupScriptS3Path: '',
Tags: {},
WebserverAccessMode: '',
WeeklyMaintenanceWindowStart: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/environments/:Name',
headers: {'content-type': 'application/json'},
data: {
AirflowConfigurationOptions: {},
AirflowVersion: '',
DagS3Path: '',
EnvironmentClass: '',
ExecutionRoleArn: '',
KmsKey: '',
LoggingConfiguration: {
DagProcessingLogs: '',
SchedulerLogs: '',
TaskLogs: '',
WebserverLogs: '',
WorkerLogs: ''
},
MaxWorkers: 0,
MinWorkers: 0,
NetworkConfiguration: {SecurityGroupIds: '', SubnetIds: ''},
PluginsS3ObjectVersion: '',
PluginsS3Path: '',
RequirementsS3ObjectVersion: '',
RequirementsS3Path: '',
Schedulers: 0,
SourceBucketArn: '',
StartupScriptS3ObjectVersion: '',
StartupScriptS3Path: '',
Tags: {},
WebserverAccessMode: '',
WeeklyMaintenanceWindowStart: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/environments/:Name';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"AirflowConfigurationOptions":{},"AirflowVersion":"","DagS3Path":"","EnvironmentClass":"","ExecutionRoleArn":"","KmsKey":"","LoggingConfiguration":{"DagProcessingLogs":"","SchedulerLogs":"","TaskLogs":"","WebserverLogs":"","WorkerLogs":""},"MaxWorkers":0,"MinWorkers":0,"NetworkConfiguration":{"SecurityGroupIds":"","SubnetIds":""},"PluginsS3ObjectVersion":"","PluginsS3Path":"","RequirementsS3ObjectVersion":"","RequirementsS3Path":"","Schedulers":0,"SourceBucketArn":"","StartupScriptS3ObjectVersion":"","StartupScriptS3Path":"","Tags":{},"WebserverAccessMode":"","WeeklyMaintenanceWindowStart":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"AirflowConfigurationOptions": @{ },
@"AirflowVersion": @"",
@"DagS3Path": @"",
@"EnvironmentClass": @"",
@"ExecutionRoleArn": @"",
@"KmsKey": @"",
@"LoggingConfiguration": @{ @"DagProcessingLogs": @"", @"SchedulerLogs": @"", @"TaskLogs": @"", @"WebserverLogs": @"", @"WorkerLogs": @"" },
@"MaxWorkers": @0,
@"MinWorkers": @0,
@"NetworkConfiguration": @{ @"SecurityGroupIds": @"", @"SubnetIds": @"" },
@"PluginsS3ObjectVersion": @"",
@"PluginsS3Path": @"",
@"RequirementsS3ObjectVersion": @"",
@"RequirementsS3Path": @"",
@"Schedulers": @0,
@"SourceBucketArn": @"",
@"StartupScriptS3ObjectVersion": @"",
@"StartupScriptS3Path": @"",
@"Tags": @{ },
@"WebserverAccessMode": @"",
@"WeeklyMaintenanceWindowStart": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/environments/:Name"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/environments/:Name" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"AirflowConfigurationOptions\": {},\n \"AirflowVersion\": \"\",\n \"DagS3Path\": \"\",\n \"EnvironmentClass\": \"\",\n \"ExecutionRoleArn\": \"\",\n \"KmsKey\": \"\",\n \"LoggingConfiguration\": {\n \"DagProcessingLogs\": \"\",\n \"SchedulerLogs\": \"\",\n \"TaskLogs\": \"\",\n \"WebserverLogs\": \"\",\n \"WorkerLogs\": \"\"\n },\n \"MaxWorkers\": 0,\n \"MinWorkers\": 0,\n \"NetworkConfiguration\": {\n \"SecurityGroupIds\": \"\",\n \"SubnetIds\": \"\"\n },\n \"PluginsS3ObjectVersion\": \"\",\n \"PluginsS3Path\": \"\",\n \"RequirementsS3ObjectVersion\": \"\",\n \"RequirementsS3Path\": \"\",\n \"Schedulers\": 0,\n \"SourceBucketArn\": \"\",\n \"StartupScriptS3ObjectVersion\": \"\",\n \"StartupScriptS3Path\": \"\",\n \"Tags\": {},\n \"WebserverAccessMode\": \"\",\n \"WeeklyMaintenanceWindowStart\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/environments/:Name",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'AirflowConfigurationOptions' => [
],
'AirflowVersion' => '',
'DagS3Path' => '',
'EnvironmentClass' => '',
'ExecutionRoleArn' => '',
'KmsKey' => '',
'LoggingConfiguration' => [
'DagProcessingLogs' => '',
'SchedulerLogs' => '',
'TaskLogs' => '',
'WebserverLogs' => '',
'WorkerLogs' => ''
],
'MaxWorkers' => 0,
'MinWorkers' => 0,
'NetworkConfiguration' => [
'SecurityGroupIds' => '',
'SubnetIds' => ''
],
'PluginsS3ObjectVersion' => '',
'PluginsS3Path' => '',
'RequirementsS3ObjectVersion' => '',
'RequirementsS3Path' => '',
'Schedulers' => 0,
'SourceBucketArn' => '',
'StartupScriptS3ObjectVersion' => '',
'StartupScriptS3Path' => '',
'Tags' => [
],
'WebserverAccessMode' => '',
'WeeklyMaintenanceWindowStart' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/environments/:Name', [
'body' => '{
"AirflowConfigurationOptions": {},
"AirflowVersion": "",
"DagS3Path": "",
"EnvironmentClass": "",
"ExecutionRoleArn": "",
"KmsKey": "",
"LoggingConfiguration": {
"DagProcessingLogs": "",
"SchedulerLogs": "",
"TaskLogs": "",
"WebserverLogs": "",
"WorkerLogs": ""
},
"MaxWorkers": 0,
"MinWorkers": 0,
"NetworkConfiguration": {
"SecurityGroupIds": "",
"SubnetIds": ""
},
"PluginsS3ObjectVersion": "",
"PluginsS3Path": "",
"RequirementsS3ObjectVersion": "",
"RequirementsS3Path": "",
"Schedulers": 0,
"SourceBucketArn": "",
"StartupScriptS3ObjectVersion": "",
"StartupScriptS3Path": "",
"Tags": {},
"WebserverAccessMode": "",
"WeeklyMaintenanceWindowStart": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/environments/:Name');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'AirflowConfigurationOptions' => [
],
'AirflowVersion' => '',
'DagS3Path' => '',
'EnvironmentClass' => '',
'ExecutionRoleArn' => '',
'KmsKey' => '',
'LoggingConfiguration' => [
'DagProcessingLogs' => '',
'SchedulerLogs' => '',
'TaskLogs' => '',
'WebserverLogs' => '',
'WorkerLogs' => ''
],
'MaxWorkers' => 0,
'MinWorkers' => 0,
'NetworkConfiguration' => [
'SecurityGroupIds' => '',
'SubnetIds' => ''
],
'PluginsS3ObjectVersion' => '',
'PluginsS3Path' => '',
'RequirementsS3ObjectVersion' => '',
'RequirementsS3Path' => '',
'Schedulers' => 0,
'SourceBucketArn' => '',
'StartupScriptS3ObjectVersion' => '',
'StartupScriptS3Path' => '',
'Tags' => [
],
'WebserverAccessMode' => '',
'WeeklyMaintenanceWindowStart' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'AirflowConfigurationOptions' => [
],
'AirflowVersion' => '',
'DagS3Path' => '',
'EnvironmentClass' => '',
'ExecutionRoleArn' => '',
'KmsKey' => '',
'LoggingConfiguration' => [
'DagProcessingLogs' => '',
'SchedulerLogs' => '',
'TaskLogs' => '',
'WebserverLogs' => '',
'WorkerLogs' => ''
],
'MaxWorkers' => 0,
'MinWorkers' => 0,
'NetworkConfiguration' => [
'SecurityGroupIds' => '',
'SubnetIds' => ''
],
'PluginsS3ObjectVersion' => '',
'PluginsS3Path' => '',
'RequirementsS3ObjectVersion' => '',
'RequirementsS3Path' => '',
'Schedulers' => 0,
'SourceBucketArn' => '',
'StartupScriptS3ObjectVersion' => '',
'StartupScriptS3Path' => '',
'Tags' => [
],
'WebserverAccessMode' => '',
'WeeklyMaintenanceWindowStart' => ''
]));
$request->setRequestUrl('{{baseUrl}}/environments/:Name');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/environments/:Name' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"AirflowConfigurationOptions": {},
"AirflowVersion": "",
"DagS3Path": "",
"EnvironmentClass": "",
"ExecutionRoleArn": "",
"KmsKey": "",
"LoggingConfiguration": {
"DagProcessingLogs": "",
"SchedulerLogs": "",
"TaskLogs": "",
"WebserverLogs": "",
"WorkerLogs": ""
},
"MaxWorkers": 0,
"MinWorkers": 0,
"NetworkConfiguration": {
"SecurityGroupIds": "",
"SubnetIds": ""
},
"PluginsS3ObjectVersion": "",
"PluginsS3Path": "",
"RequirementsS3ObjectVersion": "",
"RequirementsS3Path": "",
"Schedulers": 0,
"SourceBucketArn": "",
"StartupScriptS3ObjectVersion": "",
"StartupScriptS3Path": "",
"Tags": {},
"WebserverAccessMode": "",
"WeeklyMaintenanceWindowStart": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/environments/:Name' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"AirflowConfigurationOptions": {},
"AirflowVersion": "",
"DagS3Path": "",
"EnvironmentClass": "",
"ExecutionRoleArn": "",
"KmsKey": "",
"LoggingConfiguration": {
"DagProcessingLogs": "",
"SchedulerLogs": "",
"TaskLogs": "",
"WebserverLogs": "",
"WorkerLogs": ""
},
"MaxWorkers": 0,
"MinWorkers": 0,
"NetworkConfiguration": {
"SecurityGroupIds": "",
"SubnetIds": ""
},
"PluginsS3ObjectVersion": "",
"PluginsS3Path": "",
"RequirementsS3ObjectVersion": "",
"RequirementsS3Path": "",
"Schedulers": 0,
"SourceBucketArn": "",
"StartupScriptS3ObjectVersion": "",
"StartupScriptS3Path": "",
"Tags": {},
"WebserverAccessMode": "",
"WeeklyMaintenanceWindowStart": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"AirflowConfigurationOptions\": {},\n \"AirflowVersion\": \"\",\n \"DagS3Path\": \"\",\n \"EnvironmentClass\": \"\",\n \"ExecutionRoleArn\": \"\",\n \"KmsKey\": \"\",\n \"LoggingConfiguration\": {\n \"DagProcessingLogs\": \"\",\n \"SchedulerLogs\": \"\",\n \"TaskLogs\": \"\",\n \"WebserverLogs\": \"\",\n \"WorkerLogs\": \"\"\n },\n \"MaxWorkers\": 0,\n \"MinWorkers\": 0,\n \"NetworkConfiguration\": {\n \"SecurityGroupIds\": \"\",\n \"SubnetIds\": \"\"\n },\n \"PluginsS3ObjectVersion\": \"\",\n \"PluginsS3Path\": \"\",\n \"RequirementsS3ObjectVersion\": \"\",\n \"RequirementsS3Path\": \"\",\n \"Schedulers\": 0,\n \"SourceBucketArn\": \"\",\n \"StartupScriptS3ObjectVersion\": \"\",\n \"StartupScriptS3Path\": \"\",\n \"Tags\": {},\n \"WebserverAccessMode\": \"\",\n \"WeeklyMaintenanceWindowStart\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/environments/:Name", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/environments/:Name"
payload = {
"AirflowConfigurationOptions": {},
"AirflowVersion": "",
"DagS3Path": "",
"EnvironmentClass": "",
"ExecutionRoleArn": "",
"KmsKey": "",
"LoggingConfiguration": {
"DagProcessingLogs": "",
"SchedulerLogs": "",
"TaskLogs": "",
"WebserverLogs": "",
"WorkerLogs": ""
},
"MaxWorkers": 0,
"MinWorkers": 0,
"NetworkConfiguration": {
"SecurityGroupIds": "",
"SubnetIds": ""
},
"PluginsS3ObjectVersion": "",
"PluginsS3Path": "",
"RequirementsS3ObjectVersion": "",
"RequirementsS3Path": "",
"Schedulers": 0,
"SourceBucketArn": "",
"StartupScriptS3ObjectVersion": "",
"StartupScriptS3Path": "",
"Tags": {},
"WebserverAccessMode": "",
"WeeklyMaintenanceWindowStart": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/environments/:Name"
payload <- "{\n \"AirflowConfigurationOptions\": {},\n \"AirflowVersion\": \"\",\n \"DagS3Path\": \"\",\n \"EnvironmentClass\": \"\",\n \"ExecutionRoleArn\": \"\",\n \"KmsKey\": \"\",\n \"LoggingConfiguration\": {\n \"DagProcessingLogs\": \"\",\n \"SchedulerLogs\": \"\",\n \"TaskLogs\": \"\",\n \"WebserverLogs\": \"\",\n \"WorkerLogs\": \"\"\n },\n \"MaxWorkers\": 0,\n \"MinWorkers\": 0,\n \"NetworkConfiguration\": {\n \"SecurityGroupIds\": \"\",\n \"SubnetIds\": \"\"\n },\n \"PluginsS3ObjectVersion\": \"\",\n \"PluginsS3Path\": \"\",\n \"RequirementsS3ObjectVersion\": \"\",\n \"RequirementsS3Path\": \"\",\n \"Schedulers\": 0,\n \"SourceBucketArn\": \"\",\n \"StartupScriptS3ObjectVersion\": \"\",\n \"StartupScriptS3Path\": \"\",\n \"Tags\": {},\n \"WebserverAccessMode\": \"\",\n \"WeeklyMaintenanceWindowStart\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/environments/:Name")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"AirflowConfigurationOptions\": {},\n \"AirflowVersion\": \"\",\n \"DagS3Path\": \"\",\n \"EnvironmentClass\": \"\",\n \"ExecutionRoleArn\": \"\",\n \"KmsKey\": \"\",\n \"LoggingConfiguration\": {\n \"DagProcessingLogs\": \"\",\n \"SchedulerLogs\": \"\",\n \"TaskLogs\": \"\",\n \"WebserverLogs\": \"\",\n \"WorkerLogs\": \"\"\n },\n \"MaxWorkers\": 0,\n \"MinWorkers\": 0,\n \"NetworkConfiguration\": {\n \"SecurityGroupIds\": \"\",\n \"SubnetIds\": \"\"\n },\n \"PluginsS3ObjectVersion\": \"\",\n \"PluginsS3Path\": \"\",\n \"RequirementsS3ObjectVersion\": \"\",\n \"RequirementsS3Path\": \"\",\n \"Schedulers\": 0,\n \"SourceBucketArn\": \"\",\n \"StartupScriptS3ObjectVersion\": \"\",\n \"StartupScriptS3Path\": \"\",\n \"Tags\": {},\n \"WebserverAccessMode\": \"\",\n \"WeeklyMaintenanceWindowStart\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/environments/:Name') do |req|
req.body = "{\n \"AirflowConfigurationOptions\": {},\n \"AirflowVersion\": \"\",\n \"DagS3Path\": \"\",\n \"EnvironmentClass\": \"\",\n \"ExecutionRoleArn\": \"\",\n \"KmsKey\": \"\",\n \"LoggingConfiguration\": {\n \"DagProcessingLogs\": \"\",\n \"SchedulerLogs\": \"\",\n \"TaskLogs\": \"\",\n \"WebserverLogs\": \"\",\n \"WorkerLogs\": \"\"\n },\n \"MaxWorkers\": 0,\n \"MinWorkers\": 0,\n \"NetworkConfiguration\": {\n \"SecurityGroupIds\": \"\",\n \"SubnetIds\": \"\"\n },\n \"PluginsS3ObjectVersion\": \"\",\n \"PluginsS3Path\": \"\",\n \"RequirementsS3ObjectVersion\": \"\",\n \"RequirementsS3Path\": \"\",\n \"Schedulers\": 0,\n \"SourceBucketArn\": \"\",\n \"StartupScriptS3ObjectVersion\": \"\",\n \"StartupScriptS3Path\": \"\",\n \"Tags\": {},\n \"WebserverAccessMode\": \"\",\n \"WeeklyMaintenanceWindowStart\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/environments/:Name";
let payload = json!({
"AirflowConfigurationOptions": json!({}),
"AirflowVersion": "",
"DagS3Path": "",
"EnvironmentClass": "",
"ExecutionRoleArn": "",
"KmsKey": "",
"LoggingConfiguration": json!({
"DagProcessingLogs": "",
"SchedulerLogs": "",
"TaskLogs": "",
"WebserverLogs": "",
"WorkerLogs": ""
}),
"MaxWorkers": 0,
"MinWorkers": 0,
"NetworkConfiguration": json!({
"SecurityGroupIds": "",
"SubnetIds": ""
}),
"PluginsS3ObjectVersion": "",
"PluginsS3Path": "",
"RequirementsS3ObjectVersion": "",
"RequirementsS3Path": "",
"Schedulers": 0,
"SourceBucketArn": "",
"StartupScriptS3ObjectVersion": "",
"StartupScriptS3Path": "",
"Tags": json!({}),
"WebserverAccessMode": "",
"WeeklyMaintenanceWindowStart": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/environments/:Name \
--header 'content-type: application/json' \
--data '{
"AirflowConfigurationOptions": {},
"AirflowVersion": "",
"DagS3Path": "",
"EnvironmentClass": "",
"ExecutionRoleArn": "",
"KmsKey": "",
"LoggingConfiguration": {
"DagProcessingLogs": "",
"SchedulerLogs": "",
"TaskLogs": "",
"WebserverLogs": "",
"WorkerLogs": ""
},
"MaxWorkers": 0,
"MinWorkers": 0,
"NetworkConfiguration": {
"SecurityGroupIds": "",
"SubnetIds": ""
},
"PluginsS3ObjectVersion": "",
"PluginsS3Path": "",
"RequirementsS3ObjectVersion": "",
"RequirementsS3Path": "",
"Schedulers": 0,
"SourceBucketArn": "",
"StartupScriptS3ObjectVersion": "",
"StartupScriptS3Path": "",
"Tags": {},
"WebserverAccessMode": "",
"WeeklyMaintenanceWindowStart": ""
}'
echo '{
"AirflowConfigurationOptions": {},
"AirflowVersion": "",
"DagS3Path": "",
"EnvironmentClass": "",
"ExecutionRoleArn": "",
"KmsKey": "",
"LoggingConfiguration": {
"DagProcessingLogs": "",
"SchedulerLogs": "",
"TaskLogs": "",
"WebserverLogs": "",
"WorkerLogs": ""
},
"MaxWorkers": 0,
"MinWorkers": 0,
"NetworkConfiguration": {
"SecurityGroupIds": "",
"SubnetIds": ""
},
"PluginsS3ObjectVersion": "",
"PluginsS3Path": "",
"RequirementsS3ObjectVersion": "",
"RequirementsS3Path": "",
"Schedulers": 0,
"SourceBucketArn": "",
"StartupScriptS3ObjectVersion": "",
"StartupScriptS3Path": "",
"Tags": {},
"WebserverAccessMode": "",
"WeeklyMaintenanceWindowStart": ""
}' | \
http PUT {{baseUrl}}/environments/:Name \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "AirflowConfigurationOptions": {},\n "AirflowVersion": "",\n "DagS3Path": "",\n "EnvironmentClass": "",\n "ExecutionRoleArn": "",\n "KmsKey": "",\n "LoggingConfiguration": {\n "DagProcessingLogs": "",\n "SchedulerLogs": "",\n "TaskLogs": "",\n "WebserverLogs": "",\n "WorkerLogs": ""\n },\n "MaxWorkers": 0,\n "MinWorkers": 0,\n "NetworkConfiguration": {\n "SecurityGroupIds": "",\n "SubnetIds": ""\n },\n "PluginsS3ObjectVersion": "",\n "PluginsS3Path": "",\n "RequirementsS3ObjectVersion": "",\n "RequirementsS3Path": "",\n "Schedulers": 0,\n "SourceBucketArn": "",\n "StartupScriptS3ObjectVersion": "",\n "StartupScriptS3Path": "",\n "Tags": {},\n "WebserverAccessMode": "",\n "WeeklyMaintenanceWindowStart": ""\n}' \
--output-document \
- {{baseUrl}}/environments/:Name
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"AirflowConfigurationOptions": [],
"AirflowVersion": "",
"DagS3Path": "",
"EnvironmentClass": "",
"ExecutionRoleArn": "",
"KmsKey": "",
"LoggingConfiguration": [
"DagProcessingLogs": "",
"SchedulerLogs": "",
"TaskLogs": "",
"WebserverLogs": "",
"WorkerLogs": ""
],
"MaxWorkers": 0,
"MinWorkers": 0,
"NetworkConfiguration": [
"SecurityGroupIds": "",
"SubnetIds": ""
],
"PluginsS3ObjectVersion": "",
"PluginsS3Path": "",
"RequirementsS3ObjectVersion": "",
"RequirementsS3Path": "",
"Schedulers": 0,
"SourceBucketArn": "",
"StartupScriptS3ObjectVersion": "",
"StartupScriptS3Path": "",
"Tags": [],
"WebserverAccessMode": "",
"WeeklyMaintenanceWindowStart": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/environments/:Name")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
CreateWebLoginToken
{{baseUrl}}/webtoken/:Name
QUERY PARAMS
Name
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/webtoken/:Name");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/webtoken/:Name")
require "http/client"
url = "{{baseUrl}}/webtoken/:Name"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/webtoken/:Name"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/webtoken/:Name");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/webtoken/:Name"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/webtoken/:Name HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/webtoken/:Name")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/webtoken/:Name"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/webtoken/:Name")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/webtoken/:Name")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/webtoken/:Name');
xhr.send(data);
import axios from 'axios';
const options = {method: 'POST', url: '{{baseUrl}}/webtoken/:Name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/webtoken/:Name';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/webtoken/:Name',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/webtoken/:Name")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/webtoken/:Name',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'POST', url: '{{baseUrl}}/webtoken/:Name'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/webtoken/:Name');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'POST', url: '{{baseUrl}}/webtoken/:Name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/webtoken/:Name';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/webtoken/:Name"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/webtoken/:Name" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/webtoken/:Name",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/webtoken/:Name');
echo $response->getBody();
setUrl('{{baseUrl}}/webtoken/:Name');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/webtoken/:Name');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/webtoken/:Name' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/webtoken/:Name' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/webtoken/:Name")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/webtoken/:Name"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/webtoken/:Name"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/webtoken/:Name")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/webtoken/:Name') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/webtoken/:Name";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/webtoken/:Name
http POST {{baseUrl}}/webtoken/:Name
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/webtoken/:Name
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/webtoken/:Name")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
DeleteEnvironment
{{baseUrl}}/environments/:Name
QUERY PARAMS
Name
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/environments/:Name");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/environments/:Name")
require "http/client"
url = "{{baseUrl}}/environments/:Name"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/environments/:Name"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/environments/:Name");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/environments/:Name"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/environments/:Name HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/environments/:Name")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/environments/:Name"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/environments/:Name")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/environments/:Name")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/environments/:Name');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/environments/:Name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/environments/:Name';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/environments/:Name',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/environments/:Name")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/environments/:Name',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'DELETE', url: '{{baseUrl}}/environments/:Name'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/environments/:Name');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'DELETE', url: '{{baseUrl}}/environments/:Name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/environments/:Name';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/environments/:Name"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/environments/:Name" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/environments/:Name",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/environments/:Name');
echo $response->getBody();
setUrl('{{baseUrl}}/environments/:Name');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/environments/:Name');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/environments/:Name' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/environments/:Name' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/environments/:Name")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/environments/:Name"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/environments/:Name"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/environments/:Name")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/environments/:Name') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/environments/:Name";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/environments/:Name
http DELETE {{baseUrl}}/environments/:Name
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/environments/:Name
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/environments/:Name")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
GetEnvironment
{{baseUrl}}/environments/:Name
QUERY PARAMS
Name
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/environments/:Name");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/environments/:Name")
require "http/client"
url = "{{baseUrl}}/environments/:Name"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/environments/:Name"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/environments/:Name");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/environments/:Name"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/environments/:Name HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/environments/:Name")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/environments/:Name"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/environments/:Name")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/environments/:Name")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/environments/:Name');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/environments/:Name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/environments/:Name';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/environments/:Name',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/environments/:Name")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/environments/:Name',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/environments/:Name'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/environments/:Name');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/environments/:Name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/environments/:Name';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/environments/:Name"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/environments/:Name" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/environments/:Name",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/environments/:Name');
echo $response->getBody();
setUrl('{{baseUrl}}/environments/:Name');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/environments/:Name');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/environments/:Name' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/environments/:Name' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/environments/:Name")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/environments/:Name"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/environments/:Name"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/environments/:Name")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/environments/:Name') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/environments/:Name";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/environments/:Name
http GET {{baseUrl}}/environments/:Name
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/environments/:Name
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/environments/:Name")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
ListEnvironments
{{baseUrl}}/environments
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/environments");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/environments")
require "http/client"
url = "{{baseUrl}}/environments"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/environments"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/environments");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/environments"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/environments HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/environments")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/environments"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/environments")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/environments")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/environments');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/environments'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/environments';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/environments',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/environments")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/environments',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/environments'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/environments');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/environments'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/environments';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/environments"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/environments" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/environments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/environments');
echo $response->getBody();
setUrl('{{baseUrl}}/environments');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/environments');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/environments' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/environments' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/environments")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/environments"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/environments"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/environments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/environments') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/environments";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/environments
http GET {{baseUrl}}/environments
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/environments
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/environments")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
ListTagsForResource
{{baseUrl}}/tags/:ResourceArn
QUERY PARAMS
ResourceArn
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tags/:ResourceArn");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/tags/:ResourceArn")
require "http/client"
url = "{{baseUrl}}/tags/:ResourceArn"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/tags/:ResourceArn"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/tags/:ResourceArn");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tags/:ResourceArn"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/tags/:ResourceArn HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/tags/:ResourceArn")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tags/:ResourceArn"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/tags/:ResourceArn")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/tags/:ResourceArn")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/tags/:ResourceArn');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/tags/:ResourceArn'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tags/:ResourceArn';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/tags/:ResourceArn',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/tags/:ResourceArn")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/tags/:ResourceArn',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/tags/:ResourceArn'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/tags/:ResourceArn');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/tags/:ResourceArn'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tags/:ResourceArn';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/tags/:ResourceArn"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/tags/:ResourceArn" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tags/:ResourceArn",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/tags/:ResourceArn');
echo $response->getBody();
setUrl('{{baseUrl}}/tags/:ResourceArn');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/tags/:ResourceArn');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tags/:ResourceArn' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tags/:ResourceArn' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/tags/:ResourceArn")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tags/:ResourceArn"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tags/:ResourceArn"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tags/:ResourceArn")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/tags/:ResourceArn') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/tags/:ResourceArn";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/tags/:ResourceArn
http GET {{baseUrl}}/tags/:ResourceArn
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/tags/:ResourceArn
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tags/:ResourceArn")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
PublishMetrics
{{baseUrl}}/metrics/environments/:EnvironmentName
QUERY PARAMS
EnvironmentName
BODY json
{
"MetricData": [
{
"Dimensions": "",
"MetricName": "",
"StatisticValues": "",
"Timestamp": "",
"Unit": "",
"Value": ""
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/metrics/environments/:EnvironmentName");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"MetricData\": [\n {\n \"Dimensions\": \"\",\n \"MetricName\": \"\",\n \"StatisticValues\": \"\",\n \"Timestamp\": \"\",\n \"Unit\": \"\",\n \"Value\": \"\"\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/metrics/environments/:EnvironmentName" {:content-type :json
:form-params {:MetricData [{:Dimensions ""
:MetricName ""
:StatisticValues ""
:Timestamp ""
:Unit ""
:Value ""}]}})
require "http/client"
url = "{{baseUrl}}/metrics/environments/:EnvironmentName"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"MetricData\": [\n {\n \"Dimensions\": \"\",\n \"MetricName\": \"\",\n \"StatisticValues\": \"\",\n \"Timestamp\": \"\",\n \"Unit\": \"\",\n \"Value\": \"\"\n }\n ]\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/metrics/environments/:EnvironmentName"),
Content = new StringContent("{\n \"MetricData\": [\n {\n \"Dimensions\": \"\",\n \"MetricName\": \"\",\n \"StatisticValues\": \"\",\n \"Timestamp\": \"\",\n \"Unit\": \"\",\n \"Value\": \"\"\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/metrics/environments/:EnvironmentName");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"MetricData\": [\n {\n \"Dimensions\": \"\",\n \"MetricName\": \"\",\n \"StatisticValues\": \"\",\n \"Timestamp\": \"\",\n \"Unit\": \"\",\n \"Value\": \"\"\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/metrics/environments/:EnvironmentName"
payload := strings.NewReader("{\n \"MetricData\": [\n {\n \"Dimensions\": \"\",\n \"MetricName\": \"\",\n \"StatisticValues\": \"\",\n \"Timestamp\": \"\",\n \"Unit\": \"\",\n \"Value\": \"\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/metrics/environments/:EnvironmentName HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 173
{
"MetricData": [
{
"Dimensions": "",
"MetricName": "",
"StatisticValues": "",
"Timestamp": "",
"Unit": "",
"Value": ""
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/metrics/environments/:EnvironmentName")
.setHeader("content-type", "application/json")
.setBody("{\n \"MetricData\": [\n {\n \"Dimensions\": \"\",\n \"MetricName\": \"\",\n \"StatisticValues\": \"\",\n \"Timestamp\": \"\",\n \"Unit\": \"\",\n \"Value\": \"\"\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/metrics/environments/:EnvironmentName"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"MetricData\": [\n {\n \"Dimensions\": \"\",\n \"MetricName\": \"\",\n \"StatisticValues\": \"\",\n \"Timestamp\": \"\",\n \"Unit\": \"\",\n \"Value\": \"\"\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"MetricData\": [\n {\n \"Dimensions\": \"\",\n \"MetricName\": \"\",\n \"StatisticValues\": \"\",\n \"Timestamp\": \"\",\n \"Unit\": \"\",\n \"Value\": \"\"\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/metrics/environments/:EnvironmentName")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/metrics/environments/:EnvironmentName")
.header("content-type", "application/json")
.body("{\n \"MetricData\": [\n {\n \"Dimensions\": \"\",\n \"MetricName\": \"\",\n \"StatisticValues\": \"\",\n \"Timestamp\": \"\",\n \"Unit\": \"\",\n \"Value\": \"\"\n }\n ]\n}")
.asString();
const data = JSON.stringify({
MetricData: [
{
Dimensions: '',
MetricName: '',
StatisticValues: '',
Timestamp: '',
Unit: '',
Value: ''
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/metrics/environments/:EnvironmentName');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/metrics/environments/:EnvironmentName',
headers: {'content-type': 'application/json'},
data: {
MetricData: [
{
Dimensions: '',
MetricName: '',
StatisticValues: '',
Timestamp: '',
Unit: '',
Value: ''
}
]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/metrics/environments/:EnvironmentName';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"MetricData":[{"Dimensions":"","MetricName":"","StatisticValues":"","Timestamp":"","Unit":"","Value":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/metrics/environments/:EnvironmentName',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "MetricData": [\n {\n "Dimensions": "",\n "MetricName": "",\n "StatisticValues": "",\n "Timestamp": "",\n "Unit": "",\n "Value": ""\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"MetricData\": [\n {\n \"Dimensions\": \"\",\n \"MetricName\": \"\",\n \"StatisticValues\": \"\",\n \"Timestamp\": \"\",\n \"Unit\": \"\",\n \"Value\": \"\"\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/metrics/environments/:EnvironmentName")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/metrics/environments/:EnvironmentName',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
MetricData: [
{
Dimensions: '',
MetricName: '',
StatisticValues: '',
Timestamp: '',
Unit: '',
Value: ''
}
]
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/metrics/environments/:EnvironmentName',
headers: {'content-type': 'application/json'},
body: {
MetricData: [
{
Dimensions: '',
MetricName: '',
StatisticValues: '',
Timestamp: '',
Unit: '',
Value: ''
}
]
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/metrics/environments/:EnvironmentName');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
MetricData: [
{
Dimensions: '',
MetricName: '',
StatisticValues: '',
Timestamp: '',
Unit: '',
Value: ''
}
]
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/metrics/environments/:EnvironmentName',
headers: {'content-type': 'application/json'},
data: {
MetricData: [
{
Dimensions: '',
MetricName: '',
StatisticValues: '',
Timestamp: '',
Unit: '',
Value: ''
}
]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/metrics/environments/:EnvironmentName';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"MetricData":[{"Dimensions":"","MetricName":"","StatisticValues":"","Timestamp":"","Unit":"","Value":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"MetricData": @[ @{ @"Dimensions": @"", @"MetricName": @"", @"StatisticValues": @"", @"Timestamp": @"", @"Unit": @"", @"Value": @"" } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/metrics/environments/:EnvironmentName"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/metrics/environments/:EnvironmentName" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"MetricData\": [\n {\n \"Dimensions\": \"\",\n \"MetricName\": \"\",\n \"StatisticValues\": \"\",\n \"Timestamp\": \"\",\n \"Unit\": \"\",\n \"Value\": \"\"\n }\n ]\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/metrics/environments/:EnvironmentName",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'MetricData' => [
[
'Dimensions' => '',
'MetricName' => '',
'StatisticValues' => '',
'Timestamp' => '',
'Unit' => '',
'Value' => ''
]
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/metrics/environments/:EnvironmentName', [
'body' => '{
"MetricData": [
{
"Dimensions": "",
"MetricName": "",
"StatisticValues": "",
"Timestamp": "",
"Unit": "",
"Value": ""
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/metrics/environments/:EnvironmentName');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'MetricData' => [
[
'Dimensions' => '',
'MetricName' => '',
'StatisticValues' => '',
'Timestamp' => '',
'Unit' => '',
'Value' => ''
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'MetricData' => [
[
'Dimensions' => '',
'MetricName' => '',
'StatisticValues' => '',
'Timestamp' => '',
'Unit' => '',
'Value' => ''
]
]
]));
$request->setRequestUrl('{{baseUrl}}/metrics/environments/:EnvironmentName');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/metrics/environments/:EnvironmentName' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"MetricData": [
{
"Dimensions": "",
"MetricName": "",
"StatisticValues": "",
"Timestamp": "",
"Unit": "",
"Value": ""
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/metrics/environments/:EnvironmentName' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"MetricData": [
{
"Dimensions": "",
"MetricName": "",
"StatisticValues": "",
"Timestamp": "",
"Unit": "",
"Value": ""
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"MetricData\": [\n {\n \"Dimensions\": \"\",\n \"MetricName\": \"\",\n \"StatisticValues\": \"\",\n \"Timestamp\": \"\",\n \"Unit\": \"\",\n \"Value\": \"\"\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/metrics/environments/:EnvironmentName", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/metrics/environments/:EnvironmentName"
payload = { "MetricData": [
{
"Dimensions": "",
"MetricName": "",
"StatisticValues": "",
"Timestamp": "",
"Unit": "",
"Value": ""
}
] }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/metrics/environments/:EnvironmentName"
payload <- "{\n \"MetricData\": [\n {\n \"Dimensions\": \"\",\n \"MetricName\": \"\",\n \"StatisticValues\": \"\",\n \"Timestamp\": \"\",\n \"Unit\": \"\",\n \"Value\": \"\"\n }\n ]\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/metrics/environments/:EnvironmentName")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"MetricData\": [\n {\n \"Dimensions\": \"\",\n \"MetricName\": \"\",\n \"StatisticValues\": \"\",\n \"Timestamp\": \"\",\n \"Unit\": \"\",\n \"Value\": \"\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/metrics/environments/:EnvironmentName') do |req|
req.body = "{\n \"MetricData\": [\n {\n \"Dimensions\": \"\",\n \"MetricName\": \"\",\n \"StatisticValues\": \"\",\n \"Timestamp\": \"\",\n \"Unit\": \"\",\n \"Value\": \"\"\n }\n ]\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/metrics/environments/:EnvironmentName";
let payload = json!({"MetricData": (
json!({
"Dimensions": "",
"MetricName": "",
"StatisticValues": "",
"Timestamp": "",
"Unit": "",
"Value": ""
})
)});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/metrics/environments/:EnvironmentName \
--header 'content-type: application/json' \
--data '{
"MetricData": [
{
"Dimensions": "",
"MetricName": "",
"StatisticValues": "",
"Timestamp": "",
"Unit": "",
"Value": ""
}
]
}'
echo '{
"MetricData": [
{
"Dimensions": "",
"MetricName": "",
"StatisticValues": "",
"Timestamp": "",
"Unit": "",
"Value": ""
}
]
}' | \
http POST {{baseUrl}}/metrics/environments/:EnvironmentName \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "MetricData": [\n {\n "Dimensions": "",\n "MetricName": "",\n "StatisticValues": "",\n "Timestamp": "",\n "Unit": "",\n "Value": ""\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/metrics/environments/:EnvironmentName
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["MetricData": [
[
"Dimensions": "",
"MetricName": "",
"StatisticValues": "",
"Timestamp": "",
"Unit": "",
"Value": ""
]
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/metrics/environments/:EnvironmentName")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
TagResource
{{baseUrl}}/tags/:ResourceArn
QUERY PARAMS
ResourceArn
BODY json
{
"Tags": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tags/:ResourceArn");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"Tags\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/tags/:ResourceArn" {:content-type :json
:form-params {:Tags {}}})
require "http/client"
url = "{{baseUrl}}/tags/:ResourceArn"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"Tags\": {}\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/tags/:ResourceArn"),
Content = new StringContent("{\n \"Tags\": {}\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/tags/:ResourceArn");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"Tags\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tags/:ResourceArn"
payload := strings.NewReader("{\n \"Tags\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/tags/:ResourceArn HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 16
{
"Tags": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/tags/:ResourceArn")
.setHeader("content-type", "application/json")
.setBody("{\n \"Tags\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tags/:ResourceArn"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"Tags\": {}\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"Tags\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/tags/:ResourceArn")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/tags/:ResourceArn")
.header("content-type", "application/json")
.body("{\n \"Tags\": {}\n}")
.asString();
const data = JSON.stringify({
Tags: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/tags/:ResourceArn');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/tags/:ResourceArn',
headers: {'content-type': 'application/json'},
data: {Tags: {}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tags/:ResourceArn';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"Tags":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/tags/:ResourceArn',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "Tags": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"Tags\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/tags/:ResourceArn")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/tags/:ResourceArn',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({Tags: {}}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/tags/:ResourceArn',
headers: {'content-type': 'application/json'},
body: {Tags: {}},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/tags/:ResourceArn');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
Tags: {}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/tags/:ResourceArn',
headers: {'content-type': 'application/json'},
data: {Tags: {}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tags/:ResourceArn';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"Tags":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"Tags": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/tags/:ResourceArn"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/tags/:ResourceArn" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"Tags\": {}\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tags/:ResourceArn",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'Tags' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/tags/:ResourceArn', [
'body' => '{
"Tags": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/tags/:ResourceArn');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'Tags' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'Tags' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/tags/:ResourceArn');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tags/:ResourceArn' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Tags": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tags/:ResourceArn' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Tags": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"Tags\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/tags/:ResourceArn", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tags/:ResourceArn"
payload = { "Tags": {} }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tags/:ResourceArn"
payload <- "{\n \"Tags\": {}\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tags/:ResourceArn")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"Tags\": {}\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/tags/:ResourceArn') do |req|
req.body = "{\n \"Tags\": {}\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/tags/:ResourceArn";
let payload = json!({"Tags": json!({})});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/tags/:ResourceArn \
--header 'content-type: application/json' \
--data '{
"Tags": {}
}'
echo '{
"Tags": {}
}' | \
http POST {{baseUrl}}/tags/:ResourceArn \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "Tags": {}\n}' \
--output-document \
- {{baseUrl}}/tags/:ResourceArn
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["Tags": []] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tags/:ResourceArn")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
UntagResource
{{baseUrl}}/tags/:ResourceArn#tagKeys
QUERY PARAMS
tagKeys
ResourceArn
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tags/:ResourceArn?tagKeys=#tagKeys");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/tags/:ResourceArn#tagKeys" {:query-params {:tagKeys ""}})
require "http/client"
url = "{{baseUrl}}/tags/:ResourceArn?tagKeys=#tagKeys"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/tags/:ResourceArn?tagKeys=#tagKeys"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/tags/:ResourceArn?tagKeys=#tagKeys");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tags/:ResourceArn?tagKeys=#tagKeys"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/tags/:ResourceArn?tagKeys= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/tags/:ResourceArn?tagKeys=#tagKeys")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tags/:ResourceArn?tagKeys=#tagKeys"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/tags/:ResourceArn?tagKeys=#tagKeys")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/tags/:ResourceArn?tagKeys=#tagKeys")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/tags/:ResourceArn?tagKeys=#tagKeys');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/tags/:ResourceArn#tagKeys',
params: {tagKeys: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tags/:ResourceArn?tagKeys=#tagKeys';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/tags/:ResourceArn?tagKeys=#tagKeys',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/tags/:ResourceArn?tagKeys=#tagKeys")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/tags/:ResourceArn?tagKeys=',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/tags/:ResourceArn#tagKeys',
qs: {tagKeys: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/tags/:ResourceArn#tagKeys');
req.query({
tagKeys: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/tags/:ResourceArn#tagKeys',
params: {tagKeys: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tags/:ResourceArn?tagKeys=#tagKeys';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/tags/:ResourceArn?tagKeys=#tagKeys"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/tags/:ResourceArn?tagKeys=#tagKeys" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tags/:ResourceArn?tagKeys=#tagKeys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/tags/:ResourceArn?tagKeys=#tagKeys');
echo $response->getBody();
setUrl('{{baseUrl}}/tags/:ResourceArn#tagKeys');
$request->setMethod(HTTP_METH_DELETE);
$request->setQueryData([
'tagKeys' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/tags/:ResourceArn#tagKeys');
$request->setRequestMethod('DELETE');
$request->setQuery(new http\QueryString([
'tagKeys' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tags/:ResourceArn?tagKeys=#tagKeys' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tags/:ResourceArn?tagKeys=#tagKeys' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/tags/:ResourceArn?tagKeys=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tags/:ResourceArn#tagKeys"
querystring = {"tagKeys":""}
response = requests.delete(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tags/:ResourceArn#tagKeys"
queryString <- list(tagKeys = "")
response <- VERB("DELETE", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tags/:ResourceArn?tagKeys=#tagKeys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/tags/:ResourceArn') do |req|
req.params['tagKeys'] = ''
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/tags/:ResourceArn#tagKeys";
let querystring = [
("tagKeys", ""),
];
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url '{{baseUrl}}/tags/:ResourceArn?tagKeys=#tagKeys'
http DELETE '{{baseUrl}}/tags/:ResourceArn?tagKeys=#tagKeys'
wget --quiet \
--method DELETE \
--output-document \
- '{{baseUrl}}/tags/:ResourceArn?tagKeys=#tagKeys'
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tags/:ResourceArn?tagKeys=#tagKeys")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
UpdateEnvironment
{{baseUrl}}/environments/:Name
QUERY PARAMS
Name
BODY json
{
"AirflowConfigurationOptions": {},
"AirflowVersion": "",
"DagS3Path": "",
"EnvironmentClass": "",
"ExecutionRoleArn": "",
"LoggingConfiguration": {
"DagProcessingLogs": "",
"SchedulerLogs": "",
"TaskLogs": "",
"WebserverLogs": "",
"WorkerLogs": ""
},
"MaxWorkers": 0,
"MinWorkers": 0,
"NetworkConfiguration": {
"SecurityGroupIds": ""
},
"PluginsS3ObjectVersion": "",
"PluginsS3Path": "",
"RequirementsS3ObjectVersion": "",
"RequirementsS3Path": "",
"Schedulers": 0,
"SourceBucketArn": "",
"StartupScriptS3ObjectVersion": "",
"StartupScriptS3Path": "",
"WebserverAccessMode": "",
"WeeklyMaintenanceWindowStart": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/environments/:Name");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"AirflowConfigurationOptions\": {},\n \"AirflowVersion\": \"\",\n \"DagS3Path\": \"\",\n \"EnvironmentClass\": \"\",\n \"ExecutionRoleArn\": \"\",\n \"LoggingConfiguration\": {\n \"DagProcessingLogs\": \"\",\n \"SchedulerLogs\": \"\",\n \"TaskLogs\": \"\",\n \"WebserverLogs\": \"\",\n \"WorkerLogs\": \"\"\n },\n \"MaxWorkers\": 0,\n \"MinWorkers\": 0,\n \"NetworkConfiguration\": {\n \"SecurityGroupIds\": \"\"\n },\n \"PluginsS3ObjectVersion\": \"\",\n \"PluginsS3Path\": \"\",\n \"RequirementsS3ObjectVersion\": \"\",\n \"RequirementsS3Path\": \"\",\n \"Schedulers\": 0,\n \"SourceBucketArn\": \"\",\n \"StartupScriptS3ObjectVersion\": \"\",\n \"StartupScriptS3Path\": \"\",\n \"WebserverAccessMode\": \"\",\n \"WeeklyMaintenanceWindowStart\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/environments/:Name" {:content-type :json
:form-params {:AirflowConfigurationOptions {}
:AirflowVersion ""
:DagS3Path ""
:EnvironmentClass ""
:ExecutionRoleArn ""
:LoggingConfiguration {:DagProcessingLogs ""
:SchedulerLogs ""
:TaskLogs ""
:WebserverLogs ""
:WorkerLogs ""}
:MaxWorkers 0
:MinWorkers 0
:NetworkConfiguration {:SecurityGroupIds ""}
:PluginsS3ObjectVersion ""
:PluginsS3Path ""
:RequirementsS3ObjectVersion ""
:RequirementsS3Path ""
:Schedulers 0
:SourceBucketArn ""
:StartupScriptS3ObjectVersion ""
:StartupScriptS3Path ""
:WebserverAccessMode ""
:WeeklyMaintenanceWindowStart ""}})
require "http/client"
url = "{{baseUrl}}/environments/:Name"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"AirflowConfigurationOptions\": {},\n \"AirflowVersion\": \"\",\n \"DagS3Path\": \"\",\n \"EnvironmentClass\": \"\",\n \"ExecutionRoleArn\": \"\",\n \"LoggingConfiguration\": {\n \"DagProcessingLogs\": \"\",\n \"SchedulerLogs\": \"\",\n \"TaskLogs\": \"\",\n \"WebserverLogs\": \"\",\n \"WorkerLogs\": \"\"\n },\n \"MaxWorkers\": 0,\n \"MinWorkers\": 0,\n \"NetworkConfiguration\": {\n \"SecurityGroupIds\": \"\"\n },\n \"PluginsS3ObjectVersion\": \"\",\n \"PluginsS3Path\": \"\",\n \"RequirementsS3ObjectVersion\": \"\",\n \"RequirementsS3Path\": \"\",\n \"Schedulers\": 0,\n \"SourceBucketArn\": \"\",\n \"StartupScriptS3ObjectVersion\": \"\",\n \"StartupScriptS3Path\": \"\",\n \"WebserverAccessMode\": \"\",\n \"WeeklyMaintenanceWindowStart\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/environments/:Name"),
Content = new StringContent("{\n \"AirflowConfigurationOptions\": {},\n \"AirflowVersion\": \"\",\n \"DagS3Path\": \"\",\n \"EnvironmentClass\": \"\",\n \"ExecutionRoleArn\": \"\",\n \"LoggingConfiguration\": {\n \"DagProcessingLogs\": \"\",\n \"SchedulerLogs\": \"\",\n \"TaskLogs\": \"\",\n \"WebserverLogs\": \"\",\n \"WorkerLogs\": \"\"\n },\n \"MaxWorkers\": 0,\n \"MinWorkers\": 0,\n \"NetworkConfiguration\": {\n \"SecurityGroupIds\": \"\"\n },\n \"PluginsS3ObjectVersion\": \"\",\n \"PluginsS3Path\": \"\",\n \"RequirementsS3ObjectVersion\": \"\",\n \"RequirementsS3Path\": \"\",\n \"Schedulers\": 0,\n \"SourceBucketArn\": \"\",\n \"StartupScriptS3ObjectVersion\": \"\",\n \"StartupScriptS3Path\": \"\",\n \"WebserverAccessMode\": \"\",\n \"WeeklyMaintenanceWindowStart\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/environments/:Name");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"AirflowConfigurationOptions\": {},\n \"AirflowVersion\": \"\",\n \"DagS3Path\": \"\",\n \"EnvironmentClass\": \"\",\n \"ExecutionRoleArn\": \"\",\n \"LoggingConfiguration\": {\n \"DagProcessingLogs\": \"\",\n \"SchedulerLogs\": \"\",\n \"TaskLogs\": \"\",\n \"WebserverLogs\": \"\",\n \"WorkerLogs\": \"\"\n },\n \"MaxWorkers\": 0,\n \"MinWorkers\": 0,\n \"NetworkConfiguration\": {\n \"SecurityGroupIds\": \"\"\n },\n \"PluginsS3ObjectVersion\": \"\",\n \"PluginsS3Path\": \"\",\n \"RequirementsS3ObjectVersion\": \"\",\n \"RequirementsS3Path\": \"\",\n \"Schedulers\": 0,\n \"SourceBucketArn\": \"\",\n \"StartupScriptS3ObjectVersion\": \"\",\n \"StartupScriptS3Path\": \"\",\n \"WebserverAccessMode\": \"\",\n \"WeeklyMaintenanceWindowStart\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/environments/:Name"
payload := strings.NewReader("{\n \"AirflowConfigurationOptions\": {},\n \"AirflowVersion\": \"\",\n \"DagS3Path\": \"\",\n \"EnvironmentClass\": \"\",\n \"ExecutionRoleArn\": \"\",\n \"LoggingConfiguration\": {\n \"DagProcessingLogs\": \"\",\n \"SchedulerLogs\": \"\",\n \"TaskLogs\": \"\",\n \"WebserverLogs\": \"\",\n \"WorkerLogs\": \"\"\n },\n \"MaxWorkers\": 0,\n \"MinWorkers\": 0,\n \"NetworkConfiguration\": {\n \"SecurityGroupIds\": \"\"\n },\n \"PluginsS3ObjectVersion\": \"\",\n \"PluginsS3Path\": \"\",\n \"RequirementsS3ObjectVersion\": \"\",\n \"RequirementsS3Path\": \"\",\n \"Schedulers\": 0,\n \"SourceBucketArn\": \"\",\n \"StartupScriptS3ObjectVersion\": \"\",\n \"StartupScriptS3Path\": \"\",\n \"WebserverAccessMode\": \"\",\n \"WeeklyMaintenanceWindowStart\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/environments/:Name HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 683
{
"AirflowConfigurationOptions": {},
"AirflowVersion": "",
"DagS3Path": "",
"EnvironmentClass": "",
"ExecutionRoleArn": "",
"LoggingConfiguration": {
"DagProcessingLogs": "",
"SchedulerLogs": "",
"TaskLogs": "",
"WebserverLogs": "",
"WorkerLogs": ""
},
"MaxWorkers": 0,
"MinWorkers": 0,
"NetworkConfiguration": {
"SecurityGroupIds": ""
},
"PluginsS3ObjectVersion": "",
"PluginsS3Path": "",
"RequirementsS3ObjectVersion": "",
"RequirementsS3Path": "",
"Schedulers": 0,
"SourceBucketArn": "",
"StartupScriptS3ObjectVersion": "",
"StartupScriptS3Path": "",
"WebserverAccessMode": "",
"WeeklyMaintenanceWindowStart": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/environments/:Name")
.setHeader("content-type", "application/json")
.setBody("{\n \"AirflowConfigurationOptions\": {},\n \"AirflowVersion\": \"\",\n \"DagS3Path\": \"\",\n \"EnvironmentClass\": \"\",\n \"ExecutionRoleArn\": \"\",\n \"LoggingConfiguration\": {\n \"DagProcessingLogs\": \"\",\n \"SchedulerLogs\": \"\",\n \"TaskLogs\": \"\",\n \"WebserverLogs\": \"\",\n \"WorkerLogs\": \"\"\n },\n \"MaxWorkers\": 0,\n \"MinWorkers\": 0,\n \"NetworkConfiguration\": {\n \"SecurityGroupIds\": \"\"\n },\n \"PluginsS3ObjectVersion\": \"\",\n \"PluginsS3Path\": \"\",\n \"RequirementsS3ObjectVersion\": \"\",\n \"RequirementsS3Path\": \"\",\n \"Schedulers\": 0,\n \"SourceBucketArn\": \"\",\n \"StartupScriptS3ObjectVersion\": \"\",\n \"StartupScriptS3Path\": \"\",\n \"WebserverAccessMode\": \"\",\n \"WeeklyMaintenanceWindowStart\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/environments/:Name"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"AirflowConfigurationOptions\": {},\n \"AirflowVersion\": \"\",\n \"DagS3Path\": \"\",\n \"EnvironmentClass\": \"\",\n \"ExecutionRoleArn\": \"\",\n \"LoggingConfiguration\": {\n \"DagProcessingLogs\": \"\",\n \"SchedulerLogs\": \"\",\n \"TaskLogs\": \"\",\n \"WebserverLogs\": \"\",\n \"WorkerLogs\": \"\"\n },\n \"MaxWorkers\": 0,\n \"MinWorkers\": 0,\n \"NetworkConfiguration\": {\n \"SecurityGroupIds\": \"\"\n },\n \"PluginsS3ObjectVersion\": \"\",\n \"PluginsS3Path\": \"\",\n \"RequirementsS3ObjectVersion\": \"\",\n \"RequirementsS3Path\": \"\",\n \"Schedulers\": 0,\n \"SourceBucketArn\": \"\",\n \"StartupScriptS3ObjectVersion\": \"\",\n \"StartupScriptS3Path\": \"\",\n \"WebserverAccessMode\": \"\",\n \"WeeklyMaintenanceWindowStart\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"AirflowConfigurationOptions\": {},\n \"AirflowVersion\": \"\",\n \"DagS3Path\": \"\",\n \"EnvironmentClass\": \"\",\n \"ExecutionRoleArn\": \"\",\n \"LoggingConfiguration\": {\n \"DagProcessingLogs\": \"\",\n \"SchedulerLogs\": \"\",\n \"TaskLogs\": \"\",\n \"WebserverLogs\": \"\",\n \"WorkerLogs\": \"\"\n },\n \"MaxWorkers\": 0,\n \"MinWorkers\": 0,\n \"NetworkConfiguration\": {\n \"SecurityGroupIds\": \"\"\n },\n \"PluginsS3ObjectVersion\": \"\",\n \"PluginsS3Path\": \"\",\n \"RequirementsS3ObjectVersion\": \"\",\n \"RequirementsS3Path\": \"\",\n \"Schedulers\": 0,\n \"SourceBucketArn\": \"\",\n \"StartupScriptS3ObjectVersion\": \"\",\n \"StartupScriptS3Path\": \"\",\n \"WebserverAccessMode\": \"\",\n \"WeeklyMaintenanceWindowStart\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/environments/:Name")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/environments/:Name")
.header("content-type", "application/json")
.body("{\n \"AirflowConfigurationOptions\": {},\n \"AirflowVersion\": \"\",\n \"DagS3Path\": \"\",\n \"EnvironmentClass\": \"\",\n \"ExecutionRoleArn\": \"\",\n \"LoggingConfiguration\": {\n \"DagProcessingLogs\": \"\",\n \"SchedulerLogs\": \"\",\n \"TaskLogs\": \"\",\n \"WebserverLogs\": \"\",\n \"WorkerLogs\": \"\"\n },\n \"MaxWorkers\": 0,\n \"MinWorkers\": 0,\n \"NetworkConfiguration\": {\n \"SecurityGroupIds\": \"\"\n },\n \"PluginsS3ObjectVersion\": \"\",\n \"PluginsS3Path\": \"\",\n \"RequirementsS3ObjectVersion\": \"\",\n \"RequirementsS3Path\": \"\",\n \"Schedulers\": 0,\n \"SourceBucketArn\": \"\",\n \"StartupScriptS3ObjectVersion\": \"\",\n \"StartupScriptS3Path\": \"\",\n \"WebserverAccessMode\": \"\",\n \"WeeklyMaintenanceWindowStart\": \"\"\n}")
.asString();
const data = JSON.stringify({
AirflowConfigurationOptions: {},
AirflowVersion: '',
DagS3Path: '',
EnvironmentClass: '',
ExecutionRoleArn: '',
LoggingConfiguration: {
DagProcessingLogs: '',
SchedulerLogs: '',
TaskLogs: '',
WebserverLogs: '',
WorkerLogs: ''
},
MaxWorkers: 0,
MinWorkers: 0,
NetworkConfiguration: {
SecurityGroupIds: ''
},
PluginsS3ObjectVersion: '',
PluginsS3Path: '',
RequirementsS3ObjectVersion: '',
RequirementsS3Path: '',
Schedulers: 0,
SourceBucketArn: '',
StartupScriptS3ObjectVersion: '',
StartupScriptS3Path: '',
WebserverAccessMode: '',
WeeklyMaintenanceWindowStart: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/environments/:Name');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/environments/:Name',
headers: {'content-type': 'application/json'},
data: {
AirflowConfigurationOptions: {},
AirflowVersion: '',
DagS3Path: '',
EnvironmentClass: '',
ExecutionRoleArn: '',
LoggingConfiguration: {
DagProcessingLogs: '',
SchedulerLogs: '',
TaskLogs: '',
WebserverLogs: '',
WorkerLogs: ''
},
MaxWorkers: 0,
MinWorkers: 0,
NetworkConfiguration: {SecurityGroupIds: ''},
PluginsS3ObjectVersion: '',
PluginsS3Path: '',
RequirementsS3ObjectVersion: '',
RequirementsS3Path: '',
Schedulers: 0,
SourceBucketArn: '',
StartupScriptS3ObjectVersion: '',
StartupScriptS3Path: '',
WebserverAccessMode: '',
WeeklyMaintenanceWindowStart: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/environments/:Name';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"AirflowConfigurationOptions":{},"AirflowVersion":"","DagS3Path":"","EnvironmentClass":"","ExecutionRoleArn":"","LoggingConfiguration":{"DagProcessingLogs":"","SchedulerLogs":"","TaskLogs":"","WebserverLogs":"","WorkerLogs":""},"MaxWorkers":0,"MinWorkers":0,"NetworkConfiguration":{"SecurityGroupIds":""},"PluginsS3ObjectVersion":"","PluginsS3Path":"","RequirementsS3ObjectVersion":"","RequirementsS3Path":"","Schedulers":0,"SourceBucketArn":"","StartupScriptS3ObjectVersion":"","StartupScriptS3Path":"","WebserverAccessMode":"","WeeklyMaintenanceWindowStart":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/environments/:Name',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "AirflowConfigurationOptions": {},\n "AirflowVersion": "",\n "DagS3Path": "",\n "EnvironmentClass": "",\n "ExecutionRoleArn": "",\n "LoggingConfiguration": {\n "DagProcessingLogs": "",\n "SchedulerLogs": "",\n "TaskLogs": "",\n "WebserverLogs": "",\n "WorkerLogs": ""\n },\n "MaxWorkers": 0,\n "MinWorkers": 0,\n "NetworkConfiguration": {\n "SecurityGroupIds": ""\n },\n "PluginsS3ObjectVersion": "",\n "PluginsS3Path": "",\n "RequirementsS3ObjectVersion": "",\n "RequirementsS3Path": "",\n "Schedulers": 0,\n "SourceBucketArn": "",\n "StartupScriptS3ObjectVersion": "",\n "StartupScriptS3Path": "",\n "WebserverAccessMode": "",\n "WeeklyMaintenanceWindowStart": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"AirflowConfigurationOptions\": {},\n \"AirflowVersion\": \"\",\n \"DagS3Path\": \"\",\n \"EnvironmentClass\": \"\",\n \"ExecutionRoleArn\": \"\",\n \"LoggingConfiguration\": {\n \"DagProcessingLogs\": \"\",\n \"SchedulerLogs\": \"\",\n \"TaskLogs\": \"\",\n \"WebserverLogs\": \"\",\n \"WorkerLogs\": \"\"\n },\n \"MaxWorkers\": 0,\n \"MinWorkers\": 0,\n \"NetworkConfiguration\": {\n \"SecurityGroupIds\": \"\"\n },\n \"PluginsS3ObjectVersion\": \"\",\n \"PluginsS3Path\": \"\",\n \"RequirementsS3ObjectVersion\": \"\",\n \"RequirementsS3Path\": \"\",\n \"Schedulers\": 0,\n \"SourceBucketArn\": \"\",\n \"StartupScriptS3ObjectVersion\": \"\",\n \"StartupScriptS3Path\": \"\",\n \"WebserverAccessMode\": \"\",\n \"WeeklyMaintenanceWindowStart\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/environments/:Name")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/environments/:Name',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
AirflowConfigurationOptions: {},
AirflowVersion: '',
DagS3Path: '',
EnvironmentClass: '',
ExecutionRoleArn: '',
LoggingConfiguration: {
DagProcessingLogs: '',
SchedulerLogs: '',
TaskLogs: '',
WebserverLogs: '',
WorkerLogs: ''
},
MaxWorkers: 0,
MinWorkers: 0,
NetworkConfiguration: {SecurityGroupIds: ''},
PluginsS3ObjectVersion: '',
PluginsS3Path: '',
RequirementsS3ObjectVersion: '',
RequirementsS3Path: '',
Schedulers: 0,
SourceBucketArn: '',
StartupScriptS3ObjectVersion: '',
StartupScriptS3Path: '',
WebserverAccessMode: '',
WeeklyMaintenanceWindowStart: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/environments/:Name',
headers: {'content-type': 'application/json'},
body: {
AirflowConfigurationOptions: {},
AirflowVersion: '',
DagS3Path: '',
EnvironmentClass: '',
ExecutionRoleArn: '',
LoggingConfiguration: {
DagProcessingLogs: '',
SchedulerLogs: '',
TaskLogs: '',
WebserverLogs: '',
WorkerLogs: ''
},
MaxWorkers: 0,
MinWorkers: 0,
NetworkConfiguration: {SecurityGroupIds: ''},
PluginsS3ObjectVersion: '',
PluginsS3Path: '',
RequirementsS3ObjectVersion: '',
RequirementsS3Path: '',
Schedulers: 0,
SourceBucketArn: '',
StartupScriptS3ObjectVersion: '',
StartupScriptS3Path: '',
WebserverAccessMode: '',
WeeklyMaintenanceWindowStart: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/environments/:Name');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
AirflowConfigurationOptions: {},
AirflowVersion: '',
DagS3Path: '',
EnvironmentClass: '',
ExecutionRoleArn: '',
LoggingConfiguration: {
DagProcessingLogs: '',
SchedulerLogs: '',
TaskLogs: '',
WebserverLogs: '',
WorkerLogs: ''
},
MaxWorkers: 0,
MinWorkers: 0,
NetworkConfiguration: {
SecurityGroupIds: ''
},
PluginsS3ObjectVersion: '',
PluginsS3Path: '',
RequirementsS3ObjectVersion: '',
RequirementsS3Path: '',
Schedulers: 0,
SourceBucketArn: '',
StartupScriptS3ObjectVersion: '',
StartupScriptS3Path: '',
WebserverAccessMode: '',
WeeklyMaintenanceWindowStart: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/environments/:Name',
headers: {'content-type': 'application/json'},
data: {
AirflowConfigurationOptions: {},
AirflowVersion: '',
DagS3Path: '',
EnvironmentClass: '',
ExecutionRoleArn: '',
LoggingConfiguration: {
DagProcessingLogs: '',
SchedulerLogs: '',
TaskLogs: '',
WebserverLogs: '',
WorkerLogs: ''
},
MaxWorkers: 0,
MinWorkers: 0,
NetworkConfiguration: {SecurityGroupIds: ''},
PluginsS3ObjectVersion: '',
PluginsS3Path: '',
RequirementsS3ObjectVersion: '',
RequirementsS3Path: '',
Schedulers: 0,
SourceBucketArn: '',
StartupScriptS3ObjectVersion: '',
StartupScriptS3Path: '',
WebserverAccessMode: '',
WeeklyMaintenanceWindowStart: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/environments/:Name';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"AirflowConfigurationOptions":{},"AirflowVersion":"","DagS3Path":"","EnvironmentClass":"","ExecutionRoleArn":"","LoggingConfiguration":{"DagProcessingLogs":"","SchedulerLogs":"","TaskLogs":"","WebserverLogs":"","WorkerLogs":""},"MaxWorkers":0,"MinWorkers":0,"NetworkConfiguration":{"SecurityGroupIds":""},"PluginsS3ObjectVersion":"","PluginsS3Path":"","RequirementsS3ObjectVersion":"","RequirementsS3Path":"","Schedulers":0,"SourceBucketArn":"","StartupScriptS3ObjectVersion":"","StartupScriptS3Path":"","WebserverAccessMode":"","WeeklyMaintenanceWindowStart":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"AirflowConfigurationOptions": @{ },
@"AirflowVersion": @"",
@"DagS3Path": @"",
@"EnvironmentClass": @"",
@"ExecutionRoleArn": @"",
@"LoggingConfiguration": @{ @"DagProcessingLogs": @"", @"SchedulerLogs": @"", @"TaskLogs": @"", @"WebserverLogs": @"", @"WorkerLogs": @"" },
@"MaxWorkers": @0,
@"MinWorkers": @0,
@"NetworkConfiguration": @{ @"SecurityGroupIds": @"" },
@"PluginsS3ObjectVersion": @"",
@"PluginsS3Path": @"",
@"RequirementsS3ObjectVersion": @"",
@"RequirementsS3Path": @"",
@"Schedulers": @0,
@"SourceBucketArn": @"",
@"StartupScriptS3ObjectVersion": @"",
@"StartupScriptS3Path": @"",
@"WebserverAccessMode": @"",
@"WeeklyMaintenanceWindowStart": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/environments/:Name"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/environments/:Name" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"AirflowConfigurationOptions\": {},\n \"AirflowVersion\": \"\",\n \"DagS3Path\": \"\",\n \"EnvironmentClass\": \"\",\n \"ExecutionRoleArn\": \"\",\n \"LoggingConfiguration\": {\n \"DagProcessingLogs\": \"\",\n \"SchedulerLogs\": \"\",\n \"TaskLogs\": \"\",\n \"WebserverLogs\": \"\",\n \"WorkerLogs\": \"\"\n },\n \"MaxWorkers\": 0,\n \"MinWorkers\": 0,\n \"NetworkConfiguration\": {\n \"SecurityGroupIds\": \"\"\n },\n \"PluginsS3ObjectVersion\": \"\",\n \"PluginsS3Path\": \"\",\n \"RequirementsS3ObjectVersion\": \"\",\n \"RequirementsS3Path\": \"\",\n \"Schedulers\": 0,\n \"SourceBucketArn\": \"\",\n \"StartupScriptS3ObjectVersion\": \"\",\n \"StartupScriptS3Path\": \"\",\n \"WebserverAccessMode\": \"\",\n \"WeeklyMaintenanceWindowStart\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/environments/:Name",
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([
'AirflowConfigurationOptions' => [
],
'AirflowVersion' => '',
'DagS3Path' => '',
'EnvironmentClass' => '',
'ExecutionRoleArn' => '',
'LoggingConfiguration' => [
'DagProcessingLogs' => '',
'SchedulerLogs' => '',
'TaskLogs' => '',
'WebserverLogs' => '',
'WorkerLogs' => ''
],
'MaxWorkers' => 0,
'MinWorkers' => 0,
'NetworkConfiguration' => [
'SecurityGroupIds' => ''
],
'PluginsS3ObjectVersion' => '',
'PluginsS3Path' => '',
'RequirementsS3ObjectVersion' => '',
'RequirementsS3Path' => '',
'Schedulers' => 0,
'SourceBucketArn' => '',
'StartupScriptS3ObjectVersion' => '',
'StartupScriptS3Path' => '',
'WebserverAccessMode' => '',
'WeeklyMaintenanceWindowStart' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/environments/:Name', [
'body' => '{
"AirflowConfigurationOptions": {},
"AirflowVersion": "",
"DagS3Path": "",
"EnvironmentClass": "",
"ExecutionRoleArn": "",
"LoggingConfiguration": {
"DagProcessingLogs": "",
"SchedulerLogs": "",
"TaskLogs": "",
"WebserverLogs": "",
"WorkerLogs": ""
},
"MaxWorkers": 0,
"MinWorkers": 0,
"NetworkConfiguration": {
"SecurityGroupIds": ""
},
"PluginsS3ObjectVersion": "",
"PluginsS3Path": "",
"RequirementsS3ObjectVersion": "",
"RequirementsS3Path": "",
"Schedulers": 0,
"SourceBucketArn": "",
"StartupScriptS3ObjectVersion": "",
"StartupScriptS3Path": "",
"WebserverAccessMode": "",
"WeeklyMaintenanceWindowStart": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/environments/:Name');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'AirflowConfigurationOptions' => [
],
'AirflowVersion' => '',
'DagS3Path' => '',
'EnvironmentClass' => '',
'ExecutionRoleArn' => '',
'LoggingConfiguration' => [
'DagProcessingLogs' => '',
'SchedulerLogs' => '',
'TaskLogs' => '',
'WebserverLogs' => '',
'WorkerLogs' => ''
],
'MaxWorkers' => 0,
'MinWorkers' => 0,
'NetworkConfiguration' => [
'SecurityGroupIds' => ''
],
'PluginsS3ObjectVersion' => '',
'PluginsS3Path' => '',
'RequirementsS3ObjectVersion' => '',
'RequirementsS3Path' => '',
'Schedulers' => 0,
'SourceBucketArn' => '',
'StartupScriptS3ObjectVersion' => '',
'StartupScriptS3Path' => '',
'WebserverAccessMode' => '',
'WeeklyMaintenanceWindowStart' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'AirflowConfigurationOptions' => [
],
'AirflowVersion' => '',
'DagS3Path' => '',
'EnvironmentClass' => '',
'ExecutionRoleArn' => '',
'LoggingConfiguration' => [
'DagProcessingLogs' => '',
'SchedulerLogs' => '',
'TaskLogs' => '',
'WebserverLogs' => '',
'WorkerLogs' => ''
],
'MaxWorkers' => 0,
'MinWorkers' => 0,
'NetworkConfiguration' => [
'SecurityGroupIds' => ''
],
'PluginsS3ObjectVersion' => '',
'PluginsS3Path' => '',
'RequirementsS3ObjectVersion' => '',
'RequirementsS3Path' => '',
'Schedulers' => 0,
'SourceBucketArn' => '',
'StartupScriptS3ObjectVersion' => '',
'StartupScriptS3Path' => '',
'WebserverAccessMode' => '',
'WeeklyMaintenanceWindowStart' => ''
]));
$request->setRequestUrl('{{baseUrl}}/environments/:Name');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/environments/:Name' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"AirflowConfigurationOptions": {},
"AirflowVersion": "",
"DagS3Path": "",
"EnvironmentClass": "",
"ExecutionRoleArn": "",
"LoggingConfiguration": {
"DagProcessingLogs": "",
"SchedulerLogs": "",
"TaskLogs": "",
"WebserverLogs": "",
"WorkerLogs": ""
},
"MaxWorkers": 0,
"MinWorkers": 0,
"NetworkConfiguration": {
"SecurityGroupIds": ""
},
"PluginsS3ObjectVersion": "",
"PluginsS3Path": "",
"RequirementsS3ObjectVersion": "",
"RequirementsS3Path": "",
"Schedulers": 0,
"SourceBucketArn": "",
"StartupScriptS3ObjectVersion": "",
"StartupScriptS3Path": "",
"WebserverAccessMode": "",
"WeeklyMaintenanceWindowStart": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/environments/:Name' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"AirflowConfigurationOptions": {},
"AirflowVersion": "",
"DagS3Path": "",
"EnvironmentClass": "",
"ExecutionRoleArn": "",
"LoggingConfiguration": {
"DagProcessingLogs": "",
"SchedulerLogs": "",
"TaskLogs": "",
"WebserverLogs": "",
"WorkerLogs": ""
},
"MaxWorkers": 0,
"MinWorkers": 0,
"NetworkConfiguration": {
"SecurityGroupIds": ""
},
"PluginsS3ObjectVersion": "",
"PluginsS3Path": "",
"RequirementsS3ObjectVersion": "",
"RequirementsS3Path": "",
"Schedulers": 0,
"SourceBucketArn": "",
"StartupScriptS3ObjectVersion": "",
"StartupScriptS3Path": "",
"WebserverAccessMode": "",
"WeeklyMaintenanceWindowStart": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"AirflowConfigurationOptions\": {},\n \"AirflowVersion\": \"\",\n \"DagS3Path\": \"\",\n \"EnvironmentClass\": \"\",\n \"ExecutionRoleArn\": \"\",\n \"LoggingConfiguration\": {\n \"DagProcessingLogs\": \"\",\n \"SchedulerLogs\": \"\",\n \"TaskLogs\": \"\",\n \"WebserverLogs\": \"\",\n \"WorkerLogs\": \"\"\n },\n \"MaxWorkers\": 0,\n \"MinWorkers\": 0,\n \"NetworkConfiguration\": {\n \"SecurityGroupIds\": \"\"\n },\n \"PluginsS3ObjectVersion\": \"\",\n \"PluginsS3Path\": \"\",\n \"RequirementsS3ObjectVersion\": \"\",\n \"RequirementsS3Path\": \"\",\n \"Schedulers\": 0,\n \"SourceBucketArn\": \"\",\n \"StartupScriptS3ObjectVersion\": \"\",\n \"StartupScriptS3Path\": \"\",\n \"WebserverAccessMode\": \"\",\n \"WeeklyMaintenanceWindowStart\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/environments/:Name", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/environments/:Name"
payload = {
"AirflowConfigurationOptions": {},
"AirflowVersion": "",
"DagS3Path": "",
"EnvironmentClass": "",
"ExecutionRoleArn": "",
"LoggingConfiguration": {
"DagProcessingLogs": "",
"SchedulerLogs": "",
"TaskLogs": "",
"WebserverLogs": "",
"WorkerLogs": ""
},
"MaxWorkers": 0,
"MinWorkers": 0,
"NetworkConfiguration": { "SecurityGroupIds": "" },
"PluginsS3ObjectVersion": "",
"PluginsS3Path": "",
"RequirementsS3ObjectVersion": "",
"RequirementsS3Path": "",
"Schedulers": 0,
"SourceBucketArn": "",
"StartupScriptS3ObjectVersion": "",
"StartupScriptS3Path": "",
"WebserverAccessMode": "",
"WeeklyMaintenanceWindowStart": ""
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/environments/:Name"
payload <- "{\n \"AirflowConfigurationOptions\": {},\n \"AirflowVersion\": \"\",\n \"DagS3Path\": \"\",\n \"EnvironmentClass\": \"\",\n \"ExecutionRoleArn\": \"\",\n \"LoggingConfiguration\": {\n \"DagProcessingLogs\": \"\",\n \"SchedulerLogs\": \"\",\n \"TaskLogs\": \"\",\n \"WebserverLogs\": \"\",\n \"WorkerLogs\": \"\"\n },\n \"MaxWorkers\": 0,\n \"MinWorkers\": 0,\n \"NetworkConfiguration\": {\n \"SecurityGroupIds\": \"\"\n },\n \"PluginsS3ObjectVersion\": \"\",\n \"PluginsS3Path\": \"\",\n \"RequirementsS3ObjectVersion\": \"\",\n \"RequirementsS3Path\": \"\",\n \"Schedulers\": 0,\n \"SourceBucketArn\": \"\",\n \"StartupScriptS3ObjectVersion\": \"\",\n \"StartupScriptS3Path\": \"\",\n \"WebserverAccessMode\": \"\",\n \"WeeklyMaintenanceWindowStart\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/environments/:Name")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"AirflowConfigurationOptions\": {},\n \"AirflowVersion\": \"\",\n \"DagS3Path\": \"\",\n \"EnvironmentClass\": \"\",\n \"ExecutionRoleArn\": \"\",\n \"LoggingConfiguration\": {\n \"DagProcessingLogs\": \"\",\n \"SchedulerLogs\": \"\",\n \"TaskLogs\": \"\",\n \"WebserverLogs\": \"\",\n \"WorkerLogs\": \"\"\n },\n \"MaxWorkers\": 0,\n \"MinWorkers\": 0,\n \"NetworkConfiguration\": {\n \"SecurityGroupIds\": \"\"\n },\n \"PluginsS3ObjectVersion\": \"\",\n \"PluginsS3Path\": \"\",\n \"RequirementsS3ObjectVersion\": \"\",\n \"RequirementsS3Path\": \"\",\n \"Schedulers\": 0,\n \"SourceBucketArn\": \"\",\n \"StartupScriptS3ObjectVersion\": \"\",\n \"StartupScriptS3Path\": \"\",\n \"WebserverAccessMode\": \"\",\n \"WeeklyMaintenanceWindowStart\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/environments/:Name') do |req|
req.body = "{\n \"AirflowConfigurationOptions\": {},\n \"AirflowVersion\": \"\",\n \"DagS3Path\": \"\",\n \"EnvironmentClass\": \"\",\n \"ExecutionRoleArn\": \"\",\n \"LoggingConfiguration\": {\n \"DagProcessingLogs\": \"\",\n \"SchedulerLogs\": \"\",\n \"TaskLogs\": \"\",\n \"WebserverLogs\": \"\",\n \"WorkerLogs\": \"\"\n },\n \"MaxWorkers\": 0,\n \"MinWorkers\": 0,\n \"NetworkConfiguration\": {\n \"SecurityGroupIds\": \"\"\n },\n \"PluginsS3ObjectVersion\": \"\",\n \"PluginsS3Path\": \"\",\n \"RequirementsS3ObjectVersion\": \"\",\n \"RequirementsS3Path\": \"\",\n \"Schedulers\": 0,\n \"SourceBucketArn\": \"\",\n \"StartupScriptS3ObjectVersion\": \"\",\n \"StartupScriptS3Path\": \"\",\n \"WebserverAccessMode\": \"\",\n \"WeeklyMaintenanceWindowStart\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/environments/:Name";
let payload = json!({
"AirflowConfigurationOptions": json!({}),
"AirflowVersion": "",
"DagS3Path": "",
"EnvironmentClass": "",
"ExecutionRoleArn": "",
"LoggingConfiguration": json!({
"DagProcessingLogs": "",
"SchedulerLogs": "",
"TaskLogs": "",
"WebserverLogs": "",
"WorkerLogs": ""
}),
"MaxWorkers": 0,
"MinWorkers": 0,
"NetworkConfiguration": json!({"SecurityGroupIds": ""}),
"PluginsS3ObjectVersion": "",
"PluginsS3Path": "",
"RequirementsS3ObjectVersion": "",
"RequirementsS3Path": "",
"Schedulers": 0,
"SourceBucketArn": "",
"StartupScriptS3ObjectVersion": "",
"StartupScriptS3Path": "",
"WebserverAccessMode": "",
"WeeklyMaintenanceWindowStart": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/environments/:Name \
--header 'content-type: application/json' \
--data '{
"AirflowConfigurationOptions": {},
"AirflowVersion": "",
"DagS3Path": "",
"EnvironmentClass": "",
"ExecutionRoleArn": "",
"LoggingConfiguration": {
"DagProcessingLogs": "",
"SchedulerLogs": "",
"TaskLogs": "",
"WebserverLogs": "",
"WorkerLogs": ""
},
"MaxWorkers": 0,
"MinWorkers": 0,
"NetworkConfiguration": {
"SecurityGroupIds": ""
},
"PluginsS3ObjectVersion": "",
"PluginsS3Path": "",
"RequirementsS3ObjectVersion": "",
"RequirementsS3Path": "",
"Schedulers": 0,
"SourceBucketArn": "",
"StartupScriptS3ObjectVersion": "",
"StartupScriptS3Path": "",
"WebserverAccessMode": "",
"WeeklyMaintenanceWindowStart": ""
}'
echo '{
"AirflowConfigurationOptions": {},
"AirflowVersion": "",
"DagS3Path": "",
"EnvironmentClass": "",
"ExecutionRoleArn": "",
"LoggingConfiguration": {
"DagProcessingLogs": "",
"SchedulerLogs": "",
"TaskLogs": "",
"WebserverLogs": "",
"WorkerLogs": ""
},
"MaxWorkers": 0,
"MinWorkers": 0,
"NetworkConfiguration": {
"SecurityGroupIds": ""
},
"PluginsS3ObjectVersion": "",
"PluginsS3Path": "",
"RequirementsS3ObjectVersion": "",
"RequirementsS3Path": "",
"Schedulers": 0,
"SourceBucketArn": "",
"StartupScriptS3ObjectVersion": "",
"StartupScriptS3Path": "",
"WebserverAccessMode": "",
"WeeklyMaintenanceWindowStart": ""
}' | \
http PATCH {{baseUrl}}/environments/:Name \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "AirflowConfigurationOptions": {},\n "AirflowVersion": "",\n "DagS3Path": "",\n "EnvironmentClass": "",\n "ExecutionRoleArn": "",\n "LoggingConfiguration": {\n "DagProcessingLogs": "",\n "SchedulerLogs": "",\n "TaskLogs": "",\n "WebserverLogs": "",\n "WorkerLogs": ""\n },\n "MaxWorkers": 0,\n "MinWorkers": 0,\n "NetworkConfiguration": {\n "SecurityGroupIds": ""\n },\n "PluginsS3ObjectVersion": "",\n "PluginsS3Path": "",\n "RequirementsS3ObjectVersion": "",\n "RequirementsS3Path": "",\n "Schedulers": 0,\n "SourceBucketArn": "",\n "StartupScriptS3ObjectVersion": "",\n "StartupScriptS3Path": "",\n "WebserverAccessMode": "",\n "WeeklyMaintenanceWindowStart": ""\n}' \
--output-document \
- {{baseUrl}}/environments/:Name
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"AirflowConfigurationOptions": [],
"AirflowVersion": "",
"DagS3Path": "",
"EnvironmentClass": "",
"ExecutionRoleArn": "",
"LoggingConfiguration": [
"DagProcessingLogs": "",
"SchedulerLogs": "",
"TaskLogs": "",
"WebserverLogs": "",
"WorkerLogs": ""
],
"MaxWorkers": 0,
"MinWorkers": 0,
"NetworkConfiguration": ["SecurityGroupIds": ""],
"PluginsS3ObjectVersion": "",
"PluginsS3Path": "",
"RequirementsS3ObjectVersion": "",
"RequirementsS3Path": "",
"Schedulers": 0,
"SourceBucketArn": "",
"StartupScriptS3ObjectVersion": "",
"StartupScriptS3Path": "",
"WebserverAccessMode": "",
"WeeklyMaintenanceWindowStart": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/environments/:Name")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()