AWS Budgets
AWS Budgetsv2016-10-20
Use the Amazon Web Services Budgets API to plan your service usage, service costs, and instance reservations. This API reference provides descriptions, syntax, and usage examples for each of the actions and data types for the Amazon Web Services Budgets feature. Budgets provide you with a way to see the following information: How close your plan is to your budgeted amount or to the free tier limits Your usage-to-date, including how much you've used of your Reserved Instances (RIs) Your current estimated charges from Amazon Web Services, and how much your predicted usage will accrue in…
- Endpoints
- 23 (23 POST)
- Base URL
https://budgets.amazonaws.com- Authentication
- API key
- Spec format
- OpenAPI 3.0.0
- API version
- 2016-10-20
- Provider
- amazonaws.com
- License
- Apache 2.0 License
- Categories
- Cloud & Infrastructure
- Last updated
Use this API in Bruno:
- Download the Bruno collection above and unzip it.
- In Bruno, choose Open Collection and select the unzipped folder.
- Set the
baseUrlvariable (for examplehttps://budgets.amazonaws.com) and your API key credentials, then send requests.
POST
CreateBudget
{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudget
HEADERS
X-Amz-Target
BODY json
{
"AccountId": "",
"Budget": "",
"NotificationsWithSubscribers": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudget");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"AccountId\": \"\",\n \"Budget\": \"\",\n \"NotificationsWithSubscribers\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudget" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:AccountId ""
:Budget ""
:NotificationsWithSubscribers ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudget"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"AccountId\": \"\",\n \"Budget\": \"\",\n \"NotificationsWithSubscribers\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudget"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"AccountId\": \"\",\n \"Budget\": \"\",\n \"NotificationsWithSubscribers\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudget");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"AccountId\": \"\",\n \"Budget\": \"\",\n \"NotificationsWithSubscribers\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudget"
payload := strings.NewReader("{\n \"AccountId\": \"\",\n \"Budget\": \"\",\n \"NotificationsWithSubscribers\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
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/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 75
{
"AccountId": "",
"Budget": "",
"NotificationsWithSubscribers": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudget")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"AccountId\": \"\",\n \"Budget\": \"\",\n \"NotificationsWithSubscribers\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudget"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"AccountId\": \"\",\n \"Budget\": \"\",\n \"NotificationsWithSubscribers\": \"\"\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 \"AccountId\": \"\",\n \"Budget\": \"\",\n \"NotificationsWithSubscribers\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudget")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudget")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"AccountId\": \"\",\n \"Budget\": \"\",\n \"NotificationsWithSubscribers\": \"\"\n}")
.asString();
const data = JSON.stringify({
AccountId: '',
Budget: '',
NotificationsWithSubscribers: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudget');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudget',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AccountId: '', Budget: '', NotificationsWithSubscribers: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudget';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","Budget":"","NotificationsWithSubscribers":""}'
};
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}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudget',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "AccountId": "",\n "Budget": "",\n "NotificationsWithSubscribers": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"AccountId\": \"\",\n \"Budget\": \"\",\n \"NotificationsWithSubscribers\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudget")
.post(body)
.addHeader("x-amz-target", "")
.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/',
headers: {
'x-amz-target': '',
'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({AccountId: '', Budget: '', NotificationsWithSubscribers: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudget',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {AccountId: '', Budget: '', NotificationsWithSubscribers: ''},
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}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudget');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
AccountId: '',
Budget: '',
NotificationsWithSubscribers: ''
});
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}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudget',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AccountId: '', Budget: '', NotificationsWithSubscribers: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudget';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","Budget":"","NotificationsWithSubscribers":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"AccountId": @"",
@"Budget": @"",
@"NotificationsWithSubscribers": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudget"]
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}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudget" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"AccountId\": \"\",\n \"Budget\": \"\",\n \"NotificationsWithSubscribers\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudget",
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([
'AccountId' => '',
'Budget' => '',
'NotificationsWithSubscribers' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudget', [
'body' => '{
"AccountId": "",
"Budget": "",
"NotificationsWithSubscribers": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudget');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'AccountId' => '',
'Budget' => '',
'NotificationsWithSubscribers' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'AccountId' => '',
'Budget' => '',
'NotificationsWithSubscribers' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudget');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudget' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"Budget": "",
"NotificationsWithSubscribers": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudget' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"Budget": "",
"NotificationsWithSubscribers": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"AccountId\": \"\",\n \"Budget\": \"\",\n \"NotificationsWithSubscribers\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudget"
payload = {
"AccountId": "",
"Budget": "",
"NotificationsWithSubscribers": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudget"
payload <- "{\n \"AccountId\": \"\",\n \"Budget\": \"\",\n \"NotificationsWithSubscribers\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudget")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"AccountId\": \"\",\n \"Budget\": \"\",\n \"NotificationsWithSubscribers\": \"\"\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/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"AccountId\": \"\",\n \"Budget\": \"\",\n \"NotificationsWithSubscribers\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudget";
let payload = json!({
"AccountId": "",
"Budget": "",
"NotificationsWithSubscribers": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
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}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudget' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"AccountId": "",
"Budget": "",
"NotificationsWithSubscribers": ""
}'
echo '{
"AccountId": "",
"Budget": "",
"NotificationsWithSubscribers": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudget' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "AccountId": "",\n "Budget": "",\n "NotificationsWithSubscribers": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudget'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"AccountId": "",
"Budget": "",
"NotificationsWithSubscribers": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudget")! 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
CreateBudgetAction
{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudgetAction
HEADERS
X-Amz-Target
BODY json
{
"AccountId": "",
"BudgetName": "",
"NotificationType": "",
"ActionType": "",
"ActionThreshold": {
"ActionThresholdValue": "",
"ActionThresholdType": ""
},
"Definition": {
"IamActionDefinition": "",
"ScpActionDefinition": "",
"SsmActionDefinition": ""
},
"ExecutionRoleArn": "",
"ApprovalModel": "",
"Subscribers": [
{
"SubscriptionType": "",
"Address": ""
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudgetAction");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"NotificationType\": \"\",\n \"ActionType\": \"\",\n \"ActionThreshold\": {\n \"ActionThresholdValue\": \"\",\n \"ActionThresholdType\": \"\"\n },\n \"Definition\": {\n \"IamActionDefinition\": \"\",\n \"ScpActionDefinition\": \"\",\n \"SsmActionDefinition\": \"\"\n },\n \"ExecutionRoleArn\": \"\",\n \"ApprovalModel\": \"\",\n \"Subscribers\": [\n {\n \"SubscriptionType\": \"\",\n \"Address\": \"\"\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudgetAction" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:AccountId ""
:BudgetName ""
:NotificationType ""
:ActionType ""
:ActionThreshold {:ActionThresholdValue ""
:ActionThresholdType ""}
:Definition {:IamActionDefinition ""
:ScpActionDefinition ""
:SsmActionDefinition ""}
:ExecutionRoleArn ""
:ApprovalModel ""
:Subscribers [{:SubscriptionType ""
:Address ""}]}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudgetAction"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"NotificationType\": \"\",\n \"ActionType\": \"\",\n \"ActionThreshold\": {\n \"ActionThresholdValue\": \"\",\n \"ActionThresholdType\": \"\"\n },\n \"Definition\": {\n \"IamActionDefinition\": \"\",\n \"ScpActionDefinition\": \"\",\n \"SsmActionDefinition\": \"\"\n },\n \"ExecutionRoleArn\": \"\",\n \"ApprovalModel\": \"\",\n \"Subscribers\": [\n {\n \"SubscriptionType\": \"\",\n \"Address\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudgetAction"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"NotificationType\": \"\",\n \"ActionType\": \"\",\n \"ActionThreshold\": {\n \"ActionThresholdValue\": \"\",\n \"ActionThresholdType\": \"\"\n },\n \"Definition\": {\n \"IamActionDefinition\": \"\",\n \"ScpActionDefinition\": \"\",\n \"SsmActionDefinition\": \"\"\n },\n \"ExecutionRoleArn\": \"\",\n \"ApprovalModel\": \"\",\n \"Subscribers\": [\n {\n \"SubscriptionType\": \"\",\n \"Address\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudgetAction");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"NotificationType\": \"\",\n \"ActionType\": \"\",\n \"ActionThreshold\": {\n \"ActionThresholdValue\": \"\",\n \"ActionThresholdType\": \"\"\n },\n \"Definition\": {\n \"IamActionDefinition\": \"\",\n \"ScpActionDefinition\": \"\",\n \"SsmActionDefinition\": \"\"\n },\n \"ExecutionRoleArn\": \"\",\n \"ApprovalModel\": \"\",\n \"Subscribers\": [\n {\n \"SubscriptionType\": \"\",\n \"Address\": \"\"\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudgetAction"
payload := strings.NewReader("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"NotificationType\": \"\",\n \"ActionType\": \"\",\n \"ActionThreshold\": {\n \"ActionThresholdValue\": \"\",\n \"ActionThresholdType\": \"\"\n },\n \"Definition\": {\n \"IamActionDefinition\": \"\",\n \"ScpActionDefinition\": \"\",\n \"SsmActionDefinition\": \"\"\n },\n \"ExecutionRoleArn\": \"\",\n \"ApprovalModel\": \"\",\n \"Subscribers\": [\n {\n \"SubscriptionType\": \"\",\n \"Address\": \"\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
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/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 427
{
"AccountId": "",
"BudgetName": "",
"NotificationType": "",
"ActionType": "",
"ActionThreshold": {
"ActionThresholdValue": "",
"ActionThresholdType": ""
},
"Definition": {
"IamActionDefinition": "",
"ScpActionDefinition": "",
"SsmActionDefinition": ""
},
"ExecutionRoleArn": "",
"ApprovalModel": "",
"Subscribers": [
{
"SubscriptionType": "",
"Address": ""
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudgetAction")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"NotificationType\": \"\",\n \"ActionType\": \"\",\n \"ActionThreshold\": {\n \"ActionThresholdValue\": \"\",\n \"ActionThresholdType\": \"\"\n },\n \"Definition\": {\n \"IamActionDefinition\": \"\",\n \"ScpActionDefinition\": \"\",\n \"SsmActionDefinition\": \"\"\n },\n \"ExecutionRoleArn\": \"\",\n \"ApprovalModel\": \"\",\n \"Subscribers\": [\n {\n \"SubscriptionType\": \"\",\n \"Address\": \"\"\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudgetAction"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"NotificationType\": \"\",\n \"ActionType\": \"\",\n \"ActionThreshold\": {\n \"ActionThresholdValue\": \"\",\n \"ActionThresholdType\": \"\"\n },\n \"Definition\": {\n \"IamActionDefinition\": \"\",\n \"ScpActionDefinition\": \"\",\n \"SsmActionDefinition\": \"\"\n },\n \"ExecutionRoleArn\": \"\",\n \"ApprovalModel\": \"\",\n \"Subscribers\": [\n {\n \"SubscriptionType\": \"\",\n \"Address\": \"\"\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 \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"NotificationType\": \"\",\n \"ActionType\": \"\",\n \"ActionThreshold\": {\n \"ActionThresholdValue\": \"\",\n \"ActionThresholdType\": \"\"\n },\n \"Definition\": {\n \"IamActionDefinition\": \"\",\n \"ScpActionDefinition\": \"\",\n \"SsmActionDefinition\": \"\"\n },\n \"ExecutionRoleArn\": \"\",\n \"ApprovalModel\": \"\",\n \"Subscribers\": [\n {\n \"SubscriptionType\": \"\",\n \"Address\": \"\"\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudgetAction")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudgetAction")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"NotificationType\": \"\",\n \"ActionType\": \"\",\n \"ActionThreshold\": {\n \"ActionThresholdValue\": \"\",\n \"ActionThresholdType\": \"\"\n },\n \"Definition\": {\n \"IamActionDefinition\": \"\",\n \"ScpActionDefinition\": \"\",\n \"SsmActionDefinition\": \"\"\n },\n \"ExecutionRoleArn\": \"\",\n \"ApprovalModel\": \"\",\n \"Subscribers\": [\n {\n \"SubscriptionType\": \"\",\n \"Address\": \"\"\n }\n ]\n}")
.asString();
const data = JSON.stringify({
AccountId: '',
BudgetName: '',
NotificationType: '',
ActionType: '',
ActionThreshold: {
ActionThresholdValue: '',
ActionThresholdType: ''
},
Definition: {
IamActionDefinition: '',
ScpActionDefinition: '',
SsmActionDefinition: ''
},
ExecutionRoleArn: '',
ApprovalModel: '',
Subscribers: [
{
SubscriptionType: '',
Address: ''
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudgetAction');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudgetAction',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
AccountId: '',
BudgetName: '',
NotificationType: '',
ActionType: '',
ActionThreshold: {ActionThresholdValue: '', ActionThresholdType: ''},
Definition: {IamActionDefinition: '', ScpActionDefinition: '', SsmActionDefinition: ''},
ExecutionRoleArn: '',
ApprovalModel: '',
Subscribers: [{SubscriptionType: '', Address: ''}]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudgetAction';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","BudgetName":"","NotificationType":"","ActionType":"","ActionThreshold":{"ActionThresholdValue":"","ActionThresholdType":""},"Definition":{"IamActionDefinition":"","ScpActionDefinition":"","SsmActionDefinition":""},"ExecutionRoleArn":"","ApprovalModel":"","Subscribers":[{"SubscriptionType":"","Address":""}]}'
};
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}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudgetAction',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "AccountId": "",\n "BudgetName": "",\n "NotificationType": "",\n "ActionType": "",\n "ActionThreshold": {\n "ActionThresholdValue": "",\n "ActionThresholdType": ""\n },\n "Definition": {\n "IamActionDefinition": "",\n "ScpActionDefinition": "",\n "SsmActionDefinition": ""\n },\n "ExecutionRoleArn": "",\n "ApprovalModel": "",\n "Subscribers": [\n {\n "SubscriptionType": "",\n "Address": ""\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 \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"NotificationType\": \"\",\n \"ActionType\": \"\",\n \"ActionThreshold\": {\n \"ActionThresholdValue\": \"\",\n \"ActionThresholdType\": \"\"\n },\n \"Definition\": {\n \"IamActionDefinition\": \"\",\n \"ScpActionDefinition\": \"\",\n \"SsmActionDefinition\": \"\"\n },\n \"ExecutionRoleArn\": \"\",\n \"ApprovalModel\": \"\",\n \"Subscribers\": [\n {\n \"SubscriptionType\": \"\",\n \"Address\": \"\"\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudgetAction")
.post(body)
.addHeader("x-amz-target", "")
.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/',
headers: {
'x-amz-target': '',
'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({
AccountId: '',
BudgetName: '',
NotificationType: '',
ActionType: '',
ActionThreshold: {ActionThresholdValue: '', ActionThresholdType: ''},
Definition: {IamActionDefinition: '', ScpActionDefinition: '', SsmActionDefinition: ''},
ExecutionRoleArn: '',
ApprovalModel: '',
Subscribers: [{SubscriptionType: '', Address: ''}]
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudgetAction',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {
AccountId: '',
BudgetName: '',
NotificationType: '',
ActionType: '',
ActionThreshold: {ActionThresholdValue: '', ActionThresholdType: ''},
Definition: {IamActionDefinition: '', ScpActionDefinition: '', SsmActionDefinition: ''},
ExecutionRoleArn: '',
ApprovalModel: '',
Subscribers: [{SubscriptionType: '', Address: ''}]
},
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}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudgetAction');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
AccountId: '',
BudgetName: '',
NotificationType: '',
ActionType: '',
ActionThreshold: {
ActionThresholdValue: '',
ActionThresholdType: ''
},
Definition: {
IamActionDefinition: '',
ScpActionDefinition: '',
SsmActionDefinition: ''
},
ExecutionRoleArn: '',
ApprovalModel: '',
Subscribers: [
{
SubscriptionType: '',
Address: ''
}
]
});
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}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudgetAction',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
AccountId: '',
BudgetName: '',
NotificationType: '',
ActionType: '',
ActionThreshold: {ActionThresholdValue: '', ActionThresholdType: ''},
Definition: {IamActionDefinition: '', ScpActionDefinition: '', SsmActionDefinition: ''},
ExecutionRoleArn: '',
ApprovalModel: '',
Subscribers: [{SubscriptionType: '', Address: ''}]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudgetAction';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","BudgetName":"","NotificationType":"","ActionType":"","ActionThreshold":{"ActionThresholdValue":"","ActionThresholdType":""},"Definition":{"IamActionDefinition":"","ScpActionDefinition":"","SsmActionDefinition":""},"ExecutionRoleArn":"","ApprovalModel":"","Subscribers":[{"SubscriptionType":"","Address":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"AccountId": @"",
@"BudgetName": @"",
@"NotificationType": @"",
@"ActionType": @"",
@"ActionThreshold": @{ @"ActionThresholdValue": @"", @"ActionThresholdType": @"" },
@"Definition": @{ @"IamActionDefinition": @"", @"ScpActionDefinition": @"", @"SsmActionDefinition": @"" },
@"ExecutionRoleArn": @"",
@"ApprovalModel": @"",
@"Subscribers": @[ @{ @"SubscriptionType": @"", @"Address": @"" } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudgetAction"]
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}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudgetAction" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"NotificationType\": \"\",\n \"ActionType\": \"\",\n \"ActionThreshold\": {\n \"ActionThresholdValue\": \"\",\n \"ActionThresholdType\": \"\"\n },\n \"Definition\": {\n \"IamActionDefinition\": \"\",\n \"ScpActionDefinition\": \"\",\n \"SsmActionDefinition\": \"\"\n },\n \"ExecutionRoleArn\": \"\",\n \"ApprovalModel\": \"\",\n \"Subscribers\": [\n {\n \"SubscriptionType\": \"\",\n \"Address\": \"\"\n }\n ]\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudgetAction",
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([
'AccountId' => '',
'BudgetName' => '',
'NotificationType' => '',
'ActionType' => '',
'ActionThreshold' => [
'ActionThresholdValue' => '',
'ActionThresholdType' => ''
],
'Definition' => [
'IamActionDefinition' => '',
'ScpActionDefinition' => '',
'SsmActionDefinition' => ''
],
'ExecutionRoleArn' => '',
'ApprovalModel' => '',
'Subscribers' => [
[
'SubscriptionType' => '',
'Address' => ''
]
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudgetAction', [
'body' => '{
"AccountId": "",
"BudgetName": "",
"NotificationType": "",
"ActionType": "",
"ActionThreshold": {
"ActionThresholdValue": "",
"ActionThresholdType": ""
},
"Definition": {
"IamActionDefinition": "",
"ScpActionDefinition": "",
"SsmActionDefinition": ""
},
"ExecutionRoleArn": "",
"ApprovalModel": "",
"Subscribers": [
{
"SubscriptionType": "",
"Address": ""
}
]
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudgetAction');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'AccountId' => '',
'BudgetName' => '',
'NotificationType' => '',
'ActionType' => '',
'ActionThreshold' => [
'ActionThresholdValue' => '',
'ActionThresholdType' => ''
],
'Definition' => [
'IamActionDefinition' => '',
'ScpActionDefinition' => '',
'SsmActionDefinition' => ''
],
'ExecutionRoleArn' => '',
'ApprovalModel' => '',
'Subscribers' => [
[
'SubscriptionType' => '',
'Address' => ''
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'AccountId' => '',
'BudgetName' => '',
'NotificationType' => '',
'ActionType' => '',
'ActionThreshold' => [
'ActionThresholdValue' => '',
'ActionThresholdType' => ''
],
'Definition' => [
'IamActionDefinition' => '',
'ScpActionDefinition' => '',
'SsmActionDefinition' => ''
],
'ExecutionRoleArn' => '',
'ApprovalModel' => '',
'Subscribers' => [
[
'SubscriptionType' => '',
'Address' => ''
]
]
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudgetAction');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudgetAction' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"BudgetName": "",
"NotificationType": "",
"ActionType": "",
"ActionThreshold": {
"ActionThresholdValue": "",
"ActionThresholdType": ""
},
"Definition": {
"IamActionDefinition": "",
"ScpActionDefinition": "",
"SsmActionDefinition": ""
},
"ExecutionRoleArn": "",
"ApprovalModel": "",
"Subscribers": [
{
"SubscriptionType": "",
"Address": ""
}
]
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudgetAction' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"BudgetName": "",
"NotificationType": "",
"ActionType": "",
"ActionThreshold": {
"ActionThresholdValue": "",
"ActionThresholdType": ""
},
"Definition": {
"IamActionDefinition": "",
"ScpActionDefinition": "",
"SsmActionDefinition": ""
},
"ExecutionRoleArn": "",
"ApprovalModel": "",
"Subscribers": [
{
"SubscriptionType": "",
"Address": ""
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"NotificationType\": \"\",\n \"ActionType\": \"\",\n \"ActionThreshold\": {\n \"ActionThresholdValue\": \"\",\n \"ActionThresholdType\": \"\"\n },\n \"Definition\": {\n \"IamActionDefinition\": \"\",\n \"ScpActionDefinition\": \"\",\n \"SsmActionDefinition\": \"\"\n },\n \"ExecutionRoleArn\": \"\",\n \"ApprovalModel\": \"\",\n \"Subscribers\": [\n {\n \"SubscriptionType\": \"\",\n \"Address\": \"\"\n }\n ]\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudgetAction"
payload = {
"AccountId": "",
"BudgetName": "",
"NotificationType": "",
"ActionType": "",
"ActionThreshold": {
"ActionThresholdValue": "",
"ActionThresholdType": ""
},
"Definition": {
"IamActionDefinition": "",
"ScpActionDefinition": "",
"SsmActionDefinition": ""
},
"ExecutionRoleArn": "",
"ApprovalModel": "",
"Subscribers": [
{
"SubscriptionType": "",
"Address": ""
}
]
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudgetAction"
payload <- "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"NotificationType\": \"\",\n \"ActionType\": \"\",\n \"ActionThreshold\": {\n \"ActionThresholdValue\": \"\",\n \"ActionThresholdType\": \"\"\n },\n \"Definition\": {\n \"IamActionDefinition\": \"\",\n \"ScpActionDefinition\": \"\",\n \"SsmActionDefinition\": \"\"\n },\n \"ExecutionRoleArn\": \"\",\n \"ApprovalModel\": \"\",\n \"Subscribers\": [\n {\n \"SubscriptionType\": \"\",\n \"Address\": \"\"\n }\n ]\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudgetAction")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"NotificationType\": \"\",\n \"ActionType\": \"\",\n \"ActionThreshold\": {\n \"ActionThresholdValue\": \"\",\n \"ActionThresholdType\": \"\"\n },\n \"Definition\": {\n \"IamActionDefinition\": \"\",\n \"ScpActionDefinition\": \"\",\n \"SsmActionDefinition\": \"\"\n },\n \"ExecutionRoleArn\": \"\",\n \"ApprovalModel\": \"\",\n \"Subscribers\": [\n {\n \"SubscriptionType\": \"\",\n \"Address\": \"\"\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/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"NotificationType\": \"\",\n \"ActionType\": \"\",\n \"ActionThreshold\": {\n \"ActionThresholdValue\": \"\",\n \"ActionThresholdType\": \"\"\n },\n \"Definition\": {\n \"IamActionDefinition\": \"\",\n \"ScpActionDefinition\": \"\",\n \"SsmActionDefinition\": \"\"\n },\n \"ExecutionRoleArn\": \"\",\n \"ApprovalModel\": \"\",\n \"Subscribers\": [\n {\n \"SubscriptionType\": \"\",\n \"Address\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudgetAction";
let payload = json!({
"AccountId": "",
"BudgetName": "",
"NotificationType": "",
"ActionType": "",
"ActionThreshold": json!({
"ActionThresholdValue": "",
"ActionThresholdType": ""
}),
"Definition": json!({
"IamActionDefinition": "",
"ScpActionDefinition": "",
"SsmActionDefinition": ""
}),
"ExecutionRoleArn": "",
"ApprovalModel": "",
"Subscribers": (
json!({
"SubscriptionType": "",
"Address": ""
})
)
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
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}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudgetAction' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"AccountId": "",
"BudgetName": "",
"NotificationType": "",
"ActionType": "",
"ActionThreshold": {
"ActionThresholdValue": "",
"ActionThresholdType": ""
},
"Definition": {
"IamActionDefinition": "",
"ScpActionDefinition": "",
"SsmActionDefinition": ""
},
"ExecutionRoleArn": "",
"ApprovalModel": "",
"Subscribers": [
{
"SubscriptionType": "",
"Address": ""
}
]
}'
echo '{
"AccountId": "",
"BudgetName": "",
"NotificationType": "",
"ActionType": "",
"ActionThreshold": {
"ActionThresholdValue": "",
"ActionThresholdType": ""
},
"Definition": {
"IamActionDefinition": "",
"ScpActionDefinition": "",
"SsmActionDefinition": ""
},
"ExecutionRoleArn": "",
"ApprovalModel": "",
"Subscribers": [
{
"SubscriptionType": "",
"Address": ""
}
]
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudgetAction' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "AccountId": "",\n "BudgetName": "",\n "NotificationType": "",\n "ActionType": "",\n "ActionThreshold": {\n "ActionThresholdValue": "",\n "ActionThresholdType": ""\n },\n "Definition": {\n "IamActionDefinition": "",\n "ScpActionDefinition": "",\n "SsmActionDefinition": ""\n },\n "ExecutionRoleArn": "",\n "ApprovalModel": "",\n "Subscribers": [\n {\n "SubscriptionType": "",\n "Address": ""\n }\n ]\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudgetAction'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"AccountId": "",
"BudgetName": "",
"NotificationType": "",
"ActionType": "",
"ActionThreshold": [
"ActionThresholdValue": "",
"ActionThresholdType": ""
],
"Definition": [
"IamActionDefinition": "",
"ScpActionDefinition": "",
"SsmActionDefinition": ""
],
"ExecutionRoleArn": "",
"ApprovalModel": "",
"Subscribers": [
[
"SubscriptionType": "",
"Address": ""
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateBudgetAction")! 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
CreateNotification
{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateNotification
HEADERS
X-Amz-Target
BODY json
{
"AccountId": "",
"BudgetName": "",
"Notification": "",
"Subscribers": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateNotification");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscribers\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateNotification" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:AccountId ""
:BudgetName ""
:Notification ""
:Subscribers ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateNotification"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscribers\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateNotification"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscribers\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateNotification");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscribers\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateNotification"
payload := strings.NewReader("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscribers\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
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/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 84
{
"AccountId": "",
"BudgetName": "",
"Notification": "",
"Subscribers": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateNotification")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscribers\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateNotification"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscribers\": \"\"\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 \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscribers\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateNotification")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateNotification")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscribers\": \"\"\n}")
.asString();
const data = JSON.stringify({
AccountId: '',
BudgetName: '',
Notification: '',
Subscribers: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateNotification');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateNotification',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AccountId: '', BudgetName: '', Notification: '', Subscribers: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateNotification';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","BudgetName":"","Notification":"","Subscribers":""}'
};
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}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateNotification',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "AccountId": "",\n "BudgetName": "",\n "Notification": "",\n "Subscribers": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscribers\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateNotification")
.post(body)
.addHeader("x-amz-target", "")
.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/',
headers: {
'x-amz-target': '',
'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({AccountId: '', BudgetName: '', Notification: '', Subscribers: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateNotification',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {AccountId: '', BudgetName: '', Notification: '', Subscribers: ''},
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}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateNotification');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
AccountId: '',
BudgetName: '',
Notification: '',
Subscribers: ''
});
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}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateNotification',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AccountId: '', BudgetName: '', Notification: '', Subscribers: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateNotification';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","BudgetName":"","Notification":"","Subscribers":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"AccountId": @"",
@"BudgetName": @"",
@"Notification": @"",
@"Subscribers": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateNotification"]
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}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateNotification" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscribers\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateNotification",
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([
'AccountId' => '',
'BudgetName' => '',
'Notification' => '',
'Subscribers' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateNotification', [
'body' => '{
"AccountId": "",
"BudgetName": "",
"Notification": "",
"Subscribers": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateNotification');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'AccountId' => '',
'BudgetName' => '',
'Notification' => '',
'Subscribers' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'AccountId' => '',
'BudgetName' => '',
'Notification' => '',
'Subscribers' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateNotification');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateNotification' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"BudgetName": "",
"Notification": "",
"Subscribers": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateNotification' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"BudgetName": "",
"Notification": "",
"Subscribers": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscribers\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateNotification"
payload = {
"AccountId": "",
"BudgetName": "",
"Notification": "",
"Subscribers": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateNotification"
payload <- "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscribers\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateNotification")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscribers\": \"\"\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/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscribers\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateNotification";
let payload = json!({
"AccountId": "",
"BudgetName": "",
"Notification": "",
"Subscribers": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
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}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateNotification' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"AccountId": "",
"BudgetName": "",
"Notification": "",
"Subscribers": ""
}'
echo '{
"AccountId": "",
"BudgetName": "",
"Notification": "",
"Subscribers": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateNotification' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "AccountId": "",\n "BudgetName": "",\n "Notification": "",\n "Subscribers": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateNotification'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"AccountId": "",
"BudgetName": "",
"Notification": "",
"Subscribers": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateNotification")! 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
CreateSubscriber
{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateSubscriber
HEADERS
X-Amz-Target
BODY json
{
"AccountId": "",
"BudgetName": "",
"Notification": "",
"Subscriber": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateSubscriber");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscriber\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateSubscriber" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:AccountId ""
:BudgetName ""
:Notification ""
:Subscriber ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateSubscriber"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscriber\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateSubscriber"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscriber\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateSubscriber");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscriber\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateSubscriber"
payload := strings.NewReader("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscriber\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
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/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 83
{
"AccountId": "",
"BudgetName": "",
"Notification": "",
"Subscriber": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateSubscriber")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscriber\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateSubscriber"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscriber\": \"\"\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 \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscriber\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateSubscriber")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateSubscriber")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscriber\": \"\"\n}")
.asString();
const data = JSON.stringify({
AccountId: '',
BudgetName: '',
Notification: '',
Subscriber: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateSubscriber');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateSubscriber',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AccountId: '', BudgetName: '', Notification: '', Subscriber: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateSubscriber';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","BudgetName":"","Notification":"","Subscriber":""}'
};
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}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateSubscriber',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "AccountId": "",\n "BudgetName": "",\n "Notification": "",\n "Subscriber": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscriber\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateSubscriber")
.post(body)
.addHeader("x-amz-target", "")
.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/',
headers: {
'x-amz-target': '',
'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({AccountId: '', BudgetName: '', Notification: '', Subscriber: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateSubscriber',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {AccountId: '', BudgetName: '', Notification: '', Subscriber: ''},
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}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateSubscriber');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
AccountId: '',
BudgetName: '',
Notification: '',
Subscriber: ''
});
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}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateSubscriber',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AccountId: '', BudgetName: '', Notification: '', Subscriber: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateSubscriber';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","BudgetName":"","Notification":"","Subscriber":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"AccountId": @"",
@"BudgetName": @"",
@"Notification": @"",
@"Subscriber": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateSubscriber"]
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}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateSubscriber" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscriber\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateSubscriber",
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([
'AccountId' => '',
'BudgetName' => '',
'Notification' => '',
'Subscriber' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateSubscriber', [
'body' => '{
"AccountId": "",
"BudgetName": "",
"Notification": "",
"Subscriber": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateSubscriber');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'AccountId' => '',
'BudgetName' => '',
'Notification' => '',
'Subscriber' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'AccountId' => '',
'BudgetName' => '',
'Notification' => '',
'Subscriber' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateSubscriber');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateSubscriber' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"BudgetName": "",
"Notification": "",
"Subscriber": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateSubscriber' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"BudgetName": "",
"Notification": "",
"Subscriber": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscriber\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateSubscriber"
payload = {
"AccountId": "",
"BudgetName": "",
"Notification": "",
"Subscriber": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateSubscriber"
payload <- "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscriber\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateSubscriber")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscriber\": \"\"\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/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscriber\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateSubscriber";
let payload = json!({
"AccountId": "",
"BudgetName": "",
"Notification": "",
"Subscriber": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
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}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateSubscriber' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"AccountId": "",
"BudgetName": "",
"Notification": "",
"Subscriber": ""
}'
echo '{
"AccountId": "",
"BudgetName": "",
"Notification": "",
"Subscriber": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateSubscriber' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "AccountId": "",\n "BudgetName": "",\n "Notification": "",\n "Subscriber": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateSubscriber'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"AccountId": "",
"BudgetName": "",
"Notification": "",
"Subscriber": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.CreateSubscriber")! 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
DeleteBudget
{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudget
HEADERS
X-Amz-Target
BODY json
{
"AccountId": "",
"BudgetName": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudget");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudget" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:AccountId ""
:BudgetName ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudget"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudget"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudget");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudget"
payload := strings.NewReader("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
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/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 41
{
"AccountId": "",
"BudgetName": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudget")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudget"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\"\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 \"AccountId\": \"\",\n \"BudgetName\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudget")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudget")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\"\n}")
.asString();
const data = JSON.stringify({
AccountId: '',
BudgetName: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudget');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudget',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AccountId: '', BudgetName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudget';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","BudgetName":""}'
};
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudget',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "AccountId": "",\n "BudgetName": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudget")
.post(body)
.addHeader("x-amz-target", "")
.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/',
headers: {
'x-amz-target': '',
'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({AccountId: '', BudgetName: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudget',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {AccountId: '', BudgetName: ''},
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudget');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
AccountId: '',
BudgetName: ''
});
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudget',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AccountId: '', BudgetName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudget';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","BudgetName":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"AccountId": @"",
@"BudgetName": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudget"]
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudget" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudget",
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([
'AccountId' => '',
'BudgetName' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudget', [
'body' => '{
"AccountId": "",
"BudgetName": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudget');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'AccountId' => '',
'BudgetName' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'AccountId' => '',
'BudgetName' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudget');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudget' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"BudgetName": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudget' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"BudgetName": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudget"
payload = {
"AccountId": "",
"BudgetName": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudget"
payload <- "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudget")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\"\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/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudget";
let payload = json!({
"AccountId": "",
"BudgetName": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudget' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"AccountId": "",
"BudgetName": ""
}'
echo '{
"AccountId": "",
"BudgetName": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudget' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "AccountId": "",\n "BudgetName": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudget'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"AccountId": "",
"BudgetName": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudget")! 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
DeleteBudgetAction
{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudgetAction
HEADERS
X-Amz-Target
BODY json
{
"AccountId": "",
"BudgetName": "",
"ActionId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudgetAction");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudgetAction" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:AccountId ""
:BudgetName ""
:ActionId ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudgetAction"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudgetAction"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudgetAction");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudgetAction"
payload := strings.NewReader("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
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/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 59
{
"AccountId": "",
"BudgetName": "",
"ActionId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudgetAction")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudgetAction"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\"\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 \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudgetAction")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudgetAction")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\"\n}")
.asString();
const data = JSON.stringify({
AccountId: '',
BudgetName: '',
ActionId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudgetAction');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudgetAction',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AccountId: '', BudgetName: '', ActionId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudgetAction';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","BudgetName":"","ActionId":""}'
};
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudgetAction',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "AccountId": "",\n "BudgetName": "",\n "ActionId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudgetAction")
.post(body)
.addHeader("x-amz-target", "")
.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/',
headers: {
'x-amz-target': '',
'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({AccountId: '', BudgetName: '', ActionId: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudgetAction',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {AccountId: '', BudgetName: '', ActionId: ''},
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudgetAction');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
AccountId: '',
BudgetName: '',
ActionId: ''
});
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudgetAction',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AccountId: '', BudgetName: '', ActionId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudgetAction';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","BudgetName":"","ActionId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"AccountId": @"",
@"BudgetName": @"",
@"ActionId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudgetAction"]
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudgetAction" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudgetAction",
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([
'AccountId' => '',
'BudgetName' => '',
'ActionId' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudgetAction', [
'body' => '{
"AccountId": "",
"BudgetName": "",
"ActionId": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudgetAction');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'AccountId' => '',
'BudgetName' => '',
'ActionId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'AccountId' => '',
'BudgetName' => '',
'ActionId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudgetAction');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudgetAction' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"BudgetName": "",
"ActionId": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudgetAction' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"BudgetName": "",
"ActionId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudgetAction"
payload = {
"AccountId": "",
"BudgetName": "",
"ActionId": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudgetAction"
payload <- "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudgetAction")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\"\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/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudgetAction";
let payload = json!({
"AccountId": "",
"BudgetName": "",
"ActionId": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudgetAction' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"AccountId": "",
"BudgetName": "",
"ActionId": ""
}'
echo '{
"AccountId": "",
"BudgetName": "",
"ActionId": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudgetAction' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "AccountId": "",\n "BudgetName": "",\n "ActionId": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudgetAction'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"AccountId": "",
"BudgetName": "",
"ActionId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteBudgetAction")! 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
DeleteNotification
{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteNotification
HEADERS
X-Amz-Target
BODY json
{
"AccountId": "",
"BudgetName": "",
"Notification": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteNotification");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteNotification" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:AccountId ""
:BudgetName ""
:Notification ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteNotification"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteNotification"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteNotification");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteNotification"
payload := strings.NewReader("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
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/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 63
{
"AccountId": "",
"BudgetName": "",
"Notification": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteNotification")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteNotification"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\"\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 \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteNotification")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteNotification")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\"\n}")
.asString();
const data = JSON.stringify({
AccountId: '',
BudgetName: '',
Notification: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteNotification');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteNotification',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AccountId: '', BudgetName: '', Notification: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteNotification';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","BudgetName":"","Notification":""}'
};
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteNotification',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "AccountId": "",\n "BudgetName": "",\n "Notification": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteNotification")
.post(body)
.addHeader("x-amz-target", "")
.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/',
headers: {
'x-amz-target': '',
'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({AccountId: '', BudgetName: '', Notification: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteNotification',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {AccountId: '', BudgetName: '', Notification: ''},
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteNotification');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
AccountId: '',
BudgetName: '',
Notification: ''
});
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteNotification',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AccountId: '', BudgetName: '', Notification: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteNotification';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","BudgetName":"","Notification":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"AccountId": @"",
@"BudgetName": @"",
@"Notification": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteNotification"]
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteNotification" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteNotification",
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([
'AccountId' => '',
'BudgetName' => '',
'Notification' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteNotification', [
'body' => '{
"AccountId": "",
"BudgetName": "",
"Notification": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteNotification');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'AccountId' => '',
'BudgetName' => '',
'Notification' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'AccountId' => '',
'BudgetName' => '',
'Notification' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteNotification');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteNotification' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"BudgetName": "",
"Notification": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteNotification' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"BudgetName": "",
"Notification": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteNotification"
payload = {
"AccountId": "",
"BudgetName": "",
"Notification": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteNotification"
payload <- "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteNotification")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\"\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/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteNotification";
let payload = json!({
"AccountId": "",
"BudgetName": "",
"Notification": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteNotification' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"AccountId": "",
"BudgetName": "",
"Notification": ""
}'
echo '{
"AccountId": "",
"BudgetName": "",
"Notification": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteNotification' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "AccountId": "",\n "BudgetName": "",\n "Notification": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteNotification'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"AccountId": "",
"BudgetName": "",
"Notification": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteNotification")! 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
DeleteSubscriber
{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteSubscriber
HEADERS
X-Amz-Target
BODY json
{
"AccountId": "",
"BudgetName": "",
"Notification": "",
"Subscriber": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteSubscriber");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscriber\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteSubscriber" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:AccountId ""
:BudgetName ""
:Notification ""
:Subscriber ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteSubscriber"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscriber\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteSubscriber"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscriber\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteSubscriber");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscriber\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteSubscriber"
payload := strings.NewReader("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscriber\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
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/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 83
{
"AccountId": "",
"BudgetName": "",
"Notification": "",
"Subscriber": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteSubscriber")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscriber\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteSubscriber"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscriber\": \"\"\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 \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscriber\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteSubscriber")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteSubscriber")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscriber\": \"\"\n}")
.asString();
const data = JSON.stringify({
AccountId: '',
BudgetName: '',
Notification: '',
Subscriber: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteSubscriber');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteSubscriber',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AccountId: '', BudgetName: '', Notification: '', Subscriber: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteSubscriber';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","BudgetName":"","Notification":"","Subscriber":""}'
};
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteSubscriber',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "AccountId": "",\n "BudgetName": "",\n "Notification": "",\n "Subscriber": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscriber\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteSubscriber")
.post(body)
.addHeader("x-amz-target", "")
.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/',
headers: {
'x-amz-target': '',
'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({AccountId: '', BudgetName: '', Notification: '', Subscriber: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteSubscriber',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {AccountId: '', BudgetName: '', Notification: '', Subscriber: ''},
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteSubscriber');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
AccountId: '',
BudgetName: '',
Notification: '',
Subscriber: ''
});
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteSubscriber',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AccountId: '', BudgetName: '', Notification: '', Subscriber: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteSubscriber';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","BudgetName":"","Notification":"","Subscriber":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"AccountId": @"",
@"BudgetName": @"",
@"Notification": @"",
@"Subscriber": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteSubscriber"]
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteSubscriber" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscriber\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteSubscriber",
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([
'AccountId' => '',
'BudgetName' => '',
'Notification' => '',
'Subscriber' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteSubscriber', [
'body' => '{
"AccountId": "",
"BudgetName": "",
"Notification": "",
"Subscriber": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteSubscriber');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'AccountId' => '',
'BudgetName' => '',
'Notification' => '',
'Subscriber' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'AccountId' => '',
'BudgetName' => '',
'Notification' => '',
'Subscriber' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteSubscriber');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteSubscriber' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"BudgetName": "",
"Notification": "",
"Subscriber": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteSubscriber' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"BudgetName": "",
"Notification": "",
"Subscriber": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscriber\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteSubscriber"
payload = {
"AccountId": "",
"BudgetName": "",
"Notification": "",
"Subscriber": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteSubscriber"
payload <- "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscriber\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteSubscriber")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscriber\": \"\"\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/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"Subscriber\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteSubscriber";
let payload = json!({
"AccountId": "",
"BudgetName": "",
"Notification": "",
"Subscriber": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteSubscriber' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"AccountId": "",
"BudgetName": "",
"Notification": "",
"Subscriber": ""
}'
echo '{
"AccountId": "",
"BudgetName": "",
"Notification": "",
"Subscriber": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteSubscriber' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "AccountId": "",\n "BudgetName": "",\n "Notification": "",\n "Subscriber": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteSubscriber'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"AccountId": "",
"BudgetName": "",
"Notification": "",
"Subscriber": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DeleteSubscriber")! 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
DescribeBudget
{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudget
HEADERS
X-Amz-Target
BODY json
{
"AccountId": "",
"BudgetName": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudget");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudget" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:AccountId ""
:BudgetName ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudget"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudget"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudget");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudget"
payload := strings.NewReader("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
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/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 41
{
"AccountId": "",
"BudgetName": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudget")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudget"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\"\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 \"AccountId\": \"\",\n \"BudgetName\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudget")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudget")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\"\n}")
.asString();
const data = JSON.stringify({
AccountId: '',
BudgetName: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudget');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudget',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AccountId: '', BudgetName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudget';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","BudgetName":""}'
};
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudget',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "AccountId": "",\n "BudgetName": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudget")
.post(body)
.addHeader("x-amz-target", "")
.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/',
headers: {
'x-amz-target': '',
'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({AccountId: '', BudgetName: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudget',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {AccountId: '', BudgetName: ''},
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudget');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
AccountId: '',
BudgetName: ''
});
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudget',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AccountId: '', BudgetName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudget';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","BudgetName":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"AccountId": @"",
@"BudgetName": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudget"]
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudget" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudget",
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([
'AccountId' => '',
'BudgetName' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudget', [
'body' => '{
"AccountId": "",
"BudgetName": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudget');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'AccountId' => '',
'BudgetName' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'AccountId' => '',
'BudgetName' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudget');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudget' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"BudgetName": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudget' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"BudgetName": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudget"
payload = {
"AccountId": "",
"BudgetName": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudget"
payload <- "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudget")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\"\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/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudget";
let payload = json!({
"AccountId": "",
"BudgetName": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudget' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"AccountId": "",
"BudgetName": ""
}'
echo '{
"AccountId": "",
"BudgetName": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudget' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "AccountId": "",\n "BudgetName": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudget'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"AccountId": "",
"BudgetName": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudget")! 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
DescribeBudgetAction
{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetAction
HEADERS
X-Amz-Target
BODY json
{
"AccountId": "",
"BudgetName": "",
"ActionId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetAction");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetAction" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:AccountId ""
:BudgetName ""
:ActionId ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetAction"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetAction"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetAction");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetAction"
payload := strings.NewReader("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
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/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 59
{
"AccountId": "",
"BudgetName": "",
"ActionId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetAction")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetAction"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\"\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 \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetAction")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetAction")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\"\n}")
.asString();
const data = JSON.stringify({
AccountId: '',
BudgetName: '',
ActionId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetAction');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetAction',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AccountId: '', BudgetName: '', ActionId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetAction';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","BudgetName":"","ActionId":""}'
};
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetAction',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "AccountId": "",\n "BudgetName": "",\n "ActionId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetAction")
.post(body)
.addHeader("x-amz-target", "")
.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/',
headers: {
'x-amz-target': '',
'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({AccountId: '', BudgetName: '', ActionId: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetAction',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {AccountId: '', BudgetName: '', ActionId: ''},
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetAction');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
AccountId: '',
BudgetName: '',
ActionId: ''
});
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetAction',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AccountId: '', BudgetName: '', ActionId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetAction';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","BudgetName":"","ActionId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"AccountId": @"",
@"BudgetName": @"",
@"ActionId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetAction"]
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetAction" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetAction",
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([
'AccountId' => '',
'BudgetName' => '',
'ActionId' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetAction', [
'body' => '{
"AccountId": "",
"BudgetName": "",
"ActionId": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetAction');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'AccountId' => '',
'BudgetName' => '',
'ActionId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'AccountId' => '',
'BudgetName' => '',
'ActionId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetAction');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetAction' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"BudgetName": "",
"ActionId": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetAction' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"BudgetName": "",
"ActionId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetAction"
payload = {
"AccountId": "",
"BudgetName": "",
"ActionId": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetAction"
payload <- "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetAction")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\"\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/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetAction";
let payload = json!({
"AccountId": "",
"BudgetName": "",
"ActionId": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetAction' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"AccountId": "",
"BudgetName": "",
"ActionId": ""
}'
echo '{
"AccountId": "",
"BudgetName": "",
"ActionId": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetAction' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "AccountId": "",\n "BudgetName": "",\n "ActionId": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetAction'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"AccountId": "",
"BudgetName": "",
"ActionId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetAction")! 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
DescribeBudgetActionHistories
{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionHistories
HEADERS
X-Amz-Target
BODY json
{
"AccountId": "",
"BudgetName": "",
"ActionId": "",
"TimePeriod": {
"Start": "",
"End": ""
},
"MaxResults": 0,
"NextToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionHistories");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"TimePeriod\": {\n \"Start\": \"\",\n \"End\": \"\"\n },\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionHistories" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:AccountId ""
:BudgetName ""
:ActionId ""
:TimePeriod {:Start ""
:End ""}
:MaxResults 0
:NextToken ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionHistories"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"TimePeriod\": {\n \"Start\": \"\",\n \"End\": \"\"\n },\n \"MaxResults\": 0,\n \"NextToken\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionHistories"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"TimePeriod\": {\n \"Start\": \"\",\n \"End\": \"\"\n },\n \"MaxResults\": 0,\n \"NextToken\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionHistories");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"TimePeriod\": {\n \"Start\": \"\",\n \"End\": \"\"\n },\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionHistories"
payload := strings.NewReader("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"TimePeriod\": {\n \"Start\": \"\",\n \"End\": \"\"\n },\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
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/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 151
{
"AccountId": "",
"BudgetName": "",
"ActionId": "",
"TimePeriod": {
"Start": "",
"End": ""
},
"MaxResults": 0,
"NextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionHistories")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"TimePeriod\": {\n \"Start\": \"\",\n \"End\": \"\"\n },\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionHistories"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"TimePeriod\": {\n \"Start\": \"\",\n \"End\": \"\"\n },\n \"MaxResults\": 0,\n \"NextToken\": \"\"\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 \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"TimePeriod\": {\n \"Start\": \"\",\n \"End\": \"\"\n },\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionHistories")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionHistories")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"TimePeriod\": {\n \"Start\": \"\",\n \"End\": \"\"\n },\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
AccountId: '',
BudgetName: '',
ActionId: '',
TimePeriod: {
Start: '',
End: ''
},
MaxResults: 0,
NextToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionHistories');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionHistories',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
AccountId: '',
BudgetName: '',
ActionId: '',
TimePeriod: {Start: '', End: ''},
MaxResults: 0,
NextToken: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionHistories';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","BudgetName":"","ActionId":"","TimePeriod":{"Start":"","End":""},"MaxResults":0,"NextToken":""}'
};
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionHistories',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "AccountId": "",\n "BudgetName": "",\n "ActionId": "",\n "TimePeriod": {\n "Start": "",\n "End": ""\n },\n "MaxResults": 0,\n "NextToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"TimePeriod\": {\n \"Start\": \"\",\n \"End\": \"\"\n },\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionHistories")
.post(body)
.addHeader("x-amz-target", "")
.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/',
headers: {
'x-amz-target': '',
'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({
AccountId: '',
BudgetName: '',
ActionId: '',
TimePeriod: {Start: '', End: ''},
MaxResults: 0,
NextToken: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionHistories',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {
AccountId: '',
BudgetName: '',
ActionId: '',
TimePeriod: {Start: '', End: ''},
MaxResults: 0,
NextToken: ''
},
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionHistories');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
AccountId: '',
BudgetName: '',
ActionId: '',
TimePeriod: {
Start: '',
End: ''
},
MaxResults: 0,
NextToken: ''
});
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionHistories',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
AccountId: '',
BudgetName: '',
ActionId: '',
TimePeriod: {Start: '', End: ''},
MaxResults: 0,
NextToken: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionHistories';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","BudgetName":"","ActionId":"","TimePeriod":{"Start":"","End":""},"MaxResults":0,"NextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"AccountId": @"",
@"BudgetName": @"",
@"ActionId": @"",
@"TimePeriod": @{ @"Start": @"", @"End": @"" },
@"MaxResults": @0,
@"NextToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionHistories"]
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionHistories" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"TimePeriod\": {\n \"Start\": \"\",\n \"End\": \"\"\n },\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionHistories",
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([
'AccountId' => '',
'BudgetName' => '',
'ActionId' => '',
'TimePeriod' => [
'Start' => '',
'End' => ''
],
'MaxResults' => 0,
'NextToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionHistories', [
'body' => '{
"AccountId": "",
"BudgetName": "",
"ActionId": "",
"TimePeriod": {
"Start": "",
"End": ""
},
"MaxResults": 0,
"NextToken": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionHistories');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'AccountId' => '',
'BudgetName' => '',
'ActionId' => '',
'TimePeriod' => [
'Start' => '',
'End' => ''
],
'MaxResults' => 0,
'NextToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'AccountId' => '',
'BudgetName' => '',
'ActionId' => '',
'TimePeriod' => [
'Start' => '',
'End' => ''
],
'MaxResults' => 0,
'NextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionHistories');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionHistories' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"BudgetName": "",
"ActionId": "",
"TimePeriod": {
"Start": "",
"End": ""
},
"MaxResults": 0,
"NextToken": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionHistories' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"BudgetName": "",
"ActionId": "",
"TimePeriod": {
"Start": "",
"End": ""
},
"MaxResults": 0,
"NextToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"TimePeriod\": {\n \"Start\": \"\",\n \"End\": \"\"\n },\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionHistories"
payload = {
"AccountId": "",
"BudgetName": "",
"ActionId": "",
"TimePeriod": {
"Start": "",
"End": ""
},
"MaxResults": 0,
"NextToken": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionHistories"
payload <- "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"TimePeriod\": {\n \"Start\": \"\",\n \"End\": \"\"\n },\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionHistories")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"TimePeriod\": {\n \"Start\": \"\",\n \"End\": \"\"\n },\n \"MaxResults\": 0,\n \"NextToken\": \"\"\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/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"TimePeriod\": {\n \"Start\": \"\",\n \"End\": \"\"\n },\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionHistories";
let payload = json!({
"AccountId": "",
"BudgetName": "",
"ActionId": "",
"TimePeriod": json!({
"Start": "",
"End": ""
}),
"MaxResults": 0,
"NextToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionHistories' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"AccountId": "",
"BudgetName": "",
"ActionId": "",
"TimePeriod": {
"Start": "",
"End": ""
},
"MaxResults": 0,
"NextToken": ""
}'
echo '{
"AccountId": "",
"BudgetName": "",
"ActionId": "",
"TimePeriod": {
"Start": "",
"End": ""
},
"MaxResults": 0,
"NextToken": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionHistories' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "AccountId": "",\n "BudgetName": "",\n "ActionId": "",\n "TimePeriod": {\n "Start": "",\n "End": ""\n },\n "MaxResults": 0,\n "NextToken": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionHistories'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"AccountId": "",
"BudgetName": "",
"ActionId": "",
"TimePeriod": [
"Start": "",
"End": ""
],
"MaxResults": 0,
"NextToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionHistories")! 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
DescribeBudgetActionsForAccount
{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForAccount
HEADERS
X-Amz-Target
BODY json
{
"AccountId": "",
"MaxResults": 0,
"NextToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForAccount");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"AccountId\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForAccount" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:AccountId ""
:MaxResults 0
:NextToken ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForAccount"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"AccountId\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForAccount"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"AccountId\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForAccount");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"AccountId\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForAccount"
payload := strings.NewReader("{\n \"AccountId\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
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/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 59
{
"AccountId": "",
"MaxResults": 0,
"NextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForAccount")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"AccountId\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForAccount"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"AccountId\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\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 \"AccountId\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForAccount")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForAccount")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"AccountId\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
AccountId: '',
MaxResults: 0,
NextToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForAccount');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForAccount',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AccountId: '', MaxResults: 0, NextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForAccount';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","MaxResults":0,"NextToken":""}'
};
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForAccount',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "AccountId": "",\n "MaxResults": 0,\n "NextToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"AccountId\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForAccount")
.post(body)
.addHeader("x-amz-target", "")
.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/',
headers: {
'x-amz-target': '',
'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({AccountId: '', MaxResults: 0, NextToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForAccount',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {AccountId: '', MaxResults: 0, NextToken: ''},
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForAccount');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
AccountId: '',
MaxResults: 0,
NextToken: ''
});
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForAccount',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AccountId: '', MaxResults: 0, NextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForAccount';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","MaxResults":0,"NextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"AccountId": @"",
@"MaxResults": @0,
@"NextToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForAccount"]
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForAccount" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"AccountId\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForAccount",
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([
'AccountId' => '',
'MaxResults' => 0,
'NextToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForAccount', [
'body' => '{
"AccountId": "",
"MaxResults": 0,
"NextToken": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForAccount');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'AccountId' => '',
'MaxResults' => 0,
'NextToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'AccountId' => '',
'MaxResults' => 0,
'NextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForAccount');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForAccount' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"MaxResults": 0,
"NextToken": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForAccount' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"MaxResults": 0,
"NextToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"AccountId\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForAccount"
payload = {
"AccountId": "",
"MaxResults": 0,
"NextToken": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForAccount"
payload <- "{\n \"AccountId\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForAccount")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"AccountId\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\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/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"AccountId\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForAccount";
let payload = json!({
"AccountId": "",
"MaxResults": 0,
"NextToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForAccount' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"AccountId": "",
"MaxResults": 0,
"NextToken": ""
}'
echo '{
"AccountId": "",
"MaxResults": 0,
"NextToken": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForAccount' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "AccountId": "",\n "MaxResults": 0,\n "NextToken": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForAccount'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"AccountId": "",
"MaxResults": 0,
"NextToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForAccount")! 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
DescribeBudgetActionsForBudget
{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForBudget
HEADERS
X-Amz-Target
BODY json
{
"AccountId": "",
"BudgetName": "",
"MaxResults": 0,
"NextToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForBudget");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForBudget" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:AccountId ""
:BudgetName ""
:MaxResults 0
:NextToken ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForBudget"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForBudget"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForBudget");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForBudget"
payload := strings.NewReader("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
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/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 79
{
"AccountId": "",
"BudgetName": "",
"MaxResults": 0,
"NextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForBudget")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForBudget"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\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 \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForBudget")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForBudget")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
AccountId: '',
BudgetName: '',
MaxResults: 0,
NextToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForBudget');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForBudget',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AccountId: '', BudgetName: '', MaxResults: 0, NextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForBudget';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","BudgetName":"","MaxResults":0,"NextToken":""}'
};
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForBudget',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "AccountId": "",\n "BudgetName": "",\n "MaxResults": 0,\n "NextToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForBudget")
.post(body)
.addHeader("x-amz-target", "")
.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/',
headers: {
'x-amz-target': '',
'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({AccountId: '', BudgetName: '', MaxResults: 0, NextToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForBudget',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {AccountId: '', BudgetName: '', MaxResults: 0, NextToken: ''},
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForBudget');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
AccountId: '',
BudgetName: '',
MaxResults: 0,
NextToken: ''
});
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForBudget',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AccountId: '', BudgetName: '', MaxResults: 0, NextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForBudget';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","BudgetName":"","MaxResults":0,"NextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"AccountId": @"",
@"BudgetName": @"",
@"MaxResults": @0,
@"NextToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForBudget"]
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForBudget" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForBudget",
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([
'AccountId' => '',
'BudgetName' => '',
'MaxResults' => 0,
'NextToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForBudget', [
'body' => '{
"AccountId": "",
"BudgetName": "",
"MaxResults": 0,
"NextToken": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForBudget');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'AccountId' => '',
'BudgetName' => '',
'MaxResults' => 0,
'NextToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'AccountId' => '',
'BudgetName' => '',
'MaxResults' => 0,
'NextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForBudget');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForBudget' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"BudgetName": "",
"MaxResults": 0,
"NextToken": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForBudget' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"BudgetName": "",
"MaxResults": 0,
"NextToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForBudget"
payload = {
"AccountId": "",
"BudgetName": "",
"MaxResults": 0,
"NextToken": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForBudget"
payload <- "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForBudget")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\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/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForBudget";
let payload = json!({
"AccountId": "",
"BudgetName": "",
"MaxResults": 0,
"NextToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForBudget' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"AccountId": "",
"BudgetName": "",
"MaxResults": 0,
"NextToken": ""
}'
echo '{
"AccountId": "",
"BudgetName": "",
"MaxResults": 0,
"NextToken": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForBudget' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "AccountId": "",\n "BudgetName": "",\n "MaxResults": 0,\n "NextToken": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForBudget'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"AccountId": "",
"BudgetName": "",
"MaxResults": 0,
"NextToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetActionsForBudget")! 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
DescribeBudgetNotificationsForAccount
{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetNotificationsForAccount
HEADERS
X-Amz-Target
BODY json
{
"AccountId": "",
"MaxResults": "",
"NextToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetNotificationsForAccount");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"AccountId\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetNotificationsForAccount" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:AccountId ""
:MaxResults ""
:NextToken ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetNotificationsForAccount"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"AccountId\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetNotificationsForAccount"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"AccountId\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetNotificationsForAccount");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"AccountId\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetNotificationsForAccount"
payload := strings.NewReader("{\n \"AccountId\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
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/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 60
{
"AccountId": "",
"MaxResults": "",
"NextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetNotificationsForAccount")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"AccountId\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetNotificationsForAccount"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"AccountId\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\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 \"AccountId\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetNotificationsForAccount")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetNotificationsForAccount")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"AccountId\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
AccountId: '',
MaxResults: '',
NextToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetNotificationsForAccount');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetNotificationsForAccount',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AccountId: '', MaxResults: '', NextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetNotificationsForAccount';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","MaxResults":"","NextToken":""}'
};
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetNotificationsForAccount',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "AccountId": "",\n "MaxResults": "",\n "NextToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"AccountId\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetNotificationsForAccount")
.post(body)
.addHeader("x-amz-target", "")
.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/',
headers: {
'x-amz-target': '',
'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({AccountId: '', MaxResults: '', NextToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetNotificationsForAccount',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {AccountId: '', MaxResults: '', NextToken: ''},
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetNotificationsForAccount');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
AccountId: '',
MaxResults: '',
NextToken: ''
});
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetNotificationsForAccount',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AccountId: '', MaxResults: '', NextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetNotificationsForAccount';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","MaxResults":"","NextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"AccountId": @"",
@"MaxResults": @"",
@"NextToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetNotificationsForAccount"]
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetNotificationsForAccount" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"AccountId\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetNotificationsForAccount",
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([
'AccountId' => '',
'MaxResults' => '',
'NextToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetNotificationsForAccount', [
'body' => '{
"AccountId": "",
"MaxResults": "",
"NextToken": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetNotificationsForAccount');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'AccountId' => '',
'MaxResults' => '',
'NextToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'AccountId' => '',
'MaxResults' => '',
'NextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetNotificationsForAccount');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetNotificationsForAccount' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"MaxResults": "",
"NextToken": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetNotificationsForAccount' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"MaxResults": "",
"NextToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"AccountId\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetNotificationsForAccount"
payload = {
"AccountId": "",
"MaxResults": "",
"NextToken": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetNotificationsForAccount"
payload <- "{\n \"AccountId\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetNotificationsForAccount")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"AccountId\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\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/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"AccountId\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetNotificationsForAccount";
let payload = json!({
"AccountId": "",
"MaxResults": "",
"NextToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetNotificationsForAccount' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"AccountId": "",
"MaxResults": "",
"NextToken": ""
}'
echo '{
"AccountId": "",
"MaxResults": "",
"NextToken": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetNotificationsForAccount' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "AccountId": "",\n "MaxResults": "",\n "NextToken": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetNotificationsForAccount'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"AccountId": "",
"MaxResults": "",
"NextToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetNotificationsForAccount")! 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
DescribeBudgetPerformanceHistory
{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetPerformanceHistory
HEADERS
X-Amz-Target
BODY json
{
"AccountId": "",
"BudgetName": "",
"TimePeriod": "",
"MaxResults": 0,
"NextToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetPerformanceHistory");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"TimePeriod\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetPerformanceHistory" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:AccountId ""
:BudgetName ""
:TimePeriod ""
:MaxResults 0
:NextToken ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetPerformanceHistory"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"TimePeriod\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetPerformanceHistory"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"TimePeriod\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetPerformanceHistory");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"TimePeriod\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetPerformanceHistory"
payload := strings.NewReader("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"TimePeriod\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
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/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 99
{
"AccountId": "",
"BudgetName": "",
"TimePeriod": "",
"MaxResults": 0,
"NextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetPerformanceHistory")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"TimePeriod\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetPerformanceHistory"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"TimePeriod\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\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 \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"TimePeriod\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetPerformanceHistory")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetPerformanceHistory")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"TimePeriod\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
AccountId: '',
BudgetName: '',
TimePeriod: '',
MaxResults: 0,
NextToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetPerformanceHistory');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetPerformanceHistory',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AccountId: '', BudgetName: '', TimePeriod: '', MaxResults: 0, NextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetPerformanceHistory';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","BudgetName":"","TimePeriod":"","MaxResults":0,"NextToken":""}'
};
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetPerformanceHistory',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "AccountId": "",\n "BudgetName": "",\n "TimePeriod": "",\n "MaxResults": 0,\n "NextToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"TimePeriod\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetPerformanceHistory")
.post(body)
.addHeader("x-amz-target", "")
.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/',
headers: {
'x-amz-target': '',
'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({AccountId: '', BudgetName: '', TimePeriod: '', MaxResults: 0, NextToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetPerformanceHistory',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {AccountId: '', BudgetName: '', TimePeriod: '', MaxResults: 0, NextToken: ''},
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetPerformanceHistory');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
AccountId: '',
BudgetName: '',
TimePeriod: '',
MaxResults: 0,
NextToken: ''
});
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetPerformanceHistory',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AccountId: '', BudgetName: '', TimePeriod: '', MaxResults: 0, NextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetPerformanceHistory';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","BudgetName":"","TimePeriod":"","MaxResults":0,"NextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"AccountId": @"",
@"BudgetName": @"",
@"TimePeriod": @"",
@"MaxResults": @0,
@"NextToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetPerformanceHistory"]
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetPerformanceHistory" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"TimePeriod\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetPerformanceHistory",
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([
'AccountId' => '',
'BudgetName' => '',
'TimePeriod' => '',
'MaxResults' => 0,
'NextToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetPerformanceHistory', [
'body' => '{
"AccountId": "",
"BudgetName": "",
"TimePeriod": "",
"MaxResults": 0,
"NextToken": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetPerformanceHistory');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'AccountId' => '',
'BudgetName' => '',
'TimePeriod' => '',
'MaxResults' => 0,
'NextToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'AccountId' => '',
'BudgetName' => '',
'TimePeriod' => '',
'MaxResults' => 0,
'NextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetPerformanceHistory');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetPerformanceHistory' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"BudgetName": "",
"TimePeriod": "",
"MaxResults": 0,
"NextToken": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetPerformanceHistory' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"BudgetName": "",
"TimePeriod": "",
"MaxResults": 0,
"NextToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"TimePeriod\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetPerformanceHistory"
payload = {
"AccountId": "",
"BudgetName": "",
"TimePeriod": "",
"MaxResults": 0,
"NextToken": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetPerformanceHistory"
payload <- "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"TimePeriod\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetPerformanceHistory")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"TimePeriod\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\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/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"TimePeriod\": \"\",\n \"MaxResults\": 0,\n \"NextToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetPerformanceHistory";
let payload = json!({
"AccountId": "",
"BudgetName": "",
"TimePeriod": "",
"MaxResults": 0,
"NextToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetPerformanceHistory' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"AccountId": "",
"BudgetName": "",
"TimePeriod": "",
"MaxResults": 0,
"NextToken": ""
}'
echo '{
"AccountId": "",
"BudgetName": "",
"TimePeriod": "",
"MaxResults": 0,
"NextToken": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetPerformanceHistory' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "AccountId": "",\n "BudgetName": "",\n "TimePeriod": "",\n "MaxResults": 0,\n "NextToken": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetPerformanceHistory'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"AccountId": "",
"BudgetName": "",
"TimePeriod": "",
"MaxResults": 0,
"NextToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgetPerformanceHistory")! 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
DescribeBudgets
{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgets
HEADERS
X-Amz-Target
BODY json
{
"AccountId": "",
"MaxResults": "",
"NextToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgets");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"AccountId\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgets" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:AccountId ""
:MaxResults ""
:NextToken ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgets"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"AccountId\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgets"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"AccountId\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgets");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"AccountId\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgets"
payload := strings.NewReader("{\n \"AccountId\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
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/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 60
{
"AccountId": "",
"MaxResults": "",
"NextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgets")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"AccountId\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgets"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"AccountId\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\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 \"AccountId\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgets")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgets")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"AccountId\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
AccountId: '',
MaxResults: '',
NextToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgets');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgets',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AccountId: '', MaxResults: '', NextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgets';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","MaxResults":"","NextToken":""}'
};
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgets',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "AccountId": "",\n "MaxResults": "",\n "NextToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"AccountId\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgets")
.post(body)
.addHeader("x-amz-target", "")
.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/',
headers: {
'x-amz-target': '',
'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({AccountId: '', MaxResults: '', NextToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgets',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {AccountId: '', MaxResults: '', NextToken: ''},
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgets');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
AccountId: '',
MaxResults: '',
NextToken: ''
});
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgets',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AccountId: '', MaxResults: '', NextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgets';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","MaxResults":"","NextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"AccountId": @"",
@"MaxResults": @"",
@"NextToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgets"]
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgets" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"AccountId\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgets",
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([
'AccountId' => '',
'MaxResults' => '',
'NextToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgets', [
'body' => '{
"AccountId": "",
"MaxResults": "",
"NextToken": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgets');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'AccountId' => '',
'MaxResults' => '',
'NextToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'AccountId' => '',
'MaxResults' => '',
'NextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgets');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgets' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"MaxResults": "",
"NextToken": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgets' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"MaxResults": "",
"NextToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"AccountId\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgets"
payload = {
"AccountId": "",
"MaxResults": "",
"NextToken": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgets"
payload <- "{\n \"AccountId\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"AccountId\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\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/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"AccountId\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgets";
let payload = json!({
"AccountId": "",
"MaxResults": "",
"NextToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgets' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"AccountId": "",
"MaxResults": "",
"NextToken": ""
}'
echo '{
"AccountId": "",
"MaxResults": "",
"NextToken": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgets' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "AccountId": "",\n "MaxResults": "",\n "NextToken": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgets'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"AccountId": "",
"MaxResults": "",
"NextToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeBudgets")! 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
DescribeNotificationsForBudget
{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeNotificationsForBudget
HEADERS
X-Amz-Target
BODY json
{
"AccountId": "",
"BudgetName": "",
"MaxResults": "",
"NextToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeNotificationsForBudget");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeNotificationsForBudget" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:AccountId ""
:BudgetName ""
:MaxResults ""
:NextToken ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeNotificationsForBudget"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeNotificationsForBudget"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeNotificationsForBudget");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeNotificationsForBudget"
payload := strings.NewReader("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
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/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 80
{
"AccountId": "",
"BudgetName": "",
"MaxResults": "",
"NextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeNotificationsForBudget")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeNotificationsForBudget"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\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 \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeNotificationsForBudget")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeNotificationsForBudget")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
AccountId: '',
BudgetName: '',
MaxResults: '',
NextToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeNotificationsForBudget');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeNotificationsForBudget',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AccountId: '', BudgetName: '', MaxResults: '', NextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeNotificationsForBudget';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","BudgetName":"","MaxResults":"","NextToken":""}'
};
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeNotificationsForBudget',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "AccountId": "",\n "BudgetName": "",\n "MaxResults": "",\n "NextToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeNotificationsForBudget")
.post(body)
.addHeader("x-amz-target", "")
.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/',
headers: {
'x-amz-target': '',
'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({AccountId: '', BudgetName: '', MaxResults: '', NextToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeNotificationsForBudget',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {AccountId: '', BudgetName: '', MaxResults: '', NextToken: ''},
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeNotificationsForBudget');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
AccountId: '',
BudgetName: '',
MaxResults: '',
NextToken: ''
});
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeNotificationsForBudget',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AccountId: '', BudgetName: '', MaxResults: '', NextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeNotificationsForBudget';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","BudgetName":"","MaxResults":"","NextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"AccountId": @"",
@"BudgetName": @"",
@"MaxResults": @"",
@"NextToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeNotificationsForBudget"]
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeNotificationsForBudget" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeNotificationsForBudget",
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([
'AccountId' => '',
'BudgetName' => '',
'MaxResults' => '',
'NextToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeNotificationsForBudget', [
'body' => '{
"AccountId": "",
"BudgetName": "",
"MaxResults": "",
"NextToken": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeNotificationsForBudget');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'AccountId' => '',
'BudgetName' => '',
'MaxResults' => '',
'NextToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'AccountId' => '',
'BudgetName' => '',
'MaxResults' => '',
'NextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeNotificationsForBudget');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeNotificationsForBudget' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"BudgetName": "",
"MaxResults": "",
"NextToken": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeNotificationsForBudget' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"BudgetName": "",
"MaxResults": "",
"NextToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeNotificationsForBudget"
payload = {
"AccountId": "",
"BudgetName": "",
"MaxResults": "",
"NextToken": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeNotificationsForBudget"
payload <- "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeNotificationsForBudget")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\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/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeNotificationsForBudget";
let payload = json!({
"AccountId": "",
"BudgetName": "",
"MaxResults": "",
"NextToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeNotificationsForBudget' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"AccountId": "",
"BudgetName": "",
"MaxResults": "",
"NextToken": ""
}'
echo '{
"AccountId": "",
"BudgetName": "",
"MaxResults": "",
"NextToken": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeNotificationsForBudget' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "AccountId": "",\n "BudgetName": "",\n "MaxResults": "",\n "NextToken": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeNotificationsForBudget'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"AccountId": "",
"BudgetName": "",
"MaxResults": "",
"NextToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeNotificationsForBudget")! 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
DescribeSubscribersForNotification
{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeSubscribersForNotification
HEADERS
X-Amz-Target
BODY json
{
"AccountId": "",
"BudgetName": "",
"Notification": "",
"MaxResults": "",
"NextToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeSubscribersForNotification");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeSubscribersForNotification" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:AccountId ""
:BudgetName ""
:Notification ""
:MaxResults ""
:NextToken ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeSubscribersForNotification"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeSubscribersForNotification"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeSubscribersForNotification");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeSubscribersForNotification"
payload := strings.NewReader("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
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/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 102
{
"AccountId": "",
"BudgetName": "",
"Notification": "",
"MaxResults": "",
"NextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeSubscribersForNotification")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeSubscribersForNotification"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\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 \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeSubscribersForNotification")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeSubscribersForNotification")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
AccountId: '',
BudgetName: '',
Notification: '',
MaxResults: '',
NextToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeSubscribersForNotification');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeSubscribersForNotification',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AccountId: '', BudgetName: '', Notification: '', MaxResults: '', NextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeSubscribersForNotification';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","BudgetName":"","Notification":"","MaxResults":"","NextToken":""}'
};
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeSubscribersForNotification',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "AccountId": "",\n "BudgetName": "",\n "Notification": "",\n "MaxResults": "",\n "NextToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeSubscribersForNotification")
.post(body)
.addHeader("x-amz-target", "")
.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/',
headers: {
'x-amz-target': '',
'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({AccountId: '', BudgetName: '', Notification: '', MaxResults: '', NextToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeSubscribersForNotification',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {AccountId: '', BudgetName: '', Notification: '', MaxResults: '', NextToken: ''},
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeSubscribersForNotification');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
AccountId: '',
BudgetName: '',
Notification: '',
MaxResults: '',
NextToken: ''
});
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeSubscribersForNotification',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AccountId: '', BudgetName: '', Notification: '', MaxResults: '', NextToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeSubscribersForNotification';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","BudgetName":"","Notification":"","MaxResults":"","NextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"AccountId": @"",
@"BudgetName": @"",
@"Notification": @"",
@"MaxResults": @"",
@"NextToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeSubscribersForNotification"]
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeSubscribersForNotification" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeSubscribersForNotification",
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([
'AccountId' => '',
'BudgetName' => '',
'Notification' => '',
'MaxResults' => '',
'NextToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeSubscribersForNotification', [
'body' => '{
"AccountId": "",
"BudgetName": "",
"Notification": "",
"MaxResults": "",
"NextToken": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeSubscribersForNotification');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'AccountId' => '',
'BudgetName' => '',
'Notification' => '',
'MaxResults' => '',
'NextToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'AccountId' => '',
'BudgetName' => '',
'Notification' => '',
'MaxResults' => '',
'NextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeSubscribersForNotification');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeSubscribersForNotification' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"BudgetName": "",
"Notification": "",
"MaxResults": "",
"NextToken": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeSubscribersForNotification' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"BudgetName": "",
"Notification": "",
"MaxResults": "",
"NextToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeSubscribersForNotification"
payload = {
"AccountId": "",
"BudgetName": "",
"Notification": "",
"MaxResults": "",
"NextToken": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeSubscribersForNotification"
payload <- "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeSubscribersForNotification")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\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/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"MaxResults\": \"\",\n \"NextToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeSubscribersForNotification";
let payload = json!({
"AccountId": "",
"BudgetName": "",
"Notification": "",
"MaxResults": "",
"NextToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
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}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeSubscribersForNotification' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"AccountId": "",
"BudgetName": "",
"Notification": "",
"MaxResults": "",
"NextToken": ""
}'
echo '{
"AccountId": "",
"BudgetName": "",
"Notification": "",
"MaxResults": "",
"NextToken": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeSubscribersForNotification' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "AccountId": "",\n "BudgetName": "",\n "Notification": "",\n "MaxResults": "",\n "NextToken": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeSubscribersForNotification'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"AccountId": "",
"BudgetName": "",
"Notification": "",
"MaxResults": "",
"NextToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.DescribeSubscribersForNotification")! 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
ExecuteBudgetAction
{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.ExecuteBudgetAction
HEADERS
X-Amz-Target
BODY json
{
"AccountId": "",
"BudgetName": "",
"ActionId": "",
"ExecutionType": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.ExecuteBudgetAction");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"ExecutionType\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.ExecuteBudgetAction" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:AccountId ""
:BudgetName ""
:ActionId ""
:ExecutionType ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.ExecuteBudgetAction"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"ExecutionType\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.ExecuteBudgetAction"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"ExecutionType\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.ExecuteBudgetAction");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"ExecutionType\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.ExecuteBudgetAction"
payload := strings.NewReader("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"ExecutionType\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
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/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 82
{
"AccountId": "",
"BudgetName": "",
"ActionId": "",
"ExecutionType": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.ExecuteBudgetAction")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"ExecutionType\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.ExecuteBudgetAction"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"ExecutionType\": \"\"\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 \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"ExecutionType\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.ExecuteBudgetAction")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.ExecuteBudgetAction")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"ExecutionType\": \"\"\n}")
.asString();
const data = JSON.stringify({
AccountId: '',
BudgetName: '',
ActionId: '',
ExecutionType: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.ExecuteBudgetAction');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.ExecuteBudgetAction',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AccountId: '', BudgetName: '', ActionId: '', ExecutionType: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.ExecuteBudgetAction';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","BudgetName":"","ActionId":"","ExecutionType":""}'
};
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}}/#X-Amz-Target=AWSBudgetServiceGateway.ExecuteBudgetAction',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "AccountId": "",\n "BudgetName": "",\n "ActionId": "",\n "ExecutionType": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"ExecutionType\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.ExecuteBudgetAction")
.post(body)
.addHeader("x-amz-target", "")
.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/',
headers: {
'x-amz-target': '',
'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({AccountId: '', BudgetName: '', ActionId: '', ExecutionType: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.ExecuteBudgetAction',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {AccountId: '', BudgetName: '', ActionId: '', ExecutionType: ''},
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}}/#X-Amz-Target=AWSBudgetServiceGateway.ExecuteBudgetAction');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
AccountId: '',
BudgetName: '',
ActionId: '',
ExecutionType: ''
});
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}}/#X-Amz-Target=AWSBudgetServiceGateway.ExecuteBudgetAction',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AccountId: '', BudgetName: '', ActionId: '', ExecutionType: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.ExecuteBudgetAction';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","BudgetName":"","ActionId":"","ExecutionType":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"AccountId": @"",
@"BudgetName": @"",
@"ActionId": @"",
@"ExecutionType": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.ExecuteBudgetAction"]
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}}/#X-Amz-Target=AWSBudgetServiceGateway.ExecuteBudgetAction" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"ExecutionType\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.ExecuteBudgetAction",
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([
'AccountId' => '',
'BudgetName' => '',
'ActionId' => '',
'ExecutionType' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.ExecuteBudgetAction', [
'body' => '{
"AccountId": "",
"BudgetName": "",
"ActionId": "",
"ExecutionType": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.ExecuteBudgetAction');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'AccountId' => '',
'BudgetName' => '',
'ActionId' => '',
'ExecutionType' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'AccountId' => '',
'BudgetName' => '',
'ActionId' => '',
'ExecutionType' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.ExecuteBudgetAction');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.ExecuteBudgetAction' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"BudgetName": "",
"ActionId": "",
"ExecutionType": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.ExecuteBudgetAction' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"BudgetName": "",
"ActionId": "",
"ExecutionType": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"ExecutionType\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.ExecuteBudgetAction"
payload = {
"AccountId": "",
"BudgetName": "",
"ActionId": "",
"ExecutionType": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.ExecuteBudgetAction"
payload <- "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"ExecutionType\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.ExecuteBudgetAction")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"ExecutionType\": \"\"\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/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"ExecutionType\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.ExecuteBudgetAction";
let payload = json!({
"AccountId": "",
"BudgetName": "",
"ActionId": "",
"ExecutionType": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
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}}/#X-Amz-Target=AWSBudgetServiceGateway.ExecuteBudgetAction' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"AccountId": "",
"BudgetName": "",
"ActionId": "",
"ExecutionType": ""
}'
echo '{
"AccountId": "",
"BudgetName": "",
"ActionId": "",
"ExecutionType": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.ExecuteBudgetAction' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "AccountId": "",\n "BudgetName": "",\n "ActionId": "",\n "ExecutionType": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.ExecuteBudgetAction'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"AccountId": "",
"BudgetName": "",
"ActionId": "",
"ExecutionType": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.ExecuteBudgetAction")! 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
UpdateBudget
{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudget
HEADERS
X-Amz-Target
BODY json
{
"AccountId": "",
"NewBudget": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudget");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"AccountId\": \"\",\n \"NewBudget\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudget" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:AccountId ""
:NewBudget ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudget"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"AccountId\": \"\",\n \"NewBudget\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudget"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"AccountId\": \"\",\n \"NewBudget\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudget");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"AccountId\": \"\",\n \"NewBudget\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudget"
payload := strings.NewReader("{\n \"AccountId\": \"\",\n \"NewBudget\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
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/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 40
{
"AccountId": "",
"NewBudget": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudget")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"AccountId\": \"\",\n \"NewBudget\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudget"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"AccountId\": \"\",\n \"NewBudget\": \"\"\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 \"AccountId\": \"\",\n \"NewBudget\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudget")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudget")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"AccountId\": \"\",\n \"NewBudget\": \"\"\n}")
.asString();
const data = JSON.stringify({
AccountId: '',
NewBudget: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudget');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudget',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AccountId: '', NewBudget: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudget';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","NewBudget":""}'
};
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}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudget',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "AccountId": "",\n "NewBudget": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"AccountId\": \"\",\n \"NewBudget\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudget")
.post(body)
.addHeader("x-amz-target", "")
.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/',
headers: {
'x-amz-target': '',
'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({AccountId: '', NewBudget: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudget',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {AccountId: '', NewBudget: ''},
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}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudget');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
AccountId: '',
NewBudget: ''
});
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}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudget',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AccountId: '', NewBudget: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudget';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","NewBudget":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"AccountId": @"",
@"NewBudget": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudget"]
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}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudget" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"AccountId\": \"\",\n \"NewBudget\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudget",
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([
'AccountId' => '',
'NewBudget' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudget', [
'body' => '{
"AccountId": "",
"NewBudget": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudget');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'AccountId' => '',
'NewBudget' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'AccountId' => '',
'NewBudget' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudget');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudget' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"NewBudget": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudget' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"NewBudget": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"AccountId\": \"\",\n \"NewBudget\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudget"
payload = {
"AccountId": "",
"NewBudget": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudget"
payload <- "{\n \"AccountId\": \"\",\n \"NewBudget\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudget")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"AccountId\": \"\",\n \"NewBudget\": \"\"\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/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"AccountId\": \"\",\n \"NewBudget\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudget";
let payload = json!({
"AccountId": "",
"NewBudget": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
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}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudget' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"AccountId": "",
"NewBudget": ""
}'
echo '{
"AccountId": "",
"NewBudget": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudget' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "AccountId": "",\n "NewBudget": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudget'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"AccountId": "",
"NewBudget": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudget")! 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
UpdateBudgetAction
{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudgetAction
HEADERS
X-Amz-Target
BODY json
{
"AccountId": "",
"BudgetName": "",
"ActionId": "",
"NotificationType": "",
"ActionThreshold": {
"ActionThresholdValue": "",
"ActionThresholdType": ""
},
"Definition": {
"IamActionDefinition": "",
"ScpActionDefinition": "",
"SsmActionDefinition": ""
},
"ExecutionRoleArn": "",
"ApprovalModel": "",
"Subscribers": [
{
"SubscriptionType": "",
"Address": ""
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudgetAction");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"NotificationType\": \"\",\n \"ActionThreshold\": {\n \"ActionThresholdValue\": \"\",\n \"ActionThresholdType\": \"\"\n },\n \"Definition\": {\n \"IamActionDefinition\": \"\",\n \"ScpActionDefinition\": \"\",\n \"SsmActionDefinition\": \"\"\n },\n \"ExecutionRoleArn\": \"\",\n \"ApprovalModel\": \"\",\n \"Subscribers\": [\n {\n \"SubscriptionType\": \"\",\n \"Address\": \"\"\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudgetAction" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:AccountId ""
:BudgetName ""
:ActionId ""
:NotificationType ""
:ActionThreshold {:ActionThresholdValue ""
:ActionThresholdType ""}
:Definition {:IamActionDefinition ""
:ScpActionDefinition ""
:SsmActionDefinition ""}
:ExecutionRoleArn ""
:ApprovalModel ""
:Subscribers [{:SubscriptionType ""
:Address ""}]}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudgetAction"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"NotificationType\": \"\",\n \"ActionThreshold\": {\n \"ActionThresholdValue\": \"\",\n \"ActionThresholdType\": \"\"\n },\n \"Definition\": {\n \"IamActionDefinition\": \"\",\n \"ScpActionDefinition\": \"\",\n \"SsmActionDefinition\": \"\"\n },\n \"ExecutionRoleArn\": \"\",\n \"ApprovalModel\": \"\",\n \"Subscribers\": [\n {\n \"SubscriptionType\": \"\",\n \"Address\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudgetAction"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"NotificationType\": \"\",\n \"ActionThreshold\": {\n \"ActionThresholdValue\": \"\",\n \"ActionThresholdType\": \"\"\n },\n \"Definition\": {\n \"IamActionDefinition\": \"\",\n \"ScpActionDefinition\": \"\",\n \"SsmActionDefinition\": \"\"\n },\n \"ExecutionRoleArn\": \"\",\n \"ApprovalModel\": \"\",\n \"Subscribers\": [\n {\n \"SubscriptionType\": \"\",\n \"Address\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudgetAction");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"NotificationType\": \"\",\n \"ActionThreshold\": {\n \"ActionThresholdValue\": \"\",\n \"ActionThresholdType\": \"\"\n },\n \"Definition\": {\n \"IamActionDefinition\": \"\",\n \"ScpActionDefinition\": \"\",\n \"SsmActionDefinition\": \"\"\n },\n \"ExecutionRoleArn\": \"\",\n \"ApprovalModel\": \"\",\n \"Subscribers\": [\n {\n \"SubscriptionType\": \"\",\n \"Address\": \"\"\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudgetAction"
payload := strings.NewReader("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"NotificationType\": \"\",\n \"ActionThreshold\": {\n \"ActionThresholdValue\": \"\",\n \"ActionThresholdType\": \"\"\n },\n \"Definition\": {\n \"IamActionDefinition\": \"\",\n \"ScpActionDefinition\": \"\",\n \"SsmActionDefinition\": \"\"\n },\n \"ExecutionRoleArn\": \"\",\n \"ApprovalModel\": \"\",\n \"Subscribers\": [\n {\n \"SubscriptionType\": \"\",\n \"Address\": \"\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
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/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 425
{
"AccountId": "",
"BudgetName": "",
"ActionId": "",
"NotificationType": "",
"ActionThreshold": {
"ActionThresholdValue": "",
"ActionThresholdType": ""
},
"Definition": {
"IamActionDefinition": "",
"ScpActionDefinition": "",
"SsmActionDefinition": ""
},
"ExecutionRoleArn": "",
"ApprovalModel": "",
"Subscribers": [
{
"SubscriptionType": "",
"Address": ""
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudgetAction")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"NotificationType\": \"\",\n \"ActionThreshold\": {\n \"ActionThresholdValue\": \"\",\n \"ActionThresholdType\": \"\"\n },\n \"Definition\": {\n \"IamActionDefinition\": \"\",\n \"ScpActionDefinition\": \"\",\n \"SsmActionDefinition\": \"\"\n },\n \"ExecutionRoleArn\": \"\",\n \"ApprovalModel\": \"\",\n \"Subscribers\": [\n {\n \"SubscriptionType\": \"\",\n \"Address\": \"\"\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudgetAction"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"NotificationType\": \"\",\n \"ActionThreshold\": {\n \"ActionThresholdValue\": \"\",\n \"ActionThresholdType\": \"\"\n },\n \"Definition\": {\n \"IamActionDefinition\": \"\",\n \"ScpActionDefinition\": \"\",\n \"SsmActionDefinition\": \"\"\n },\n \"ExecutionRoleArn\": \"\",\n \"ApprovalModel\": \"\",\n \"Subscribers\": [\n {\n \"SubscriptionType\": \"\",\n \"Address\": \"\"\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 \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"NotificationType\": \"\",\n \"ActionThreshold\": {\n \"ActionThresholdValue\": \"\",\n \"ActionThresholdType\": \"\"\n },\n \"Definition\": {\n \"IamActionDefinition\": \"\",\n \"ScpActionDefinition\": \"\",\n \"SsmActionDefinition\": \"\"\n },\n \"ExecutionRoleArn\": \"\",\n \"ApprovalModel\": \"\",\n \"Subscribers\": [\n {\n \"SubscriptionType\": \"\",\n \"Address\": \"\"\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudgetAction")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudgetAction")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"NotificationType\": \"\",\n \"ActionThreshold\": {\n \"ActionThresholdValue\": \"\",\n \"ActionThresholdType\": \"\"\n },\n \"Definition\": {\n \"IamActionDefinition\": \"\",\n \"ScpActionDefinition\": \"\",\n \"SsmActionDefinition\": \"\"\n },\n \"ExecutionRoleArn\": \"\",\n \"ApprovalModel\": \"\",\n \"Subscribers\": [\n {\n \"SubscriptionType\": \"\",\n \"Address\": \"\"\n }\n ]\n}")
.asString();
const data = JSON.stringify({
AccountId: '',
BudgetName: '',
ActionId: '',
NotificationType: '',
ActionThreshold: {
ActionThresholdValue: '',
ActionThresholdType: ''
},
Definition: {
IamActionDefinition: '',
ScpActionDefinition: '',
SsmActionDefinition: ''
},
ExecutionRoleArn: '',
ApprovalModel: '',
Subscribers: [
{
SubscriptionType: '',
Address: ''
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudgetAction');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudgetAction',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
AccountId: '',
BudgetName: '',
ActionId: '',
NotificationType: '',
ActionThreshold: {ActionThresholdValue: '', ActionThresholdType: ''},
Definition: {IamActionDefinition: '', ScpActionDefinition: '', SsmActionDefinition: ''},
ExecutionRoleArn: '',
ApprovalModel: '',
Subscribers: [{SubscriptionType: '', Address: ''}]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudgetAction';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","BudgetName":"","ActionId":"","NotificationType":"","ActionThreshold":{"ActionThresholdValue":"","ActionThresholdType":""},"Definition":{"IamActionDefinition":"","ScpActionDefinition":"","SsmActionDefinition":""},"ExecutionRoleArn":"","ApprovalModel":"","Subscribers":[{"SubscriptionType":"","Address":""}]}'
};
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}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudgetAction',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "AccountId": "",\n "BudgetName": "",\n "ActionId": "",\n "NotificationType": "",\n "ActionThreshold": {\n "ActionThresholdValue": "",\n "ActionThresholdType": ""\n },\n "Definition": {\n "IamActionDefinition": "",\n "ScpActionDefinition": "",\n "SsmActionDefinition": ""\n },\n "ExecutionRoleArn": "",\n "ApprovalModel": "",\n "Subscribers": [\n {\n "SubscriptionType": "",\n "Address": ""\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 \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"NotificationType\": \"\",\n \"ActionThreshold\": {\n \"ActionThresholdValue\": \"\",\n \"ActionThresholdType\": \"\"\n },\n \"Definition\": {\n \"IamActionDefinition\": \"\",\n \"ScpActionDefinition\": \"\",\n \"SsmActionDefinition\": \"\"\n },\n \"ExecutionRoleArn\": \"\",\n \"ApprovalModel\": \"\",\n \"Subscribers\": [\n {\n \"SubscriptionType\": \"\",\n \"Address\": \"\"\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudgetAction")
.post(body)
.addHeader("x-amz-target", "")
.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/',
headers: {
'x-amz-target': '',
'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({
AccountId: '',
BudgetName: '',
ActionId: '',
NotificationType: '',
ActionThreshold: {ActionThresholdValue: '', ActionThresholdType: ''},
Definition: {IamActionDefinition: '', ScpActionDefinition: '', SsmActionDefinition: ''},
ExecutionRoleArn: '',
ApprovalModel: '',
Subscribers: [{SubscriptionType: '', Address: ''}]
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudgetAction',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {
AccountId: '',
BudgetName: '',
ActionId: '',
NotificationType: '',
ActionThreshold: {ActionThresholdValue: '', ActionThresholdType: ''},
Definition: {IamActionDefinition: '', ScpActionDefinition: '', SsmActionDefinition: ''},
ExecutionRoleArn: '',
ApprovalModel: '',
Subscribers: [{SubscriptionType: '', Address: ''}]
},
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}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudgetAction');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
AccountId: '',
BudgetName: '',
ActionId: '',
NotificationType: '',
ActionThreshold: {
ActionThresholdValue: '',
ActionThresholdType: ''
},
Definition: {
IamActionDefinition: '',
ScpActionDefinition: '',
SsmActionDefinition: ''
},
ExecutionRoleArn: '',
ApprovalModel: '',
Subscribers: [
{
SubscriptionType: '',
Address: ''
}
]
});
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}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudgetAction',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
AccountId: '',
BudgetName: '',
ActionId: '',
NotificationType: '',
ActionThreshold: {ActionThresholdValue: '', ActionThresholdType: ''},
Definition: {IamActionDefinition: '', ScpActionDefinition: '', SsmActionDefinition: ''},
ExecutionRoleArn: '',
ApprovalModel: '',
Subscribers: [{SubscriptionType: '', Address: ''}]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudgetAction';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","BudgetName":"","ActionId":"","NotificationType":"","ActionThreshold":{"ActionThresholdValue":"","ActionThresholdType":""},"Definition":{"IamActionDefinition":"","ScpActionDefinition":"","SsmActionDefinition":""},"ExecutionRoleArn":"","ApprovalModel":"","Subscribers":[{"SubscriptionType":"","Address":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"AccountId": @"",
@"BudgetName": @"",
@"ActionId": @"",
@"NotificationType": @"",
@"ActionThreshold": @{ @"ActionThresholdValue": @"", @"ActionThresholdType": @"" },
@"Definition": @{ @"IamActionDefinition": @"", @"ScpActionDefinition": @"", @"SsmActionDefinition": @"" },
@"ExecutionRoleArn": @"",
@"ApprovalModel": @"",
@"Subscribers": @[ @{ @"SubscriptionType": @"", @"Address": @"" } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudgetAction"]
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}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudgetAction" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"NotificationType\": \"\",\n \"ActionThreshold\": {\n \"ActionThresholdValue\": \"\",\n \"ActionThresholdType\": \"\"\n },\n \"Definition\": {\n \"IamActionDefinition\": \"\",\n \"ScpActionDefinition\": \"\",\n \"SsmActionDefinition\": \"\"\n },\n \"ExecutionRoleArn\": \"\",\n \"ApprovalModel\": \"\",\n \"Subscribers\": [\n {\n \"SubscriptionType\": \"\",\n \"Address\": \"\"\n }\n ]\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudgetAction",
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([
'AccountId' => '',
'BudgetName' => '',
'ActionId' => '',
'NotificationType' => '',
'ActionThreshold' => [
'ActionThresholdValue' => '',
'ActionThresholdType' => ''
],
'Definition' => [
'IamActionDefinition' => '',
'ScpActionDefinition' => '',
'SsmActionDefinition' => ''
],
'ExecutionRoleArn' => '',
'ApprovalModel' => '',
'Subscribers' => [
[
'SubscriptionType' => '',
'Address' => ''
]
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudgetAction', [
'body' => '{
"AccountId": "",
"BudgetName": "",
"ActionId": "",
"NotificationType": "",
"ActionThreshold": {
"ActionThresholdValue": "",
"ActionThresholdType": ""
},
"Definition": {
"IamActionDefinition": "",
"ScpActionDefinition": "",
"SsmActionDefinition": ""
},
"ExecutionRoleArn": "",
"ApprovalModel": "",
"Subscribers": [
{
"SubscriptionType": "",
"Address": ""
}
]
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudgetAction');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'AccountId' => '',
'BudgetName' => '',
'ActionId' => '',
'NotificationType' => '',
'ActionThreshold' => [
'ActionThresholdValue' => '',
'ActionThresholdType' => ''
],
'Definition' => [
'IamActionDefinition' => '',
'ScpActionDefinition' => '',
'SsmActionDefinition' => ''
],
'ExecutionRoleArn' => '',
'ApprovalModel' => '',
'Subscribers' => [
[
'SubscriptionType' => '',
'Address' => ''
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'AccountId' => '',
'BudgetName' => '',
'ActionId' => '',
'NotificationType' => '',
'ActionThreshold' => [
'ActionThresholdValue' => '',
'ActionThresholdType' => ''
],
'Definition' => [
'IamActionDefinition' => '',
'ScpActionDefinition' => '',
'SsmActionDefinition' => ''
],
'ExecutionRoleArn' => '',
'ApprovalModel' => '',
'Subscribers' => [
[
'SubscriptionType' => '',
'Address' => ''
]
]
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudgetAction');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudgetAction' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"BudgetName": "",
"ActionId": "",
"NotificationType": "",
"ActionThreshold": {
"ActionThresholdValue": "",
"ActionThresholdType": ""
},
"Definition": {
"IamActionDefinition": "",
"ScpActionDefinition": "",
"SsmActionDefinition": ""
},
"ExecutionRoleArn": "",
"ApprovalModel": "",
"Subscribers": [
{
"SubscriptionType": "",
"Address": ""
}
]
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudgetAction' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"BudgetName": "",
"ActionId": "",
"NotificationType": "",
"ActionThreshold": {
"ActionThresholdValue": "",
"ActionThresholdType": ""
},
"Definition": {
"IamActionDefinition": "",
"ScpActionDefinition": "",
"SsmActionDefinition": ""
},
"ExecutionRoleArn": "",
"ApprovalModel": "",
"Subscribers": [
{
"SubscriptionType": "",
"Address": ""
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"NotificationType\": \"\",\n \"ActionThreshold\": {\n \"ActionThresholdValue\": \"\",\n \"ActionThresholdType\": \"\"\n },\n \"Definition\": {\n \"IamActionDefinition\": \"\",\n \"ScpActionDefinition\": \"\",\n \"SsmActionDefinition\": \"\"\n },\n \"ExecutionRoleArn\": \"\",\n \"ApprovalModel\": \"\",\n \"Subscribers\": [\n {\n \"SubscriptionType\": \"\",\n \"Address\": \"\"\n }\n ]\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudgetAction"
payload = {
"AccountId": "",
"BudgetName": "",
"ActionId": "",
"NotificationType": "",
"ActionThreshold": {
"ActionThresholdValue": "",
"ActionThresholdType": ""
},
"Definition": {
"IamActionDefinition": "",
"ScpActionDefinition": "",
"SsmActionDefinition": ""
},
"ExecutionRoleArn": "",
"ApprovalModel": "",
"Subscribers": [
{
"SubscriptionType": "",
"Address": ""
}
]
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudgetAction"
payload <- "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"NotificationType\": \"\",\n \"ActionThreshold\": {\n \"ActionThresholdValue\": \"\",\n \"ActionThresholdType\": \"\"\n },\n \"Definition\": {\n \"IamActionDefinition\": \"\",\n \"ScpActionDefinition\": \"\",\n \"SsmActionDefinition\": \"\"\n },\n \"ExecutionRoleArn\": \"\",\n \"ApprovalModel\": \"\",\n \"Subscribers\": [\n {\n \"SubscriptionType\": \"\",\n \"Address\": \"\"\n }\n ]\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudgetAction")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"NotificationType\": \"\",\n \"ActionThreshold\": {\n \"ActionThresholdValue\": \"\",\n \"ActionThresholdType\": \"\"\n },\n \"Definition\": {\n \"IamActionDefinition\": \"\",\n \"ScpActionDefinition\": \"\",\n \"SsmActionDefinition\": \"\"\n },\n \"ExecutionRoleArn\": \"\",\n \"ApprovalModel\": \"\",\n \"Subscribers\": [\n {\n \"SubscriptionType\": \"\",\n \"Address\": \"\"\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/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"ActionId\": \"\",\n \"NotificationType\": \"\",\n \"ActionThreshold\": {\n \"ActionThresholdValue\": \"\",\n \"ActionThresholdType\": \"\"\n },\n \"Definition\": {\n \"IamActionDefinition\": \"\",\n \"ScpActionDefinition\": \"\",\n \"SsmActionDefinition\": \"\"\n },\n \"ExecutionRoleArn\": \"\",\n \"ApprovalModel\": \"\",\n \"Subscribers\": [\n {\n \"SubscriptionType\": \"\",\n \"Address\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudgetAction";
let payload = json!({
"AccountId": "",
"BudgetName": "",
"ActionId": "",
"NotificationType": "",
"ActionThreshold": json!({
"ActionThresholdValue": "",
"ActionThresholdType": ""
}),
"Definition": json!({
"IamActionDefinition": "",
"ScpActionDefinition": "",
"SsmActionDefinition": ""
}),
"ExecutionRoleArn": "",
"ApprovalModel": "",
"Subscribers": (
json!({
"SubscriptionType": "",
"Address": ""
})
)
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
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}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudgetAction' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"AccountId": "",
"BudgetName": "",
"ActionId": "",
"NotificationType": "",
"ActionThreshold": {
"ActionThresholdValue": "",
"ActionThresholdType": ""
},
"Definition": {
"IamActionDefinition": "",
"ScpActionDefinition": "",
"SsmActionDefinition": ""
},
"ExecutionRoleArn": "",
"ApprovalModel": "",
"Subscribers": [
{
"SubscriptionType": "",
"Address": ""
}
]
}'
echo '{
"AccountId": "",
"BudgetName": "",
"ActionId": "",
"NotificationType": "",
"ActionThreshold": {
"ActionThresholdValue": "",
"ActionThresholdType": ""
},
"Definition": {
"IamActionDefinition": "",
"ScpActionDefinition": "",
"SsmActionDefinition": ""
},
"ExecutionRoleArn": "",
"ApprovalModel": "",
"Subscribers": [
{
"SubscriptionType": "",
"Address": ""
}
]
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudgetAction' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "AccountId": "",\n "BudgetName": "",\n "ActionId": "",\n "NotificationType": "",\n "ActionThreshold": {\n "ActionThresholdValue": "",\n "ActionThresholdType": ""\n },\n "Definition": {\n "IamActionDefinition": "",\n "ScpActionDefinition": "",\n "SsmActionDefinition": ""\n },\n "ExecutionRoleArn": "",\n "ApprovalModel": "",\n "Subscribers": [\n {\n "SubscriptionType": "",\n "Address": ""\n }\n ]\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudgetAction'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"AccountId": "",
"BudgetName": "",
"ActionId": "",
"NotificationType": "",
"ActionThreshold": [
"ActionThresholdValue": "",
"ActionThresholdType": ""
],
"Definition": [
"IamActionDefinition": "",
"ScpActionDefinition": "",
"SsmActionDefinition": ""
],
"ExecutionRoleArn": "",
"ApprovalModel": "",
"Subscribers": [
[
"SubscriptionType": "",
"Address": ""
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateBudgetAction")! 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
UpdateNotification
{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateNotification
HEADERS
X-Amz-Target
BODY json
{
"AccountId": "",
"BudgetName": "",
"OldNotification": "",
"NewNotification": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateNotification");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"OldNotification\": \"\",\n \"NewNotification\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateNotification" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:AccountId ""
:BudgetName ""
:OldNotification ""
:NewNotification ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateNotification"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"OldNotification\": \"\",\n \"NewNotification\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateNotification"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"OldNotification\": \"\",\n \"NewNotification\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateNotification");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"OldNotification\": \"\",\n \"NewNotification\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateNotification"
payload := strings.NewReader("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"OldNotification\": \"\",\n \"NewNotification\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
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/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 91
{
"AccountId": "",
"BudgetName": "",
"OldNotification": "",
"NewNotification": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateNotification")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"OldNotification\": \"\",\n \"NewNotification\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateNotification"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"OldNotification\": \"\",\n \"NewNotification\": \"\"\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 \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"OldNotification\": \"\",\n \"NewNotification\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateNotification")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateNotification")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"OldNotification\": \"\",\n \"NewNotification\": \"\"\n}")
.asString();
const data = JSON.stringify({
AccountId: '',
BudgetName: '',
OldNotification: '',
NewNotification: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateNotification');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateNotification',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AccountId: '', BudgetName: '', OldNotification: '', NewNotification: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateNotification';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","BudgetName":"","OldNotification":"","NewNotification":""}'
};
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}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateNotification',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "AccountId": "",\n "BudgetName": "",\n "OldNotification": "",\n "NewNotification": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"OldNotification\": \"\",\n \"NewNotification\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateNotification")
.post(body)
.addHeader("x-amz-target", "")
.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/',
headers: {
'x-amz-target': '',
'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({AccountId: '', BudgetName: '', OldNotification: '', NewNotification: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateNotification',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {AccountId: '', BudgetName: '', OldNotification: '', NewNotification: ''},
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}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateNotification');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
AccountId: '',
BudgetName: '',
OldNotification: '',
NewNotification: ''
});
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}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateNotification',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {AccountId: '', BudgetName: '', OldNotification: '', NewNotification: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateNotification';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","BudgetName":"","OldNotification":"","NewNotification":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"AccountId": @"",
@"BudgetName": @"",
@"OldNotification": @"",
@"NewNotification": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateNotification"]
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}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateNotification" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"OldNotification\": \"\",\n \"NewNotification\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateNotification",
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([
'AccountId' => '',
'BudgetName' => '',
'OldNotification' => '',
'NewNotification' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateNotification', [
'body' => '{
"AccountId": "",
"BudgetName": "",
"OldNotification": "",
"NewNotification": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateNotification');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'AccountId' => '',
'BudgetName' => '',
'OldNotification' => '',
'NewNotification' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'AccountId' => '',
'BudgetName' => '',
'OldNotification' => '',
'NewNotification' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateNotification');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateNotification' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"BudgetName": "",
"OldNotification": "",
"NewNotification": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateNotification' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"BudgetName": "",
"OldNotification": "",
"NewNotification": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"OldNotification\": \"\",\n \"NewNotification\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateNotification"
payload = {
"AccountId": "",
"BudgetName": "",
"OldNotification": "",
"NewNotification": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateNotification"
payload <- "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"OldNotification\": \"\",\n \"NewNotification\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateNotification")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"OldNotification\": \"\",\n \"NewNotification\": \"\"\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/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"OldNotification\": \"\",\n \"NewNotification\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateNotification";
let payload = json!({
"AccountId": "",
"BudgetName": "",
"OldNotification": "",
"NewNotification": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
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}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateNotification' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"AccountId": "",
"BudgetName": "",
"OldNotification": "",
"NewNotification": ""
}'
echo '{
"AccountId": "",
"BudgetName": "",
"OldNotification": "",
"NewNotification": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateNotification' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "AccountId": "",\n "BudgetName": "",\n "OldNotification": "",\n "NewNotification": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateNotification'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"AccountId": "",
"BudgetName": "",
"OldNotification": "",
"NewNotification": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateNotification")! 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
UpdateSubscriber
{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateSubscriber
HEADERS
X-Amz-Target
BODY json
{
"AccountId": "",
"BudgetName": "",
"Notification": "",
"OldSubscriber": "",
"NewSubscriber": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateSubscriber");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-amz-target: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"OldSubscriber\": \"\",\n \"NewSubscriber\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateSubscriber" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:AccountId ""
:BudgetName ""
:Notification ""
:OldSubscriber ""
:NewSubscriber ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateSubscriber"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"OldSubscriber\": \"\",\n \"NewSubscriber\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateSubscriber"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"OldSubscriber\": \"\",\n \"NewSubscriber\": \"\"\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}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateSubscriber");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"OldSubscriber\": \"\",\n \"NewSubscriber\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateSubscriber"
payload := strings.NewReader("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"OldSubscriber\": \"\",\n \"NewSubscriber\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-amz-target", "")
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/ HTTP/1.1
X-Amz-Target:
Content-Type: application/json
Host: example.com
Content-Length: 109
{
"AccountId": "",
"BudgetName": "",
"Notification": "",
"OldSubscriber": "",
"NewSubscriber": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateSubscriber")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"OldSubscriber\": \"\",\n \"NewSubscriber\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateSubscriber"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"OldSubscriber\": \"\",\n \"NewSubscriber\": \"\"\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 \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"OldSubscriber\": \"\",\n \"NewSubscriber\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateSubscriber")
.post(body)
.addHeader("x-amz-target", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateSubscriber")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"OldSubscriber\": \"\",\n \"NewSubscriber\": \"\"\n}")
.asString();
const data = JSON.stringify({
AccountId: '',
BudgetName: '',
Notification: '',
OldSubscriber: '',
NewSubscriber: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateSubscriber');
xhr.setRequestHeader('x-amz-target', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateSubscriber',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
AccountId: '',
BudgetName: '',
Notification: '',
OldSubscriber: '',
NewSubscriber: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateSubscriber';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","BudgetName":"","Notification":"","OldSubscriber":"","NewSubscriber":""}'
};
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}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateSubscriber',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "AccountId": "",\n "BudgetName": "",\n "Notification": "",\n "OldSubscriber": "",\n "NewSubscriber": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"OldSubscriber\": \"\",\n \"NewSubscriber\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateSubscriber")
.post(body)
.addHeader("x-amz-target", "")
.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/',
headers: {
'x-amz-target': '',
'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({
AccountId: '',
BudgetName: '',
Notification: '',
OldSubscriber: '',
NewSubscriber: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateSubscriber',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {
AccountId: '',
BudgetName: '',
Notification: '',
OldSubscriber: '',
NewSubscriber: ''
},
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}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateSubscriber');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
AccountId: '',
BudgetName: '',
Notification: '',
OldSubscriber: '',
NewSubscriber: ''
});
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}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateSubscriber',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
AccountId: '',
BudgetName: '',
Notification: '',
OldSubscriber: '',
NewSubscriber: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateSubscriber';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"AccountId":"","BudgetName":"","Notification":"","OldSubscriber":"","NewSubscriber":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-amz-target": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"AccountId": @"",
@"BudgetName": @"",
@"Notification": @"",
@"OldSubscriber": @"",
@"NewSubscriber": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateSubscriber"]
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}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateSubscriber" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"OldSubscriber\": \"\",\n \"NewSubscriber\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateSubscriber",
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([
'AccountId' => '',
'BudgetName' => '',
'Notification' => '',
'OldSubscriber' => '',
'NewSubscriber' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-amz-target: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateSubscriber', [
'body' => '{
"AccountId": "",
"BudgetName": "",
"Notification": "",
"OldSubscriber": "",
"NewSubscriber": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateSubscriber');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'AccountId' => '',
'BudgetName' => '',
'Notification' => '',
'OldSubscriber' => '',
'NewSubscriber' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'AccountId' => '',
'BudgetName' => '',
'Notification' => '',
'OldSubscriber' => '',
'NewSubscriber' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateSubscriber');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateSubscriber' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"BudgetName": "",
"Notification": "",
"OldSubscriber": "",
"NewSubscriber": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateSubscriber' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AccountId": "",
"BudgetName": "",
"Notification": "",
"OldSubscriber": "",
"NewSubscriber": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"OldSubscriber\": \"\",\n \"NewSubscriber\": \"\"\n}"
headers = {
'x-amz-target': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateSubscriber"
payload = {
"AccountId": "",
"BudgetName": "",
"Notification": "",
"OldSubscriber": "",
"NewSubscriber": ""
}
headers = {
"x-amz-target": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateSubscriber"
payload <- "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"OldSubscriber\": \"\",\n \"NewSubscriber\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-amz-target' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateSubscriber")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-amz-target"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"OldSubscriber\": \"\",\n \"NewSubscriber\": \"\"\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/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"AccountId\": \"\",\n \"BudgetName\": \"\",\n \"Notification\": \"\",\n \"OldSubscriber\": \"\",\n \"NewSubscriber\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateSubscriber";
let payload = json!({
"AccountId": "",
"BudgetName": "",
"Notification": "",
"OldSubscriber": "",
"NewSubscriber": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-amz-target", "".parse().unwrap());
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}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateSubscriber' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"AccountId": "",
"BudgetName": "",
"Notification": "",
"OldSubscriber": "",
"NewSubscriber": ""
}'
echo '{
"AccountId": "",
"BudgetName": "",
"Notification": "",
"OldSubscriber": "",
"NewSubscriber": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateSubscriber' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "AccountId": "",\n "BudgetName": "",\n "Notification": "",\n "OldSubscriber": "",\n "NewSubscriber": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateSubscriber'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"AccountId": "",
"BudgetName": "",
"Notification": "",
"OldSubscriber": "",
"NewSubscriber": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=AWSBudgetServiceGateway.UpdateSubscriber")! 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()