AWS Certificate Manager Private Certificate Authority
POST
CreateCertificateAuthority
{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreateCertificateAuthority
HEADERS
X-Amz-Target
BODY json
{
"CertificateAuthorityConfiguration": "",
"RevocationConfiguration": "",
"CertificateAuthorityType": "",
"IdempotencyToken": "",
"KeyStorageSecurityStandard": "",
"Tags": "",
"UsageMode": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreateCertificateAuthority");
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 \"CertificateAuthorityConfiguration\": \"\",\n \"RevocationConfiguration\": \"\",\n \"CertificateAuthorityType\": \"\",\n \"IdempotencyToken\": \"\",\n \"KeyStorageSecurityStandard\": \"\",\n \"Tags\": \"\",\n \"UsageMode\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreateCertificateAuthority" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:CertificateAuthorityConfiguration ""
:RevocationConfiguration ""
:CertificateAuthorityType ""
:IdempotencyToken ""
:KeyStorageSecurityStandard ""
:Tags ""
:UsageMode ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreateCertificateAuthority"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"CertificateAuthorityConfiguration\": \"\",\n \"RevocationConfiguration\": \"\",\n \"CertificateAuthorityType\": \"\",\n \"IdempotencyToken\": \"\",\n \"KeyStorageSecurityStandard\": \"\",\n \"Tags\": \"\",\n \"UsageMode\": \"\"\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=ACMPrivateCA.CreateCertificateAuthority"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"CertificateAuthorityConfiguration\": \"\",\n \"RevocationConfiguration\": \"\",\n \"CertificateAuthorityType\": \"\",\n \"IdempotencyToken\": \"\",\n \"KeyStorageSecurityStandard\": \"\",\n \"Tags\": \"\",\n \"UsageMode\": \"\"\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=ACMPrivateCA.CreateCertificateAuthority");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"CertificateAuthorityConfiguration\": \"\",\n \"RevocationConfiguration\": \"\",\n \"CertificateAuthorityType\": \"\",\n \"IdempotencyToken\": \"\",\n \"KeyStorageSecurityStandard\": \"\",\n \"Tags\": \"\",\n \"UsageMode\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreateCertificateAuthority"
payload := strings.NewReader("{\n \"CertificateAuthorityConfiguration\": \"\",\n \"RevocationConfiguration\": \"\",\n \"CertificateAuthorityType\": \"\",\n \"IdempotencyToken\": \"\",\n \"KeyStorageSecurityStandard\": \"\",\n \"Tags\": \"\",\n \"UsageMode\": \"\"\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: 207
{
"CertificateAuthorityConfiguration": "",
"RevocationConfiguration": "",
"CertificateAuthorityType": "",
"IdempotencyToken": "",
"KeyStorageSecurityStandard": "",
"Tags": "",
"UsageMode": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreateCertificateAuthority")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"CertificateAuthorityConfiguration\": \"\",\n \"RevocationConfiguration\": \"\",\n \"CertificateAuthorityType\": \"\",\n \"IdempotencyToken\": \"\",\n \"KeyStorageSecurityStandard\": \"\",\n \"Tags\": \"\",\n \"UsageMode\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreateCertificateAuthority"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"CertificateAuthorityConfiguration\": \"\",\n \"RevocationConfiguration\": \"\",\n \"CertificateAuthorityType\": \"\",\n \"IdempotencyToken\": \"\",\n \"KeyStorageSecurityStandard\": \"\",\n \"Tags\": \"\",\n \"UsageMode\": \"\"\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 \"CertificateAuthorityConfiguration\": \"\",\n \"RevocationConfiguration\": \"\",\n \"CertificateAuthorityType\": \"\",\n \"IdempotencyToken\": \"\",\n \"KeyStorageSecurityStandard\": \"\",\n \"Tags\": \"\",\n \"UsageMode\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreateCertificateAuthority")
.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=ACMPrivateCA.CreateCertificateAuthority")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"CertificateAuthorityConfiguration\": \"\",\n \"RevocationConfiguration\": \"\",\n \"CertificateAuthorityType\": \"\",\n \"IdempotencyToken\": \"\",\n \"KeyStorageSecurityStandard\": \"\",\n \"Tags\": \"\",\n \"UsageMode\": \"\"\n}")
.asString();
const data = JSON.stringify({
CertificateAuthorityConfiguration: '',
RevocationConfiguration: '',
CertificateAuthorityType: '',
IdempotencyToken: '',
KeyStorageSecurityStandard: '',
Tags: '',
UsageMode: ''
});
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=ACMPrivateCA.CreateCertificateAuthority');
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=ACMPrivateCA.CreateCertificateAuthority',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
CertificateAuthorityConfiguration: '',
RevocationConfiguration: '',
CertificateAuthorityType: '',
IdempotencyToken: '',
KeyStorageSecurityStandard: '',
Tags: '',
UsageMode: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreateCertificateAuthority';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"CertificateAuthorityConfiguration":"","RevocationConfiguration":"","CertificateAuthorityType":"","IdempotencyToken":"","KeyStorageSecurityStandard":"","Tags":"","UsageMode":""}'
};
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=ACMPrivateCA.CreateCertificateAuthority',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "CertificateAuthorityConfiguration": "",\n "RevocationConfiguration": "",\n "CertificateAuthorityType": "",\n "IdempotencyToken": "",\n "KeyStorageSecurityStandard": "",\n "Tags": "",\n "UsageMode": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"CertificateAuthorityConfiguration\": \"\",\n \"RevocationConfiguration\": \"\",\n \"CertificateAuthorityType\": \"\",\n \"IdempotencyToken\": \"\",\n \"KeyStorageSecurityStandard\": \"\",\n \"Tags\": \"\",\n \"UsageMode\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreateCertificateAuthority")
.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({
CertificateAuthorityConfiguration: '',
RevocationConfiguration: '',
CertificateAuthorityType: '',
IdempotencyToken: '',
KeyStorageSecurityStandard: '',
Tags: '',
UsageMode: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreateCertificateAuthority',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {
CertificateAuthorityConfiguration: '',
RevocationConfiguration: '',
CertificateAuthorityType: '',
IdempotencyToken: '',
KeyStorageSecurityStandard: '',
Tags: '',
UsageMode: ''
},
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=ACMPrivateCA.CreateCertificateAuthority');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
CertificateAuthorityConfiguration: '',
RevocationConfiguration: '',
CertificateAuthorityType: '',
IdempotencyToken: '',
KeyStorageSecurityStandard: '',
Tags: '',
UsageMode: ''
});
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=ACMPrivateCA.CreateCertificateAuthority',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
CertificateAuthorityConfiguration: '',
RevocationConfiguration: '',
CertificateAuthorityType: '',
IdempotencyToken: '',
KeyStorageSecurityStandard: '',
Tags: '',
UsageMode: ''
}
};
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=ACMPrivateCA.CreateCertificateAuthority';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"CertificateAuthorityConfiguration":"","RevocationConfiguration":"","CertificateAuthorityType":"","IdempotencyToken":"","KeyStorageSecurityStandard":"","Tags":"","UsageMode":""}'
};
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 = @{ @"CertificateAuthorityConfiguration": @"",
@"RevocationConfiguration": @"",
@"CertificateAuthorityType": @"",
@"IdempotencyToken": @"",
@"KeyStorageSecurityStandard": @"",
@"Tags": @"",
@"UsageMode": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreateCertificateAuthority"]
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=ACMPrivateCA.CreateCertificateAuthority" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"CertificateAuthorityConfiguration\": \"\",\n \"RevocationConfiguration\": \"\",\n \"CertificateAuthorityType\": \"\",\n \"IdempotencyToken\": \"\",\n \"KeyStorageSecurityStandard\": \"\",\n \"Tags\": \"\",\n \"UsageMode\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreateCertificateAuthority",
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([
'CertificateAuthorityConfiguration' => '',
'RevocationConfiguration' => '',
'CertificateAuthorityType' => '',
'IdempotencyToken' => '',
'KeyStorageSecurityStandard' => '',
'Tags' => '',
'UsageMode' => ''
]),
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=ACMPrivateCA.CreateCertificateAuthority', [
'body' => '{
"CertificateAuthorityConfiguration": "",
"RevocationConfiguration": "",
"CertificateAuthorityType": "",
"IdempotencyToken": "",
"KeyStorageSecurityStandard": "",
"Tags": "",
"UsageMode": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreateCertificateAuthority');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'CertificateAuthorityConfiguration' => '',
'RevocationConfiguration' => '',
'CertificateAuthorityType' => '',
'IdempotencyToken' => '',
'KeyStorageSecurityStandard' => '',
'Tags' => '',
'UsageMode' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'CertificateAuthorityConfiguration' => '',
'RevocationConfiguration' => '',
'CertificateAuthorityType' => '',
'IdempotencyToken' => '',
'KeyStorageSecurityStandard' => '',
'Tags' => '',
'UsageMode' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreateCertificateAuthority');
$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=ACMPrivateCA.CreateCertificateAuthority' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"CertificateAuthorityConfiguration": "",
"RevocationConfiguration": "",
"CertificateAuthorityType": "",
"IdempotencyToken": "",
"KeyStorageSecurityStandard": "",
"Tags": "",
"UsageMode": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreateCertificateAuthority' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"CertificateAuthorityConfiguration": "",
"RevocationConfiguration": "",
"CertificateAuthorityType": "",
"IdempotencyToken": "",
"KeyStorageSecurityStandard": "",
"Tags": "",
"UsageMode": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"CertificateAuthorityConfiguration\": \"\",\n \"RevocationConfiguration\": \"\",\n \"CertificateAuthorityType\": \"\",\n \"IdempotencyToken\": \"\",\n \"KeyStorageSecurityStandard\": \"\",\n \"Tags\": \"\",\n \"UsageMode\": \"\"\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=ACMPrivateCA.CreateCertificateAuthority"
payload = {
"CertificateAuthorityConfiguration": "",
"RevocationConfiguration": "",
"CertificateAuthorityType": "",
"IdempotencyToken": "",
"KeyStorageSecurityStandard": "",
"Tags": "",
"UsageMode": ""
}
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=ACMPrivateCA.CreateCertificateAuthority"
payload <- "{\n \"CertificateAuthorityConfiguration\": \"\",\n \"RevocationConfiguration\": \"\",\n \"CertificateAuthorityType\": \"\",\n \"IdempotencyToken\": \"\",\n \"KeyStorageSecurityStandard\": \"\",\n \"Tags\": \"\",\n \"UsageMode\": \"\"\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=ACMPrivateCA.CreateCertificateAuthority")
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 \"CertificateAuthorityConfiguration\": \"\",\n \"RevocationConfiguration\": \"\",\n \"CertificateAuthorityType\": \"\",\n \"IdempotencyToken\": \"\",\n \"KeyStorageSecurityStandard\": \"\",\n \"Tags\": \"\",\n \"UsageMode\": \"\"\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 \"CertificateAuthorityConfiguration\": \"\",\n \"RevocationConfiguration\": \"\",\n \"CertificateAuthorityType\": \"\",\n \"IdempotencyToken\": \"\",\n \"KeyStorageSecurityStandard\": \"\",\n \"Tags\": \"\",\n \"UsageMode\": \"\"\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=ACMPrivateCA.CreateCertificateAuthority";
let payload = json!({
"CertificateAuthorityConfiguration": "",
"RevocationConfiguration": "",
"CertificateAuthorityType": "",
"IdempotencyToken": "",
"KeyStorageSecurityStandard": "",
"Tags": "",
"UsageMode": ""
});
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=ACMPrivateCA.CreateCertificateAuthority' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"CertificateAuthorityConfiguration": "",
"RevocationConfiguration": "",
"CertificateAuthorityType": "",
"IdempotencyToken": "",
"KeyStorageSecurityStandard": "",
"Tags": "",
"UsageMode": ""
}'
echo '{
"CertificateAuthorityConfiguration": "",
"RevocationConfiguration": "",
"CertificateAuthorityType": "",
"IdempotencyToken": "",
"KeyStorageSecurityStandard": "",
"Tags": "",
"UsageMode": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreateCertificateAuthority' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "CertificateAuthorityConfiguration": "",\n "RevocationConfiguration": "",\n "CertificateAuthorityType": "",\n "IdempotencyToken": "",\n "KeyStorageSecurityStandard": "",\n "Tags": "",\n "UsageMode": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreateCertificateAuthority'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"CertificateAuthorityConfiguration": "",
"RevocationConfiguration": "",
"CertificateAuthorityType": "",
"IdempotencyToken": "",
"KeyStorageSecurityStandard": "",
"Tags": "",
"UsageMode": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreateCertificateAuthority")! 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
CreateCertificateAuthorityAuditReport
{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreateCertificateAuthorityAuditReport
HEADERS
X-Amz-Target
BODY json
{
"CertificateAuthorityArn": "",
"S3BucketName": "",
"AuditReportResponseFormat": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreateCertificateAuthorityAuditReport");
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 \"CertificateAuthorityArn\": \"\",\n \"S3BucketName\": \"\",\n \"AuditReportResponseFormat\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreateCertificateAuthorityAuditReport" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:CertificateAuthorityArn ""
:S3BucketName ""
:AuditReportResponseFormat ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreateCertificateAuthorityAuditReport"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"CertificateAuthorityArn\": \"\",\n \"S3BucketName\": \"\",\n \"AuditReportResponseFormat\": \"\"\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=ACMPrivateCA.CreateCertificateAuthorityAuditReport"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"CertificateAuthorityArn\": \"\",\n \"S3BucketName\": \"\",\n \"AuditReportResponseFormat\": \"\"\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=ACMPrivateCA.CreateCertificateAuthorityAuditReport");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"CertificateAuthorityArn\": \"\",\n \"S3BucketName\": \"\",\n \"AuditReportResponseFormat\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreateCertificateAuthorityAuditReport"
payload := strings.NewReader("{\n \"CertificateAuthorityArn\": \"\",\n \"S3BucketName\": \"\",\n \"AuditReportResponseFormat\": \"\"\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: 92
{
"CertificateAuthorityArn": "",
"S3BucketName": "",
"AuditReportResponseFormat": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreateCertificateAuthorityAuditReport")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"CertificateAuthorityArn\": \"\",\n \"S3BucketName\": \"\",\n \"AuditReportResponseFormat\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreateCertificateAuthorityAuditReport"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"CertificateAuthorityArn\": \"\",\n \"S3BucketName\": \"\",\n \"AuditReportResponseFormat\": \"\"\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 \"CertificateAuthorityArn\": \"\",\n \"S3BucketName\": \"\",\n \"AuditReportResponseFormat\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreateCertificateAuthorityAuditReport")
.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=ACMPrivateCA.CreateCertificateAuthorityAuditReport")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"CertificateAuthorityArn\": \"\",\n \"S3BucketName\": \"\",\n \"AuditReportResponseFormat\": \"\"\n}")
.asString();
const data = JSON.stringify({
CertificateAuthorityArn: '',
S3BucketName: '',
AuditReportResponseFormat: ''
});
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=ACMPrivateCA.CreateCertificateAuthorityAuditReport');
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=ACMPrivateCA.CreateCertificateAuthorityAuditReport',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {CertificateAuthorityArn: '', S3BucketName: '', AuditReportResponseFormat: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreateCertificateAuthorityAuditReport';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"CertificateAuthorityArn":"","S3BucketName":"","AuditReportResponseFormat":""}'
};
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=ACMPrivateCA.CreateCertificateAuthorityAuditReport',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "CertificateAuthorityArn": "",\n "S3BucketName": "",\n "AuditReportResponseFormat": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"CertificateAuthorityArn\": \"\",\n \"S3BucketName\": \"\",\n \"AuditReportResponseFormat\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreateCertificateAuthorityAuditReport")
.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({CertificateAuthorityArn: '', S3BucketName: '', AuditReportResponseFormat: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreateCertificateAuthorityAuditReport',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {CertificateAuthorityArn: '', S3BucketName: '', AuditReportResponseFormat: ''},
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=ACMPrivateCA.CreateCertificateAuthorityAuditReport');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
CertificateAuthorityArn: '',
S3BucketName: '',
AuditReportResponseFormat: ''
});
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=ACMPrivateCA.CreateCertificateAuthorityAuditReport',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {CertificateAuthorityArn: '', S3BucketName: '', AuditReportResponseFormat: ''}
};
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=ACMPrivateCA.CreateCertificateAuthorityAuditReport';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"CertificateAuthorityArn":"","S3BucketName":"","AuditReportResponseFormat":""}'
};
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 = @{ @"CertificateAuthorityArn": @"",
@"S3BucketName": @"",
@"AuditReportResponseFormat": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreateCertificateAuthorityAuditReport"]
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=ACMPrivateCA.CreateCertificateAuthorityAuditReport" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"CertificateAuthorityArn\": \"\",\n \"S3BucketName\": \"\",\n \"AuditReportResponseFormat\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreateCertificateAuthorityAuditReport",
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([
'CertificateAuthorityArn' => '',
'S3BucketName' => '',
'AuditReportResponseFormat' => ''
]),
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=ACMPrivateCA.CreateCertificateAuthorityAuditReport', [
'body' => '{
"CertificateAuthorityArn": "",
"S3BucketName": "",
"AuditReportResponseFormat": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreateCertificateAuthorityAuditReport');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'CertificateAuthorityArn' => '',
'S3BucketName' => '',
'AuditReportResponseFormat' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'CertificateAuthorityArn' => '',
'S3BucketName' => '',
'AuditReportResponseFormat' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreateCertificateAuthorityAuditReport');
$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=ACMPrivateCA.CreateCertificateAuthorityAuditReport' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"CertificateAuthorityArn": "",
"S3BucketName": "",
"AuditReportResponseFormat": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreateCertificateAuthorityAuditReport' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"CertificateAuthorityArn": "",
"S3BucketName": "",
"AuditReportResponseFormat": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"CertificateAuthorityArn\": \"\",\n \"S3BucketName\": \"\",\n \"AuditReportResponseFormat\": \"\"\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=ACMPrivateCA.CreateCertificateAuthorityAuditReport"
payload = {
"CertificateAuthorityArn": "",
"S3BucketName": "",
"AuditReportResponseFormat": ""
}
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=ACMPrivateCA.CreateCertificateAuthorityAuditReport"
payload <- "{\n \"CertificateAuthorityArn\": \"\",\n \"S3BucketName\": \"\",\n \"AuditReportResponseFormat\": \"\"\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=ACMPrivateCA.CreateCertificateAuthorityAuditReport")
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 \"CertificateAuthorityArn\": \"\",\n \"S3BucketName\": \"\",\n \"AuditReportResponseFormat\": \"\"\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 \"CertificateAuthorityArn\": \"\",\n \"S3BucketName\": \"\",\n \"AuditReportResponseFormat\": \"\"\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=ACMPrivateCA.CreateCertificateAuthorityAuditReport";
let payload = json!({
"CertificateAuthorityArn": "",
"S3BucketName": "",
"AuditReportResponseFormat": ""
});
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=ACMPrivateCA.CreateCertificateAuthorityAuditReport' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"CertificateAuthorityArn": "",
"S3BucketName": "",
"AuditReportResponseFormat": ""
}'
echo '{
"CertificateAuthorityArn": "",
"S3BucketName": "",
"AuditReportResponseFormat": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreateCertificateAuthorityAuditReport' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "CertificateAuthorityArn": "",\n "S3BucketName": "",\n "AuditReportResponseFormat": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreateCertificateAuthorityAuditReport'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"CertificateAuthorityArn": "",
"S3BucketName": "",
"AuditReportResponseFormat": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreateCertificateAuthorityAuditReport")! 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
CreatePermission
{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreatePermission
HEADERS
X-Amz-Target
BODY json
{
"CertificateAuthorityArn": "",
"Principal": "",
"SourceAccount": "",
"Actions": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreatePermission");
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 \"CertificateAuthorityArn\": \"\",\n \"Principal\": \"\",\n \"SourceAccount\": \"\",\n \"Actions\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreatePermission" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:CertificateAuthorityArn ""
:Principal ""
:SourceAccount ""
:Actions ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreatePermission"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"CertificateAuthorityArn\": \"\",\n \"Principal\": \"\",\n \"SourceAccount\": \"\",\n \"Actions\": \"\"\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=ACMPrivateCA.CreatePermission"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"CertificateAuthorityArn\": \"\",\n \"Principal\": \"\",\n \"SourceAccount\": \"\",\n \"Actions\": \"\"\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=ACMPrivateCA.CreatePermission");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"CertificateAuthorityArn\": \"\",\n \"Principal\": \"\",\n \"SourceAccount\": \"\",\n \"Actions\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreatePermission"
payload := strings.NewReader("{\n \"CertificateAuthorityArn\": \"\",\n \"Principal\": \"\",\n \"SourceAccount\": \"\",\n \"Actions\": \"\"\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: 94
{
"CertificateAuthorityArn": "",
"Principal": "",
"SourceAccount": "",
"Actions": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreatePermission")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"CertificateAuthorityArn\": \"\",\n \"Principal\": \"\",\n \"SourceAccount\": \"\",\n \"Actions\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreatePermission"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"CertificateAuthorityArn\": \"\",\n \"Principal\": \"\",\n \"SourceAccount\": \"\",\n \"Actions\": \"\"\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 \"CertificateAuthorityArn\": \"\",\n \"Principal\": \"\",\n \"SourceAccount\": \"\",\n \"Actions\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreatePermission")
.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=ACMPrivateCA.CreatePermission")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"CertificateAuthorityArn\": \"\",\n \"Principal\": \"\",\n \"SourceAccount\": \"\",\n \"Actions\": \"\"\n}")
.asString();
const data = JSON.stringify({
CertificateAuthorityArn: '',
Principal: '',
SourceAccount: '',
Actions: ''
});
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=ACMPrivateCA.CreatePermission');
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=ACMPrivateCA.CreatePermission',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {CertificateAuthorityArn: '', Principal: '', SourceAccount: '', Actions: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreatePermission';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"CertificateAuthorityArn":"","Principal":"","SourceAccount":"","Actions":""}'
};
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=ACMPrivateCA.CreatePermission',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "CertificateAuthorityArn": "",\n "Principal": "",\n "SourceAccount": "",\n "Actions": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"CertificateAuthorityArn\": \"\",\n \"Principal\": \"\",\n \"SourceAccount\": \"\",\n \"Actions\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreatePermission")
.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({CertificateAuthorityArn: '', Principal: '', SourceAccount: '', Actions: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreatePermission',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {CertificateAuthorityArn: '', Principal: '', SourceAccount: '', Actions: ''},
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=ACMPrivateCA.CreatePermission');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
CertificateAuthorityArn: '',
Principal: '',
SourceAccount: '',
Actions: ''
});
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=ACMPrivateCA.CreatePermission',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {CertificateAuthorityArn: '', Principal: '', SourceAccount: '', Actions: ''}
};
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=ACMPrivateCA.CreatePermission';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"CertificateAuthorityArn":"","Principal":"","SourceAccount":"","Actions":""}'
};
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 = @{ @"CertificateAuthorityArn": @"",
@"Principal": @"",
@"SourceAccount": @"",
@"Actions": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreatePermission"]
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=ACMPrivateCA.CreatePermission" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"CertificateAuthorityArn\": \"\",\n \"Principal\": \"\",\n \"SourceAccount\": \"\",\n \"Actions\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreatePermission",
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([
'CertificateAuthorityArn' => '',
'Principal' => '',
'SourceAccount' => '',
'Actions' => ''
]),
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=ACMPrivateCA.CreatePermission', [
'body' => '{
"CertificateAuthorityArn": "",
"Principal": "",
"SourceAccount": "",
"Actions": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreatePermission');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'CertificateAuthorityArn' => '',
'Principal' => '',
'SourceAccount' => '',
'Actions' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'CertificateAuthorityArn' => '',
'Principal' => '',
'SourceAccount' => '',
'Actions' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreatePermission');
$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=ACMPrivateCA.CreatePermission' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"CertificateAuthorityArn": "",
"Principal": "",
"SourceAccount": "",
"Actions": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreatePermission' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"CertificateAuthorityArn": "",
"Principal": "",
"SourceAccount": "",
"Actions": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"CertificateAuthorityArn\": \"\",\n \"Principal\": \"\",\n \"SourceAccount\": \"\",\n \"Actions\": \"\"\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=ACMPrivateCA.CreatePermission"
payload = {
"CertificateAuthorityArn": "",
"Principal": "",
"SourceAccount": "",
"Actions": ""
}
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=ACMPrivateCA.CreatePermission"
payload <- "{\n \"CertificateAuthorityArn\": \"\",\n \"Principal\": \"\",\n \"SourceAccount\": \"\",\n \"Actions\": \"\"\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=ACMPrivateCA.CreatePermission")
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 \"CertificateAuthorityArn\": \"\",\n \"Principal\": \"\",\n \"SourceAccount\": \"\",\n \"Actions\": \"\"\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 \"CertificateAuthorityArn\": \"\",\n \"Principal\": \"\",\n \"SourceAccount\": \"\",\n \"Actions\": \"\"\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=ACMPrivateCA.CreatePermission";
let payload = json!({
"CertificateAuthorityArn": "",
"Principal": "",
"SourceAccount": "",
"Actions": ""
});
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=ACMPrivateCA.CreatePermission' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"CertificateAuthorityArn": "",
"Principal": "",
"SourceAccount": "",
"Actions": ""
}'
echo '{
"CertificateAuthorityArn": "",
"Principal": "",
"SourceAccount": "",
"Actions": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreatePermission' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "CertificateAuthorityArn": "",\n "Principal": "",\n "SourceAccount": "",\n "Actions": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreatePermission'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"CertificateAuthorityArn": "",
"Principal": "",
"SourceAccount": "",
"Actions": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.CreatePermission")! 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
DeleteCertificateAuthority
{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeleteCertificateAuthority
HEADERS
X-Amz-Target
BODY json
{
"CertificateAuthorityArn": "",
"PermanentDeletionTimeInDays": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeleteCertificateAuthority");
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 \"CertificateAuthorityArn\": \"\",\n \"PermanentDeletionTimeInDays\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeleteCertificateAuthority" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:CertificateAuthorityArn ""
:PermanentDeletionTimeInDays ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeleteCertificateAuthority"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"CertificateAuthorityArn\": \"\",\n \"PermanentDeletionTimeInDays\": \"\"\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=ACMPrivateCA.DeleteCertificateAuthority"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"CertificateAuthorityArn\": \"\",\n \"PermanentDeletionTimeInDays\": \"\"\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=ACMPrivateCA.DeleteCertificateAuthority");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"CertificateAuthorityArn\": \"\",\n \"PermanentDeletionTimeInDays\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeleteCertificateAuthority"
payload := strings.NewReader("{\n \"CertificateAuthorityArn\": \"\",\n \"PermanentDeletionTimeInDays\": \"\"\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: 72
{
"CertificateAuthorityArn": "",
"PermanentDeletionTimeInDays": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeleteCertificateAuthority")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"CertificateAuthorityArn\": \"\",\n \"PermanentDeletionTimeInDays\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeleteCertificateAuthority"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"CertificateAuthorityArn\": \"\",\n \"PermanentDeletionTimeInDays\": \"\"\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 \"CertificateAuthorityArn\": \"\",\n \"PermanentDeletionTimeInDays\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeleteCertificateAuthority")
.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=ACMPrivateCA.DeleteCertificateAuthority")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"CertificateAuthorityArn\": \"\",\n \"PermanentDeletionTimeInDays\": \"\"\n}")
.asString();
const data = JSON.stringify({
CertificateAuthorityArn: '',
PermanentDeletionTimeInDays: ''
});
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=ACMPrivateCA.DeleteCertificateAuthority');
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=ACMPrivateCA.DeleteCertificateAuthority',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {CertificateAuthorityArn: '', PermanentDeletionTimeInDays: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeleteCertificateAuthority';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"CertificateAuthorityArn":"","PermanentDeletionTimeInDays":""}'
};
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=ACMPrivateCA.DeleteCertificateAuthority',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "CertificateAuthorityArn": "",\n "PermanentDeletionTimeInDays": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"CertificateAuthorityArn\": \"\",\n \"PermanentDeletionTimeInDays\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeleteCertificateAuthority")
.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({CertificateAuthorityArn: '', PermanentDeletionTimeInDays: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeleteCertificateAuthority',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {CertificateAuthorityArn: '', PermanentDeletionTimeInDays: ''},
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=ACMPrivateCA.DeleteCertificateAuthority');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
CertificateAuthorityArn: '',
PermanentDeletionTimeInDays: ''
});
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=ACMPrivateCA.DeleteCertificateAuthority',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {CertificateAuthorityArn: '', PermanentDeletionTimeInDays: ''}
};
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=ACMPrivateCA.DeleteCertificateAuthority';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"CertificateAuthorityArn":"","PermanentDeletionTimeInDays":""}'
};
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 = @{ @"CertificateAuthorityArn": @"",
@"PermanentDeletionTimeInDays": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeleteCertificateAuthority"]
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=ACMPrivateCA.DeleteCertificateAuthority" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"CertificateAuthorityArn\": \"\",\n \"PermanentDeletionTimeInDays\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeleteCertificateAuthority",
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([
'CertificateAuthorityArn' => '',
'PermanentDeletionTimeInDays' => ''
]),
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=ACMPrivateCA.DeleteCertificateAuthority', [
'body' => '{
"CertificateAuthorityArn": "",
"PermanentDeletionTimeInDays": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeleteCertificateAuthority');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'CertificateAuthorityArn' => '',
'PermanentDeletionTimeInDays' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'CertificateAuthorityArn' => '',
'PermanentDeletionTimeInDays' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeleteCertificateAuthority');
$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=ACMPrivateCA.DeleteCertificateAuthority' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"CertificateAuthorityArn": "",
"PermanentDeletionTimeInDays": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeleteCertificateAuthority' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"CertificateAuthorityArn": "",
"PermanentDeletionTimeInDays": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"CertificateAuthorityArn\": \"\",\n \"PermanentDeletionTimeInDays\": \"\"\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=ACMPrivateCA.DeleteCertificateAuthority"
payload = {
"CertificateAuthorityArn": "",
"PermanentDeletionTimeInDays": ""
}
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=ACMPrivateCA.DeleteCertificateAuthority"
payload <- "{\n \"CertificateAuthorityArn\": \"\",\n \"PermanentDeletionTimeInDays\": \"\"\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=ACMPrivateCA.DeleteCertificateAuthority")
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 \"CertificateAuthorityArn\": \"\",\n \"PermanentDeletionTimeInDays\": \"\"\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 \"CertificateAuthorityArn\": \"\",\n \"PermanentDeletionTimeInDays\": \"\"\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=ACMPrivateCA.DeleteCertificateAuthority";
let payload = json!({
"CertificateAuthorityArn": "",
"PermanentDeletionTimeInDays": ""
});
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=ACMPrivateCA.DeleteCertificateAuthority' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"CertificateAuthorityArn": "",
"PermanentDeletionTimeInDays": ""
}'
echo '{
"CertificateAuthorityArn": "",
"PermanentDeletionTimeInDays": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeleteCertificateAuthority' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "CertificateAuthorityArn": "",\n "PermanentDeletionTimeInDays": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeleteCertificateAuthority'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"CertificateAuthorityArn": "",
"PermanentDeletionTimeInDays": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeleteCertificateAuthority")! 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
DeletePermission
{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeletePermission
HEADERS
X-Amz-Target
BODY json
{
"CertificateAuthorityArn": "",
"Principal": "",
"SourceAccount": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeletePermission");
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 \"CertificateAuthorityArn\": \"\",\n \"Principal\": \"\",\n \"SourceAccount\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeletePermission" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:CertificateAuthorityArn ""
:Principal ""
:SourceAccount ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeletePermission"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"CertificateAuthorityArn\": \"\",\n \"Principal\": \"\",\n \"SourceAccount\": \"\"\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=ACMPrivateCA.DeletePermission"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"CertificateAuthorityArn\": \"\",\n \"Principal\": \"\",\n \"SourceAccount\": \"\"\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=ACMPrivateCA.DeletePermission");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"CertificateAuthorityArn\": \"\",\n \"Principal\": \"\",\n \"SourceAccount\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeletePermission"
payload := strings.NewReader("{\n \"CertificateAuthorityArn\": \"\",\n \"Principal\": \"\",\n \"SourceAccount\": \"\"\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: 77
{
"CertificateAuthorityArn": "",
"Principal": "",
"SourceAccount": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeletePermission")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"CertificateAuthorityArn\": \"\",\n \"Principal\": \"\",\n \"SourceAccount\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeletePermission"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"CertificateAuthorityArn\": \"\",\n \"Principal\": \"\",\n \"SourceAccount\": \"\"\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 \"CertificateAuthorityArn\": \"\",\n \"Principal\": \"\",\n \"SourceAccount\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeletePermission")
.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=ACMPrivateCA.DeletePermission")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"CertificateAuthorityArn\": \"\",\n \"Principal\": \"\",\n \"SourceAccount\": \"\"\n}")
.asString();
const data = JSON.stringify({
CertificateAuthorityArn: '',
Principal: '',
SourceAccount: ''
});
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=ACMPrivateCA.DeletePermission');
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=ACMPrivateCA.DeletePermission',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {CertificateAuthorityArn: '', Principal: '', SourceAccount: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeletePermission';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"CertificateAuthorityArn":"","Principal":"","SourceAccount":""}'
};
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=ACMPrivateCA.DeletePermission',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "CertificateAuthorityArn": "",\n "Principal": "",\n "SourceAccount": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"CertificateAuthorityArn\": \"\",\n \"Principal\": \"\",\n \"SourceAccount\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeletePermission")
.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({CertificateAuthorityArn: '', Principal: '', SourceAccount: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeletePermission',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {CertificateAuthorityArn: '', Principal: '', SourceAccount: ''},
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=ACMPrivateCA.DeletePermission');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
CertificateAuthorityArn: '',
Principal: '',
SourceAccount: ''
});
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=ACMPrivateCA.DeletePermission',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {CertificateAuthorityArn: '', Principal: '', SourceAccount: ''}
};
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=ACMPrivateCA.DeletePermission';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"CertificateAuthorityArn":"","Principal":"","SourceAccount":""}'
};
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 = @{ @"CertificateAuthorityArn": @"",
@"Principal": @"",
@"SourceAccount": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeletePermission"]
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=ACMPrivateCA.DeletePermission" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"CertificateAuthorityArn\": \"\",\n \"Principal\": \"\",\n \"SourceAccount\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeletePermission",
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([
'CertificateAuthorityArn' => '',
'Principal' => '',
'SourceAccount' => ''
]),
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=ACMPrivateCA.DeletePermission', [
'body' => '{
"CertificateAuthorityArn": "",
"Principal": "",
"SourceAccount": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeletePermission');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'CertificateAuthorityArn' => '',
'Principal' => '',
'SourceAccount' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'CertificateAuthorityArn' => '',
'Principal' => '',
'SourceAccount' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeletePermission');
$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=ACMPrivateCA.DeletePermission' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"CertificateAuthorityArn": "",
"Principal": "",
"SourceAccount": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeletePermission' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"CertificateAuthorityArn": "",
"Principal": "",
"SourceAccount": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"CertificateAuthorityArn\": \"\",\n \"Principal\": \"\",\n \"SourceAccount\": \"\"\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=ACMPrivateCA.DeletePermission"
payload = {
"CertificateAuthorityArn": "",
"Principal": "",
"SourceAccount": ""
}
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=ACMPrivateCA.DeletePermission"
payload <- "{\n \"CertificateAuthorityArn\": \"\",\n \"Principal\": \"\",\n \"SourceAccount\": \"\"\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=ACMPrivateCA.DeletePermission")
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 \"CertificateAuthorityArn\": \"\",\n \"Principal\": \"\",\n \"SourceAccount\": \"\"\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 \"CertificateAuthorityArn\": \"\",\n \"Principal\": \"\",\n \"SourceAccount\": \"\"\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=ACMPrivateCA.DeletePermission";
let payload = json!({
"CertificateAuthorityArn": "",
"Principal": "",
"SourceAccount": ""
});
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=ACMPrivateCA.DeletePermission' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"CertificateAuthorityArn": "",
"Principal": "",
"SourceAccount": ""
}'
echo '{
"CertificateAuthorityArn": "",
"Principal": "",
"SourceAccount": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeletePermission' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "CertificateAuthorityArn": "",\n "Principal": "",\n "SourceAccount": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeletePermission'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"CertificateAuthorityArn": "",
"Principal": "",
"SourceAccount": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeletePermission")! 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
DeletePolicy
{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeletePolicy
HEADERS
X-Amz-Target
BODY json
{
"ResourceArn": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeletePolicy");
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 \"ResourceArn\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeletePolicy" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:ResourceArn ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeletePolicy"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"ResourceArn\": \"\"\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=ACMPrivateCA.DeletePolicy"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"ResourceArn\": \"\"\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=ACMPrivateCA.DeletePolicy");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"ResourceArn\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeletePolicy"
payload := strings.NewReader("{\n \"ResourceArn\": \"\"\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: 23
{
"ResourceArn": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeletePolicy")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"ResourceArn\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeletePolicy"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"ResourceArn\": \"\"\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 \"ResourceArn\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeletePolicy")
.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=ACMPrivateCA.DeletePolicy")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"ResourceArn\": \"\"\n}")
.asString();
const data = JSON.stringify({
ResourceArn: ''
});
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=ACMPrivateCA.DeletePolicy');
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=ACMPrivateCA.DeletePolicy',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {ResourceArn: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeletePolicy';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"ResourceArn":""}'
};
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=ACMPrivateCA.DeletePolicy',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "ResourceArn": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"ResourceArn\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeletePolicy")
.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({ResourceArn: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeletePolicy',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {ResourceArn: ''},
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=ACMPrivateCA.DeletePolicy');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
ResourceArn: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeletePolicy',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {ResourceArn: ''}
};
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=ACMPrivateCA.DeletePolicy';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"ResourceArn":""}'
};
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 = @{ @"ResourceArn": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeletePolicy"]
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=ACMPrivateCA.DeletePolicy" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"ResourceArn\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeletePolicy",
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([
'ResourceArn' => ''
]),
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=ACMPrivateCA.DeletePolicy', [
'body' => '{
"ResourceArn": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeletePolicy');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'ResourceArn' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'ResourceArn' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeletePolicy');
$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=ACMPrivateCA.DeletePolicy' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ResourceArn": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeletePolicy' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ResourceArn": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"ResourceArn\": \"\"\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=ACMPrivateCA.DeletePolicy"
payload = { "ResourceArn": "" }
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=ACMPrivateCA.DeletePolicy"
payload <- "{\n \"ResourceArn\": \"\"\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=ACMPrivateCA.DeletePolicy")
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 \"ResourceArn\": \"\"\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 \"ResourceArn\": \"\"\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=ACMPrivateCA.DeletePolicy";
let payload = json!({"ResourceArn": ""});
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=ACMPrivateCA.DeletePolicy' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"ResourceArn": ""
}'
echo '{
"ResourceArn": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeletePolicy' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "ResourceArn": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeletePolicy'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = ["ResourceArn": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DeletePolicy")! 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
DescribeCertificateAuthority
{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DescribeCertificateAuthority
HEADERS
X-Amz-Target
BODY json
{
"CertificateAuthorityArn": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DescribeCertificateAuthority");
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 \"CertificateAuthorityArn\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DescribeCertificateAuthority" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:CertificateAuthorityArn ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DescribeCertificateAuthority"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"CertificateAuthorityArn\": \"\"\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=ACMPrivateCA.DescribeCertificateAuthority"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"CertificateAuthorityArn\": \"\"\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=ACMPrivateCA.DescribeCertificateAuthority");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"CertificateAuthorityArn\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DescribeCertificateAuthority"
payload := strings.NewReader("{\n \"CertificateAuthorityArn\": \"\"\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: 35
{
"CertificateAuthorityArn": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DescribeCertificateAuthority")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"CertificateAuthorityArn\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DescribeCertificateAuthority"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"CertificateAuthorityArn\": \"\"\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 \"CertificateAuthorityArn\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DescribeCertificateAuthority")
.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=ACMPrivateCA.DescribeCertificateAuthority")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"CertificateAuthorityArn\": \"\"\n}")
.asString();
const data = JSON.stringify({
CertificateAuthorityArn: ''
});
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=ACMPrivateCA.DescribeCertificateAuthority');
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=ACMPrivateCA.DescribeCertificateAuthority',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {CertificateAuthorityArn: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DescribeCertificateAuthority';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"CertificateAuthorityArn":""}'
};
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=ACMPrivateCA.DescribeCertificateAuthority',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "CertificateAuthorityArn": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"CertificateAuthorityArn\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DescribeCertificateAuthority")
.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({CertificateAuthorityArn: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DescribeCertificateAuthority',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {CertificateAuthorityArn: ''},
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=ACMPrivateCA.DescribeCertificateAuthority');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
CertificateAuthorityArn: ''
});
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=ACMPrivateCA.DescribeCertificateAuthority',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {CertificateAuthorityArn: ''}
};
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=ACMPrivateCA.DescribeCertificateAuthority';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"CertificateAuthorityArn":""}'
};
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 = @{ @"CertificateAuthorityArn": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DescribeCertificateAuthority"]
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=ACMPrivateCA.DescribeCertificateAuthority" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"CertificateAuthorityArn\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DescribeCertificateAuthority",
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([
'CertificateAuthorityArn' => ''
]),
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=ACMPrivateCA.DescribeCertificateAuthority', [
'body' => '{
"CertificateAuthorityArn": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DescribeCertificateAuthority');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'CertificateAuthorityArn' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'CertificateAuthorityArn' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DescribeCertificateAuthority');
$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=ACMPrivateCA.DescribeCertificateAuthority' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"CertificateAuthorityArn": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DescribeCertificateAuthority' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"CertificateAuthorityArn": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"CertificateAuthorityArn\": \"\"\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=ACMPrivateCA.DescribeCertificateAuthority"
payload = { "CertificateAuthorityArn": "" }
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=ACMPrivateCA.DescribeCertificateAuthority"
payload <- "{\n \"CertificateAuthorityArn\": \"\"\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=ACMPrivateCA.DescribeCertificateAuthority")
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 \"CertificateAuthorityArn\": \"\"\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 \"CertificateAuthorityArn\": \"\"\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=ACMPrivateCA.DescribeCertificateAuthority";
let payload = json!({"CertificateAuthorityArn": ""});
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=ACMPrivateCA.DescribeCertificateAuthority' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"CertificateAuthorityArn": ""
}'
echo '{
"CertificateAuthorityArn": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DescribeCertificateAuthority' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "CertificateAuthorityArn": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DescribeCertificateAuthority'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = ["CertificateAuthorityArn": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DescribeCertificateAuthority")! 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
DescribeCertificateAuthorityAuditReport
{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DescribeCertificateAuthorityAuditReport
HEADERS
X-Amz-Target
BODY json
{
"CertificateAuthorityArn": "",
"AuditReportId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DescribeCertificateAuthorityAuditReport");
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 \"CertificateAuthorityArn\": \"\",\n \"AuditReportId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DescribeCertificateAuthorityAuditReport" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:CertificateAuthorityArn ""
:AuditReportId ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DescribeCertificateAuthorityAuditReport"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"CertificateAuthorityArn\": \"\",\n \"AuditReportId\": \"\"\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=ACMPrivateCA.DescribeCertificateAuthorityAuditReport"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"CertificateAuthorityArn\": \"\",\n \"AuditReportId\": \"\"\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=ACMPrivateCA.DescribeCertificateAuthorityAuditReport");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"CertificateAuthorityArn\": \"\",\n \"AuditReportId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DescribeCertificateAuthorityAuditReport"
payload := strings.NewReader("{\n \"CertificateAuthorityArn\": \"\",\n \"AuditReportId\": \"\"\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: 58
{
"CertificateAuthorityArn": "",
"AuditReportId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DescribeCertificateAuthorityAuditReport")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"CertificateAuthorityArn\": \"\",\n \"AuditReportId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DescribeCertificateAuthorityAuditReport"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"CertificateAuthorityArn\": \"\",\n \"AuditReportId\": \"\"\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 \"CertificateAuthorityArn\": \"\",\n \"AuditReportId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DescribeCertificateAuthorityAuditReport")
.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=ACMPrivateCA.DescribeCertificateAuthorityAuditReport")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"CertificateAuthorityArn\": \"\",\n \"AuditReportId\": \"\"\n}")
.asString();
const data = JSON.stringify({
CertificateAuthorityArn: '',
AuditReportId: ''
});
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=ACMPrivateCA.DescribeCertificateAuthorityAuditReport');
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=ACMPrivateCA.DescribeCertificateAuthorityAuditReport',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {CertificateAuthorityArn: '', AuditReportId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DescribeCertificateAuthorityAuditReport';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"CertificateAuthorityArn":"","AuditReportId":""}'
};
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=ACMPrivateCA.DescribeCertificateAuthorityAuditReport',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "CertificateAuthorityArn": "",\n "AuditReportId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"CertificateAuthorityArn\": \"\",\n \"AuditReportId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DescribeCertificateAuthorityAuditReport")
.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({CertificateAuthorityArn: '', AuditReportId: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DescribeCertificateAuthorityAuditReport',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {CertificateAuthorityArn: '', AuditReportId: ''},
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=ACMPrivateCA.DescribeCertificateAuthorityAuditReport');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
CertificateAuthorityArn: '',
AuditReportId: ''
});
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=ACMPrivateCA.DescribeCertificateAuthorityAuditReport',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {CertificateAuthorityArn: '', AuditReportId: ''}
};
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=ACMPrivateCA.DescribeCertificateAuthorityAuditReport';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"CertificateAuthorityArn":"","AuditReportId":""}'
};
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 = @{ @"CertificateAuthorityArn": @"",
@"AuditReportId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DescribeCertificateAuthorityAuditReport"]
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=ACMPrivateCA.DescribeCertificateAuthorityAuditReport" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"CertificateAuthorityArn\": \"\",\n \"AuditReportId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DescribeCertificateAuthorityAuditReport",
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([
'CertificateAuthorityArn' => '',
'AuditReportId' => ''
]),
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=ACMPrivateCA.DescribeCertificateAuthorityAuditReport', [
'body' => '{
"CertificateAuthorityArn": "",
"AuditReportId": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DescribeCertificateAuthorityAuditReport');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'CertificateAuthorityArn' => '',
'AuditReportId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'CertificateAuthorityArn' => '',
'AuditReportId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DescribeCertificateAuthorityAuditReport');
$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=ACMPrivateCA.DescribeCertificateAuthorityAuditReport' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"CertificateAuthorityArn": "",
"AuditReportId": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DescribeCertificateAuthorityAuditReport' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"CertificateAuthorityArn": "",
"AuditReportId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"CertificateAuthorityArn\": \"\",\n \"AuditReportId\": \"\"\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=ACMPrivateCA.DescribeCertificateAuthorityAuditReport"
payload = {
"CertificateAuthorityArn": "",
"AuditReportId": ""
}
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=ACMPrivateCA.DescribeCertificateAuthorityAuditReport"
payload <- "{\n \"CertificateAuthorityArn\": \"\",\n \"AuditReportId\": \"\"\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=ACMPrivateCA.DescribeCertificateAuthorityAuditReport")
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 \"CertificateAuthorityArn\": \"\",\n \"AuditReportId\": \"\"\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 \"CertificateAuthorityArn\": \"\",\n \"AuditReportId\": \"\"\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=ACMPrivateCA.DescribeCertificateAuthorityAuditReport";
let payload = json!({
"CertificateAuthorityArn": "",
"AuditReportId": ""
});
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=ACMPrivateCA.DescribeCertificateAuthorityAuditReport' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"CertificateAuthorityArn": "",
"AuditReportId": ""
}'
echo '{
"CertificateAuthorityArn": "",
"AuditReportId": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DescribeCertificateAuthorityAuditReport' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "CertificateAuthorityArn": "",\n "AuditReportId": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DescribeCertificateAuthorityAuditReport'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"CertificateAuthorityArn": "",
"AuditReportId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.DescribeCertificateAuthorityAuditReport")! 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
GetCertificate
{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificate
HEADERS
X-Amz-Target
BODY json
{
"CertificateAuthorityArn": "",
"CertificateArn": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificate");
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 \"CertificateAuthorityArn\": \"\",\n \"CertificateArn\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificate" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:CertificateAuthorityArn ""
:CertificateArn ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificate"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"CertificateAuthorityArn\": \"\",\n \"CertificateArn\": \"\"\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=ACMPrivateCA.GetCertificate"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"CertificateAuthorityArn\": \"\",\n \"CertificateArn\": \"\"\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=ACMPrivateCA.GetCertificate");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"CertificateAuthorityArn\": \"\",\n \"CertificateArn\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificate"
payload := strings.NewReader("{\n \"CertificateAuthorityArn\": \"\",\n \"CertificateArn\": \"\"\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
{
"CertificateAuthorityArn": "",
"CertificateArn": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificate")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"CertificateAuthorityArn\": \"\",\n \"CertificateArn\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificate"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"CertificateAuthorityArn\": \"\",\n \"CertificateArn\": \"\"\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 \"CertificateAuthorityArn\": \"\",\n \"CertificateArn\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificate")
.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=ACMPrivateCA.GetCertificate")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"CertificateAuthorityArn\": \"\",\n \"CertificateArn\": \"\"\n}")
.asString();
const data = JSON.stringify({
CertificateAuthorityArn: '',
CertificateArn: ''
});
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=ACMPrivateCA.GetCertificate');
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=ACMPrivateCA.GetCertificate',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {CertificateAuthorityArn: '', CertificateArn: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificate';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"CertificateAuthorityArn":"","CertificateArn":""}'
};
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=ACMPrivateCA.GetCertificate',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "CertificateAuthorityArn": "",\n "CertificateArn": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"CertificateAuthorityArn\": \"\",\n \"CertificateArn\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificate")
.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({CertificateAuthorityArn: '', CertificateArn: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificate',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {CertificateAuthorityArn: '', CertificateArn: ''},
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=ACMPrivateCA.GetCertificate');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
CertificateAuthorityArn: '',
CertificateArn: ''
});
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=ACMPrivateCA.GetCertificate',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {CertificateAuthorityArn: '', CertificateArn: ''}
};
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=ACMPrivateCA.GetCertificate';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"CertificateAuthorityArn":"","CertificateArn":""}'
};
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 = @{ @"CertificateAuthorityArn": @"",
@"CertificateArn": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificate"]
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=ACMPrivateCA.GetCertificate" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"CertificateAuthorityArn\": \"\",\n \"CertificateArn\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificate",
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([
'CertificateAuthorityArn' => '',
'CertificateArn' => ''
]),
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=ACMPrivateCA.GetCertificate', [
'body' => '{
"CertificateAuthorityArn": "",
"CertificateArn": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificate');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'CertificateAuthorityArn' => '',
'CertificateArn' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'CertificateAuthorityArn' => '',
'CertificateArn' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificate');
$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=ACMPrivateCA.GetCertificate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"CertificateAuthorityArn": "",
"CertificateArn": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"CertificateAuthorityArn": "",
"CertificateArn": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"CertificateAuthorityArn\": \"\",\n \"CertificateArn\": \"\"\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=ACMPrivateCA.GetCertificate"
payload = {
"CertificateAuthorityArn": "",
"CertificateArn": ""
}
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=ACMPrivateCA.GetCertificate"
payload <- "{\n \"CertificateAuthorityArn\": \"\",\n \"CertificateArn\": \"\"\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=ACMPrivateCA.GetCertificate")
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 \"CertificateAuthorityArn\": \"\",\n \"CertificateArn\": \"\"\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 \"CertificateAuthorityArn\": \"\",\n \"CertificateArn\": \"\"\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=ACMPrivateCA.GetCertificate";
let payload = json!({
"CertificateAuthorityArn": "",
"CertificateArn": ""
});
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=ACMPrivateCA.GetCertificate' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"CertificateAuthorityArn": "",
"CertificateArn": ""
}'
echo '{
"CertificateAuthorityArn": "",
"CertificateArn": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificate' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "CertificateAuthorityArn": "",\n "CertificateArn": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificate'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"CertificateAuthorityArn": "",
"CertificateArn": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificate")! 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
GetCertificateAuthorityCertificate
{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificateAuthorityCertificate
HEADERS
X-Amz-Target
BODY json
{
"CertificateAuthorityArn": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificateAuthorityCertificate");
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 \"CertificateAuthorityArn\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificateAuthorityCertificate" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:CertificateAuthorityArn ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificateAuthorityCertificate"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"CertificateAuthorityArn\": \"\"\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=ACMPrivateCA.GetCertificateAuthorityCertificate"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"CertificateAuthorityArn\": \"\"\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=ACMPrivateCA.GetCertificateAuthorityCertificate");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"CertificateAuthorityArn\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificateAuthorityCertificate"
payload := strings.NewReader("{\n \"CertificateAuthorityArn\": \"\"\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: 35
{
"CertificateAuthorityArn": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificateAuthorityCertificate")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"CertificateAuthorityArn\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificateAuthorityCertificate"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"CertificateAuthorityArn\": \"\"\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 \"CertificateAuthorityArn\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificateAuthorityCertificate")
.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=ACMPrivateCA.GetCertificateAuthorityCertificate")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"CertificateAuthorityArn\": \"\"\n}")
.asString();
const data = JSON.stringify({
CertificateAuthorityArn: ''
});
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=ACMPrivateCA.GetCertificateAuthorityCertificate');
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=ACMPrivateCA.GetCertificateAuthorityCertificate',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {CertificateAuthorityArn: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificateAuthorityCertificate';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"CertificateAuthorityArn":""}'
};
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=ACMPrivateCA.GetCertificateAuthorityCertificate',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "CertificateAuthorityArn": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"CertificateAuthorityArn\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificateAuthorityCertificate")
.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({CertificateAuthorityArn: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificateAuthorityCertificate',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {CertificateAuthorityArn: ''},
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=ACMPrivateCA.GetCertificateAuthorityCertificate');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
CertificateAuthorityArn: ''
});
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=ACMPrivateCA.GetCertificateAuthorityCertificate',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {CertificateAuthorityArn: ''}
};
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=ACMPrivateCA.GetCertificateAuthorityCertificate';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"CertificateAuthorityArn":""}'
};
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 = @{ @"CertificateAuthorityArn": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificateAuthorityCertificate"]
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=ACMPrivateCA.GetCertificateAuthorityCertificate" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"CertificateAuthorityArn\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificateAuthorityCertificate",
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([
'CertificateAuthorityArn' => ''
]),
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=ACMPrivateCA.GetCertificateAuthorityCertificate', [
'body' => '{
"CertificateAuthorityArn": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificateAuthorityCertificate');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'CertificateAuthorityArn' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'CertificateAuthorityArn' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificateAuthorityCertificate');
$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=ACMPrivateCA.GetCertificateAuthorityCertificate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"CertificateAuthorityArn": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificateAuthorityCertificate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"CertificateAuthorityArn": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"CertificateAuthorityArn\": \"\"\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=ACMPrivateCA.GetCertificateAuthorityCertificate"
payload = { "CertificateAuthorityArn": "" }
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=ACMPrivateCA.GetCertificateAuthorityCertificate"
payload <- "{\n \"CertificateAuthorityArn\": \"\"\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=ACMPrivateCA.GetCertificateAuthorityCertificate")
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 \"CertificateAuthorityArn\": \"\"\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 \"CertificateAuthorityArn\": \"\"\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=ACMPrivateCA.GetCertificateAuthorityCertificate";
let payload = json!({"CertificateAuthorityArn": ""});
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=ACMPrivateCA.GetCertificateAuthorityCertificate' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"CertificateAuthorityArn": ""
}'
echo '{
"CertificateAuthorityArn": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificateAuthorityCertificate' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "CertificateAuthorityArn": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificateAuthorityCertificate'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = ["CertificateAuthorityArn": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificateAuthorityCertificate")! 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
GetCertificateAuthorityCsr
{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificateAuthorityCsr
HEADERS
X-Amz-Target
BODY json
{
"CertificateAuthorityArn": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificateAuthorityCsr");
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 \"CertificateAuthorityArn\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificateAuthorityCsr" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:CertificateAuthorityArn ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificateAuthorityCsr"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"CertificateAuthorityArn\": \"\"\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=ACMPrivateCA.GetCertificateAuthorityCsr"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"CertificateAuthorityArn\": \"\"\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=ACMPrivateCA.GetCertificateAuthorityCsr");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"CertificateAuthorityArn\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificateAuthorityCsr"
payload := strings.NewReader("{\n \"CertificateAuthorityArn\": \"\"\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: 35
{
"CertificateAuthorityArn": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificateAuthorityCsr")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"CertificateAuthorityArn\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificateAuthorityCsr"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"CertificateAuthorityArn\": \"\"\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 \"CertificateAuthorityArn\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificateAuthorityCsr")
.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=ACMPrivateCA.GetCertificateAuthorityCsr")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"CertificateAuthorityArn\": \"\"\n}")
.asString();
const data = JSON.stringify({
CertificateAuthorityArn: ''
});
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=ACMPrivateCA.GetCertificateAuthorityCsr');
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=ACMPrivateCA.GetCertificateAuthorityCsr',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {CertificateAuthorityArn: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificateAuthorityCsr';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"CertificateAuthorityArn":""}'
};
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=ACMPrivateCA.GetCertificateAuthorityCsr',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "CertificateAuthorityArn": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"CertificateAuthorityArn\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificateAuthorityCsr")
.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({CertificateAuthorityArn: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificateAuthorityCsr',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {CertificateAuthorityArn: ''},
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=ACMPrivateCA.GetCertificateAuthorityCsr');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
CertificateAuthorityArn: ''
});
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=ACMPrivateCA.GetCertificateAuthorityCsr',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {CertificateAuthorityArn: ''}
};
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=ACMPrivateCA.GetCertificateAuthorityCsr';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"CertificateAuthorityArn":""}'
};
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 = @{ @"CertificateAuthorityArn": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificateAuthorityCsr"]
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=ACMPrivateCA.GetCertificateAuthorityCsr" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"CertificateAuthorityArn\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificateAuthorityCsr",
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([
'CertificateAuthorityArn' => ''
]),
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=ACMPrivateCA.GetCertificateAuthorityCsr', [
'body' => '{
"CertificateAuthorityArn": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificateAuthorityCsr');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'CertificateAuthorityArn' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'CertificateAuthorityArn' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificateAuthorityCsr');
$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=ACMPrivateCA.GetCertificateAuthorityCsr' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"CertificateAuthorityArn": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificateAuthorityCsr' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"CertificateAuthorityArn": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"CertificateAuthorityArn\": \"\"\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=ACMPrivateCA.GetCertificateAuthorityCsr"
payload = { "CertificateAuthorityArn": "" }
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=ACMPrivateCA.GetCertificateAuthorityCsr"
payload <- "{\n \"CertificateAuthorityArn\": \"\"\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=ACMPrivateCA.GetCertificateAuthorityCsr")
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 \"CertificateAuthorityArn\": \"\"\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 \"CertificateAuthorityArn\": \"\"\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=ACMPrivateCA.GetCertificateAuthorityCsr";
let payload = json!({"CertificateAuthorityArn": ""});
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=ACMPrivateCA.GetCertificateAuthorityCsr' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"CertificateAuthorityArn": ""
}'
echo '{
"CertificateAuthorityArn": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificateAuthorityCsr' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "CertificateAuthorityArn": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificateAuthorityCsr'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = ["CertificateAuthorityArn": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetCertificateAuthorityCsr")! 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
GetPolicy
{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetPolicy
HEADERS
X-Amz-Target
BODY json
{
"ResourceArn": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetPolicy");
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 \"ResourceArn\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetPolicy" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:ResourceArn ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetPolicy"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"ResourceArn\": \"\"\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=ACMPrivateCA.GetPolicy"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"ResourceArn\": \"\"\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=ACMPrivateCA.GetPolicy");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"ResourceArn\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetPolicy"
payload := strings.NewReader("{\n \"ResourceArn\": \"\"\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: 23
{
"ResourceArn": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetPolicy")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"ResourceArn\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetPolicy"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"ResourceArn\": \"\"\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 \"ResourceArn\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetPolicy")
.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=ACMPrivateCA.GetPolicy")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"ResourceArn\": \"\"\n}")
.asString();
const data = JSON.stringify({
ResourceArn: ''
});
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=ACMPrivateCA.GetPolicy');
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=ACMPrivateCA.GetPolicy',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {ResourceArn: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetPolicy';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"ResourceArn":""}'
};
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=ACMPrivateCA.GetPolicy',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "ResourceArn": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"ResourceArn\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetPolicy")
.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({ResourceArn: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetPolicy',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {ResourceArn: ''},
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=ACMPrivateCA.GetPolicy');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
ResourceArn: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetPolicy',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {ResourceArn: ''}
};
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=ACMPrivateCA.GetPolicy';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"ResourceArn":""}'
};
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 = @{ @"ResourceArn": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetPolicy"]
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=ACMPrivateCA.GetPolicy" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"ResourceArn\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetPolicy",
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([
'ResourceArn' => ''
]),
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=ACMPrivateCA.GetPolicy', [
'body' => '{
"ResourceArn": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetPolicy');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'ResourceArn' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'ResourceArn' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetPolicy');
$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=ACMPrivateCA.GetPolicy' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ResourceArn": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetPolicy' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ResourceArn": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"ResourceArn\": \"\"\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=ACMPrivateCA.GetPolicy"
payload = { "ResourceArn": "" }
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=ACMPrivateCA.GetPolicy"
payload <- "{\n \"ResourceArn\": \"\"\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=ACMPrivateCA.GetPolicy")
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 \"ResourceArn\": \"\"\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 \"ResourceArn\": \"\"\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=ACMPrivateCA.GetPolicy";
let payload = json!({"ResourceArn": ""});
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=ACMPrivateCA.GetPolicy' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"ResourceArn": ""
}'
echo '{
"ResourceArn": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetPolicy' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "ResourceArn": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetPolicy'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = ["ResourceArn": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.GetPolicy")! 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
ImportCertificateAuthorityCertificate
{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ImportCertificateAuthorityCertificate
HEADERS
X-Amz-Target
BODY json
{
"CertificateAuthorityArn": "",
"Certificate": "",
"CertificateChain": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ImportCertificateAuthorityCertificate");
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 \"CertificateAuthorityArn\": \"\",\n \"Certificate\": \"\",\n \"CertificateChain\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ImportCertificateAuthorityCertificate" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:CertificateAuthorityArn ""
:Certificate ""
:CertificateChain ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ImportCertificateAuthorityCertificate"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"CertificateAuthorityArn\": \"\",\n \"Certificate\": \"\",\n \"CertificateChain\": \"\"\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=ACMPrivateCA.ImportCertificateAuthorityCertificate"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"CertificateAuthorityArn\": \"\",\n \"Certificate\": \"\",\n \"CertificateChain\": \"\"\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=ACMPrivateCA.ImportCertificateAuthorityCertificate");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"CertificateAuthorityArn\": \"\",\n \"Certificate\": \"\",\n \"CertificateChain\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ImportCertificateAuthorityCertificate"
payload := strings.NewReader("{\n \"CertificateAuthorityArn\": \"\",\n \"Certificate\": \"\",\n \"CertificateChain\": \"\"\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
{
"CertificateAuthorityArn": "",
"Certificate": "",
"CertificateChain": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ImportCertificateAuthorityCertificate")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"CertificateAuthorityArn\": \"\",\n \"Certificate\": \"\",\n \"CertificateChain\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ImportCertificateAuthorityCertificate"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"CertificateAuthorityArn\": \"\",\n \"Certificate\": \"\",\n \"CertificateChain\": \"\"\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 \"CertificateAuthorityArn\": \"\",\n \"Certificate\": \"\",\n \"CertificateChain\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ImportCertificateAuthorityCertificate")
.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=ACMPrivateCA.ImportCertificateAuthorityCertificate")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"CertificateAuthorityArn\": \"\",\n \"Certificate\": \"\",\n \"CertificateChain\": \"\"\n}")
.asString();
const data = JSON.stringify({
CertificateAuthorityArn: '',
Certificate: '',
CertificateChain: ''
});
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=ACMPrivateCA.ImportCertificateAuthorityCertificate');
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=ACMPrivateCA.ImportCertificateAuthorityCertificate',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {CertificateAuthorityArn: '', Certificate: '', CertificateChain: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ImportCertificateAuthorityCertificate';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"CertificateAuthorityArn":"","Certificate":"","CertificateChain":""}'
};
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=ACMPrivateCA.ImportCertificateAuthorityCertificate',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "CertificateAuthorityArn": "",\n "Certificate": "",\n "CertificateChain": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"CertificateAuthorityArn\": \"\",\n \"Certificate\": \"\",\n \"CertificateChain\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ImportCertificateAuthorityCertificate")
.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({CertificateAuthorityArn: '', Certificate: '', CertificateChain: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ImportCertificateAuthorityCertificate',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {CertificateAuthorityArn: '', Certificate: '', CertificateChain: ''},
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=ACMPrivateCA.ImportCertificateAuthorityCertificate');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
CertificateAuthorityArn: '',
Certificate: '',
CertificateChain: ''
});
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=ACMPrivateCA.ImportCertificateAuthorityCertificate',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {CertificateAuthorityArn: '', Certificate: '', CertificateChain: ''}
};
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=ACMPrivateCA.ImportCertificateAuthorityCertificate';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"CertificateAuthorityArn":"","Certificate":"","CertificateChain":""}'
};
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 = @{ @"CertificateAuthorityArn": @"",
@"Certificate": @"",
@"CertificateChain": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ImportCertificateAuthorityCertificate"]
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=ACMPrivateCA.ImportCertificateAuthorityCertificate" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"CertificateAuthorityArn\": \"\",\n \"Certificate\": \"\",\n \"CertificateChain\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ImportCertificateAuthorityCertificate",
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([
'CertificateAuthorityArn' => '',
'Certificate' => '',
'CertificateChain' => ''
]),
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=ACMPrivateCA.ImportCertificateAuthorityCertificate', [
'body' => '{
"CertificateAuthorityArn": "",
"Certificate": "",
"CertificateChain": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ImportCertificateAuthorityCertificate');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'CertificateAuthorityArn' => '',
'Certificate' => '',
'CertificateChain' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'CertificateAuthorityArn' => '',
'Certificate' => '',
'CertificateChain' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ImportCertificateAuthorityCertificate');
$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=ACMPrivateCA.ImportCertificateAuthorityCertificate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"CertificateAuthorityArn": "",
"Certificate": "",
"CertificateChain": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ImportCertificateAuthorityCertificate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"CertificateAuthorityArn": "",
"Certificate": "",
"CertificateChain": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"CertificateAuthorityArn\": \"\",\n \"Certificate\": \"\",\n \"CertificateChain\": \"\"\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=ACMPrivateCA.ImportCertificateAuthorityCertificate"
payload = {
"CertificateAuthorityArn": "",
"Certificate": "",
"CertificateChain": ""
}
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=ACMPrivateCA.ImportCertificateAuthorityCertificate"
payload <- "{\n \"CertificateAuthorityArn\": \"\",\n \"Certificate\": \"\",\n \"CertificateChain\": \"\"\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=ACMPrivateCA.ImportCertificateAuthorityCertificate")
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 \"CertificateAuthorityArn\": \"\",\n \"Certificate\": \"\",\n \"CertificateChain\": \"\"\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 \"CertificateAuthorityArn\": \"\",\n \"Certificate\": \"\",\n \"CertificateChain\": \"\"\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=ACMPrivateCA.ImportCertificateAuthorityCertificate";
let payload = json!({
"CertificateAuthorityArn": "",
"Certificate": "",
"CertificateChain": ""
});
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=ACMPrivateCA.ImportCertificateAuthorityCertificate' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"CertificateAuthorityArn": "",
"Certificate": "",
"CertificateChain": ""
}'
echo '{
"CertificateAuthorityArn": "",
"Certificate": "",
"CertificateChain": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ImportCertificateAuthorityCertificate' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "CertificateAuthorityArn": "",\n "Certificate": "",\n "CertificateChain": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ImportCertificateAuthorityCertificate'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"CertificateAuthorityArn": "",
"Certificate": "",
"CertificateChain": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ImportCertificateAuthorityCertificate")! 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
IssueCertificate
{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.IssueCertificate
HEADERS
X-Amz-Target
BODY json
{
"ApiPassthrough": "",
"CertificateAuthorityArn": "",
"Csr": "",
"SigningAlgorithm": "",
"TemplateArn": "",
"Validity": "",
"ValidityNotBefore": "",
"IdempotencyToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.IssueCertificate");
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 \"ApiPassthrough\": \"\",\n \"CertificateAuthorityArn\": \"\",\n \"Csr\": \"\",\n \"SigningAlgorithm\": \"\",\n \"TemplateArn\": \"\",\n \"Validity\": \"\",\n \"ValidityNotBefore\": \"\",\n \"IdempotencyToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.IssueCertificate" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:ApiPassthrough ""
:CertificateAuthorityArn ""
:Csr ""
:SigningAlgorithm ""
:TemplateArn ""
:Validity ""
:ValidityNotBefore ""
:IdempotencyToken ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.IssueCertificate"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"ApiPassthrough\": \"\",\n \"CertificateAuthorityArn\": \"\",\n \"Csr\": \"\",\n \"SigningAlgorithm\": \"\",\n \"TemplateArn\": \"\",\n \"Validity\": \"\",\n \"ValidityNotBefore\": \"\",\n \"IdempotencyToken\": \"\"\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=ACMPrivateCA.IssueCertificate"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"ApiPassthrough\": \"\",\n \"CertificateAuthorityArn\": \"\",\n \"Csr\": \"\",\n \"SigningAlgorithm\": \"\",\n \"TemplateArn\": \"\",\n \"Validity\": \"\",\n \"ValidityNotBefore\": \"\",\n \"IdempotencyToken\": \"\"\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=ACMPrivateCA.IssueCertificate");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"ApiPassthrough\": \"\",\n \"CertificateAuthorityArn\": \"\",\n \"Csr\": \"\",\n \"SigningAlgorithm\": \"\",\n \"TemplateArn\": \"\",\n \"Validity\": \"\",\n \"ValidityNotBefore\": \"\",\n \"IdempotencyToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.IssueCertificate"
payload := strings.NewReader("{\n \"ApiPassthrough\": \"\",\n \"CertificateAuthorityArn\": \"\",\n \"Csr\": \"\",\n \"SigningAlgorithm\": \"\",\n \"TemplateArn\": \"\",\n \"Validity\": \"\",\n \"ValidityNotBefore\": \"\",\n \"IdempotencyToken\": \"\"\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: 190
{
"ApiPassthrough": "",
"CertificateAuthorityArn": "",
"Csr": "",
"SigningAlgorithm": "",
"TemplateArn": "",
"Validity": "",
"ValidityNotBefore": "",
"IdempotencyToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.IssueCertificate")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"ApiPassthrough\": \"\",\n \"CertificateAuthorityArn\": \"\",\n \"Csr\": \"\",\n \"SigningAlgorithm\": \"\",\n \"TemplateArn\": \"\",\n \"Validity\": \"\",\n \"ValidityNotBefore\": \"\",\n \"IdempotencyToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.IssueCertificate"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"ApiPassthrough\": \"\",\n \"CertificateAuthorityArn\": \"\",\n \"Csr\": \"\",\n \"SigningAlgorithm\": \"\",\n \"TemplateArn\": \"\",\n \"Validity\": \"\",\n \"ValidityNotBefore\": \"\",\n \"IdempotencyToken\": \"\"\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 \"ApiPassthrough\": \"\",\n \"CertificateAuthorityArn\": \"\",\n \"Csr\": \"\",\n \"SigningAlgorithm\": \"\",\n \"TemplateArn\": \"\",\n \"Validity\": \"\",\n \"ValidityNotBefore\": \"\",\n \"IdempotencyToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.IssueCertificate")
.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=ACMPrivateCA.IssueCertificate")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"ApiPassthrough\": \"\",\n \"CertificateAuthorityArn\": \"\",\n \"Csr\": \"\",\n \"SigningAlgorithm\": \"\",\n \"TemplateArn\": \"\",\n \"Validity\": \"\",\n \"ValidityNotBefore\": \"\",\n \"IdempotencyToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
ApiPassthrough: '',
CertificateAuthorityArn: '',
Csr: '',
SigningAlgorithm: '',
TemplateArn: '',
Validity: '',
ValidityNotBefore: '',
IdempotencyToken: ''
});
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=ACMPrivateCA.IssueCertificate');
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=ACMPrivateCA.IssueCertificate',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
ApiPassthrough: '',
CertificateAuthorityArn: '',
Csr: '',
SigningAlgorithm: '',
TemplateArn: '',
Validity: '',
ValidityNotBefore: '',
IdempotencyToken: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.IssueCertificate';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"ApiPassthrough":"","CertificateAuthorityArn":"","Csr":"","SigningAlgorithm":"","TemplateArn":"","Validity":"","ValidityNotBefore":"","IdempotencyToken":""}'
};
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=ACMPrivateCA.IssueCertificate',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "ApiPassthrough": "",\n "CertificateAuthorityArn": "",\n "Csr": "",\n "SigningAlgorithm": "",\n "TemplateArn": "",\n "Validity": "",\n "ValidityNotBefore": "",\n "IdempotencyToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"ApiPassthrough\": \"\",\n \"CertificateAuthorityArn\": \"\",\n \"Csr\": \"\",\n \"SigningAlgorithm\": \"\",\n \"TemplateArn\": \"\",\n \"Validity\": \"\",\n \"ValidityNotBefore\": \"\",\n \"IdempotencyToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.IssueCertificate")
.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({
ApiPassthrough: '',
CertificateAuthorityArn: '',
Csr: '',
SigningAlgorithm: '',
TemplateArn: '',
Validity: '',
ValidityNotBefore: '',
IdempotencyToken: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.IssueCertificate',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {
ApiPassthrough: '',
CertificateAuthorityArn: '',
Csr: '',
SigningAlgorithm: '',
TemplateArn: '',
Validity: '',
ValidityNotBefore: '',
IdempotencyToken: ''
},
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=ACMPrivateCA.IssueCertificate');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
ApiPassthrough: '',
CertificateAuthorityArn: '',
Csr: '',
SigningAlgorithm: '',
TemplateArn: '',
Validity: '',
ValidityNotBefore: '',
IdempotencyToken: ''
});
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=ACMPrivateCA.IssueCertificate',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {
ApiPassthrough: '',
CertificateAuthorityArn: '',
Csr: '',
SigningAlgorithm: '',
TemplateArn: '',
Validity: '',
ValidityNotBefore: '',
IdempotencyToken: ''
}
};
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=ACMPrivateCA.IssueCertificate';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"ApiPassthrough":"","CertificateAuthorityArn":"","Csr":"","SigningAlgorithm":"","TemplateArn":"","Validity":"","ValidityNotBefore":"","IdempotencyToken":""}'
};
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 = @{ @"ApiPassthrough": @"",
@"CertificateAuthorityArn": @"",
@"Csr": @"",
@"SigningAlgorithm": @"",
@"TemplateArn": @"",
@"Validity": @"",
@"ValidityNotBefore": @"",
@"IdempotencyToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.IssueCertificate"]
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=ACMPrivateCA.IssueCertificate" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"ApiPassthrough\": \"\",\n \"CertificateAuthorityArn\": \"\",\n \"Csr\": \"\",\n \"SigningAlgorithm\": \"\",\n \"TemplateArn\": \"\",\n \"Validity\": \"\",\n \"ValidityNotBefore\": \"\",\n \"IdempotencyToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.IssueCertificate",
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([
'ApiPassthrough' => '',
'CertificateAuthorityArn' => '',
'Csr' => '',
'SigningAlgorithm' => '',
'TemplateArn' => '',
'Validity' => '',
'ValidityNotBefore' => '',
'IdempotencyToken' => ''
]),
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=ACMPrivateCA.IssueCertificate', [
'body' => '{
"ApiPassthrough": "",
"CertificateAuthorityArn": "",
"Csr": "",
"SigningAlgorithm": "",
"TemplateArn": "",
"Validity": "",
"ValidityNotBefore": "",
"IdempotencyToken": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.IssueCertificate');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'ApiPassthrough' => '',
'CertificateAuthorityArn' => '',
'Csr' => '',
'SigningAlgorithm' => '',
'TemplateArn' => '',
'Validity' => '',
'ValidityNotBefore' => '',
'IdempotencyToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'ApiPassthrough' => '',
'CertificateAuthorityArn' => '',
'Csr' => '',
'SigningAlgorithm' => '',
'TemplateArn' => '',
'Validity' => '',
'ValidityNotBefore' => '',
'IdempotencyToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.IssueCertificate');
$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=ACMPrivateCA.IssueCertificate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ApiPassthrough": "",
"CertificateAuthorityArn": "",
"Csr": "",
"SigningAlgorithm": "",
"TemplateArn": "",
"Validity": "",
"ValidityNotBefore": "",
"IdempotencyToken": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.IssueCertificate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ApiPassthrough": "",
"CertificateAuthorityArn": "",
"Csr": "",
"SigningAlgorithm": "",
"TemplateArn": "",
"Validity": "",
"ValidityNotBefore": "",
"IdempotencyToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"ApiPassthrough\": \"\",\n \"CertificateAuthorityArn\": \"\",\n \"Csr\": \"\",\n \"SigningAlgorithm\": \"\",\n \"TemplateArn\": \"\",\n \"Validity\": \"\",\n \"ValidityNotBefore\": \"\",\n \"IdempotencyToken\": \"\"\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=ACMPrivateCA.IssueCertificate"
payload = {
"ApiPassthrough": "",
"CertificateAuthorityArn": "",
"Csr": "",
"SigningAlgorithm": "",
"TemplateArn": "",
"Validity": "",
"ValidityNotBefore": "",
"IdempotencyToken": ""
}
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=ACMPrivateCA.IssueCertificate"
payload <- "{\n \"ApiPassthrough\": \"\",\n \"CertificateAuthorityArn\": \"\",\n \"Csr\": \"\",\n \"SigningAlgorithm\": \"\",\n \"TemplateArn\": \"\",\n \"Validity\": \"\",\n \"ValidityNotBefore\": \"\",\n \"IdempotencyToken\": \"\"\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=ACMPrivateCA.IssueCertificate")
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 \"ApiPassthrough\": \"\",\n \"CertificateAuthorityArn\": \"\",\n \"Csr\": \"\",\n \"SigningAlgorithm\": \"\",\n \"TemplateArn\": \"\",\n \"Validity\": \"\",\n \"ValidityNotBefore\": \"\",\n \"IdempotencyToken\": \"\"\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 \"ApiPassthrough\": \"\",\n \"CertificateAuthorityArn\": \"\",\n \"Csr\": \"\",\n \"SigningAlgorithm\": \"\",\n \"TemplateArn\": \"\",\n \"Validity\": \"\",\n \"ValidityNotBefore\": \"\",\n \"IdempotencyToken\": \"\"\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=ACMPrivateCA.IssueCertificate";
let payload = json!({
"ApiPassthrough": "",
"CertificateAuthorityArn": "",
"Csr": "",
"SigningAlgorithm": "",
"TemplateArn": "",
"Validity": "",
"ValidityNotBefore": "",
"IdempotencyToken": ""
});
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=ACMPrivateCA.IssueCertificate' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"ApiPassthrough": "",
"CertificateAuthorityArn": "",
"Csr": "",
"SigningAlgorithm": "",
"TemplateArn": "",
"Validity": "",
"ValidityNotBefore": "",
"IdempotencyToken": ""
}'
echo '{
"ApiPassthrough": "",
"CertificateAuthorityArn": "",
"Csr": "",
"SigningAlgorithm": "",
"TemplateArn": "",
"Validity": "",
"ValidityNotBefore": "",
"IdempotencyToken": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.IssueCertificate' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "ApiPassthrough": "",\n "CertificateAuthorityArn": "",\n "Csr": "",\n "SigningAlgorithm": "",\n "TemplateArn": "",\n "Validity": "",\n "ValidityNotBefore": "",\n "IdempotencyToken": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.IssueCertificate'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"ApiPassthrough": "",
"CertificateAuthorityArn": "",
"Csr": "",
"SigningAlgorithm": "",
"TemplateArn": "",
"Validity": "",
"ValidityNotBefore": "",
"IdempotencyToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.IssueCertificate")! 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
ListCertificateAuthorities
{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListCertificateAuthorities
HEADERS
X-Amz-Target
BODY json
{
"NextToken": "",
"MaxResults": "",
"ResourceOwner": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListCertificateAuthorities");
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 \"NextToken\": \"\",\n \"MaxResults\": \"\",\n \"ResourceOwner\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListCertificateAuthorities" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:NextToken ""
:MaxResults ""
:ResourceOwner ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListCertificateAuthorities"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"NextToken\": \"\",\n \"MaxResults\": \"\",\n \"ResourceOwner\": \"\"\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=ACMPrivateCA.ListCertificateAuthorities"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"NextToken\": \"\",\n \"MaxResults\": \"\",\n \"ResourceOwner\": \"\"\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=ACMPrivateCA.ListCertificateAuthorities");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"NextToken\": \"\",\n \"MaxResults\": \"\",\n \"ResourceOwner\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListCertificateAuthorities"
payload := strings.NewReader("{\n \"NextToken\": \"\",\n \"MaxResults\": \"\",\n \"ResourceOwner\": \"\"\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: 64
{
"NextToken": "",
"MaxResults": "",
"ResourceOwner": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListCertificateAuthorities")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"NextToken\": \"\",\n \"MaxResults\": \"\",\n \"ResourceOwner\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListCertificateAuthorities"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"NextToken\": \"\",\n \"MaxResults\": \"\",\n \"ResourceOwner\": \"\"\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 \"NextToken\": \"\",\n \"MaxResults\": \"\",\n \"ResourceOwner\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListCertificateAuthorities")
.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=ACMPrivateCA.ListCertificateAuthorities")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"NextToken\": \"\",\n \"MaxResults\": \"\",\n \"ResourceOwner\": \"\"\n}")
.asString();
const data = JSON.stringify({
NextToken: '',
MaxResults: '',
ResourceOwner: ''
});
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=ACMPrivateCA.ListCertificateAuthorities');
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=ACMPrivateCA.ListCertificateAuthorities',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {NextToken: '', MaxResults: '', ResourceOwner: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListCertificateAuthorities';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"NextToken":"","MaxResults":"","ResourceOwner":""}'
};
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=ACMPrivateCA.ListCertificateAuthorities',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "NextToken": "",\n "MaxResults": "",\n "ResourceOwner": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"NextToken\": \"\",\n \"MaxResults\": \"\",\n \"ResourceOwner\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListCertificateAuthorities")
.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({NextToken: '', MaxResults: '', ResourceOwner: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListCertificateAuthorities',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {NextToken: '', MaxResults: '', ResourceOwner: ''},
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=ACMPrivateCA.ListCertificateAuthorities');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
NextToken: '',
MaxResults: '',
ResourceOwner: ''
});
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=ACMPrivateCA.ListCertificateAuthorities',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {NextToken: '', MaxResults: '', ResourceOwner: ''}
};
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=ACMPrivateCA.ListCertificateAuthorities';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"NextToken":"","MaxResults":"","ResourceOwner":""}'
};
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 = @{ @"NextToken": @"",
@"MaxResults": @"",
@"ResourceOwner": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListCertificateAuthorities"]
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=ACMPrivateCA.ListCertificateAuthorities" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"NextToken\": \"\",\n \"MaxResults\": \"\",\n \"ResourceOwner\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListCertificateAuthorities",
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([
'NextToken' => '',
'MaxResults' => '',
'ResourceOwner' => ''
]),
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=ACMPrivateCA.ListCertificateAuthorities', [
'body' => '{
"NextToken": "",
"MaxResults": "",
"ResourceOwner": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListCertificateAuthorities');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'NextToken' => '',
'MaxResults' => '',
'ResourceOwner' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'NextToken' => '',
'MaxResults' => '',
'ResourceOwner' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListCertificateAuthorities');
$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=ACMPrivateCA.ListCertificateAuthorities' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"NextToken": "",
"MaxResults": "",
"ResourceOwner": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListCertificateAuthorities' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"NextToken": "",
"MaxResults": "",
"ResourceOwner": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"NextToken\": \"\",\n \"MaxResults\": \"\",\n \"ResourceOwner\": \"\"\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=ACMPrivateCA.ListCertificateAuthorities"
payload = {
"NextToken": "",
"MaxResults": "",
"ResourceOwner": ""
}
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=ACMPrivateCA.ListCertificateAuthorities"
payload <- "{\n \"NextToken\": \"\",\n \"MaxResults\": \"\",\n \"ResourceOwner\": \"\"\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=ACMPrivateCA.ListCertificateAuthorities")
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 \"NextToken\": \"\",\n \"MaxResults\": \"\",\n \"ResourceOwner\": \"\"\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 \"NextToken\": \"\",\n \"MaxResults\": \"\",\n \"ResourceOwner\": \"\"\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=ACMPrivateCA.ListCertificateAuthorities";
let payload = json!({
"NextToken": "",
"MaxResults": "",
"ResourceOwner": ""
});
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=ACMPrivateCA.ListCertificateAuthorities' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"NextToken": "",
"MaxResults": "",
"ResourceOwner": ""
}'
echo '{
"NextToken": "",
"MaxResults": "",
"ResourceOwner": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListCertificateAuthorities' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "NextToken": "",\n "MaxResults": "",\n "ResourceOwner": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListCertificateAuthorities'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"NextToken": "",
"MaxResults": "",
"ResourceOwner": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListCertificateAuthorities")! 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
ListPermissions
{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListPermissions
HEADERS
X-Amz-Target
BODY json
{
"CertificateAuthorityArn": "",
"NextToken": "",
"MaxResults": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListPermissions");
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 \"CertificateAuthorityArn\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListPermissions" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:CertificateAuthorityArn ""
:NextToken ""
:MaxResults ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListPermissions"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"CertificateAuthorityArn\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\"\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=ACMPrivateCA.ListPermissions"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"CertificateAuthorityArn\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\"\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=ACMPrivateCA.ListPermissions");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"CertificateAuthorityArn\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListPermissions"
payload := strings.NewReader("{\n \"CertificateAuthorityArn\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\"\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: 74
{
"CertificateAuthorityArn": "",
"NextToken": "",
"MaxResults": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListPermissions")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"CertificateAuthorityArn\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListPermissions"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"CertificateAuthorityArn\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\"\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 \"CertificateAuthorityArn\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListPermissions")
.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=ACMPrivateCA.ListPermissions")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"CertificateAuthorityArn\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\"\n}")
.asString();
const data = JSON.stringify({
CertificateAuthorityArn: '',
NextToken: '',
MaxResults: ''
});
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=ACMPrivateCA.ListPermissions');
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=ACMPrivateCA.ListPermissions',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {CertificateAuthorityArn: '', NextToken: '', MaxResults: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListPermissions';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"CertificateAuthorityArn":"","NextToken":"","MaxResults":""}'
};
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=ACMPrivateCA.ListPermissions',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "CertificateAuthorityArn": "",\n "NextToken": "",\n "MaxResults": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"CertificateAuthorityArn\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListPermissions")
.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({CertificateAuthorityArn: '', NextToken: '', MaxResults: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListPermissions',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {CertificateAuthorityArn: '', NextToken: '', MaxResults: ''},
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=ACMPrivateCA.ListPermissions');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
CertificateAuthorityArn: '',
NextToken: '',
MaxResults: ''
});
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=ACMPrivateCA.ListPermissions',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {CertificateAuthorityArn: '', NextToken: '', MaxResults: ''}
};
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=ACMPrivateCA.ListPermissions';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"CertificateAuthorityArn":"","NextToken":"","MaxResults":""}'
};
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 = @{ @"CertificateAuthorityArn": @"",
@"NextToken": @"",
@"MaxResults": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListPermissions"]
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=ACMPrivateCA.ListPermissions" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"CertificateAuthorityArn\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListPermissions",
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([
'CertificateAuthorityArn' => '',
'NextToken' => '',
'MaxResults' => ''
]),
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=ACMPrivateCA.ListPermissions', [
'body' => '{
"CertificateAuthorityArn": "",
"NextToken": "",
"MaxResults": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListPermissions');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'CertificateAuthorityArn' => '',
'NextToken' => '',
'MaxResults' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'CertificateAuthorityArn' => '',
'NextToken' => '',
'MaxResults' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListPermissions');
$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=ACMPrivateCA.ListPermissions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"CertificateAuthorityArn": "",
"NextToken": "",
"MaxResults": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListPermissions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"CertificateAuthorityArn": "",
"NextToken": "",
"MaxResults": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"CertificateAuthorityArn\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\"\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=ACMPrivateCA.ListPermissions"
payload = {
"CertificateAuthorityArn": "",
"NextToken": "",
"MaxResults": ""
}
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=ACMPrivateCA.ListPermissions"
payload <- "{\n \"CertificateAuthorityArn\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\"\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=ACMPrivateCA.ListPermissions")
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 \"CertificateAuthorityArn\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\"\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 \"CertificateAuthorityArn\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\"\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=ACMPrivateCA.ListPermissions";
let payload = json!({
"CertificateAuthorityArn": "",
"NextToken": "",
"MaxResults": ""
});
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=ACMPrivateCA.ListPermissions' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"CertificateAuthorityArn": "",
"NextToken": "",
"MaxResults": ""
}'
echo '{
"CertificateAuthorityArn": "",
"NextToken": "",
"MaxResults": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListPermissions' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "CertificateAuthorityArn": "",\n "NextToken": "",\n "MaxResults": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListPermissions'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"CertificateAuthorityArn": "",
"NextToken": "",
"MaxResults": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListPermissions")! 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
ListTags
{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListTags
HEADERS
X-Amz-Target
BODY json
{
"CertificateAuthorityArn": "",
"NextToken": "",
"MaxResults": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListTags");
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 \"CertificateAuthorityArn\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListTags" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:CertificateAuthorityArn ""
:NextToken ""
:MaxResults ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListTags"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"CertificateAuthorityArn\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\"\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=ACMPrivateCA.ListTags"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"CertificateAuthorityArn\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\"\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=ACMPrivateCA.ListTags");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"CertificateAuthorityArn\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListTags"
payload := strings.NewReader("{\n \"CertificateAuthorityArn\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\"\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: 74
{
"CertificateAuthorityArn": "",
"NextToken": "",
"MaxResults": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListTags")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"CertificateAuthorityArn\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListTags"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"CertificateAuthorityArn\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\"\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 \"CertificateAuthorityArn\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListTags")
.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=ACMPrivateCA.ListTags")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"CertificateAuthorityArn\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\"\n}")
.asString();
const data = JSON.stringify({
CertificateAuthorityArn: '',
NextToken: '',
MaxResults: ''
});
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=ACMPrivateCA.ListTags');
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=ACMPrivateCA.ListTags',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {CertificateAuthorityArn: '', NextToken: '', MaxResults: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListTags';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"CertificateAuthorityArn":"","NextToken":"","MaxResults":""}'
};
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=ACMPrivateCA.ListTags',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "CertificateAuthorityArn": "",\n "NextToken": "",\n "MaxResults": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"CertificateAuthorityArn\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListTags")
.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({CertificateAuthorityArn: '', NextToken: '', MaxResults: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListTags',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {CertificateAuthorityArn: '', NextToken: '', MaxResults: ''},
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=ACMPrivateCA.ListTags');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
CertificateAuthorityArn: '',
NextToken: '',
MaxResults: ''
});
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=ACMPrivateCA.ListTags',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {CertificateAuthorityArn: '', NextToken: '', MaxResults: ''}
};
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=ACMPrivateCA.ListTags';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"CertificateAuthorityArn":"","NextToken":"","MaxResults":""}'
};
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 = @{ @"CertificateAuthorityArn": @"",
@"NextToken": @"",
@"MaxResults": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListTags"]
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=ACMPrivateCA.ListTags" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"CertificateAuthorityArn\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListTags",
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([
'CertificateAuthorityArn' => '',
'NextToken' => '',
'MaxResults' => ''
]),
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=ACMPrivateCA.ListTags', [
'body' => '{
"CertificateAuthorityArn": "",
"NextToken": "",
"MaxResults": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListTags');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'CertificateAuthorityArn' => '',
'NextToken' => '',
'MaxResults' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'CertificateAuthorityArn' => '',
'NextToken' => '',
'MaxResults' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListTags');
$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=ACMPrivateCA.ListTags' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"CertificateAuthorityArn": "",
"NextToken": "",
"MaxResults": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListTags' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"CertificateAuthorityArn": "",
"NextToken": "",
"MaxResults": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"CertificateAuthorityArn\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\"\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=ACMPrivateCA.ListTags"
payload = {
"CertificateAuthorityArn": "",
"NextToken": "",
"MaxResults": ""
}
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=ACMPrivateCA.ListTags"
payload <- "{\n \"CertificateAuthorityArn\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\"\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=ACMPrivateCA.ListTags")
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 \"CertificateAuthorityArn\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\"\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 \"CertificateAuthorityArn\": \"\",\n \"NextToken\": \"\",\n \"MaxResults\": \"\"\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=ACMPrivateCA.ListTags";
let payload = json!({
"CertificateAuthorityArn": "",
"NextToken": "",
"MaxResults": ""
});
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=ACMPrivateCA.ListTags' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"CertificateAuthorityArn": "",
"NextToken": "",
"MaxResults": ""
}'
echo '{
"CertificateAuthorityArn": "",
"NextToken": "",
"MaxResults": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListTags' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "CertificateAuthorityArn": "",\n "NextToken": "",\n "MaxResults": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListTags'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"CertificateAuthorityArn": "",
"NextToken": "",
"MaxResults": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.ListTags")! 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
PutPolicy
{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.PutPolicy
HEADERS
X-Amz-Target
BODY json
{
"ResourceArn": "",
"Policy": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.PutPolicy");
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 \"ResourceArn\": \"\",\n \"Policy\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.PutPolicy" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:ResourceArn ""
:Policy ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.PutPolicy"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"ResourceArn\": \"\",\n \"Policy\": \"\"\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=ACMPrivateCA.PutPolicy"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"ResourceArn\": \"\",\n \"Policy\": \"\"\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=ACMPrivateCA.PutPolicy");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"ResourceArn\": \"\",\n \"Policy\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.PutPolicy"
payload := strings.NewReader("{\n \"ResourceArn\": \"\",\n \"Policy\": \"\"\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: 39
{
"ResourceArn": "",
"Policy": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.PutPolicy")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"ResourceArn\": \"\",\n \"Policy\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.PutPolicy"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"ResourceArn\": \"\",\n \"Policy\": \"\"\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 \"ResourceArn\": \"\",\n \"Policy\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.PutPolicy")
.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=ACMPrivateCA.PutPolicy")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"ResourceArn\": \"\",\n \"Policy\": \"\"\n}")
.asString();
const data = JSON.stringify({
ResourceArn: '',
Policy: ''
});
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=ACMPrivateCA.PutPolicy');
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=ACMPrivateCA.PutPolicy',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {ResourceArn: '', Policy: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.PutPolicy';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"ResourceArn":"","Policy":""}'
};
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=ACMPrivateCA.PutPolicy',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "ResourceArn": "",\n "Policy": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"ResourceArn\": \"\",\n \"Policy\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.PutPolicy")
.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({ResourceArn: '', Policy: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.PutPolicy',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {ResourceArn: '', Policy: ''},
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=ACMPrivateCA.PutPolicy');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
ResourceArn: '',
Policy: ''
});
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=ACMPrivateCA.PutPolicy',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {ResourceArn: '', Policy: ''}
};
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=ACMPrivateCA.PutPolicy';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"ResourceArn":"","Policy":""}'
};
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 = @{ @"ResourceArn": @"",
@"Policy": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.PutPolicy"]
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=ACMPrivateCA.PutPolicy" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"ResourceArn\": \"\",\n \"Policy\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.PutPolicy",
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([
'ResourceArn' => '',
'Policy' => ''
]),
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=ACMPrivateCA.PutPolicy', [
'body' => '{
"ResourceArn": "",
"Policy": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.PutPolicy');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'ResourceArn' => '',
'Policy' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'ResourceArn' => '',
'Policy' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.PutPolicy');
$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=ACMPrivateCA.PutPolicy' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ResourceArn": "",
"Policy": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.PutPolicy' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ResourceArn": "",
"Policy": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"ResourceArn\": \"\",\n \"Policy\": \"\"\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=ACMPrivateCA.PutPolicy"
payload = {
"ResourceArn": "",
"Policy": ""
}
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=ACMPrivateCA.PutPolicy"
payload <- "{\n \"ResourceArn\": \"\",\n \"Policy\": \"\"\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=ACMPrivateCA.PutPolicy")
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 \"ResourceArn\": \"\",\n \"Policy\": \"\"\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 \"ResourceArn\": \"\",\n \"Policy\": \"\"\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=ACMPrivateCA.PutPolicy";
let payload = json!({
"ResourceArn": "",
"Policy": ""
});
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=ACMPrivateCA.PutPolicy' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"ResourceArn": "",
"Policy": ""
}'
echo '{
"ResourceArn": "",
"Policy": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.PutPolicy' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "ResourceArn": "",\n "Policy": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.PutPolicy'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"ResourceArn": "",
"Policy": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.PutPolicy")! 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
RestoreCertificateAuthority
{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.RestoreCertificateAuthority
HEADERS
X-Amz-Target
BODY json
{
"CertificateAuthorityArn": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.RestoreCertificateAuthority");
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 \"CertificateAuthorityArn\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.RestoreCertificateAuthority" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:CertificateAuthorityArn ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.RestoreCertificateAuthority"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"CertificateAuthorityArn\": \"\"\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=ACMPrivateCA.RestoreCertificateAuthority"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"CertificateAuthorityArn\": \"\"\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=ACMPrivateCA.RestoreCertificateAuthority");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"CertificateAuthorityArn\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.RestoreCertificateAuthority"
payload := strings.NewReader("{\n \"CertificateAuthorityArn\": \"\"\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: 35
{
"CertificateAuthorityArn": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.RestoreCertificateAuthority")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"CertificateAuthorityArn\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.RestoreCertificateAuthority"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"CertificateAuthorityArn\": \"\"\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 \"CertificateAuthorityArn\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.RestoreCertificateAuthority")
.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=ACMPrivateCA.RestoreCertificateAuthority")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"CertificateAuthorityArn\": \"\"\n}")
.asString();
const data = JSON.stringify({
CertificateAuthorityArn: ''
});
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=ACMPrivateCA.RestoreCertificateAuthority');
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=ACMPrivateCA.RestoreCertificateAuthority',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {CertificateAuthorityArn: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.RestoreCertificateAuthority';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"CertificateAuthorityArn":""}'
};
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=ACMPrivateCA.RestoreCertificateAuthority',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "CertificateAuthorityArn": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"CertificateAuthorityArn\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.RestoreCertificateAuthority")
.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({CertificateAuthorityArn: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.RestoreCertificateAuthority',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {CertificateAuthorityArn: ''},
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=ACMPrivateCA.RestoreCertificateAuthority');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
CertificateAuthorityArn: ''
});
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=ACMPrivateCA.RestoreCertificateAuthority',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {CertificateAuthorityArn: ''}
};
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=ACMPrivateCA.RestoreCertificateAuthority';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"CertificateAuthorityArn":""}'
};
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 = @{ @"CertificateAuthorityArn": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.RestoreCertificateAuthority"]
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=ACMPrivateCA.RestoreCertificateAuthority" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"CertificateAuthorityArn\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.RestoreCertificateAuthority",
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([
'CertificateAuthorityArn' => ''
]),
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=ACMPrivateCA.RestoreCertificateAuthority', [
'body' => '{
"CertificateAuthorityArn": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.RestoreCertificateAuthority');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'CertificateAuthorityArn' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'CertificateAuthorityArn' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.RestoreCertificateAuthority');
$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=ACMPrivateCA.RestoreCertificateAuthority' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"CertificateAuthorityArn": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.RestoreCertificateAuthority' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"CertificateAuthorityArn": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"CertificateAuthorityArn\": \"\"\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=ACMPrivateCA.RestoreCertificateAuthority"
payload = { "CertificateAuthorityArn": "" }
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=ACMPrivateCA.RestoreCertificateAuthority"
payload <- "{\n \"CertificateAuthorityArn\": \"\"\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=ACMPrivateCA.RestoreCertificateAuthority")
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 \"CertificateAuthorityArn\": \"\"\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 \"CertificateAuthorityArn\": \"\"\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=ACMPrivateCA.RestoreCertificateAuthority";
let payload = json!({"CertificateAuthorityArn": ""});
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=ACMPrivateCA.RestoreCertificateAuthority' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"CertificateAuthorityArn": ""
}'
echo '{
"CertificateAuthorityArn": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.RestoreCertificateAuthority' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "CertificateAuthorityArn": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.RestoreCertificateAuthority'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = ["CertificateAuthorityArn": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.RestoreCertificateAuthority")! 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
RevokeCertificate
{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.RevokeCertificate
HEADERS
X-Amz-Target
BODY json
{
"CertificateAuthorityArn": "",
"CertificateSerial": "",
"RevocationReason": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.RevokeCertificate");
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 \"CertificateAuthorityArn\": \"\",\n \"CertificateSerial\": \"\",\n \"RevocationReason\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.RevokeCertificate" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:CertificateAuthorityArn ""
:CertificateSerial ""
:RevocationReason ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.RevokeCertificate"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"CertificateAuthorityArn\": \"\",\n \"CertificateSerial\": \"\",\n \"RevocationReason\": \"\"\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=ACMPrivateCA.RevokeCertificate"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"CertificateAuthorityArn\": \"\",\n \"CertificateSerial\": \"\",\n \"RevocationReason\": \"\"\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=ACMPrivateCA.RevokeCertificate");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"CertificateAuthorityArn\": \"\",\n \"CertificateSerial\": \"\",\n \"RevocationReason\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.RevokeCertificate"
payload := strings.NewReader("{\n \"CertificateAuthorityArn\": \"\",\n \"CertificateSerial\": \"\",\n \"RevocationReason\": \"\"\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: 88
{
"CertificateAuthorityArn": "",
"CertificateSerial": "",
"RevocationReason": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.RevokeCertificate")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"CertificateAuthorityArn\": \"\",\n \"CertificateSerial\": \"\",\n \"RevocationReason\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.RevokeCertificate"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"CertificateAuthorityArn\": \"\",\n \"CertificateSerial\": \"\",\n \"RevocationReason\": \"\"\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 \"CertificateAuthorityArn\": \"\",\n \"CertificateSerial\": \"\",\n \"RevocationReason\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.RevokeCertificate")
.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=ACMPrivateCA.RevokeCertificate")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"CertificateAuthorityArn\": \"\",\n \"CertificateSerial\": \"\",\n \"RevocationReason\": \"\"\n}")
.asString();
const data = JSON.stringify({
CertificateAuthorityArn: '',
CertificateSerial: '',
RevocationReason: ''
});
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=ACMPrivateCA.RevokeCertificate');
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=ACMPrivateCA.RevokeCertificate',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {CertificateAuthorityArn: '', CertificateSerial: '', RevocationReason: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.RevokeCertificate';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"CertificateAuthorityArn":"","CertificateSerial":"","RevocationReason":""}'
};
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=ACMPrivateCA.RevokeCertificate',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "CertificateAuthorityArn": "",\n "CertificateSerial": "",\n "RevocationReason": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"CertificateAuthorityArn\": \"\",\n \"CertificateSerial\": \"\",\n \"RevocationReason\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.RevokeCertificate")
.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({CertificateAuthorityArn: '', CertificateSerial: '', RevocationReason: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.RevokeCertificate',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {CertificateAuthorityArn: '', CertificateSerial: '', RevocationReason: ''},
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=ACMPrivateCA.RevokeCertificate');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
CertificateAuthorityArn: '',
CertificateSerial: '',
RevocationReason: ''
});
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=ACMPrivateCA.RevokeCertificate',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {CertificateAuthorityArn: '', CertificateSerial: '', RevocationReason: ''}
};
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=ACMPrivateCA.RevokeCertificate';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"CertificateAuthorityArn":"","CertificateSerial":"","RevocationReason":""}'
};
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 = @{ @"CertificateAuthorityArn": @"",
@"CertificateSerial": @"",
@"RevocationReason": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.RevokeCertificate"]
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=ACMPrivateCA.RevokeCertificate" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"CertificateAuthorityArn\": \"\",\n \"CertificateSerial\": \"\",\n \"RevocationReason\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.RevokeCertificate",
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([
'CertificateAuthorityArn' => '',
'CertificateSerial' => '',
'RevocationReason' => ''
]),
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=ACMPrivateCA.RevokeCertificate', [
'body' => '{
"CertificateAuthorityArn": "",
"CertificateSerial": "",
"RevocationReason": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.RevokeCertificate');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'CertificateAuthorityArn' => '',
'CertificateSerial' => '',
'RevocationReason' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'CertificateAuthorityArn' => '',
'CertificateSerial' => '',
'RevocationReason' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.RevokeCertificate');
$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=ACMPrivateCA.RevokeCertificate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"CertificateAuthorityArn": "",
"CertificateSerial": "",
"RevocationReason": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.RevokeCertificate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"CertificateAuthorityArn": "",
"CertificateSerial": "",
"RevocationReason": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"CertificateAuthorityArn\": \"\",\n \"CertificateSerial\": \"\",\n \"RevocationReason\": \"\"\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=ACMPrivateCA.RevokeCertificate"
payload = {
"CertificateAuthorityArn": "",
"CertificateSerial": "",
"RevocationReason": ""
}
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=ACMPrivateCA.RevokeCertificate"
payload <- "{\n \"CertificateAuthorityArn\": \"\",\n \"CertificateSerial\": \"\",\n \"RevocationReason\": \"\"\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=ACMPrivateCA.RevokeCertificate")
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 \"CertificateAuthorityArn\": \"\",\n \"CertificateSerial\": \"\",\n \"RevocationReason\": \"\"\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 \"CertificateAuthorityArn\": \"\",\n \"CertificateSerial\": \"\",\n \"RevocationReason\": \"\"\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=ACMPrivateCA.RevokeCertificate";
let payload = json!({
"CertificateAuthorityArn": "",
"CertificateSerial": "",
"RevocationReason": ""
});
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=ACMPrivateCA.RevokeCertificate' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"CertificateAuthorityArn": "",
"CertificateSerial": "",
"RevocationReason": ""
}'
echo '{
"CertificateAuthorityArn": "",
"CertificateSerial": "",
"RevocationReason": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.RevokeCertificate' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "CertificateAuthorityArn": "",\n "CertificateSerial": "",\n "RevocationReason": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.RevokeCertificate'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"CertificateAuthorityArn": "",
"CertificateSerial": "",
"RevocationReason": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.RevokeCertificate")! 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
TagCertificateAuthority
{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.TagCertificateAuthority
HEADERS
X-Amz-Target
BODY json
{
"CertificateAuthorityArn": "",
"Tags": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.TagCertificateAuthority");
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 \"CertificateAuthorityArn\": \"\",\n \"Tags\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.TagCertificateAuthority" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:CertificateAuthorityArn ""
:Tags ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.TagCertificateAuthority"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"CertificateAuthorityArn\": \"\",\n \"Tags\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.TagCertificateAuthority"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"CertificateAuthorityArn\": \"\",\n \"Tags\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.TagCertificateAuthority");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"CertificateAuthorityArn\": \"\",\n \"Tags\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.TagCertificateAuthority"
payload := strings.NewReader("{\n \"CertificateAuthorityArn\": \"\",\n \"Tags\": \"\"\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: 49
{
"CertificateAuthorityArn": "",
"Tags": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.TagCertificateAuthority")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"CertificateAuthorityArn\": \"\",\n \"Tags\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.TagCertificateAuthority"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"CertificateAuthorityArn\": \"\",\n \"Tags\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"CertificateAuthorityArn\": \"\",\n \"Tags\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.TagCertificateAuthority")
.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=ACMPrivateCA.TagCertificateAuthority")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"CertificateAuthorityArn\": \"\",\n \"Tags\": \"\"\n}")
.asString();
const data = JSON.stringify({
CertificateAuthorityArn: '',
Tags: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.TagCertificateAuthority');
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=ACMPrivateCA.TagCertificateAuthority',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {CertificateAuthorityArn: '', Tags: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.TagCertificateAuthority';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"CertificateAuthorityArn":"","Tags":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.TagCertificateAuthority',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "CertificateAuthorityArn": "",\n "Tags": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"CertificateAuthorityArn\": \"\",\n \"Tags\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.TagCertificateAuthority")
.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({CertificateAuthorityArn: '', Tags: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.TagCertificateAuthority',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {CertificateAuthorityArn: '', Tags: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.TagCertificateAuthority');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
CertificateAuthorityArn: '',
Tags: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.TagCertificateAuthority',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {CertificateAuthorityArn: '', Tags: ''}
};
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=ACMPrivateCA.TagCertificateAuthority';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"CertificateAuthorityArn":"","Tags":""}'
};
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 = @{ @"CertificateAuthorityArn": @"",
@"Tags": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.TagCertificateAuthority"]
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=ACMPrivateCA.TagCertificateAuthority" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"CertificateAuthorityArn\": \"\",\n \"Tags\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.TagCertificateAuthority",
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([
'CertificateAuthorityArn' => '',
'Tags' => ''
]),
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=ACMPrivateCA.TagCertificateAuthority', [
'body' => '{
"CertificateAuthorityArn": "",
"Tags": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.TagCertificateAuthority');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'CertificateAuthorityArn' => '',
'Tags' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'CertificateAuthorityArn' => '',
'Tags' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.TagCertificateAuthority');
$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=ACMPrivateCA.TagCertificateAuthority' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"CertificateAuthorityArn": "",
"Tags": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.TagCertificateAuthority' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"CertificateAuthorityArn": "",
"Tags": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"CertificateAuthorityArn\": \"\",\n \"Tags\": \"\"\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=ACMPrivateCA.TagCertificateAuthority"
payload = {
"CertificateAuthorityArn": "",
"Tags": ""
}
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=ACMPrivateCA.TagCertificateAuthority"
payload <- "{\n \"CertificateAuthorityArn\": \"\",\n \"Tags\": \"\"\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=ACMPrivateCA.TagCertificateAuthority")
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 \"CertificateAuthorityArn\": \"\",\n \"Tags\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"CertificateAuthorityArn\": \"\",\n \"Tags\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.TagCertificateAuthority";
let payload = json!({
"CertificateAuthorityArn": "",
"Tags": ""
});
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=ACMPrivateCA.TagCertificateAuthority' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"CertificateAuthorityArn": "",
"Tags": ""
}'
echo '{
"CertificateAuthorityArn": "",
"Tags": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.TagCertificateAuthority' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "CertificateAuthorityArn": "",\n "Tags": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.TagCertificateAuthority'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"CertificateAuthorityArn": "",
"Tags": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.TagCertificateAuthority")! 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
UntagCertificateAuthority
{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UntagCertificateAuthority
HEADERS
X-Amz-Target
BODY json
{
"CertificateAuthorityArn": "",
"Tags": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UntagCertificateAuthority");
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 \"CertificateAuthorityArn\": \"\",\n \"Tags\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UntagCertificateAuthority" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:CertificateAuthorityArn ""
:Tags ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UntagCertificateAuthority"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"CertificateAuthorityArn\": \"\",\n \"Tags\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UntagCertificateAuthority"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"CertificateAuthorityArn\": \"\",\n \"Tags\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UntagCertificateAuthority");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"CertificateAuthorityArn\": \"\",\n \"Tags\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UntagCertificateAuthority"
payload := strings.NewReader("{\n \"CertificateAuthorityArn\": \"\",\n \"Tags\": \"\"\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: 49
{
"CertificateAuthorityArn": "",
"Tags": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UntagCertificateAuthority")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"CertificateAuthorityArn\": \"\",\n \"Tags\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UntagCertificateAuthority"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"CertificateAuthorityArn\": \"\",\n \"Tags\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"CertificateAuthorityArn\": \"\",\n \"Tags\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UntagCertificateAuthority")
.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=ACMPrivateCA.UntagCertificateAuthority")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"CertificateAuthorityArn\": \"\",\n \"Tags\": \"\"\n}")
.asString();
const data = JSON.stringify({
CertificateAuthorityArn: '',
Tags: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UntagCertificateAuthority');
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=ACMPrivateCA.UntagCertificateAuthority',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {CertificateAuthorityArn: '', Tags: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UntagCertificateAuthority';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"CertificateAuthorityArn":"","Tags":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UntagCertificateAuthority',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "CertificateAuthorityArn": "",\n "Tags": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"CertificateAuthorityArn\": \"\",\n \"Tags\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UntagCertificateAuthority")
.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({CertificateAuthorityArn: '', Tags: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UntagCertificateAuthority',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {CertificateAuthorityArn: '', Tags: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UntagCertificateAuthority');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
CertificateAuthorityArn: '',
Tags: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UntagCertificateAuthority',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {CertificateAuthorityArn: '', Tags: ''}
};
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=ACMPrivateCA.UntagCertificateAuthority';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"CertificateAuthorityArn":"","Tags":""}'
};
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 = @{ @"CertificateAuthorityArn": @"",
@"Tags": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UntagCertificateAuthority"]
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=ACMPrivateCA.UntagCertificateAuthority" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"CertificateAuthorityArn\": \"\",\n \"Tags\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UntagCertificateAuthority",
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([
'CertificateAuthorityArn' => '',
'Tags' => ''
]),
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=ACMPrivateCA.UntagCertificateAuthority', [
'body' => '{
"CertificateAuthorityArn": "",
"Tags": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UntagCertificateAuthority');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'CertificateAuthorityArn' => '',
'Tags' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'CertificateAuthorityArn' => '',
'Tags' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UntagCertificateAuthority');
$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=ACMPrivateCA.UntagCertificateAuthority' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"CertificateAuthorityArn": "",
"Tags": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UntagCertificateAuthority' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"CertificateAuthorityArn": "",
"Tags": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"CertificateAuthorityArn\": \"\",\n \"Tags\": \"\"\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=ACMPrivateCA.UntagCertificateAuthority"
payload = {
"CertificateAuthorityArn": "",
"Tags": ""
}
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=ACMPrivateCA.UntagCertificateAuthority"
payload <- "{\n \"CertificateAuthorityArn\": \"\",\n \"Tags\": \"\"\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=ACMPrivateCA.UntagCertificateAuthority")
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 \"CertificateAuthorityArn\": \"\",\n \"Tags\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/') do |req|
req.headers['x-amz-target'] = ''
req.body = "{\n \"CertificateAuthorityArn\": \"\",\n \"Tags\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UntagCertificateAuthority";
let payload = json!({
"CertificateAuthorityArn": "",
"Tags": ""
});
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=ACMPrivateCA.UntagCertificateAuthority' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"CertificateAuthorityArn": "",
"Tags": ""
}'
echo '{
"CertificateAuthorityArn": "",
"Tags": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UntagCertificateAuthority' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "CertificateAuthorityArn": "",\n "Tags": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UntagCertificateAuthority'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"CertificateAuthorityArn": "",
"Tags": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UntagCertificateAuthority")! 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
UpdateCertificateAuthority
{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UpdateCertificateAuthority
HEADERS
X-Amz-Target
BODY json
{
"CertificateAuthorityArn": "",
"RevocationConfiguration": "",
"Status": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UpdateCertificateAuthority");
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 \"CertificateAuthorityArn\": \"\",\n \"RevocationConfiguration\": \"\",\n \"Status\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UpdateCertificateAuthority" {:headers {:x-amz-target ""}
:content-type :json
:form-params {:CertificateAuthorityArn ""
:RevocationConfiguration ""
:Status ""}})
require "http/client"
url = "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UpdateCertificateAuthority"
headers = HTTP::Headers{
"x-amz-target" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"CertificateAuthorityArn\": \"\",\n \"RevocationConfiguration\": \"\",\n \"Status\": \"\"\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=ACMPrivateCA.UpdateCertificateAuthority"),
Headers =
{
{ "x-amz-target", "" },
},
Content = new StringContent("{\n \"CertificateAuthorityArn\": \"\",\n \"RevocationConfiguration\": \"\",\n \"Status\": \"\"\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=ACMPrivateCA.UpdateCertificateAuthority");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-amz-target", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"CertificateAuthorityArn\": \"\",\n \"RevocationConfiguration\": \"\",\n \"Status\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UpdateCertificateAuthority"
payload := strings.NewReader("{\n \"CertificateAuthorityArn\": \"\",\n \"RevocationConfiguration\": \"\",\n \"Status\": \"\"\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
{
"CertificateAuthorityArn": "",
"RevocationConfiguration": "",
"Status": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UpdateCertificateAuthority")
.setHeader("x-amz-target", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"CertificateAuthorityArn\": \"\",\n \"RevocationConfiguration\": \"\",\n \"Status\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UpdateCertificateAuthority"))
.header("x-amz-target", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"CertificateAuthorityArn\": \"\",\n \"RevocationConfiguration\": \"\",\n \"Status\": \"\"\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 \"CertificateAuthorityArn\": \"\",\n \"RevocationConfiguration\": \"\",\n \"Status\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UpdateCertificateAuthority")
.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=ACMPrivateCA.UpdateCertificateAuthority")
.header("x-amz-target", "")
.header("content-type", "application/json")
.body("{\n \"CertificateAuthorityArn\": \"\",\n \"RevocationConfiguration\": \"\",\n \"Status\": \"\"\n}")
.asString();
const data = JSON.stringify({
CertificateAuthorityArn: '',
RevocationConfiguration: '',
Status: ''
});
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=ACMPrivateCA.UpdateCertificateAuthority');
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=ACMPrivateCA.UpdateCertificateAuthority',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {CertificateAuthorityArn: '', RevocationConfiguration: '', Status: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UpdateCertificateAuthority';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"CertificateAuthorityArn":"","RevocationConfiguration":"","Status":""}'
};
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=ACMPrivateCA.UpdateCertificateAuthority',
method: 'POST',
headers: {
'x-amz-target': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "CertificateAuthorityArn": "",\n "RevocationConfiguration": "",\n "Status": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"CertificateAuthorityArn\": \"\",\n \"RevocationConfiguration\": \"\",\n \"Status\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UpdateCertificateAuthority")
.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({CertificateAuthorityArn: '', RevocationConfiguration: '', Status: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UpdateCertificateAuthority',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: {CertificateAuthorityArn: '', RevocationConfiguration: '', Status: ''},
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=ACMPrivateCA.UpdateCertificateAuthority');
req.headers({
'x-amz-target': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
CertificateAuthorityArn: '',
RevocationConfiguration: '',
Status: ''
});
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=ACMPrivateCA.UpdateCertificateAuthority',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
data: {CertificateAuthorityArn: '', RevocationConfiguration: '', Status: ''}
};
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=ACMPrivateCA.UpdateCertificateAuthority';
const options = {
method: 'POST',
headers: {'x-amz-target': '', 'content-type': 'application/json'},
body: '{"CertificateAuthorityArn":"","RevocationConfiguration":"","Status":""}'
};
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 = @{ @"CertificateAuthorityArn": @"",
@"RevocationConfiguration": @"",
@"Status": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UpdateCertificateAuthority"]
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=ACMPrivateCA.UpdateCertificateAuthority" in
let headers = Header.add_list (Header.init ()) [
("x-amz-target", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"CertificateAuthorityArn\": \"\",\n \"RevocationConfiguration\": \"\",\n \"Status\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UpdateCertificateAuthority",
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([
'CertificateAuthorityArn' => '',
'RevocationConfiguration' => '',
'Status' => ''
]),
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=ACMPrivateCA.UpdateCertificateAuthority', [
'body' => '{
"CertificateAuthorityArn": "",
"RevocationConfiguration": "",
"Status": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-amz-target' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UpdateCertificateAuthority');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-amz-target' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'CertificateAuthorityArn' => '',
'RevocationConfiguration' => '',
'Status' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'CertificateAuthorityArn' => '',
'RevocationConfiguration' => '',
'Status' => ''
]));
$request->setRequestUrl('{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UpdateCertificateAuthority');
$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=ACMPrivateCA.UpdateCertificateAuthority' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"CertificateAuthorityArn": "",
"RevocationConfiguration": "",
"Status": ""
}'
$headers=@{}
$headers.Add("x-amz-target", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UpdateCertificateAuthority' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"CertificateAuthorityArn": "",
"RevocationConfiguration": "",
"Status": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"CertificateAuthorityArn\": \"\",\n \"RevocationConfiguration\": \"\",\n \"Status\": \"\"\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=ACMPrivateCA.UpdateCertificateAuthority"
payload = {
"CertificateAuthorityArn": "",
"RevocationConfiguration": "",
"Status": ""
}
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=ACMPrivateCA.UpdateCertificateAuthority"
payload <- "{\n \"CertificateAuthorityArn\": \"\",\n \"RevocationConfiguration\": \"\",\n \"Status\": \"\"\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=ACMPrivateCA.UpdateCertificateAuthority")
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 \"CertificateAuthorityArn\": \"\",\n \"RevocationConfiguration\": \"\",\n \"Status\": \"\"\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 \"CertificateAuthorityArn\": \"\",\n \"RevocationConfiguration\": \"\",\n \"Status\": \"\"\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=ACMPrivateCA.UpdateCertificateAuthority";
let payload = json!({
"CertificateAuthorityArn": "",
"RevocationConfiguration": "",
"Status": ""
});
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=ACMPrivateCA.UpdateCertificateAuthority' \
--header 'content-type: application/json' \
--header 'x-amz-target: ' \
--data '{
"CertificateAuthorityArn": "",
"RevocationConfiguration": "",
"Status": ""
}'
echo '{
"CertificateAuthorityArn": "",
"RevocationConfiguration": "",
"Status": ""
}' | \
http POST '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UpdateCertificateAuthority' \
content-type:application/json \
x-amz-target:''
wget --quiet \
--method POST \
--header 'x-amz-target: ' \
--header 'content-type: application/json' \
--body-data '{\n "CertificateAuthorityArn": "",\n "RevocationConfiguration": "",\n "Status": ""\n}' \
--output-document \
- '{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UpdateCertificateAuthority'
import Foundation
let headers = [
"x-amz-target": "",
"content-type": "application/json"
]
let parameters = [
"CertificateAuthorityArn": "",
"RevocationConfiguration": "",
"Status": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/#X-Amz-Target=ACMPrivateCA.UpdateCertificateAuthority")! 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()