Cloud Deployment Manager V2 API
POST
deploymentmanager.deployments.cancelPreview
{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/cancelPreview
QUERY PARAMS
project
deployment
BODY json
{
"fingerprint": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/cancelPreview");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"fingerprint\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/cancelPreview" {:content-type :json
:form-params {:fingerprint ""}})
require "http/client"
url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/cancelPreview"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"fingerprint\": \"\"\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}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/cancelPreview"),
Content = new StringContent("{\n \"fingerprint\": \"\"\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}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/cancelPreview");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"fingerprint\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/cancelPreview"
payload := strings.NewReader("{\n \"fingerprint\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:deployment/cancelPreview HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 23
{
"fingerprint": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/cancelPreview")
.setHeader("content-type", "application/json")
.setBody("{\n \"fingerprint\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/cancelPreview"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"fingerprint\": \"\"\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 \"fingerprint\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/cancelPreview")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/cancelPreview")
.header("content-type", "application/json")
.body("{\n \"fingerprint\": \"\"\n}")
.asString();
const data = JSON.stringify({
fingerprint: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/cancelPreview');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/cancelPreview',
headers: {'content-type': 'application/json'},
data: {fingerprint: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/cancelPreview';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"fingerprint":""}'
};
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}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/cancelPreview',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "fingerprint": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"fingerprint\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/cancelPreview")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:deployment/cancelPreview',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({fingerprint: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/cancelPreview',
headers: {'content-type': 'application/json'},
body: {fingerprint: ''},
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}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/cancelPreview');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
fingerprint: ''
});
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}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/cancelPreview',
headers: {'content-type': 'application/json'},
data: {fingerprint: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/cancelPreview';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"fingerprint":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"fingerprint": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/cancelPreview"]
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}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/cancelPreview" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"fingerprint\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/cancelPreview",
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([
'fingerprint' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/cancelPreview', [
'body' => '{
"fingerprint": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/cancelPreview');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'fingerprint' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'fingerprint' => ''
]));
$request->setRequestUrl('{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/cancelPreview');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/cancelPreview' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"fingerprint": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/cancelPreview' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"fingerprint": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"fingerprint\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:deployment/cancelPreview", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/cancelPreview"
payload = { "fingerprint": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/cancelPreview"
payload <- "{\n \"fingerprint\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/cancelPreview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"fingerprint\": \"\"\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/deploymentmanager/v2/projects/:project/global/deployments/:deployment/cancelPreview') do |req|
req.body = "{\n \"fingerprint\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/cancelPreview";
let payload = json!({"fingerprint": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/cancelPreview \
--header 'content-type: application/json' \
--data '{
"fingerprint": ""
}'
echo '{
"fingerprint": ""
}' | \
http POST {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/cancelPreview \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "fingerprint": ""\n}' \
--output-document \
- {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/cancelPreview
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["fingerprint": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/cancelPreview")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
deploymentmanager.deployments.delete
{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment
QUERY PARAMS
project
deployment
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment")
require "http/client"
url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:deployment HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:deployment',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment');
echo $response->getBody();
setUrl('{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:deployment")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:deployment') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment
http DELETE {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
deploymentmanager.deployments.get
{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment
QUERY PARAMS
project
deployment
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment")
require "http/client"
url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:deployment HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:deployment',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment');
echo $response->getBody();
setUrl('{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:deployment")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:deployment') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment
http GET {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
deploymentmanager.deployments.getIamPolicy
{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/getIamPolicy
QUERY PARAMS
project
resource
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/getIamPolicy");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/getIamPolicy")
require "http/client"
url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/getIamPolicy"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/getIamPolicy"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/getIamPolicy");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/getIamPolicy"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:resource/getIamPolicy HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/getIamPolicy")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/getIamPolicy"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/getIamPolicy")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/getIamPolicy")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/getIamPolicy');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/getIamPolicy'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/getIamPolicy';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/getIamPolicy',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/getIamPolicy")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:resource/getIamPolicy',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/getIamPolicy'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/getIamPolicy');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/getIamPolicy'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/getIamPolicy';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/getIamPolicy"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/getIamPolicy" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/getIamPolicy",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/getIamPolicy');
echo $response->getBody();
setUrl('{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/getIamPolicy');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/getIamPolicy');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/getIamPolicy' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/getIamPolicy' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:resource/getIamPolicy")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/getIamPolicy"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/getIamPolicy"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/getIamPolicy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:resource/getIamPolicy') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/getIamPolicy";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/getIamPolicy
http GET {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/getIamPolicy
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/getIamPolicy
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/getIamPolicy")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
deploymentmanager.deployments.insert
{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments
QUERY PARAMS
project
BODY json
{
"description": "",
"fingerprint": "",
"id": "",
"insertTime": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": "",
"name": "",
"operation": {
"clientOperationId": "",
"creationTimestamp": "",
"description": "",
"endTime": "",
"error": {
"errors": [
{
"arguments": [],
"code": "",
"debugInfo": {
"detail": "",
"stackEntries": []
},
"errorDetails": [
{
"errorInfo": {
"domain": "",
"metadatas": {},
"reason": ""
},
"help": {
"links": [
{
"description": "",
"url": ""
}
]
},
"localizedMessage": {
"locale": "",
"message": ""
},
"quotaInfo": {
"dimensions": {},
"futureLimit": "",
"limit": "",
"limitName": "",
"metricName": "",
"rolloutStatus": ""
}
}
],
"location": "",
"message": ""
}
]
},
"httpErrorMessage": "",
"httpErrorStatusCode": 0,
"id": "",
"insertTime": "",
"instancesBulkInsertOperationMetadata": {
"machineType": "",
"perLocationStatus": {}
},
"kind": "",
"name": "",
"operationGroupId": "",
"operationType": "",
"progress": 0,
"region": "",
"selfLink": "",
"selfLinkWithId": "",
"setCommonInstanceMetadataOperationMetadata": {
"clientOperationId": "",
"perLocationOperations": {}
},
"startTime": "",
"status": "",
"statusMessage": "",
"targetId": "",
"targetLink": "",
"user": "",
"warnings": [
{
"code": "",
"data": [
{
"key": "",
"value": ""
}
],
"message": ""
}
],
"zone": ""
},
"selfLink": "",
"target": {
"config": {
"content": ""
},
"imports": [
{
"content": "",
"name": ""
}
]
},
"update": {
"description": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": ""
},
"updateTime": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments" {:content-type :json
:form-params {:description ""
:fingerprint ""
:id ""
:insertTime ""
:labels [{:key ""
:value ""}]
:manifest ""
:name ""
:operation {:clientOperationId ""
:creationTimestamp ""
:description ""
:endTime ""
:error {:errors [{:arguments []
:code ""
:debugInfo {:detail ""
:stackEntries []}
:errorDetails [{:errorInfo {:domain ""
:metadatas {}
:reason ""}
:help {:links [{:description ""
:url ""}]}
:localizedMessage {:locale ""
:message ""}
:quotaInfo {:dimensions {}
:futureLimit ""
:limit ""
:limitName ""
:metricName ""
:rolloutStatus ""}}]
:location ""
:message ""}]}
:httpErrorMessage ""
:httpErrorStatusCode 0
:id ""
:insertTime ""
:instancesBulkInsertOperationMetadata {:machineType ""
:perLocationStatus {}}
:kind ""
:name ""
:operationGroupId ""
:operationType ""
:progress 0
:region ""
:selfLink ""
:selfLinkWithId ""
:setCommonInstanceMetadataOperationMetadata {:clientOperationId ""
:perLocationOperations {}}
:startTime ""
:status ""
:statusMessage ""
:targetId ""
:targetLink ""
:user ""
:warnings [{:code ""
:data [{:key ""
:value ""}]
:message ""}]
:zone ""}
:selfLink ""
:target {:config {:content ""}
:imports [{:content ""
:name ""}]}
:update {:description ""
:labels [{:key ""
:value ""}]
:manifest ""}
:updateTime ""}})
require "http/client"
url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\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}}/deploymentmanager/v2/projects/:project/global/deployments"),
Content = new StringContent("{\n \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\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}}/deploymentmanager/v2/projects/:project/global/deployments");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments"
payload := strings.NewReader("{\n \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/deploymentmanager/v2/projects/:project/global/deployments HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2453
{
"description": "",
"fingerprint": "",
"id": "",
"insertTime": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": "",
"name": "",
"operation": {
"clientOperationId": "",
"creationTimestamp": "",
"description": "",
"endTime": "",
"error": {
"errors": [
{
"arguments": [],
"code": "",
"debugInfo": {
"detail": "",
"stackEntries": []
},
"errorDetails": [
{
"errorInfo": {
"domain": "",
"metadatas": {},
"reason": ""
},
"help": {
"links": [
{
"description": "",
"url": ""
}
]
},
"localizedMessage": {
"locale": "",
"message": ""
},
"quotaInfo": {
"dimensions": {},
"futureLimit": "",
"limit": "",
"limitName": "",
"metricName": "",
"rolloutStatus": ""
}
}
],
"location": "",
"message": ""
}
]
},
"httpErrorMessage": "",
"httpErrorStatusCode": 0,
"id": "",
"insertTime": "",
"instancesBulkInsertOperationMetadata": {
"machineType": "",
"perLocationStatus": {}
},
"kind": "",
"name": "",
"operationGroupId": "",
"operationType": "",
"progress": 0,
"region": "",
"selfLink": "",
"selfLinkWithId": "",
"setCommonInstanceMetadataOperationMetadata": {
"clientOperationId": "",
"perLocationOperations": {}
},
"startTime": "",
"status": "",
"statusMessage": "",
"targetId": "",
"targetLink": "",
"user": "",
"warnings": [
{
"code": "",
"data": [
{
"key": "",
"value": ""
}
],
"message": ""
}
],
"zone": ""
},
"selfLink": "",
"target": {
"config": {
"content": ""
},
"imports": [
{
"content": "",
"name": ""
}
]
},
"update": {
"description": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": ""
},
"updateTime": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments")
.setHeader("content-type", "application/json")
.setBody("{\n \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\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 \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments")
.header("content-type", "application/json")
.body("{\n \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\n}")
.asString();
const data = JSON.stringify({
description: '',
fingerprint: '',
id: '',
insertTime: '',
labels: [
{
key: '',
value: ''
}
],
manifest: '',
name: '',
operation: {
clientOperationId: '',
creationTimestamp: '',
description: '',
endTime: '',
error: {
errors: [
{
arguments: [],
code: '',
debugInfo: {
detail: '',
stackEntries: []
},
errorDetails: [
{
errorInfo: {
domain: '',
metadatas: {},
reason: ''
},
help: {
links: [
{
description: '',
url: ''
}
]
},
localizedMessage: {
locale: '',
message: ''
},
quotaInfo: {
dimensions: {},
futureLimit: '',
limit: '',
limitName: '',
metricName: '',
rolloutStatus: ''
}
}
],
location: '',
message: ''
}
]
},
httpErrorMessage: '',
httpErrorStatusCode: 0,
id: '',
insertTime: '',
instancesBulkInsertOperationMetadata: {
machineType: '',
perLocationStatus: {}
},
kind: '',
name: '',
operationGroupId: '',
operationType: '',
progress: 0,
region: '',
selfLink: '',
selfLinkWithId: '',
setCommonInstanceMetadataOperationMetadata: {
clientOperationId: '',
perLocationOperations: {}
},
startTime: '',
status: '',
statusMessage: '',
targetId: '',
targetLink: '',
user: '',
warnings: [
{
code: '',
data: [
{
key: '',
value: ''
}
],
message: ''
}
],
zone: ''
},
selfLink: '',
target: {
config: {
content: ''
},
imports: [
{
content: '',
name: ''
}
]
},
update: {
description: '',
labels: [
{
key: '',
value: ''
}
],
manifest: ''
},
updateTime: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments',
headers: {'content-type': 'application/json'},
data: {
description: '',
fingerprint: '',
id: '',
insertTime: '',
labels: [{key: '', value: ''}],
manifest: '',
name: '',
operation: {
clientOperationId: '',
creationTimestamp: '',
description: '',
endTime: '',
error: {
errors: [
{
arguments: [],
code: '',
debugInfo: {detail: '', stackEntries: []},
errorDetails: [
{
errorInfo: {domain: '', metadatas: {}, reason: ''},
help: {links: [{description: '', url: ''}]},
localizedMessage: {locale: '', message: ''},
quotaInfo: {
dimensions: {},
futureLimit: '',
limit: '',
limitName: '',
metricName: '',
rolloutStatus: ''
}
}
],
location: '',
message: ''
}
]
},
httpErrorMessage: '',
httpErrorStatusCode: 0,
id: '',
insertTime: '',
instancesBulkInsertOperationMetadata: {machineType: '', perLocationStatus: {}},
kind: '',
name: '',
operationGroupId: '',
operationType: '',
progress: 0,
region: '',
selfLink: '',
selfLinkWithId: '',
setCommonInstanceMetadataOperationMetadata: {clientOperationId: '', perLocationOperations: {}},
startTime: '',
status: '',
statusMessage: '',
targetId: '',
targetLink: '',
user: '',
warnings: [{code: '', data: [{key: '', value: ''}], message: ''}],
zone: ''
},
selfLink: '',
target: {config: {content: ''}, imports: [{content: '', name: ''}]},
update: {description: '', labels: [{key: '', value: ''}], manifest: ''},
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"description":"","fingerprint":"","id":"","insertTime":"","labels":[{"key":"","value":""}],"manifest":"","name":"","operation":{"clientOperationId":"","creationTimestamp":"","description":"","endTime":"","error":{"errors":[{"arguments":[],"code":"","debugInfo":{"detail":"","stackEntries":[]},"errorDetails":[{"errorInfo":{"domain":"","metadatas":{},"reason":""},"help":{"links":[{"description":"","url":""}]},"localizedMessage":{"locale":"","message":""},"quotaInfo":{"dimensions":{},"futureLimit":"","limit":"","limitName":"","metricName":"","rolloutStatus":""}}],"location":"","message":""}]},"httpErrorMessage":"","httpErrorStatusCode":0,"id":"","insertTime":"","instancesBulkInsertOperationMetadata":{"machineType":"","perLocationStatus":{}},"kind":"","name":"","operationGroupId":"","operationType":"","progress":0,"region":"","selfLink":"","selfLinkWithId":"","setCommonInstanceMetadataOperationMetadata":{"clientOperationId":"","perLocationOperations":{}},"startTime":"","status":"","statusMessage":"","targetId":"","targetLink":"","user":"","warnings":[{"code":"","data":[{"key":"","value":""}],"message":""}],"zone":""},"selfLink":"","target":{"config":{"content":""},"imports":[{"content":"","name":""}]},"update":{"description":"","labels":[{"key":"","value":""}],"manifest":""},"updateTime":""}'
};
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}}/deploymentmanager/v2/projects/:project/global/deployments',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "description": "",\n "fingerprint": "",\n "id": "",\n "insertTime": "",\n "labels": [\n {\n "key": "",\n "value": ""\n }\n ],\n "manifest": "",\n "name": "",\n "operation": {\n "clientOperationId": "",\n "creationTimestamp": "",\n "description": "",\n "endTime": "",\n "error": {\n "errors": [\n {\n "arguments": [],\n "code": "",\n "debugInfo": {\n "detail": "",\n "stackEntries": []\n },\n "errorDetails": [\n {\n "errorInfo": {\n "domain": "",\n "metadatas": {},\n "reason": ""\n },\n "help": {\n "links": [\n {\n "description": "",\n "url": ""\n }\n ]\n },\n "localizedMessage": {\n "locale": "",\n "message": ""\n },\n "quotaInfo": {\n "dimensions": {},\n "futureLimit": "",\n "limit": "",\n "limitName": "",\n "metricName": "",\n "rolloutStatus": ""\n }\n }\n ],\n "location": "",\n "message": ""\n }\n ]\n },\n "httpErrorMessage": "",\n "httpErrorStatusCode": 0,\n "id": "",\n "insertTime": "",\n "instancesBulkInsertOperationMetadata": {\n "machineType": "",\n "perLocationStatus": {}\n },\n "kind": "",\n "name": "",\n "operationGroupId": "",\n "operationType": "",\n "progress": 0,\n "region": "",\n "selfLink": "",\n "selfLinkWithId": "",\n "setCommonInstanceMetadataOperationMetadata": {\n "clientOperationId": "",\n "perLocationOperations": {}\n },\n "startTime": "",\n "status": "",\n "statusMessage": "",\n "targetId": "",\n "targetLink": "",\n "user": "",\n "warnings": [\n {\n "code": "",\n "data": [\n {\n "key": "",\n "value": ""\n }\n ],\n "message": ""\n }\n ],\n "zone": ""\n },\n "selfLink": "",\n "target": {\n "config": {\n "content": ""\n },\n "imports": [\n {\n "content": "",\n "name": ""\n }\n ]\n },\n "update": {\n "description": "",\n "labels": [\n {\n "key": "",\n "value": ""\n }\n ],\n "manifest": ""\n },\n "updateTime": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/deploymentmanager/v2/projects/:project/global/deployments',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
description: '',
fingerprint: '',
id: '',
insertTime: '',
labels: [{key: '', value: ''}],
manifest: '',
name: '',
operation: {
clientOperationId: '',
creationTimestamp: '',
description: '',
endTime: '',
error: {
errors: [
{
arguments: [],
code: '',
debugInfo: {detail: '', stackEntries: []},
errorDetails: [
{
errorInfo: {domain: '', metadatas: {}, reason: ''},
help: {links: [{description: '', url: ''}]},
localizedMessage: {locale: '', message: ''},
quotaInfo: {
dimensions: {},
futureLimit: '',
limit: '',
limitName: '',
metricName: '',
rolloutStatus: ''
}
}
],
location: '',
message: ''
}
]
},
httpErrorMessage: '',
httpErrorStatusCode: 0,
id: '',
insertTime: '',
instancesBulkInsertOperationMetadata: {machineType: '', perLocationStatus: {}},
kind: '',
name: '',
operationGroupId: '',
operationType: '',
progress: 0,
region: '',
selfLink: '',
selfLinkWithId: '',
setCommonInstanceMetadataOperationMetadata: {clientOperationId: '', perLocationOperations: {}},
startTime: '',
status: '',
statusMessage: '',
targetId: '',
targetLink: '',
user: '',
warnings: [{code: '', data: [{key: '', value: ''}], message: ''}],
zone: ''
},
selfLink: '',
target: {config: {content: ''}, imports: [{content: '', name: ''}]},
update: {description: '', labels: [{key: '', value: ''}], manifest: ''},
updateTime: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments',
headers: {'content-type': 'application/json'},
body: {
description: '',
fingerprint: '',
id: '',
insertTime: '',
labels: [{key: '', value: ''}],
manifest: '',
name: '',
operation: {
clientOperationId: '',
creationTimestamp: '',
description: '',
endTime: '',
error: {
errors: [
{
arguments: [],
code: '',
debugInfo: {detail: '', stackEntries: []},
errorDetails: [
{
errorInfo: {domain: '', metadatas: {}, reason: ''},
help: {links: [{description: '', url: ''}]},
localizedMessage: {locale: '', message: ''},
quotaInfo: {
dimensions: {},
futureLimit: '',
limit: '',
limitName: '',
metricName: '',
rolloutStatus: ''
}
}
],
location: '',
message: ''
}
]
},
httpErrorMessage: '',
httpErrorStatusCode: 0,
id: '',
insertTime: '',
instancesBulkInsertOperationMetadata: {machineType: '', perLocationStatus: {}},
kind: '',
name: '',
operationGroupId: '',
operationType: '',
progress: 0,
region: '',
selfLink: '',
selfLinkWithId: '',
setCommonInstanceMetadataOperationMetadata: {clientOperationId: '', perLocationOperations: {}},
startTime: '',
status: '',
statusMessage: '',
targetId: '',
targetLink: '',
user: '',
warnings: [{code: '', data: [{key: '', value: ''}], message: ''}],
zone: ''
},
selfLink: '',
target: {config: {content: ''}, imports: [{content: '', name: ''}]},
update: {description: '', labels: [{key: '', value: ''}], manifest: ''},
updateTime: ''
},
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}}/deploymentmanager/v2/projects/:project/global/deployments');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
description: '',
fingerprint: '',
id: '',
insertTime: '',
labels: [
{
key: '',
value: ''
}
],
manifest: '',
name: '',
operation: {
clientOperationId: '',
creationTimestamp: '',
description: '',
endTime: '',
error: {
errors: [
{
arguments: [],
code: '',
debugInfo: {
detail: '',
stackEntries: []
},
errorDetails: [
{
errorInfo: {
domain: '',
metadatas: {},
reason: ''
},
help: {
links: [
{
description: '',
url: ''
}
]
},
localizedMessage: {
locale: '',
message: ''
},
quotaInfo: {
dimensions: {},
futureLimit: '',
limit: '',
limitName: '',
metricName: '',
rolloutStatus: ''
}
}
],
location: '',
message: ''
}
]
},
httpErrorMessage: '',
httpErrorStatusCode: 0,
id: '',
insertTime: '',
instancesBulkInsertOperationMetadata: {
machineType: '',
perLocationStatus: {}
},
kind: '',
name: '',
operationGroupId: '',
operationType: '',
progress: 0,
region: '',
selfLink: '',
selfLinkWithId: '',
setCommonInstanceMetadataOperationMetadata: {
clientOperationId: '',
perLocationOperations: {}
},
startTime: '',
status: '',
statusMessage: '',
targetId: '',
targetLink: '',
user: '',
warnings: [
{
code: '',
data: [
{
key: '',
value: ''
}
],
message: ''
}
],
zone: ''
},
selfLink: '',
target: {
config: {
content: ''
},
imports: [
{
content: '',
name: ''
}
]
},
update: {
description: '',
labels: [
{
key: '',
value: ''
}
],
manifest: ''
},
updateTime: ''
});
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}}/deploymentmanager/v2/projects/:project/global/deployments',
headers: {'content-type': 'application/json'},
data: {
description: '',
fingerprint: '',
id: '',
insertTime: '',
labels: [{key: '', value: ''}],
manifest: '',
name: '',
operation: {
clientOperationId: '',
creationTimestamp: '',
description: '',
endTime: '',
error: {
errors: [
{
arguments: [],
code: '',
debugInfo: {detail: '', stackEntries: []},
errorDetails: [
{
errorInfo: {domain: '', metadatas: {}, reason: ''},
help: {links: [{description: '', url: ''}]},
localizedMessage: {locale: '', message: ''},
quotaInfo: {
dimensions: {},
futureLimit: '',
limit: '',
limitName: '',
metricName: '',
rolloutStatus: ''
}
}
],
location: '',
message: ''
}
]
},
httpErrorMessage: '',
httpErrorStatusCode: 0,
id: '',
insertTime: '',
instancesBulkInsertOperationMetadata: {machineType: '', perLocationStatus: {}},
kind: '',
name: '',
operationGroupId: '',
operationType: '',
progress: 0,
region: '',
selfLink: '',
selfLinkWithId: '',
setCommonInstanceMetadataOperationMetadata: {clientOperationId: '', perLocationOperations: {}},
startTime: '',
status: '',
statusMessage: '',
targetId: '',
targetLink: '',
user: '',
warnings: [{code: '', data: [{key: '', value: ''}], message: ''}],
zone: ''
},
selfLink: '',
target: {config: {content: ''}, imports: [{content: '', name: ''}]},
update: {description: '', labels: [{key: '', value: ''}], manifest: ''},
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"description":"","fingerprint":"","id":"","insertTime":"","labels":[{"key":"","value":""}],"manifest":"","name":"","operation":{"clientOperationId":"","creationTimestamp":"","description":"","endTime":"","error":{"errors":[{"arguments":[],"code":"","debugInfo":{"detail":"","stackEntries":[]},"errorDetails":[{"errorInfo":{"domain":"","metadatas":{},"reason":""},"help":{"links":[{"description":"","url":""}]},"localizedMessage":{"locale":"","message":""},"quotaInfo":{"dimensions":{},"futureLimit":"","limit":"","limitName":"","metricName":"","rolloutStatus":""}}],"location":"","message":""}]},"httpErrorMessage":"","httpErrorStatusCode":0,"id":"","insertTime":"","instancesBulkInsertOperationMetadata":{"machineType":"","perLocationStatus":{}},"kind":"","name":"","operationGroupId":"","operationType":"","progress":0,"region":"","selfLink":"","selfLinkWithId":"","setCommonInstanceMetadataOperationMetadata":{"clientOperationId":"","perLocationOperations":{}},"startTime":"","status":"","statusMessage":"","targetId":"","targetLink":"","user":"","warnings":[{"code":"","data":[{"key":"","value":""}],"message":""}],"zone":""},"selfLink":"","target":{"config":{"content":""},"imports":[{"content":"","name":""}]},"update":{"description":"","labels":[{"key":"","value":""}],"manifest":""},"updateTime":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"description": @"",
@"fingerprint": @"",
@"id": @"",
@"insertTime": @"",
@"labels": @[ @{ @"key": @"", @"value": @"" } ],
@"manifest": @"",
@"name": @"",
@"operation": @{ @"clientOperationId": @"", @"creationTimestamp": @"", @"description": @"", @"endTime": @"", @"error": @{ @"errors": @[ @{ @"arguments": @[ ], @"code": @"", @"debugInfo": @{ @"detail": @"", @"stackEntries": @[ ] }, @"errorDetails": @[ @{ @"errorInfo": @{ @"domain": @"", @"metadatas": @{ }, @"reason": @"" }, @"help": @{ @"links": @[ @{ @"description": @"", @"url": @"" } ] }, @"localizedMessage": @{ @"locale": @"", @"message": @"" }, @"quotaInfo": @{ @"dimensions": @{ }, @"futureLimit": @"", @"limit": @"", @"limitName": @"", @"metricName": @"", @"rolloutStatus": @"" } } ], @"location": @"", @"message": @"" } ] }, @"httpErrorMessage": @"", @"httpErrorStatusCode": @0, @"id": @"", @"insertTime": @"", @"instancesBulkInsertOperationMetadata": @{ @"machineType": @"", @"perLocationStatus": @{ } }, @"kind": @"", @"name": @"", @"operationGroupId": @"", @"operationType": @"", @"progress": @0, @"region": @"", @"selfLink": @"", @"selfLinkWithId": @"", @"setCommonInstanceMetadataOperationMetadata": @{ @"clientOperationId": @"", @"perLocationOperations": @{ } }, @"startTime": @"", @"status": @"", @"statusMessage": @"", @"targetId": @"", @"targetLink": @"", @"user": @"", @"warnings": @[ @{ @"code": @"", @"data": @[ @{ @"key": @"", @"value": @"" } ], @"message": @"" } ], @"zone": @"" },
@"selfLink": @"",
@"target": @{ @"config": @{ @"content": @"" }, @"imports": @[ @{ @"content": @"", @"name": @"" } ] },
@"update": @{ @"description": @"", @"labels": @[ @{ @"key": @"", @"value": @"" } ], @"manifest": @"" },
@"updateTime": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments"]
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}}/deploymentmanager/v2/projects/:project/global/deployments" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments",
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([
'description' => '',
'fingerprint' => '',
'id' => '',
'insertTime' => '',
'labels' => [
[
'key' => '',
'value' => ''
]
],
'manifest' => '',
'name' => '',
'operation' => [
'clientOperationId' => '',
'creationTimestamp' => '',
'description' => '',
'endTime' => '',
'error' => [
'errors' => [
[
'arguments' => [
],
'code' => '',
'debugInfo' => [
'detail' => '',
'stackEntries' => [
]
],
'errorDetails' => [
[
'errorInfo' => [
'domain' => '',
'metadatas' => [
],
'reason' => ''
],
'help' => [
'links' => [
[
'description' => '',
'url' => ''
]
]
],
'localizedMessage' => [
'locale' => '',
'message' => ''
],
'quotaInfo' => [
'dimensions' => [
],
'futureLimit' => '',
'limit' => '',
'limitName' => '',
'metricName' => '',
'rolloutStatus' => ''
]
]
],
'location' => '',
'message' => ''
]
]
],
'httpErrorMessage' => '',
'httpErrorStatusCode' => 0,
'id' => '',
'insertTime' => '',
'instancesBulkInsertOperationMetadata' => [
'machineType' => '',
'perLocationStatus' => [
]
],
'kind' => '',
'name' => '',
'operationGroupId' => '',
'operationType' => '',
'progress' => 0,
'region' => '',
'selfLink' => '',
'selfLinkWithId' => '',
'setCommonInstanceMetadataOperationMetadata' => [
'clientOperationId' => '',
'perLocationOperations' => [
]
],
'startTime' => '',
'status' => '',
'statusMessage' => '',
'targetId' => '',
'targetLink' => '',
'user' => '',
'warnings' => [
[
'code' => '',
'data' => [
[
'key' => '',
'value' => ''
]
],
'message' => ''
]
],
'zone' => ''
],
'selfLink' => '',
'target' => [
'config' => [
'content' => ''
],
'imports' => [
[
'content' => '',
'name' => ''
]
]
],
'update' => [
'description' => '',
'labels' => [
[
'key' => '',
'value' => ''
]
],
'manifest' => ''
],
'updateTime' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments', [
'body' => '{
"description": "",
"fingerprint": "",
"id": "",
"insertTime": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": "",
"name": "",
"operation": {
"clientOperationId": "",
"creationTimestamp": "",
"description": "",
"endTime": "",
"error": {
"errors": [
{
"arguments": [],
"code": "",
"debugInfo": {
"detail": "",
"stackEntries": []
},
"errorDetails": [
{
"errorInfo": {
"domain": "",
"metadatas": {},
"reason": ""
},
"help": {
"links": [
{
"description": "",
"url": ""
}
]
},
"localizedMessage": {
"locale": "",
"message": ""
},
"quotaInfo": {
"dimensions": {},
"futureLimit": "",
"limit": "",
"limitName": "",
"metricName": "",
"rolloutStatus": ""
}
}
],
"location": "",
"message": ""
}
]
},
"httpErrorMessage": "",
"httpErrorStatusCode": 0,
"id": "",
"insertTime": "",
"instancesBulkInsertOperationMetadata": {
"machineType": "",
"perLocationStatus": {}
},
"kind": "",
"name": "",
"operationGroupId": "",
"operationType": "",
"progress": 0,
"region": "",
"selfLink": "",
"selfLinkWithId": "",
"setCommonInstanceMetadataOperationMetadata": {
"clientOperationId": "",
"perLocationOperations": {}
},
"startTime": "",
"status": "",
"statusMessage": "",
"targetId": "",
"targetLink": "",
"user": "",
"warnings": [
{
"code": "",
"data": [
{
"key": "",
"value": ""
}
],
"message": ""
}
],
"zone": ""
},
"selfLink": "",
"target": {
"config": {
"content": ""
},
"imports": [
{
"content": "",
"name": ""
}
]
},
"update": {
"description": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": ""
},
"updateTime": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'description' => '',
'fingerprint' => '',
'id' => '',
'insertTime' => '',
'labels' => [
[
'key' => '',
'value' => ''
]
],
'manifest' => '',
'name' => '',
'operation' => [
'clientOperationId' => '',
'creationTimestamp' => '',
'description' => '',
'endTime' => '',
'error' => [
'errors' => [
[
'arguments' => [
],
'code' => '',
'debugInfo' => [
'detail' => '',
'stackEntries' => [
]
],
'errorDetails' => [
[
'errorInfo' => [
'domain' => '',
'metadatas' => [
],
'reason' => ''
],
'help' => [
'links' => [
[
'description' => '',
'url' => ''
]
]
],
'localizedMessage' => [
'locale' => '',
'message' => ''
],
'quotaInfo' => [
'dimensions' => [
],
'futureLimit' => '',
'limit' => '',
'limitName' => '',
'metricName' => '',
'rolloutStatus' => ''
]
]
],
'location' => '',
'message' => ''
]
]
],
'httpErrorMessage' => '',
'httpErrorStatusCode' => 0,
'id' => '',
'insertTime' => '',
'instancesBulkInsertOperationMetadata' => [
'machineType' => '',
'perLocationStatus' => [
]
],
'kind' => '',
'name' => '',
'operationGroupId' => '',
'operationType' => '',
'progress' => 0,
'region' => '',
'selfLink' => '',
'selfLinkWithId' => '',
'setCommonInstanceMetadataOperationMetadata' => [
'clientOperationId' => '',
'perLocationOperations' => [
]
],
'startTime' => '',
'status' => '',
'statusMessage' => '',
'targetId' => '',
'targetLink' => '',
'user' => '',
'warnings' => [
[
'code' => '',
'data' => [
[
'key' => '',
'value' => ''
]
],
'message' => ''
]
],
'zone' => ''
],
'selfLink' => '',
'target' => [
'config' => [
'content' => ''
],
'imports' => [
[
'content' => '',
'name' => ''
]
]
],
'update' => [
'description' => '',
'labels' => [
[
'key' => '',
'value' => ''
]
],
'manifest' => ''
],
'updateTime' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'description' => '',
'fingerprint' => '',
'id' => '',
'insertTime' => '',
'labels' => [
[
'key' => '',
'value' => ''
]
],
'manifest' => '',
'name' => '',
'operation' => [
'clientOperationId' => '',
'creationTimestamp' => '',
'description' => '',
'endTime' => '',
'error' => [
'errors' => [
[
'arguments' => [
],
'code' => '',
'debugInfo' => [
'detail' => '',
'stackEntries' => [
]
],
'errorDetails' => [
[
'errorInfo' => [
'domain' => '',
'metadatas' => [
],
'reason' => ''
],
'help' => [
'links' => [
[
'description' => '',
'url' => ''
]
]
],
'localizedMessage' => [
'locale' => '',
'message' => ''
],
'quotaInfo' => [
'dimensions' => [
],
'futureLimit' => '',
'limit' => '',
'limitName' => '',
'metricName' => '',
'rolloutStatus' => ''
]
]
],
'location' => '',
'message' => ''
]
]
],
'httpErrorMessage' => '',
'httpErrorStatusCode' => 0,
'id' => '',
'insertTime' => '',
'instancesBulkInsertOperationMetadata' => [
'machineType' => '',
'perLocationStatus' => [
]
],
'kind' => '',
'name' => '',
'operationGroupId' => '',
'operationType' => '',
'progress' => 0,
'region' => '',
'selfLink' => '',
'selfLinkWithId' => '',
'setCommonInstanceMetadataOperationMetadata' => [
'clientOperationId' => '',
'perLocationOperations' => [
]
],
'startTime' => '',
'status' => '',
'statusMessage' => '',
'targetId' => '',
'targetLink' => '',
'user' => '',
'warnings' => [
[
'code' => '',
'data' => [
[
'key' => '',
'value' => ''
]
],
'message' => ''
]
],
'zone' => ''
],
'selfLink' => '',
'target' => [
'config' => [
'content' => ''
],
'imports' => [
[
'content' => '',
'name' => ''
]
]
],
'update' => [
'description' => '',
'labels' => [
[
'key' => '',
'value' => ''
]
],
'manifest' => ''
],
'updateTime' => ''
]));
$request->setRequestUrl('{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"fingerprint": "",
"id": "",
"insertTime": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": "",
"name": "",
"operation": {
"clientOperationId": "",
"creationTimestamp": "",
"description": "",
"endTime": "",
"error": {
"errors": [
{
"arguments": [],
"code": "",
"debugInfo": {
"detail": "",
"stackEntries": []
},
"errorDetails": [
{
"errorInfo": {
"domain": "",
"metadatas": {},
"reason": ""
},
"help": {
"links": [
{
"description": "",
"url": ""
}
]
},
"localizedMessage": {
"locale": "",
"message": ""
},
"quotaInfo": {
"dimensions": {},
"futureLimit": "",
"limit": "",
"limitName": "",
"metricName": "",
"rolloutStatus": ""
}
}
],
"location": "",
"message": ""
}
]
},
"httpErrorMessage": "",
"httpErrorStatusCode": 0,
"id": "",
"insertTime": "",
"instancesBulkInsertOperationMetadata": {
"machineType": "",
"perLocationStatus": {}
},
"kind": "",
"name": "",
"operationGroupId": "",
"operationType": "",
"progress": 0,
"region": "",
"selfLink": "",
"selfLinkWithId": "",
"setCommonInstanceMetadataOperationMetadata": {
"clientOperationId": "",
"perLocationOperations": {}
},
"startTime": "",
"status": "",
"statusMessage": "",
"targetId": "",
"targetLink": "",
"user": "",
"warnings": [
{
"code": "",
"data": [
{
"key": "",
"value": ""
}
],
"message": ""
}
],
"zone": ""
},
"selfLink": "",
"target": {
"config": {
"content": ""
},
"imports": [
{
"content": "",
"name": ""
}
]
},
"update": {
"description": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": ""
},
"updateTime": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"fingerprint": "",
"id": "",
"insertTime": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": "",
"name": "",
"operation": {
"clientOperationId": "",
"creationTimestamp": "",
"description": "",
"endTime": "",
"error": {
"errors": [
{
"arguments": [],
"code": "",
"debugInfo": {
"detail": "",
"stackEntries": []
},
"errorDetails": [
{
"errorInfo": {
"domain": "",
"metadatas": {},
"reason": ""
},
"help": {
"links": [
{
"description": "",
"url": ""
}
]
},
"localizedMessage": {
"locale": "",
"message": ""
},
"quotaInfo": {
"dimensions": {},
"futureLimit": "",
"limit": "",
"limitName": "",
"metricName": "",
"rolloutStatus": ""
}
}
],
"location": "",
"message": ""
}
]
},
"httpErrorMessage": "",
"httpErrorStatusCode": 0,
"id": "",
"insertTime": "",
"instancesBulkInsertOperationMetadata": {
"machineType": "",
"perLocationStatus": {}
},
"kind": "",
"name": "",
"operationGroupId": "",
"operationType": "",
"progress": 0,
"region": "",
"selfLink": "",
"selfLinkWithId": "",
"setCommonInstanceMetadataOperationMetadata": {
"clientOperationId": "",
"perLocationOperations": {}
},
"startTime": "",
"status": "",
"statusMessage": "",
"targetId": "",
"targetLink": "",
"user": "",
"warnings": [
{
"code": "",
"data": [
{
"key": "",
"value": ""
}
],
"message": ""
}
],
"zone": ""
},
"selfLink": "",
"target": {
"config": {
"content": ""
},
"imports": [
{
"content": "",
"name": ""
}
]
},
"update": {
"description": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": ""
},
"updateTime": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/deploymentmanager/v2/projects/:project/global/deployments", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments"
payload = {
"description": "",
"fingerprint": "",
"id": "",
"insertTime": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": "",
"name": "",
"operation": {
"clientOperationId": "",
"creationTimestamp": "",
"description": "",
"endTime": "",
"error": { "errors": [
{
"arguments": [],
"code": "",
"debugInfo": {
"detail": "",
"stackEntries": []
},
"errorDetails": [
{
"errorInfo": {
"domain": "",
"metadatas": {},
"reason": ""
},
"help": { "links": [
{
"description": "",
"url": ""
}
] },
"localizedMessage": {
"locale": "",
"message": ""
},
"quotaInfo": {
"dimensions": {},
"futureLimit": "",
"limit": "",
"limitName": "",
"metricName": "",
"rolloutStatus": ""
}
}
],
"location": "",
"message": ""
}
] },
"httpErrorMessage": "",
"httpErrorStatusCode": 0,
"id": "",
"insertTime": "",
"instancesBulkInsertOperationMetadata": {
"machineType": "",
"perLocationStatus": {}
},
"kind": "",
"name": "",
"operationGroupId": "",
"operationType": "",
"progress": 0,
"region": "",
"selfLink": "",
"selfLinkWithId": "",
"setCommonInstanceMetadataOperationMetadata": {
"clientOperationId": "",
"perLocationOperations": {}
},
"startTime": "",
"status": "",
"statusMessage": "",
"targetId": "",
"targetLink": "",
"user": "",
"warnings": [
{
"code": "",
"data": [
{
"key": "",
"value": ""
}
],
"message": ""
}
],
"zone": ""
},
"selfLink": "",
"target": {
"config": { "content": "" },
"imports": [
{
"content": "",
"name": ""
}
]
},
"update": {
"description": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": ""
},
"updateTime": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments"
payload <- "{\n \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\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/deploymentmanager/v2/projects/:project/global/deployments') do |req|
req.body = "{\n \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments";
let payload = json!({
"description": "",
"fingerprint": "",
"id": "",
"insertTime": "",
"labels": (
json!({
"key": "",
"value": ""
})
),
"manifest": "",
"name": "",
"operation": json!({
"clientOperationId": "",
"creationTimestamp": "",
"description": "",
"endTime": "",
"error": json!({"errors": (
json!({
"arguments": (),
"code": "",
"debugInfo": json!({
"detail": "",
"stackEntries": ()
}),
"errorDetails": (
json!({
"errorInfo": json!({
"domain": "",
"metadatas": json!({}),
"reason": ""
}),
"help": json!({"links": (
json!({
"description": "",
"url": ""
})
)}),
"localizedMessage": json!({
"locale": "",
"message": ""
}),
"quotaInfo": json!({
"dimensions": json!({}),
"futureLimit": "",
"limit": "",
"limitName": "",
"metricName": "",
"rolloutStatus": ""
})
})
),
"location": "",
"message": ""
})
)}),
"httpErrorMessage": "",
"httpErrorStatusCode": 0,
"id": "",
"insertTime": "",
"instancesBulkInsertOperationMetadata": json!({
"machineType": "",
"perLocationStatus": json!({})
}),
"kind": "",
"name": "",
"operationGroupId": "",
"operationType": "",
"progress": 0,
"region": "",
"selfLink": "",
"selfLinkWithId": "",
"setCommonInstanceMetadataOperationMetadata": json!({
"clientOperationId": "",
"perLocationOperations": json!({})
}),
"startTime": "",
"status": "",
"statusMessage": "",
"targetId": "",
"targetLink": "",
"user": "",
"warnings": (
json!({
"code": "",
"data": (
json!({
"key": "",
"value": ""
})
),
"message": ""
})
),
"zone": ""
}),
"selfLink": "",
"target": json!({
"config": json!({"content": ""}),
"imports": (
json!({
"content": "",
"name": ""
})
)
}),
"update": json!({
"description": "",
"labels": (
json!({
"key": "",
"value": ""
})
),
"manifest": ""
}),
"updateTime": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments \
--header 'content-type: application/json' \
--data '{
"description": "",
"fingerprint": "",
"id": "",
"insertTime": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": "",
"name": "",
"operation": {
"clientOperationId": "",
"creationTimestamp": "",
"description": "",
"endTime": "",
"error": {
"errors": [
{
"arguments": [],
"code": "",
"debugInfo": {
"detail": "",
"stackEntries": []
},
"errorDetails": [
{
"errorInfo": {
"domain": "",
"metadatas": {},
"reason": ""
},
"help": {
"links": [
{
"description": "",
"url": ""
}
]
},
"localizedMessage": {
"locale": "",
"message": ""
},
"quotaInfo": {
"dimensions": {},
"futureLimit": "",
"limit": "",
"limitName": "",
"metricName": "",
"rolloutStatus": ""
}
}
],
"location": "",
"message": ""
}
]
},
"httpErrorMessage": "",
"httpErrorStatusCode": 0,
"id": "",
"insertTime": "",
"instancesBulkInsertOperationMetadata": {
"machineType": "",
"perLocationStatus": {}
},
"kind": "",
"name": "",
"operationGroupId": "",
"operationType": "",
"progress": 0,
"region": "",
"selfLink": "",
"selfLinkWithId": "",
"setCommonInstanceMetadataOperationMetadata": {
"clientOperationId": "",
"perLocationOperations": {}
},
"startTime": "",
"status": "",
"statusMessage": "",
"targetId": "",
"targetLink": "",
"user": "",
"warnings": [
{
"code": "",
"data": [
{
"key": "",
"value": ""
}
],
"message": ""
}
],
"zone": ""
},
"selfLink": "",
"target": {
"config": {
"content": ""
},
"imports": [
{
"content": "",
"name": ""
}
]
},
"update": {
"description": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": ""
},
"updateTime": ""
}'
echo '{
"description": "",
"fingerprint": "",
"id": "",
"insertTime": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": "",
"name": "",
"operation": {
"clientOperationId": "",
"creationTimestamp": "",
"description": "",
"endTime": "",
"error": {
"errors": [
{
"arguments": [],
"code": "",
"debugInfo": {
"detail": "",
"stackEntries": []
},
"errorDetails": [
{
"errorInfo": {
"domain": "",
"metadatas": {},
"reason": ""
},
"help": {
"links": [
{
"description": "",
"url": ""
}
]
},
"localizedMessage": {
"locale": "",
"message": ""
},
"quotaInfo": {
"dimensions": {},
"futureLimit": "",
"limit": "",
"limitName": "",
"metricName": "",
"rolloutStatus": ""
}
}
],
"location": "",
"message": ""
}
]
},
"httpErrorMessage": "",
"httpErrorStatusCode": 0,
"id": "",
"insertTime": "",
"instancesBulkInsertOperationMetadata": {
"machineType": "",
"perLocationStatus": {}
},
"kind": "",
"name": "",
"operationGroupId": "",
"operationType": "",
"progress": 0,
"region": "",
"selfLink": "",
"selfLinkWithId": "",
"setCommonInstanceMetadataOperationMetadata": {
"clientOperationId": "",
"perLocationOperations": {}
},
"startTime": "",
"status": "",
"statusMessage": "",
"targetId": "",
"targetLink": "",
"user": "",
"warnings": [
{
"code": "",
"data": [
{
"key": "",
"value": ""
}
],
"message": ""
}
],
"zone": ""
},
"selfLink": "",
"target": {
"config": {
"content": ""
},
"imports": [
{
"content": "",
"name": ""
}
]
},
"update": {
"description": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": ""
},
"updateTime": ""
}' | \
http POST {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "description": "",\n "fingerprint": "",\n "id": "",\n "insertTime": "",\n "labels": [\n {\n "key": "",\n "value": ""\n }\n ],\n "manifest": "",\n "name": "",\n "operation": {\n "clientOperationId": "",\n "creationTimestamp": "",\n "description": "",\n "endTime": "",\n "error": {\n "errors": [\n {\n "arguments": [],\n "code": "",\n "debugInfo": {\n "detail": "",\n "stackEntries": []\n },\n "errorDetails": [\n {\n "errorInfo": {\n "domain": "",\n "metadatas": {},\n "reason": ""\n },\n "help": {\n "links": [\n {\n "description": "",\n "url": ""\n }\n ]\n },\n "localizedMessage": {\n "locale": "",\n "message": ""\n },\n "quotaInfo": {\n "dimensions": {},\n "futureLimit": "",\n "limit": "",\n "limitName": "",\n "metricName": "",\n "rolloutStatus": ""\n }\n }\n ],\n "location": "",\n "message": ""\n }\n ]\n },\n "httpErrorMessage": "",\n "httpErrorStatusCode": 0,\n "id": "",\n "insertTime": "",\n "instancesBulkInsertOperationMetadata": {\n "machineType": "",\n "perLocationStatus": {}\n },\n "kind": "",\n "name": "",\n "operationGroupId": "",\n "operationType": "",\n "progress": 0,\n "region": "",\n "selfLink": "",\n "selfLinkWithId": "",\n "setCommonInstanceMetadataOperationMetadata": {\n "clientOperationId": "",\n "perLocationOperations": {}\n },\n "startTime": "",\n "status": "",\n "statusMessage": "",\n "targetId": "",\n "targetLink": "",\n "user": "",\n "warnings": [\n {\n "code": "",\n "data": [\n {\n "key": "",\n "value": ""\n }\n ],\n "message": ""\n }\n ],\n "zone": ""\n },\n "selfLink": "",\n "target": {\n "config": {\n "content": ""\n },\n "imports": [\n {\n "content": "",\n "name": ""\n }\n ]\n },\n "update": {\n "description": "",\n "labels": [\n {\n "key": "",\n "value": ""\n }\n ],\n "manifest": ""\n },\n "updateTime": ""\n}' \
--output-document \
- {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"description": "",
"fingerprint": "",
"id": "",
"insertTime": "",
"labels": [
[
"key": "",
"value": ""
]
],
"manifest": "",
"name": "",
"operation": [
"clientOperationId": "",
"creationTimestamp": "",
"description": "",
"endTime": "",
"error": ["errors": [
[
"arguments": [],
"code": "",
"debugInfo": [
"detail": "",
"stackEntries": []
],
"errorDetails": [
[
"errorInfo": [
"domain": "",
"metadatas": [],
"reason": ""
],
"help": ["links": [
[
"description": "",
"url": ""
]
]],
"localizedMessage": [
"locale": "",
"message": ""
],
"quotaInfo": [
"dimensions": [],
"futureLimit": "",
"limit": "",
"limitName": "",
"metricName": "",
"rolloutStatus": ""
]
]
],
"location": "",
"message": ""
]
]],
"httpErrorMessage": "",
"httpErrorStatusCode": 0,
"id": "",
"insertTime": "",
"instancesBulkInsertOperationMetadata": [
"machineType": "",
"perLocationStatus": []
],
"kind": "",
"name": "",
"operationGroupId": "",
"operationType": "",
"progress": 0,
"region": "",
"selfLink": "",
"selfLinkWithId": "",
"setCommonInstanceMetadataOperationMetadata": [
"clientOperationId": "",
"perLocationOperations": []
],
"startTime": "",
"status": "",
"statusMessage": "",
"targetId": "",
"targetLink": "",
"user": "",
"warnings": [
[
"code": "",
"data": [
[
"key": "",
"value": ""
]
],
"message": ""
]
],
"zone": ""
],
"selfLink": "",
"target": [
"config": ["content": ""],
"imports": [
[
"content": "",
"name": ""
]
]
],
"update": [
"description": "",
"labels": [
[
"key": "",
"value": ""
]
],
"manifest": ""
],
"updateTime": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments")! 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()
GET
deploymentmanager.deployments.list
{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments
QUERY PARAMS
project
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments")
require "http/client"
url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/deploymentmanager/v2/projects/:project/global/deployments HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/deploymentmanager/v2/projects/:project/global/deployments',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments');
echo $response->getBody();
setUrl('{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/deploymentmanager/v2/projects/:project/global/deployments")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/deploymentmanager/v2/projects/:project/global/deployments') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments
http GET {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
deploymentmanager.deployments.patch
{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment
QUERY PARAMS
project
deployment
BODY json
{
"description": "",
"fingerprint": "",
"id": "",
"insertTime": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": "",
"name": "",
"operation": {
"clientOperationId": "",
"creationTimestamp": "",
"description": "",
"endTime": "",
"error": {
"errors": [
{
"arguments": [],
"code": "",
"debugInfo": {
"detail": "",
"stackEntries": []
},
"errorDetails": [
{
"errorInfo": {
"domain": "",
"metadatas": {},
"reason": ""
},
"help": {
"links": [
{
"description": "",
"url": ""
}
]
},
"localizedMessage": {
"locale": "",
"message": ""
},
"quotaInfo": {
"dimensions": {},
"futureLimit": "",
"limit": "",
"limitName": "",
"metricName": "",
"rolloutStatus": ""
}
}
],
"location": "",
"message": ""
}
]
},
"httpErrorMessage": "",
"httpErrorStatusCode": 0,
"id": "",
"insertTime": "",
"instancesBulkInsertOperationMetadata": {
"machineType": "",
"perLocationStatus": {}
},
"kind": "",
"name": "",
"operationGroupId": "",
"operationType": "",
"progress": 0,
"region": "",
"selfLink": "",
"selfLinkWithId": "",
"setCommonInstanceMetadataOperationMetadata": {
"clientOperationId": "",
"perLocationOperations": {}
},
"startTime": "",
"status": "",
"statusMessage": "",
"targetId": "",
"targetLink": "",
"user": "",
"warnings": [
{
"code": "",
"data": [
{
"key": "",
"value": ""
}
],
"message": ""
}
],
"zone": ""
},
"selfLink": "",
"target": {
"config": {
"content": ""
},
"imports": [
{
"content": "",
"name": ""
}
]
},
"update": {
"description": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": ""
},
"updateTime": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment" {:content-type :json
:form-params {:description ""
:fingerprint ""
:id ""
:insertTime ""
:labels [{:key ""
:value ""}]
:manifest ""
:name ""
:operation {:clientOperationId ""
:creationTimestamp ""
:description ""
:endTime ""
:error {:errors [{:arguments []
:code ""
:debugInfo {:detail ""
:stackEntries []}
:errorDetails [{:errorInfo {:domain ""
:metadatas {}
:reason ""}
:help {:links [{:description ""
:url ""}]}
:localizedMessage {:locale ""
:message ""}
:quotaInfo {:dimensions {}
:futureLimit ""
:limit ""
:limitName ""
:metricName ""
:rolloutStatus ""}}]
:location ""
:message ""}]}
:httpErrorMessage ""
:httpErrorStatusCode 0
:id ""
:insertTime ""
:instancesBulkInsertOperationMetadata {:machineType ""
:perLocationStatus {}}
:kind ""
:name ""
:operationGroupId ""
:operationType ""
:progress 0
:region ""
:selfLink ""
:selfLinkWithId ""
:setCommonInstanceMetadataOperationMetadata {:clientOperationId ""
:perLocationOperations {}}
:startTime ""
:status ""
:statusMessage ""
:targetId ""
:targetLink ""
:user ""
:warnings [{:code ""
:data [{:key ""
:value ""}]
:message ""}]
:zone ""}
:selfLink ""
:target {:config {:content ""}
:imports [{:content ""
:name ""}]}
:update {:description ""
:labels [{:key ""
:value ""}]
:manifest ""}
:updateTime ""}})
require "http/client"
url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment"),
Content = new StringContent("{\n \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\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}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment"
payload := strings.NewReader("{\n \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:deployment HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2453
{
"description": "",
"fingerprint": "",
"id": "",
"insertTime": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": "",
"name": "",
"operation": {
"clientOperationId": "",
"creationTimestamp": "",
"description": "",
"endTime": "",
"error": {
"errors": [
{
"arguments": [],
"code": "",
"debugInfo": {
"detail": "",
"stackEntries": []
},
"errorDetails": [
{
"errorInfo": {
"domain": "",
"metadatas": {},
"reason": ""
},
"help": {
"links": [
{
"description": "",
"url": ""
}
]
},
"localizedMessage": {
"locale": "",
"message": ""
},
"quotaInfo": {
"dimensions": {},
"futureLimit": "",
"limit": "",
"limitName": "",
"metricName": "",
"rolloutStatus": ""
}
}
],
"location": "",
"message": ""
}
]
},
"httpErrorMessage": "",
"httpErrorStatusCode": 0,
"id": "",
"insertTime": "",
"instancesBulkInsertOperationMetadata": {
"machineType": "",
"perLocationStatus": {}
},
"kind": "",
"name": "",
"operationGroupId": "",
"operationType": "",
"progress": 0,
"region": "",
"selfLink": "",
"selfLinkWithId": "",
"setCommonInstanceMetadataOperationMetadata": {
"clientOperationId": "",
"perLocationOperations": {}
},
"startTime": "",
"status": "",
"statusMessage": "",
"targetId": "",
"targetLink": "",
"user": "",
"warnings": [
{
"code": "",
"data": [
{
"key": "",
"value": ""
}
],
"message": ""
}
],
"zone": ""
},
"selfLink": "",
"target": {
"config": {
"content": ""
},
"imports": [
{
"content": "",
"name": ""
}
]
},
"update": {
"description": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": ""
},
"updateTime": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment")
.setHeader("content-type", "application/json")
.setBody("{\n \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\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 \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment")
.header("content-type", "application/json")
.body("{\n \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\n}")
.asString();
const data = JSON.stringify({
description: '',
fingerprint: '',
id: '',
insertTime: '',
labels: [
{
key: '',
value: ''
}
],
manifest: '',
name: '',
operation: {
clientOperationId: '',
creationTimestamp: '',
description: '',
endTime: '',
error: {
errors: [
{
arguments: [],
code: '',
debugInfo: {
detail: '',
stackEntries: []
},
errorDetails: [
{
errorInfo: {
domain: '',
metadatas: {},
reason: ''
},
help: {
links: [
{
description: '',
url: ''
}
]
},
localizedMessage: {
locale: '',
message: ''
},
quotaInfo: {
dimensions: {},
futureLimit: '',
limit: '',
limitName: '',
metricName: '',
rolloutStatus: ''
}
}
],
location: '',
message: ''
}
]
},
httpErrorMessage: '',
httpErrorStatusCode: 0,
id: '',
insertTime: '',
instancesBulkInsertOperationMetadata: {
machineType: '',
perLocationStatus: {}
},
kind: '',
name: '',
operationGroupId: '',
operationType: '',
progress: 0,
region: '',
selfLink: '',
selfLinkWithId: '',
setCommonInstanceMetadataOperationMetadata: {
clientOperationId: '',
perLocationOperations: {}
},
startTime: '',
status: '',
statusMessage: '',
targetId: '',
targetLink: '',
user: '',
warnings: [
{
code: '',
data: [
{
key: '',
value: ''
}
],
message: ''
}
],
zone: ''
},
selfLink: '',
target: {
config: {
content: ''
},
imports: [
{
content: '',
name: ''
}
]
},
update: {
description: '',
labels: [
{
key: '',
value: ''
}
],
manifest: ''
},
updateTime: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment',
headers: {'content-type': 'application/json'},
data: {
description: '',
fingerprint: '',
id: '',
insertTime: '',
labels: [{key: '', value: ''}],
manifest: '',
name: '',
operation: {
clientOperationId: '',
creationTimestamp: '',
description: '',
endTime: '',
error: {
errors: [
{
arguments: [],
code: '',
debugInfo: {detail: '', stackEntries: []},
errorDetails: [
{
errorInfo: {domain: '', metadatas: {}, reason: ''},
help: {links: [{description: '', url: ''}]},
localizedMessage: {locale: '', message: ''},
quotaInfo: {
dimensions: {},
futureLimit: '',
limit: '',
limitName: '',
metricName: '',
rolloutStatus: ''
}
}
],
location: '',
message: ''
}
]
},
httpErrorMessage: '',
httpErrorStatusCode: 0,
id: '',
insertTime: '',
instancesBulkInsertOperationMetadata: {machineType: '', perLocationStatus: {}},
kind: '',
name: '',
operationGroupId: '',
operationType: '',
progress: 0,
region: '',
selfLink: '',
selfLinkWithId: '',
setCommonInstanceMetadataOperationMetadata: {clientOperationId: '', perLocationOperations: {}},
startTime: '',
status: '',
statusMessage: '',
targetId: '',
targetLink: '',
user: '',
warnings: [{code: '', data: [{key: '', value: ''}], message: ''}],
zone: ''
},
selfLink: '',
target: {config: {content: ''}, imports: [{content: '', name: ''}]},
update: {description: '', labels: [{key: '', value: ''}], manifest: ''},
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"description":"","fingerprint":"","id":"","insertTime":"","labels":[{"key":"","value":""}],"manifest":"","name":"","operation":{"clientOperationId":"","creationTimestamp":"","description":"","endTime":"","error":{"errors":[{"arguments":[],"code":"","debugInfo":{"detail":"","stackEntries":[]},"errorDetails":[{"errorInfo":{"domain":"","metadatas":{},"reason":""},"help":{"links":[{"description":"","url":""}]},"localizedMessage":{"locale":"","message":""},"quotaInfo":{"dimensions":{},"futureLimit":"","limit":"","limitName":"","metricName":"","rolloutStatus":""}}],"location":"","message":""}]},"httpErrorMessage":"","httpErrorStatusCode":0,"id":"","insertTime":"","instancesBulkInsertOperationMetadata":{"machineType":"","perLocationStatus":{}},"kind":"","name":"","operationGroupId":"","operationType":"","progress":0,"region":"","selfLink":"","selfLinkWithId":"","setCommonInstanceMetadataOperationMetadata":{"clientOperationId":"","perLocationOperations":{}},"startTime":"","status":"","statusMessage":"","targetId":"","targetLink":"","user":"","warnings":[{"code":"","data":[{"key":"","value":""}],"message":""}],"zone":""},"selfLink":"","target":{"config":{"content":""},"imports":[{"content":"","name":""}]},"update":{"description":"","labels":[{"key":"","value":""}],"manifest":""},"updateTime":""}'
};
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}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "description": "",\n "fingerprint": "",\n "id": "",\n "insertTime": "",\n "labels": [\n {\n "key": "",\n "value": ""\n }\n ],\n "manifest": "",\n "name": "",\n "operation": {\n "clientOperationId": "",\n "creationTimestamp": "",\n "description": "",\n "endTime": "",\n "error": {\n "errors": [\n {\n "arguments": [],\n "code": "",\n "debugInfo": {\n "detail": "",\n "stackEntries": []\n },\n "errorDetails": [\n {\n "errorInfo": {\n "domain": "",\n "metadatas": {},\n "reason": ""\n },\n "help": {\n "links": [\n {\n "description": "",\n "url": ""\n }\n ]\n },\n "localizedMessage": {\n "locale": "",\n "message": ""\n },\n "quotaInfo": {\n "dimensions": {},\n "futureLimit": "",\n "limit": "",\n "limitName": "",\n "metricName": "",\n "rolloutStatus": ""\n }\n }\n ],\n "location": "",\n "message": ""\n }\n ]\n },\n "httpErrorMessage": "",\n "httpErrorStatusCode": 0,\n "id": "",\n "insertTime": "",\n "instancesBulkInsertOperationMetadata": {\n "machineType": "",\n "perLocationStatus": {}\n },\n "kind": "",\n "name": "",\n "operationGroupId": "",\n "operationType": "",\n "progress": 0,\n "region": "",\n "selfLink": "",\n "selfLinkWithId": "",\n "setCommonInstanceMetadataOperationMetadata": {\n "clientOperationId": "",\n "perLocationOperations": {}\n },\n "startTime": "",\n "status": "",\n "statusMessage": "",\n "targetId": "",\n "targetLink": "",\n "user": "",\n "warnings": [\n {\n "code": "",\n "data": [\n {\n "key": "",\n "value": ""\n }\n ],\n "message": ""\n }\n ],\n "zone": ""\n },\n "selfLink": "",\n "target": {\n "config": {\n "content": ""\n },\n "imports": [\n {\n "content": "",\n "name": ""\n }\n ]\n },\n "update": {\n "description": "",\n "labels": [\n {\n "key": "",\n "value": ""\n }\n ],\n "manifest": ""\n },\n "updateTime": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:deployment',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
description: '',
fingerprint: '',
id: '',
insertTime: '',
labels: [{key: '', value: ''}],
manifest: '',
name: '',
operation: {
clientOperationId: '',
creationTimestamp: '',
description: '',
endTime: '',
error: {
errors: [
{
arguments: [],
code: '',
debugInfo: {detail: '', stackEntries: []},
errorDetails: [
{
errorInfo: {domain: '', metadatas: {}, reason: ''},
help: {links: [{description: '', url: ''}]},
localizedMessage: {locale: '', message: ''},
quotaInfo: {
dimensions: {},
futureLimit: '',
limit: '',
limitName: '',
metricName: '',
rolloutStatus: ''
}
}
],
location: '',
message: ''
}
]
},
httpErrorMessage: '',
httpErrorStatusCode: 0,
id: '',
insertTime: '',
instancesBulkInsertOperationMetadata: {machineType: '', perLocationStatus: {}},
kind: '',
name: '',
operationGroupId: '',
operationType: '',
progress: 0,
region: '',
selfLink: '',
selfLinkWithId: '',
setCommonInstanceMetadataOperationMetadata: {clientOperationId: '', perLocationOperations: {}},
startTime: '',
status: '',
statusMessage: '',
targetId: '',
targetLink: '',
user: '',
warnings: [{code: '', data: [{key: '', value: ''}], message: ''}],
zone: ''
},
selfLink: '',
target: {config: {content: ''}, imports: [{content: '', name: ''}]},
update: {description: '', labels: [{key: '', value: ''}], manifest: ''},
updateTime: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment',
headers: {'content-type': 'application/json'},
body: {
description: '',
fingerprint: '',
id: '',
insertTime: '',
labels: [{key: '', value: ''}],
manifest: '',
name: '',
operation: {
clientOperationId: '',
creationTimestamp: '',
description: '',
endTime: '',
error: {
errors: [
{
arguments: [],
code: '',
debugInfo: {detail: '', stackEntries: []},
errorDetails: [
{
errorInfo: {domain: '', metadatas: {}, reason: ''},
help: {links: [{description: '', url: ''}]},
localizedMessage: {locale: '', message: ''},
quotaInfo: {
dimensions: {},
futureLimit: '',
limit: '',
limitName: '',
metricName: '',
rolloutStatus: ''
}
}
],
location: '',
message: ''
}
]
},
httpErrorMessage: '',
httpErrorStatusCode: 0,
id: '',
insertTime: '',
instancesBulkInsertOperationMetadata: {machineType: '', perLocationStatus: {}},
kind: '',
name: '',
operationGroupId: '',
operationType: '',
progress: 0,
region: '',
selfLink: '',
selfLinkWithId: '',
setCommonInstanceMetadataOperationMetadata: {clientOperationId: '', perLocationOperations: {}},
startTime: '',
status: '',
statusMessage: '',
targetId: '',
targetLink: '',
user: '',
warnings: [{code: '', data: [{key: '', value: ''}], message: ''}],
zone: ''
},
selfLink: '',
target: {config: {content: ''}, imports: [{content: '', name: ''}]},
update: {description: '', labels: [{key: '', value: ''}], manifest: ''},
updateTime: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
description: '',
fingerprint: '',
id: '',
insertTime: '',
labels: [
{
key: '',
value: ''
}
],
manifest: '',
name: '',
operation: {
clientOperationId: '',
creationTimestamp: '',
description: '',
endTime: '',
error: {
errors: [
{
arguments: [],
code: '',
debugInfo: {
detail: '',
stackEntries: []
},
errorDetails: [
{
errorInfo: {
domain: '',
metadatas: {},
reason: ''
},
help: {
links: [
{
description: '',
url: ''
}
]
},
localizedMessage: {
locale: '',
message: ''
},
quotaInfo: {
dimensions: {},
futureLimit: '',
limit: '',
limitName: '',
metricName: '',
rolloutStatus: ''
}
}
],
location: '',
message: ''
}
]
},
httpErrorMessage: '',
httpErrorStatusCode: 0,
id: '',
insertTime: '',
instancesBulkInsertOperationMetadata: {
machineType: '',
perLocationStatus: {}
},
kind: '',
name: '',
operationGroupId: '',
operationType: '',
progress: 0,
region: '',
selfLink: '',
selfLinkWithId: '',
setCommonInstanceMetadataOperationMetadata: {
clientOperationId: '',
perLocationOperations: {}
},
startTime: '',
status: '',
statusMessage: '',
targetId: '',
targetLink: '',
user: '',
warnings: [
{
code: '',
data: [
{
key: '',
value: ''
}
],
message: ''
}
],
zone: ''
},
selfLink: '',
target: {
config: {
content: ''
},
imports: [
{
content: '',
name: ''
}
]
},
update: {
description: '',
labels: [
{
key: '',
value: ''
}
],
manifest: ''
},
updateTime: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment',
headers: {'content-type': 'application/json'},
data: {
description: '',
fingerprint: '',
id: '',
insertTime: '',
labels: [{key: '', value: ''}],
manifest: '',
name: '',
operation: {
clientOperationId: '',
creationTimestamp: '',
description: '',
endTime: '',
error: {
errors: [
{
arguments: [],
code: '',
debugInfo: {detail: '', stackEntries: []},
errorDetails: [
{
errorInfo: {domain: '', metadatas: {}, reason: ''},
help: {links: [{description: '', url: ''}]},
localizedMessage: {locale: '', message: ''},
quotaInfo: {
dimensions: {},
futureLimit: '',
limit: '',
limitName: '',
metricName: '',
rolloutStatus: ''
}
}
],
location: '',
message: ''
}
]
},
httpErrorMessage: '',
httpErrorStatusCode: 0,
id: '',
insertTime: '',
instancesBulkInsertOperationMetadata: {machineType: '', perLocationStatus: {}},
kind: '',
name: '',
operationGroupId: '',
operationType: '',
progress: 0,
region: '',
selfLink: '',
selfLinkWithId: '',
setCommonInstanceMetadataOperationMetadata: {clientOperationId: '', perLocationOperations: {}},
startTime: '',
status: '',
statusMessage: '',
targetId: '',
targetLink: '',
user: '',
warnings: [{code: '', data: [{key: '', value: ''}], message: ''}],
zone: ''
},
selfLink: '',
target: {config: {content: ''}, imports: [{content: '', name: ''}]},
update: {description: '', labels: [{key: '', value: ''}], manifest: ''},
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"description":"","fingerprint":"","id":"","insertTime":"","labels":[{"key":"","value":""}],"manifest":"","name":"","operation":{"clientOperationId":"","creationTimestamp":"","description":"","endTime":"","error":{"errors":[{"arguments":[],"code":"","debugInfo":{"detail":"","stackEntries":[]},"errorDetails":[{"errorInfo":{"domain":"","metadatas":{},"reason":""},"help":{"links":[{"description":"","url":""}]},"localizedMessage":{"locale":"","message":""},"quotaInfo":{"dimensions":{},"futureLimit":"","limit":"","limitName":"","metricName":"","rolloutStatus":""}}],"location":"","message":""}]},"httpErrorMessage":"","httpErrorStatusCode":0,"id":"","insertTime":"","instancesBulkInsertOperationMetadata":{"machineType":"","perLocationStatus":{}},"kind":"","name":"","operationGroupId":"","operationType":"","progress":0,"region":"","selfLink":"","selfLinkWithId":"","setCommonInstanceMetadataOperationMetadata":{"clientOperationId":"","perLocationOperations":{}},"startTime":"","status":"","statusMessage":"","targetId":"","targetLink":"","user":"","warnings":[{"code":"","data":[{"key":"","value":""}],"message":""}],"zone":""},"selfLink":"","target":{"config":{"content":""},"imports":[{"content":"","name":""}]},"update":{"description":"","labels":[{"key":"","value":""}],"manifest":""},"updateTime":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"description": @"",
@"fingerprint": @"",
@"id": @"",
@"insertTime": @"",
@"labels": @[ @{ @"key": @"", @"value": @"" } ],
@"manifest": @"",
@"name": @"",
@"operation": @{ @"clientOperationId": @"", @"creationTimestamp": @"", @"description": @"", @"endTime": @"", @"error": @{ @"errors": @[ @{ @"arguments": @[ ], @"code": @"", @"debugInfo": @{ @"detail": @"", @"stackEntries": @[ ] }, @"errorDetails": @[ @{ @"errorInfo": @{ @"domain": @"", @"metadatas": @{ }, @"reason": @"" }, @"help": @{ @"links": @[ @{ @"description": @"", @"url": @"" } ] }, @"localizedMessage": @{ @"locale": @"", @"message": @"" }, @"quotaInfo": @{ @"dimensions": @{ }, @"futureLimit": @"", @"limit": @"", @"limitName": @"", @"metricName": @"", @"rolloutStatus": @"" } } ], @"location": @"", @"message": @"" } ] }, @"httpErrorMessage": @"", @"httpErrorStatusCode": @0, @"id": @"", @"insertTime": @"", @"instancesBulkInsertOperationMetadata": @{ @"machineType": @"", @"perLocationStatus": @{ } }, @"kind": @"", @"name": @"", @"operationGroupId": @"", @"operationType": @"", @"progress": @0, @"region": @"", @"selfLink": @"", @"selfLinkWithId": @"", @"setCommonInstanceMetadataOperationMetadata": @{ @"clientOperationId": @"", @"perLocationOperations": @{ } }, @"startTime": @"", @"status": @"", @"statusMessage": @"", @"targetId": @"", @"targetLink": @"", @"user": @"", @"warnings": @[ @{ @"code": @"", @"data": @[ @{ @"key": @"", @"value": @"" } ], @"message": @"" } ], @"zone": @"" },
@"selfLink": @"",
@"target": @{ @"config": @{ @"content": @"" }, @"imports": @[ @{ @"content": @"", @"name": @"" } ] },
@"update": @{ @"description": @"", @"labels": @[ @{ @"key": @"", @"value": @"" } ], @"manifest": @"" },
@"updateTime": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'description' => '',
'fingerprint' => '',
'id' => '',
'insertTime' => '',
'labels' => [
[
'key' => '',
'value' => ''
]
],
'manifest' => '',
'name' => '',
'operation' => [
'clientOperationId' => '',
'creationTimestamp' => '',
'description' => '',
'endTime' => '',
'error' => [
'errors' => [
[
'arguments' => [
],
'code' => '',
'debugInfo' => [
'detail' => '',
'stackEntries' => [
]
],
'errorDetails' => [
[
'errorInfo' => [
'domain' => '',
'metadatas' => [
],
'reason' => ''
],
'help' => [
'links' => [
[
'description' => '',
'url' => ''
]
]
],
'localizedMessage' => [
'locale' => '',
'message' => ''
],
'quotaInfo' => [
'dimensions' => [
],
'futureLimit' => '',
'limit' => '',
'limitName' => '',
'metricName' => '',
'rolloutStatus' => ''
]
]
],
'location' => '',
'message' => ''
]
]
],
'httpErrorMessage' => '',
'httpErrorStatusCode' => 0,
'id' => '',
'insertTime' => '',
'instancesBulkInsertOperationMetadata' => [
'machineType' => '',
'perLocationStatus' => [
]
],
'kind' => '',
'name' => '',
'operationGroupId' => '',
'operationType' => '',
'progress' => 0,
'region' => '',
'selfLink' => '',
'selfLinkWithId' => '',
'setCommonInstanceMetadataOperationMetadata' => [
'clientOperationId' => '',
'perLocationOperations' => [
]
],
'startTime' => '',
'status' => '',
'statusMessage' => '',
'targetId' => '',
'targetLink' => '',
'user' => '',
'warnings' => [
[
'code' => '',
'data' => [
[
'key' => '',
'value' => ''
]
],
'message' => ''
]
],
'zone' => ''
],
'selfLink' => '',
'target' => [
'config' => [
'content' => ''
],
'imports' => [
[
'content' => '',
'name' => ''
]
]
],
'update' => [
'description' => '',
'labels' => [
[
'key' => '',
'value' => ''
]
],
'manifest' => ''
],
'updateTime' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment', [
'body' => '{
"description": "",
"fingerprint": "",
"id": "",
"insertTime": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": "",
"name": "",
"operation": {
"clientOperationId": "",
"creationTimestamp": "",
"description": "",
"endTime": "",
"error": {
"errors": [
{
"arguments": [],
"code": "",
"debugInfo": {
"detail": "",
"stackEntries": []
},
"errorDetails": [
{
"errorInfo": {
"domain": "",
"metadatas": {},
"reason": ""
},
"help": {
"links": [
{
"description": "",
"url": ""
}
]
},
"localizedMessage": {
"locale": "",
"message": ""
},
"quotaInfo": {
"dimensions": {},
"futureLimit": "",
"limit": "",
"limitName": "",
"metricName": "",
"rolloutStatus": ""
}
}
],
"location": "",
"message": ""
}
]
},
"httpErrorMessage": "",
"httpErrorStatusCode": 0,
"id": "",
"insertTime": "",
"instancesBulkInsertOperationMetadata": {
"machineType": "",
"perLocationStatus": {}
},
"kind": "",
"name": "",
"operationGroupId": "",
"operationType": "",
"progress": 0,
"region": "",
"selfLink": "",
"selfLinkWithId": "",
"setCommonInstanceMetadataOperationMetadata": {
"clientOperationId": "",
"perLocationOperations": {}
},
"startTime": "",
"status": "",
"statusMessage": "",
"targetId": "",
"targetLink": "",
"user": "",
"warnings": [
{
"code": "",
"data": [
{
"key": "",
"value": ""
}
],
"message": ""
}
],
"zone": ""
},
"selfLink": "",
"target": {
"config": {
"content": ""
},
"imports": [
{
"content": "",
"name": ""
}
]
},
"update": {
"description": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": ""
},
"updateTime": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'description' => '',
'fingerprint' => '',
'id' => '',
'insertTime' => '',
'labels' => [
[
'key' => '',
'value' => ''
]
],
'manifest' => '',
'name' => '',
'operation' => [
'clientOperationId' => '',
'creationTimestamp' => '',
'description' => '',
'endTime' => '',
'error' => [
'errors' => [
[
'arguments' => [
],
'code' => '',
'debugInfo' => [
'detail' => '',
'stackEntries' => [
]
],
'errorDetails' => [
[
'errorInfo' => [
'domain' => '',
'metadatas' => [
],
'reason' => ''
],
'help' => [
'links' => [
[
'description' => '',
'url' => ''
]
]
],
'localizedMessage' => [
'locale' => '',
'message' => ''
],
'quotaInfo' => [
'dimensions' => [
],
'futureLimit' => '',
'limit' => '',
'limitName' => '',
'metricName' => '',
'rolloutStatus' => ''
]
]
],
'location' => '',
'message' => ''
]
]
],
'httpErrorMessage' => '',
'httpErrorStatusCode' => 0,
'id' => '',
'insertTime' => '',
'instancesBulkInsertOperationMetadata' => [
'machineType' => '',
'perLocationStatus' => [
]
],
'kind' => '',
'name' => '',
'operationGroupId' => '',
'operationType' => '',
'progress' => 0,
'region' => '',
'selfLink' => '',
'selfLinkWithId' => '',
'setCommonInstanceMetadataOperationMetadata' => [
'clientOperationId' => '',
'perLocationOperations' => [
]
],
'startTime' => '',
'status' => '',
'statusMessage' => '',
'targetId' => '',
'targetLink' => '',
'user' => '',
'warnings' => [
[
'code' => '',
'data' => [
[
'key' => '',
'value' => ''
]
],
'message' => ''
]
],
'zone' => ''
],
'selfLink' => '',
'target' => [
'config' => [
'content' => ''
],
'imports' => [
[
'content' => '',
'name' => ''
]
]
],
'update' => [
'description' => '',
'labels' => [
[
'key' => '',
'value' => ''
]
],
'manifest' => ''
],
'updateTime' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'description' => '',
'fingerprint' => '',
'id' => '',
'insertTime' => '',
'labels' => [
[
'key' => '',
'value' => ''
]
],
'manifest' => '',
'name' => '',
'operation' => [
'clientOperationId' => '',
'creationTimestamp' => '',
'description' => '',
'endTime' => '',
'error' => [
'errors' => [
[
'arguments' => [
],
'code' => '',
'debugInfo' => [
'detail' => '',
'stackEntries' => [
]
],
'errorDetails' => [
[
'errorInfo' => [
'domain' => '',
'metadatas' => [
],
'reason' => ''
],
'help' => [
'links' => [
[
'description' => '',
'url' => ''
]
]
],
'localizedMessage' => [
'locale' => '',
'message' => ''
],
'quotaInfo' => [
'dimensions' => [
],
'futureLimit' => '',
'limit' => '',
'limitName' => '',
'metricName' => '',
'rolloutStatus' => ''
]
]
],
'location' => '',
'message' => ''
]
]
],
'httpErrorMessage' => '',
'httpErrorStatusCode' => 0,
'id' => '',
'insertTime' => '',
'instancesBulkInsertOperationMetadata' => [
'machineType' => '',
'perLocationStatus' => [
]
],
'kind' => '',
'name' => '',
'operationGroupId' => '',
'operationType' => '',
'progress' => 0,
'region' => '',
'selfLink' => '',
'selfLinkWithId' => '',
'setCommonInstanceMetadataOperationMetadata' => [
'clientOperationId' => '',
'perLocationOperations' => [
]
],
'startTime' => '',
'status' => '',
'statusMessage' => '',
'targetId' => '',
'targetLink' => '',
'user' => '',
'warnings' => [
[
'code' => '',
'data' => [
[
'key' => '',
'value' => ''
]
],
'message' => ''
]
],
'zone' => ''
],
'selfLink' => '',
'target' => [
'config' => [
'content' => ''
],
'imports' => [
[
'content' => '',
'name' => ''
]
]
],
'update' => [
'description' => '',
'labels' => [
[
'key' => '',
'value' => ''
]
],
'manifest' => ''
],
'updateTime' => ''
]));
$request->setRequestUrl('{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"fingerprint": "",
"id": "",
"insertTime": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": "",
"name": "",
"operation": {
"clientOperationId": "",
"creationTimestamp": "",
"description": "",
"endTime": "",
"error": {
"errors": [
{
"arguments": [],
"code": "",
"debugInfo": {
"detail": "",
"stackEntries": []
},
"errorDetails": [
{
"errorInfo": {
"domain": "",
"metadatas": {},
"reason": ""
},
"help": {
"links": [
{
"description": "",
"url": ""
}
]
},
"localizedMessage": {
"locale": "",
"message": ""
},
"quotaInfo": {
"dimensions": {},
"futureLimit": "",
"limit": "",
"limitName": "",
"metricName": "",
"rolloutStatus": ""
}
}
],
"location": "",
"message": ""
}
]
},
"httpErrorMessage": "",
"httpErrorStatusCode": 0,
"id": "",
"insertTime": "",
"instancesBulkInsertOperationMetadata": {
"machineType": "",
"perLocationStatus": {}
},
"kind": "",
"name": "",
"operationGroupId": "",
"operationType": "",
"progress": 0,
"region": "",
"selfLink": "",
"selfLinkWithId": "",
"setCommonInstanceMetadataOperationMetadata": {
"clientOperationId": "",
"perLocationOperations": {}
},
"startTime": "",
"status": "",
"statusMessage": "",
"targetId": "",
"targetLink": "",
"user": "",
"warnings": [
{
"code": "",
"data": [
{
"key": "",
"value": ""
}
],
"message": ""
}
],
"zone": ""
},
"selfLink": "",
"target": {
"config": {
"content": ""
},
"imports": [
{
"content": "",
"name": ""
}
]
},
"update": {
"description": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": ""
},
"updateTime": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"fingerprint": "",
"id": "",
"insertTime": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": "",
"name": "",
"operation": {
"clientOperationId": "",
"creationTimestamp": "",
"description": "",
"endTime": "",
"error": {
"errors": [
{
"arguments": [],
"code": "",
"debugInfo": {
"detail": "",
"stackEntries": []
},
"errorDetails": [
{
"errorInfo": {
"domain": "",
"metadatas": {},
"reason": ""
},
"help": {
"links": [
{
"description": "",
"url": ""
}
]
},
"localizedMessage": {
"locale": "",
"message": ""
},
"quotaInfo": {
"dimensions": {},
"futureLimit": "",
"limit": "",
"limitName": "",
"metricName": "",
"rolloutStatus": ""
}
}
],
"location": "",
"message": ""
}
]
},
"httpErrorMessage": "",
"httpErrorStatusCode": 0,
"id": "",
"insertTime": "",
"instancesBulkInsertOperationMetadata": {
"machineType": "",
"perLocationStatus": {}
},
"kind": "",
"name": "",
"operationGroupId": "",
"operationType": "",
"progress": 0,
"region": "",
"selfLink": "",
"selfLinkWithId": "",
"setCommonInstanceMetadataOperationMetadata": {
"clientOperationId": "",
"perLocationOperations": {}
},
"startTime": "",
"status": "",
"statusMessage": "",
"targetId": "",
"targetLink": "",
"user": "",
"warnings": [
{
"code": "",
"data": [
{
"key": "",
"value": ""
}
],
"message": ""
}
],
"zone": ""
},
"selfLink": "",
"target": {
"config": {
"content": ""
},
"imports": [
{
"content": "",
"name": ""
}
]
},
"update": {
"description": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": ""
},
"updateTime": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:deployment", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment"
payload = {
"description": "",
"fingerprint": "",
"id": "",
"insertTime": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": "",
"name": "",
"operation": {
"clientOperationId": "",
"creationTimestamp": "",
"description": "",
"endTime": "",
"error": { "errors": [
{
"arguments": [],
"code": "",
"debugInfo": {
"detail": "",
"stackEntries": []
},
"errorDetails": [
{
"errorInfo": {
"domain": "",
"metadatas": {},
"reason": ""
},
"help": { "links": [
{
"description": "",
"url": ""
}
] },
"localizedMessage": {
"locale": "",
"message": ""
},
"quotaInfo": {
"dimensions": {},
"futureLimit": "",
"limit": "",
"limitName": "",
"metricName": "",
"rolloutStatus": ""
}
}
],
"location": "",
"message": ""
}
] },
"httpErrorMessage": "",
"httpErrorStatusCode": 0,
"id": "",
"insertTime": "",
"instancesBulkInsertOperationMetadata": {
"machineType": "",
"perLocationStatus": {}
},
"kind": "",
"name": "",
"operationGroupId": "",
"operationType": "",
"progress": 0,
"region": "",
"selfLink": "",
"selfLinkWithId": "",
"setCommonInstanceMetadataOperationMetadata": {
"clientOperationId": "",
"perLocationOperations": {}
},
"startTime": "",
"status": "",
"statusMessage": "",
"targetId": "",
"targetLink": "",
"user": "",
"warnings": [
{
"code": "",
"data": [
{
"key": "",
"value": ""
}
],
"message": ""
}
],
"zone": ""
},
"selfLink": "",
"target": {
"config": { "content": "" },
"imports": [
{
"content": "",
"name": ""
}
]
},
"update": {
"description": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": ""
},
"updateTime": ""
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment"
payload <- "{\n \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:deployment') do |req|
req.body = "{\n \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment";
let payload = json!({
"description": "",
"fingerprint": "",
"id": "",
"insertTime": "",
"labels": (
json!({
"key": "",
"value": ""
})
),
"manifest": "",
"name": "",
"operation": json!({
"clientOperationId": "",
"creationTimestamp": "",
"description": "",
"endTime": "",
"error": json!({"errors": (
json!({
"arguments": (),
"code": "",
"debugInfo": json!({
"detail": "",
"stackEntries": ()
}),
"errorDetails": (
json!({
"errorInfo": json!({
"domain": "",
"metadatas": json!({}),
"reason": ""
}),
"help": json!({"links": (
json!({
"description": "",
"url": ""
})
)}),
"localizedMessage": json!({
"locale": "",
"message": ""
}),
"quotaInfo": json!({
"dimensions": json!({}),
"futureLimit": "",
"limit": "",
"limitName": "",
"metricName": "",
"rolloutStatus": ""
})
})
),
"location": "",
"message": ""
})
)}),
"httpErrorMessage": "",
"httpErrorStatusCode": 0,
"id": "",
"insertTime": "",
"instancesBulkInsertOperationMetadata": json!({
"machineType": "",
"perLocationStatus": json!({})
}),
"kind": "",
"name": "",
"operationGroupId": "",
"operationType": "",
"progress": 0,
"region": "",
"selfLink": "",
"selfLinkWithId": "",
"setCommonInstanceMetadataOperationMetadata": json!({
"clientOperationId": "",
"perLocationOperations": json!({})
}),
"startTime": "",
"status": "",
"statusMessage": "",
"targetId": "",
"targetLink": "",
"user": "",
"warnings": (
json!({
"code": "",
"data": (
json!({
"key": "",
"value": ""
})
),
"message": ""
})
),
"zone": ""
}),
"selfLink": "",
"target": json!({
"config": json!({"content": ""}),
"imports": (
json!({
"content": "",
"name": ""
})
)
}),
"update": json!({
"description": "",
"labels": (
json!({
"key": "",
"value": ""
})
),
"manifest": ""
}),
"updateTime": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment \
--header 'content-type: application/json' \
--data '{
"description": "",
"fingerprint": "",
"id": "",
"insertTime": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": "",
"name": "",
"operation": {
"clientOperationId": "",
"creationTimestamp": "",
"description": "",
"endTime": "",
"error": {
"errors": [
{
"arguments": [],
"code": "",
"debugInfo": {
"detail": "",
"stackEntries": []
},
"errorDetails": [
{
"errorInfo": {
"domain": "",
"metadatas": {},
"reason": ""
},
"help": {
"links": [
{
"description": "",
"url": ""
}
]
},
"localizedMessage": {
"locale": "",
"message": ""
},
"quotaInfo": {
"dimensions": {},
"futureLimit": "",
"limit": "",
"limitName": "",
"metricName": "",
"rolloutStatus": ""
}
}
],
"location": "",
"message": ""
}
]
},
"httpErrorMessage": "",
"httpErrorStatusCode": 0,
"id": "",
"insertTime": "",
"instancesBulkInsertOperationMetadata": {
"machineType": "",
"perLocationStatus": {}
},
"kind": "",
"name": "",
"operationGroupId": "",
"operationType": "",
"progress": 0,
"region": "",
"selfLink": "",
"selfLinkWithId": "",
"setCommonInstanceMetadataOperationMetadata": {
"clientOperationId": "",
"perLocationOperations": {}
},
"startTime": "",
"status": "",
"statusMessage": "",
"targetId": "",
"targetLink": "",
"user": "",
"warnings": [
{
"code": "",
"data": [
{
"key": "",
"value": ""
}
],
"message": ""
}
],
"zone": ""
},
"selfLink": "",
"target": {
"config": {
"content": ""
},
"imports": [
{
"content": "",
"name": ""
}
]
},
"update": {
"description": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": ""
},
"updateTime": ""
}'
echo '{
"description": "",
"fingerprint": "",
"id": "",
"insertTime": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": "",
"name": "",
"operation": {
"clientOperationId": "",
"creationTimestamp": "",
"description": "",
"endTime": "",
"error": {
"errors": [
{
"arguments": [],
"code": "",
"debugInfo": {
"detail": "",
"stackEntries": []
},
"errorDetails": [
{
"errorInfo": {
"domain": "",
"metadatas": {},
"reason": ""
},
"help": {
"links": [
{
"description": "",
"url": ""
}
]
},
"localizedMessage": {
"locale": "",
"message": ""
},
"quotaInfo": {
"dimensions": {},
"futureLimit": "",
"limit": "",
"limitName": "",
"metricName": "",
"rolloutStatus": ""
}
}
],
"location": "",
"message": ""
}
]
},
"httpErrorMessage": "",
"httpErrorStatusCode": 0,
"id": "",
"insertTime": "",
"instancesBulkInsertOperationMetadata": {
"machineType": "",
"perLocationStatus": {}
},
"kind": "",
"name": "",
"operationGroupId": "",
"operationType": "",
"progress": 0,
"region": "",
"selfLink": "",
"selfLinkWithId": "",
"setCommonInstanceMetadataOperationMetadata": {
"clientOperationId": "",
"perLocationOperations": {}
},
"startTime": "",
"status": "",
"statusMessage": "",
"targetId": "",
"targetLink": "",
"user": "",
"warnings": [
{
"code": "",
"data": [
{
"key": "",
"value": ""
}
],
"message": ""
}
],
"zone": ""
},
"selfLink": "",
"target": {
"config": {
"content": ""
},
"imports": [
{
"content": "",
"name": ""
}
]
},
"update": {
"description": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": ""
},
"updateTime": ""
}' | \
http PATCH {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "description": "",\n "fingerprint": "",\n "id": "",\n "insertTime": "",\n "labels": [\n {\n "key": "",\n "value": ""\n }\n ],\n "manifest": "",\n "name": "",\n "operation": {\n "clientOperationId": "",\n "creationTimestamp": "",\n "description": "",\n "endTime": "",\n "error": {\n "errors": [\n {\n "arguments": [],\n "code": "",\n "debugInfo": {\n "detail": "",\n "stackEntries": []\n },\n "errorDetails": [\n {\n "errorInfo": {\n "domain": "",\n "metadatas": {},\n "reason": ""\n },\n "help": {\n "links": [\n {\n "description": "",\n "url": ""\n }\n ]\n },\n "localizedMessage": {\n "locale": "",\n "message": ""\n },\n "quotaInfo": {\n "dimensions": {},\n "futureLimit": "",\n "limit": "",\n "limitName": "",\n "metricName": "",\n "rolloutStatus": ""\n }\n }\n ],\n "location": "",\n "message": ""\n }\n ]\n },\n "httpErrorMessage": "",\n "httpErrorStatusCode": 0,\n "id": "",\n "insertTime": "",\n "instancesBulkInsertOperationMetadata": {\n "machineType": "",\n "perLocationStatus": {}\n },\n "kind": "",\n "name": "",\n "operationGroupId": "",\n "operationType": "",\n "progress": 0,\n "region": "",\n "selfLink": "",\n "selfLinkWithId": "",\n "setCommonInstanceMetadataOperationMetadata": {\n "clientOperationId": "",\n "perLocationOperations": {}\n },\n "startTime": "",\n "status": "",\n "statusMessage": "",\n "targetId": "",\n "targetLink": "",\n "user": "",\n "warnings": [\n {\n "code": "",\n "data": [\n {\n "key": "",\n "value": ""\n }\n ],\n "message": ""\n }\n ],\n "zone": ""\n },\n "selfLink": "",\n "target": {\n "config": {\n "content": ""\n },\n "imports": [\n {\n "content": "",\n "name": ""\n }\n ]\n },\n "update": {\n "description": "",\n "labels": [\n {\n "key": "",\n "value": ""\n }\n ],\n "manifest": ""\n },\n "updateTime": ""\n}' \
--output-document \
- {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"description": "",
"fingerprint": "",
"id": "",
"insertTime": "",
"labels": [
[
"key": "",
"value": ""
]
],
"manifest": "",
"name": "",
"operation": [
"clientOperationId": "",
"creationTimestamp": "",
"description": "",
"endTime": "",
"error": ["errors": [
[
"arguments": [],
"code": "",
"debugInfo": [
"detail": "",
"stackEntries": []
],
"errorDetails": [
[
"errorInfo": [
"domain": "",
"metadatas": [],
"reason": ""
],
"help": ["links": [
[
"description": "",
"url": ""
]
]],
"localizedMessage": [
"locale": "",
"message": ""
],
"quotaInfo": [
"dimensions": [],
"futureLimit": "",
"limit": "",
"limitName": "",
"metricName": "",
"rolloutStatus": ""
]
]
],
"location": "",
"message": ""
]
]],
"httpErrorMessage": "",
"httpErrorStatusCode": 0,
"id": "",
"insertTime": "",
"instancesBulkInsertOperationMetadata": [
"machineType": "",
"perLocationStatus": []
],
"kind": "",
"name": "",
"operationGroupId": "",
"operationType": "",
"progress": 0,
"region": "",
"selfLink": "",
"selfLinkWithId": "",
"setCommonInstanceMetadataOperationMetadata": [
"clientOperationId": "",
"perLocationOperations": []
],
"startTime": "",
"status": "",
"statusMessage": "",
"targetId": "",
"targetLink": "",
"user": "",
"warnings": [
[
"code": "",
"data": [
[
"key": "",
"value": ""
]
],
"message": ""
]
],
"zone": ""
],
"selfLink": "",
"target": [
"config": ["content": ""],
"imports": [
[
"content": "",
"name": ""
]
]
],
"update": [
"description": "",
"labels": [
[
"key": "",
"value": ""
]
],
"manifest": ""
],
"updateTime": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
deploymentmanager.deployments.setIamPolicy
{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/setIamPolicy
QUERY PARAMS
project
resource
BODY json
{
"bindings": [
{
"condition": {
"description": "",
"expression": "",
"location": "",
"title": ""
},
"members": [],
"role": ""
}
],
"etag": "",
"policy": {
"auditConfigs": [
{
"auditLogConfigs": [
{
"exemptedMembers": [],
"logType": ""
}
],
"service": ""
}
],
"bindings": [
{}
],
"etag": "",
"version": 0
},
"updateMask": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/setIamPolicy");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"policy\": {\n \"auditConfigs\": [\n {\n \"auditLogConfigs\": [\n {\n \"exemptedMembers\": [],\n \"logType\": \"\"\n }\n ],\n \"service\": \"\"\n }\n ],\n \"bindings\": [\n {}\n ],\n \"etag\": \"\",\n \"version\": 0\n },\n \"updateMask\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/setIamPolicy" {:content-type :json
:form-params {:bindings [{:condition {:description ""
:expression ""
:location ""
:title ""}
:members []
:role ""}]
:etag ""
:policy {:auditConfigs [{:auditLogConfigs [{:exemptedMembers []
:logType ""}]
:service ""}]
:bindings [{}]
:etag ""
:version 0}
:updateMask ""}})
require "http/client"
url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/setIamPolicy"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"policy\": {\n \"auditConfigs\": [\n {\n \"auditLogConfigs\": [\n {\n \"exemptedMembers\": [],\n \"logType\": \"\"\n }\n ],\n \"service\": \"\"\n }\n ],\n \"bindings\": [\n {}\n ],\n \"etag\": \"\",\n \"version\": 0\n },\n \"updateMask\": \"\"\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}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/setIamPolicy"),
Content = new StringContent("{\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"policy\": {\n \"auditConfigs\": [\n {\n \"auditLogConfigs\": [\n {\n \"exemptedMembers\": [],\n \"logType\": \"\"\n }\n ],\n \"service\": \"\"\n }\n ],\n \"bindings\": [\n {}\n ],\n \"etag\": \"\",\n \"version\": 0\n },\n \"updateMask\": \"\"\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}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/setIamPolicy");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"policy\": {\n \"auditConfigs\": [\n {\n \"auditLogConfigs\": [\n {\n \"exemptedMembers\": [],\n \"logType\": \"\"\n }\n ],\n \"service\": \"\"\n }\n ],\n \"bindings\": [\n {}\n ],\n \"etag\": \"\",\n \"version\": 0\n },\n \"updateMask\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/setIamPolicy"
payload := strings.NewReader("{\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"policy\": {\n \"auditConfigs\": [\n {\n \"auditLogConfigs\": [\n {\n \"exemptedMembers\": [],\n \"logType\": \"\"\n }\n ],\n \"service\": \"\"\n }\n ],\n \"bindings\": [\n {}\n ],\n \"etag\": \"\",\n \"version\": 0\n },\n \"updateMask\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:resource/setIamPolicy HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 512
{
"bindings": [
{
"condition": {
"description": "",
"expression": "",
"location": "",
"title": ""
},
"members": [],
"role": ""
}
],
"etag": "",
"policy": {
"auditConfigs": [
{
"auditLogConfigs": [
{
"exemptedMembers": [],
"logType": ""
}
],
"service": ""
}
],
"bindings": [
{}
],
"etag": "",
"version": 0
},
"updateMask": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/setIamPolicy")
.setHeader("content-type", "application/json")
.setBody("{\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"policy\": {\n \"auditConfigs\": [\n {\n \"auditLogConfigs\": [\n {\n \"exemptedMembers\": [],\n \"logType\": \"\"\n }\n ],\n \"service\": \"\"\n }\n ],\n \"bindings\": [\n {}\n ],\n \"etag\": \"\",\n \"version\": 0\n },\n \"updateMask\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/setIamPolicy"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"policy\": {\n \"auditConfigs\": [\n {\n \"auditLogConfigs\": [\n {\n \"exemptedMembers\": [],\n \"logType\": \"\"\n }\n ],\n \"service\": \"\"\n }\n ],\n \"bindings\": [\n {}\n ],\n \"etag\": \"\",\n \"version\": 0\n },\n \"updateMask\": \"\"\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 \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"policy\": {\n \"auditConfigs\": [\n {\n \"auditLogConfigs\": [\n {\n \"exemptedMembers\": [],\n \"logType\": \"\"\n }\n ],\n \"service\": \"\"\n }\n ],\n \"bindings\": [\n {}\n ],\n \"etag\": \"\",\n \"version\": 0\n },\n \"updateMask\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/setIamPolicy")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/setIamPolicy")
.header("content-type", "application/json")
.body("{\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"policy\": {\n \"auditConfigs\": [\n {\n \"auditLogConfigs\": [\n {\n \"exemptedMembers\": [],\n \"logType\": \"\"\n }\n ],\n \"service\": \"\"\n }\n ],\n \"bindings\": [\n {}\n ],\n \"etag\": \"\",\n \"version\": 0\n },\n \"updateMask\": \"\"\n}")
.asString();
const data = JSON.stringify({
bindings: [
{
condition: {
description: '',
expression: '',
location: '',
title: ''
},
members: [],
role: ''
}
],
etag: '',
policy: {
auditConfigs: [
{
auditLogConfigs: [
{
exemptedMembers: [],
logType: ''
}
],
service: ''
}
],
bindings: [
{}
],
etag: '',
version: 0
},
updateMask: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/setIamPolicy');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/setIamPolicy',
headers: {'content-type': 'application/json'},
data: {
bindings: [
{
condition: {description: '', expression: '', location: '', title: ''},
members: [],
role: ''
}
],
etag: '',
policy: {
auditConfigs: [{auditLogConfigs: [{exemptedMembers: [], logType: ''}], service: ''}],
bindings: [{}],
etag: '',
version: 0
},
updateMask: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/setIamPolicy';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"bindings":[{"condition":{"description":"","expression":"","location":"","title":""},"members":[],"role":""}],"etag":"","policy":{"auditConfigs":[{"auditLogConfigs":[{"exemptedMembers":[],"logType":""}],"service":""}],"bindings":[{}],"etag":"","version":0},"updateMask":""}'
};
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}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/setIamPolicy',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "bindings": [\n {\n "condition": {\n "description": "",\n "expression": "",\n "location": "",\n "title": ""\n },\n "members": [],\n "role": ""\n }\n ],\n "etag": "",\n "policy": {\n "auditConfigs": [\n {\n "auditLogConfigs": [\n {\n "exemptedMembers": [],\n "logType": ""\n }\n ],\n "service": ""\n }\n ],\n "bindings": [\n {}\n ],\n "etag": "",\n "version": 0\n },\n "updateMask": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"policy\": {\n \"auditConfigs\": [\n {\n \"auditLogConfigs\": [\n {\n \"exemptedMembers\": [],\n \"logType\": \"\"\n }\n ],\n \"service\": \"\"\n }\n ],\n \"bindings\": [\n {}\n ],\n \"etag\": \"\",\n \"version\": 0\n },\n \"updateMask\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/setIamPolicy")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:resource/setIamPolicy',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
bindings: [
{
condition: {description: '', expression: '', location: '', title: ''},
members: [],
role: ''
}
],
etag: '',
policy: {
auditConfigs: [{auditLogConfigs: [{exemptedMembers: [], logType: ''}], service: ''}],
bindings: [{}],
etag: '',
version: 0
},
updateMask: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/setIamPolicy',
headers: {'content-type': 'application/json'},
body: {
bindings: [
{
condition: {description: '', expression: '', location: '', title: ''},
members: [],
role: ''
}
],
etag: '',
policy: {
auditConfigs: [{auditLogConfigs: [{exemptedMembers: [], logType: ''}], service: ''}],
bindings: [{}],
etag: '',
version: 0
},
updateMask: ''
},
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}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/setIamPolicy');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
bindings: [
{
condition: {
description: '',
expression: '',
location: '',
title: ''
},
members: [],
role: ''
}
],
etag: '',
policy: {
auditConfigs: [
{
auditLogConfigs: [
{
exemptedMembers: [],
logType: ''
}
],
service: ''
}
],
bindings: [
{}
],
etag: '',
version: 0
},
updateMask: ''
});
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}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/setIamPolicy',
headers: {'content-type': 'application/json'},
data: {
bindings: [
{
condition: {description: '', expression: '', location: '', title: ''},
members: [],
role: ''
}
],
etag: '',
policy: {
auditConfigs: [{auditLogConfigs: [{exemptedMembers: [], logType: ''}], service: ''}],
bindings: [{}],
etag: '',
version: 0
},
updateMask: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/setIamPolicy';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"bindings":[{"condition":{"description":"","expression":"","location":"","title":""},"members":[],"role":""}],"etag":"","policy":{"auditConfigs":[{"auditLogConfigs":[{"exemptedMembers":[],"logType":""}],"service":""}],"bindings":[{}],"etag":"","version":0},"updateMask":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"bindings": @[ @{ @"condition": @{ @"description": @"", @"expression": @"", @"location": @"", @"title": @"" }, @"members": @[ ], @"role": @"" } ],
@"etag": @"",
@"policy": @{ @"auditConfigs": @[ @{ @"auditLogConfigs": @[ @{ @"exemptedMembers": @[ ], @"logType": @"" } ], @"service": @"" } ], @"bindings": @[ @{ } ], @"etag": @"", @"version": @0 },
@"updateMask": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/setIamPolicy"]
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}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/setIamPolicy" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"policy\": {\n \"auditConfigs\": [\n {\n \"auditLogConfigs\": [\n {\n \"exemptedMembers\": [],\n \"logType\": \"\"\n }\n ],\n \"service\": \"\"\n }\n ],\n \"bindings\": [\n {}\n ],\n \"etag\": \"\",\n \"version\": 0\n },\n \"updateMask\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/setIamPolicy",
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([
'bindings' => [
[
'condition' => [
'description' => '',
'expression' => '',
'location' => '',
'title' => ''
],
'members' => [
],
'role' => ''
]
],
'etag' => '',
'policy' => [
'auditConfigs' => [
[
'auditLogConfigs' => [
[
'exemptedMembers' => [
],
'logType' => ''
]
],
'service' => ''
]
],
'bindings' => [
[
]
],
'etag' => '',
'version' => 0
],
'updateMask' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/setIamPolicy', [
'body' => '{
"bindings": [
{
"condition": {
"description": "",
"expression": "",
"location": "",
"title": ""
},
"members": [],
"role": ""
}
],
"etag": "",
"policy": {
"auditConfigs": [
{
"auditLogConfigs": [
{
"exemptedMembers": [],
"logType": ""
}
],
"service": ""
}
],
"bindings": [
{}
],
"etag": "",
"version": 0
},
"updateMask": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/setIamPolicy');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'bindings' => [
[
'condition' => [
'description' => '',
'expression' => '',
'location' => '',
'title' => ''
],
'members' => [
],
'role' => ''
]
],
'etag' => '',
'policy' => [
'auditConfigs' => [
[
'auditLogConfigs' => [
[
'exemptedMembers' => [
],
'logType' => ''
]
],
'service' => ''
]
],
'bindings' => [
[
]
],
'etag' => '',
'version' => 0
],
'updateMask' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'bindings' => [
[
'condition' => [
'description' => '',
'expression' => '',
'location' => '',
'title' => ''
],
'members' => [
],
'role' => ''
]
],
'etag' => '',
'policy' => [
'auditConfigs' => [
[
'auditLogConfigs' => [
[
'exemptedMembers' => [
],
'logType' => ''
]
],
'service' => ''
]
],
'bindings' => [
[
]
],
'etag' => '',
'version' => 0
],
'updateMask' => ''
]));
$request->setRequestUrl('{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/setIamPolicy');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/setIamPolicy' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"bindings": [
{
"condition": {
"description": "",
"expression": "",
"location": "",
"title": ""
},
"members": [],
"role": ""
}
],
"etag": "",
"policy": {
"auditConfigs": [
{
"auditLogConfigs": [
{
"exemptedMembers": [],
"logType": ""
}
],
"service": ""
}
],
"bindings": [
{}
],
"etag": "",
"version": 0
},
"updateMask": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/setIamPolicy' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"bindings": [
{
"condition": {
"description": "",
"expression": "",
"location": "",
"title": ""
},
"members": [],
"role": ""
}
],
"etag": "",
"policy": {
"auditConfigs": [
{
"auditLogConfigs": [
{
"exemptedMembers": [],
"logType": ""
}
],
"service": ""
}
],
"bindings": [
{}
],
"etag": "",
"version": 0
},
"updateMask": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"policy\": {\n \"auditConfigs\": [\n {\n \"auditLogConfigs\": [\n {\n \"exemptedMembers\": [],\n \"logType\": \"\"\n }\n ],\n \"service\": \"\"\n }\n ],\n \"bindings\": [\n {}\n ],\n \"etag\": \"\",\n \"version\": 0\n },\n \"updateMask\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:resource/setIamPolicy", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/setIamPolicy"
payload = {
"bindings": [
{
"condition": {
"description": "",
"expression": "",
"location": "",
"title": ""
},
"members": [],
"role": ""
}
],
"etag": "",
"policy": {
"auditConfigs": [
{
"auditLogConfigs": [
{
"exemptedMembers": [],
"logType": ""
}
],
"service": ""
}
],
"bindings": [{}],
"etag": "",
"version": 0
},
"updateMask": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/setIamPolicy"
payload <- "{\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"policy\": {\n \"auditConfigs\": [\n {\n \"auditLogConfigs\": [\n {\n \"exemptedMembers\": [],\n \"logType\": \"\"\n }\n ],\n \"service\": \"\"\n }\n ],\n \"bindings\": [\n {}\n ],\n \"etag\": \"\",\n \"version\": 0\n },\n \"updateMask\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/setIamPolicy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"policy\": {\n \"auditConfigs\": [\n {\n \"auditLogConfigs\": [\n {\n \"exemptedMembers\": [],\n \"logType\": \"\"\n }\n ],\n \"service\": \"\"\n }\n ],\n \"bindings\": [\n {}\n ],\n \"etag\": \"\",\n \"version\": 0\n },\n \"updateMask\": \"\"\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/deploymentmanager/v2/projects/:project/global/deployments/:resource/setIamPolicy') do |req|
req.body = "{\n \"bindings\": [\n {\n \"condition\": {\n \"description\": \"\",\n \"expression\": \"\",\n \"location\": \"\",\n \"title\": \"\"\n },\n \"members\": [],\n \"role\": \"\"\n }\n ],\n \"etag\": \"\",\n \"policy\": {\n \"auditConfigs\": [\n {\n \"auditLogConfigs\": [\n {\n \"exemptedMembers\": [],\n \"logType\": \"\"\n }\n ],\n \"service\": \"\"\n }\n ],\n \"bindings\": [\n {}\n ],\n \"etag\": \"\",\n \"version\": 0\n },\n \"updateMask\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/setIamPolicy";
let payload = json!({
"bindings": (
json!({
"condition": json!({
"description": "",
"expression": "",
"location": "",
"title": ""
}),
"members": (),
"role": ""
})
),
"etag": "",
"policy": json!({
"auditConfigs": (
json!({
"auditLogConfigs": (
json!({
"exemptedMembers": (),
"logType": ""
})
),
"service": ""
})
),
"bindings": (json!({})),
"etag": "",
"version": 0
}),
"updateMask": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/setIamPolicy \
--header 'content-type: application/json' \
--data '{
"bindings": [
{
"condition": {
"description": "",
"expression": "",
"location": "",
"title": ""
},
"members": [],
"role": ""
}
],
"etag": "",
"policy": {
"auditConfigs": [
{
"auditLogConfigs": [
{
"exemptedMembers": [],
"logType": ""
}
],
"service": ""
}
],
"bindings": [
{}
],
"etag": "",
"version": 0
},
"updateMask": ""
}'
echo '{
"bindings": [
{
"condition": {
"description": "",
"expression": "",
"location": "",
"title": ""
},
"members": [],
"role": ""
}
],
"etag": "",
"policy": {
"auditConfigs": [
{
"auditLogConfigs": [
{
"exemptedMembers": [],
"logType": ""
}
],
"service": ""
}
],
"bindings": [
{}
],
"etag": "",
"version": 0
},
"updateMask": ""
}' | \
http POST {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/setIamPolicy \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "bindings": [\n {\n "condition": {\n "description": "",\n "expression": "",\n "location": "",\n "title": ""\n },\n "members": [],\n "role": ""\n }\n ],\n "etag": "",\n "policy": {\n "auditConfigs": [\n {\n "auditLogConfigs": [\n {\n "exemptedMembers": [],\n "logType": ""\n }\n ],\n "service": ""\n }\n ],\n "bindings": [\n {}\n ],\n "etag": "",\n "version": 0\n },\n "updateMask": ""\n}' \
--output-document \
- {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/setIamPolicy
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"bindings": [
[
"condition": [
"description": "",
"expression": "",
"location": "",
"title": ""
],
"members": [],
"role": ""
]
],
"etag": "",
"policy": [
"auditConfigs": [
[
"auditLogConfigs": [
[
"exemptedMembers": [],
"logType": ""
]
],
"service": ""
]
],
"bindings": [[]],
"etag": "",
"version": 0
],
"updateMask": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/setIamPolicy")! 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
deploymentmanager.deployments.stop
{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/stop
QUERY PARAMS
project
deployment
BODY json
{
"fingerprint": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/stop");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"fingerprint\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/stop" {:content-type :json
:form-params {:fingerprint ""}})
require "http/client"
url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/stop"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"fingerprint\": \"\"\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}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/stop"),
Content = new StringContent("{\n \"fingerprint\": \"\"\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}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/stop");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"fingerprint\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/stop"
payload := strings.NewReader("{\n \"fingerprint\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:deployment/stop HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 23
{
"fingerprint": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/stop")
.setHeader("content-type", "application/json")
.setBody("{\n \"fingerprint\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/stop"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"fingerprint\": \"\"\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 \"fingerprint\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/stop")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/stop")
.header("content-type", "application/json")
.body("{\n \"fingerprint\": \"\"\n}")
.asString();
const data = JSON.stringify({
fingerprint: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/stop');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/stop',
headers: {'content-type': 'application/json'},
data: {fingerprint: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/stop';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"fingerprint":""}'
};
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}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/stop',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "fingerprint": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"fingerprint\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/stop")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:deployment/stop',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({fingerprint: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/stop',
headers: {'content-type': 'application/json'},
body: {fingerprint: ''},
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}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/stop');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
fingerprint: ''
});
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}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/stop',
headers: {'content-type': 'application/json'},
data: {fingerprint: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/stop';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"fingerprint":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"fingerprint": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/stop"]
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}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/stop" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"fingerprint\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/stop",
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([
'fingerprint' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/stop', [
'body' => '{
"fingerprint": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/stop');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'fingerprint' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'fingerprint' => ''
]));
$request->setRequestUrl('{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/stop');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/stop' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"fingerprint": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/stop' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"fingerprint": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"fingerprint\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:deployment/stop", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/stop"
payload = { "fingerprint": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/stop"
payload <- "{\n \"fingerprint\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/stop")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"fingerprint\": \"\"\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/deploymentmanager/v2/projects/:project/global/deployments/:deployment/stop') do |req|
req.body = "{\n \"fingerprint\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/stop";
let payload = json!({"fingerprint": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/stop \
--header 'content-type: application/json' \
--data '{
"fingerprint": ""
}'
echo '{
"fingerprint": ""
}' | \
http POST {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/stop \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "fingerprint": ""\n}' \
--output-document \
- {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/stop
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["fingerprint": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/stop")! 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
deploymentmanager.deployments.testIamPermissions
{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/testIamPermissions
QUERY PARAMS
project
resource
BODY json
{
"permissions": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/testIamPermissions");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"permissions\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/testIamPermissions" {:content-type :json
:form-params {:permissions []}})
require "http/client"
url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/testIamPermissions"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"permissions\": []\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}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/testIamPermissions"),
Content = new StringContent("{\n \"permissions\": []\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}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/testIamPermissions");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"permissions\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/testIamPermissions"
payload := strings.NewReader("{\n \"permissions\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:resource/testIamPermissions HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 23
{
"permissions": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/testIamPermissions")
.setHeader("content-type", "application/json")
.setBody("{\n \"permissions\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/testIamPermissions"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"permissions\": []\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 \"permissions\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/testIamPermissions")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/testIamPermissions")
.header("content-type", "application/json")
.body("{\n \"permissions\": []\n}")
.asString();
const data = JSON.stringify({
permissions: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/testIamPermissions');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/testIamPermissions',
headers: {'content-type': 'application/json'},
data: {permissions: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/testIamPermissions';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"permissions":[]}'
};
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}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/testIamPermissions',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "permissions": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"permissions\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/testIamPermissions")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:resource/testIamPermissions',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({permissions: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/testIamPermissions',
headers: {'content-type': 'application/json'},
body: {permissions: []},
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}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/testIamPermissions');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
permissions: []
});
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}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/testIamPermissions',
headers: {'content-type': 'application/json'},
data: {permissions: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/testIamPermissions';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"permissions":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"permissions": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/testIamPermissions"]
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}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/testIamPermissions" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"permissions\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/testIamPermissions",
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([
'permissions' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/testIamPermissions', [
'body' => '{
"permissions": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/testIamPermissions');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'permissions' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'permissions' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/testIamPermissions');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/testIamPermissions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"permissions": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/testIamPermissions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"permissions": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"permissions\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:resource/testIamPermissions", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/testIamPermissions"
payload = { "permissions": [] }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/testIamPermissions"
payload <- "{\n \"permissions\": []\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/testIamPermissions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"permissions\": []\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/deploymentmanager/v2/projects/:project/global/deployments/:resource/testIamPermissions') do |req|
req.body = "{\n \"permissions\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/testIamPermissions";
let payload = json!({"permissions": ()});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/testIamPermissions \
--header 'content-type: application/json' \
--data '{
"permissions": []
}'
echo '{
"permissions": []
}' | \
http POST {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/testIamPermissions \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "permissions": []\n}' \
--output-document \
- {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/testIamPermissions
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["permissions": []] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:resource/testIamPermissions")! 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()
PUT
deploymentmanager.deployments.update
{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment
QUERY PARAMS
project
deployment
BODY json
{
"description": "",
"fingerprint": "",
"id": "",
"insertTime": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": "",
"name": "",
"operation": {
"clientOperationId": "",
"creationTimestamp": "",
"description": "",
"endTime": "",
"error": {
"errors": [
{
"arguments": [],
"code": "",
"debugInfo": {
"detail": "",
"stackEntries": []
},
"errorDetails": [
{
"errorInfo": {
"domain": "",
"metadatas": {},
"reason": ""
},
"help": {
"links": [
{
"description": "",
"url": ""
}
]
},
"localizedMessage": {
"locale": "",
"message": ""
},
"quotaInfo": {
"dimensions": {},
"futureLimit": "",
"limit": "",
"limitName": "",
"metricName": "",
"rolloutStatus": ""
}
}
],
"location": "",
"message": ""
}
]
},
"httpErrorMessage": "",
"httpErrorStatusCode": 0,
"id": "",
"insertTime": "",
"instancesBulkInsertOperationMetadata": {
"machineType": "",
"perLocationStatus": {}
},
"kind": "",
"name": "",
"operationGroupId": "",
"operationType": "",
"progress": 0,
"region": "",
"selfLink": "",
"selfLinkWithId": "",
"setCommonInstanceMetadataOperationMetadata": {
"clientOperationId": "",
"perLocationOperations": {}
},
"startTime": "",
"status": "",
"statusMessage": "",
"targetId": "",
"targetLink": "",
"user": "",
"warnings": [
{
"code": "",
"data": [
{
"key": "",
"value": ""
}
],
"message": ""
}
],
"zone": ""
},
"selfLink": "",
"target": {
"config": {
"content": ""
},
"imports": [
{
"content": "",
"name": ""
}
]
},
"update": {
"description": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": ""
},
"updateTime": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment" {:content-type :json
:form-params {:description ""
:fingerprint ""
:id ""
:insertTime ""
:labels [{:key ""
:value ""}]
:manifest ""
:name ""
:operation {:clientOperationId ""
:creationTimestamp ""
:description ""
:endTime ""
:error {:errors [{:arguments []
:code ""
:debugInfo {:detail ""
:stackEntries []}
:errorDetails [{:errorInfo {:domain ""
:metadatas {}
:reason ""}
:help {:links [{:description ""
:url ""}]}
:localizedMessage {:locale ""
:message ""}
:quotaInfo {:dimensions {}
:futureLimit ""
:limit ""
:limitName ""
:metricName ""
:rolloutStatus ""}}]
:location ""
:message ""}]}
:httpErrorMessage ""
:httpErrorStatusCode 0
:id ""
:insertTime ""
:instancesBulkInsertOperationMetadata {:machineType ""
:perLocationStatus {}}
:kind ""
:name ""
:operationGroupId ""
:operationType ""
:progress 0
:region ""
:selfLink ""
:selfLinkWithId ""
:setCommonInstanceMetadataOperationMetadata {:clientOperationId ""
:perLocationOperations {}}
:startTime ""
:status ""
:statusMessage ""
:targetId ""
:targetLink ""
:user ""
:warnings [{:code ""
:data [{:key ""
:value ""}]
:message ""}]
:zone ""}
:selfLink ""
:target {:config {:content ""}
:imports [{:content ""
:name ""}]}
:update {:description ""
:labels [{:key ""
:value ""}]
:manifest ""}
:updateTime ""}})
require "http/client"
url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment"),
Content = new StringContent("{\n \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\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}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment"
payload := strings.NewReader("{\n \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:deployment HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2453
{
"description": "",
"fingerprint": "",
"id": "",
"insertTime": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": "",
"name": "",
"operation": {
"clientOperationId": "",
"creationTimestamp": "",
"description": "",
"endTime": "",
"error": {
"errors": [
{
"arguments": [],
"code": "",
"debugInfo": {
"detail": "",
"stackEntries": []
},
"errorDetails": [
{
"errorInfo": {
"domain": "",
"metadatas": {},
"reason": ""
},
"help": {
"links": [
{
"description": "",
"url": ""
}
]
},
"localizedMessage": {
"locale": "",
"message": ""
},
"quotaInfo": {
"dimensions": {},
"futureLimit": "",
"limit": "",
"limitName": "",
"metricName": "",
"rolloutStatus": ""
}
}
],
"location": "",
"message": ""
}
]
},
"httpErrorMessage": "",
"httpErrorStatusCode": 0,
"id": "",
"insertTime": "",
"instancesBulkInsertOperationMetadata": {
"machineType": "",
"perLocationStatus": {}
},
"kind": "",
"name": "",
"operationGroupId": "",
"operationType": "",
"progress": 0,
"region": "",
"selfLink": "",
"selfLinkWithId": "",
"setCommonInstanceMetadataOperationMetadata": {
"clientOperationId": "",
"perLocationOperations": {}
},
"startTime": "",
"status": "",
"statusMessage": "",
"targetId": "",
"targetLink": "",
"user": "",
"warnings": [
{
"code": "",
"data": [
{
"key": "",
"value": ""
}
],
"message": ""
}
],
"zone": ""
},
"selfLink": "",
"target": {
"config": {
"content": ""
},
"imports": [
{
"content": "",
"name": ""
}
]
},
"update": {
"description": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": ""
},
"updateTime": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment")
.setHeader("content-type", "application/json")
.setBody("{\n \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\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 \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment")
.header("content-type", "application/json")
.body("{\n \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\n}")
.asString();
const data = JSON.stringify({
description: '',
fingerprint: '',
id: '',
insertTime: '',
labels: [
{
key: '',
value: ''
}
],
manifest: '',
name: '',
operation: {
clientOperationId: '',
creationTimestamp: '',
description: '',
endTime: '',
error: {
errors: [
{
arguments: [],
code: '',
debugInfo: {
detail: '',
stackEntries: []
},
errorDetails: [
{
errorInfo: {
domain: '',
metadatas: {},
reason: ''
},
help: {
links: [
{
description: '',
url: ''
}
]
},
localizedMessage: {
locale: '',
message: ''
},
quotaInfo: {
dimensions: {},
futureLimit: '',
limit: '',
limitName: '',
metricName: '',
rolloutStatus: ''
}
}
],
location: '',
message: ''
}
]
},
httpErrorMessage: '',
httpErrorStatusCode: 0,
id: '',
insertTime: '',
instancesBulkInsertOperationMetadata: {
machineType: '',
perLocationStatus: {}
},
kind: '',
name: '',
operationGroupId: '',
operationType: '',
progress: 0,
region: '',
selfLink: '',
selfLinkWithId: '',
setCommonInstanceMetadataOperationMetadata: {
clientOperationId: '',
perLocationOperations: {}
},
startTime: '',
status: '',
statusMessage: '',
targetId: '',
targetLink: '',
user: '',
warnings: [
{
code: '',
data: [
{
key: '',
value: ''
}
],
message: ''
}
],
zone: ''
},
selfLink: '',
target: {
config: {
content: ''
},
imports: [
{
content: '',
name: ''
}
]
},
update: {
description: '',
labels: [
{
key: '',
value: ''
}
],
manifest: ''
},
updateTime: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment',
headers: {'content-type': 'application/json'},
data: {
description: '',
fingerprint: '',
id: '',
insertTime: '',
labels: [{key: '', value: ''}],
manifest: '',
name: '',
operation: {
clientOperationId: '',
creationTimestamp: '',
description: '',
endTime: '',
error: {
errors: [
{
arguments: [],
code: '',
debugInfo: {detail: '', stackEntries: []},
errorDetails: [
{
errorInfo: {domain: '', metadatas: {}, reason: ''},
help: {links: [{description: '', url: ''}]},
localizedMessage: {locale: '', message: ''},
quotaInfo: {
dimensions: {},
futureLimit: '',
limit: '',
limitName: '',
metricName: '',
rolloutStatus: ''
}
}
],
location: '',
message: ''
}
]
},
httpErrorMessage: '',
httpErrorStatusCode: 0,
id: '',
insertTime: '',
instancesBulkInsertOperationMetadata: {machineType: '', perLocationStatus: {}},
kind: '',
name: '',
operationGroupId: '',
operationType: '',
progress: 0,
region: '',
selfLink: '',
selfLinkWithId: '',
setCommonInstanceMetadataOperationMetadata: {clientOperationId: '', perLocationOperations: {}},
startTime: '',
status: '',
statusMessage: '',
targetId: '',
targetLink: '',
user: '',
warnings: [{code: '', data: [{key: '', value: ''}], message: ''}],
zone: ''
},
selfLink: '',
target: {config: {content: ''}, imports: [{content: '', name: ''}]},
update: {description: '', labels: [{key: '', value: ''}], manifest: ''},
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"description":"","fingerprint":"","id":"","insertTime":"","labels":[{"key":"","value":""}],"manifest":"","name":"","operation":{"clientOperationId":"","creationTimestamp":"","description":"","endTime":"","error":{"errors":[{"arguments":[],"code":"","debugInfo":{"detail":"","stackEntries":[]},"errorDetails":[{"errorInfo":{"domain":"","metadatas":{},"reason":""},"help":{"links":[{"description":"","url":""}]},"localizedMessage":{"locale":"","message":""},"quotaInfo":{"dimensions":{},"futureLimit":"","limit":"","limitName":"","metricName":"","rolloutStatus":""}}],"location":"","message":""}]},"httpErrorMessage":"","httpErrorStatusCode":0,"id":"","insertTime":"","instancesBulkInsertOperationMetadata":{"machineType":"","perLocationStatus":{}},"kind":"","name":"","operationGroupId":"","operationType":"","progress":0,"region":"","selfLink":"","selfLinkWithId":"","setCommonInstanceMetadataOperationMetadata":{"clientOperationId":"","perLocationOperations":{}},"startTime":"","status":"","statusMessage":"","targetId":"","targetLink":"","user":"","warnings":[{"code":"","data":[{"key":"","value":""}],"message":""}],"zone":""},"selfLink":"","target":{"config":{"content":""},"imports":[{"content":"","name":""}]},"update":{"description":"","labels":[{"key":"","value":""}],"manifest":""},"updateTime":""}'
};
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}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "description": "",\n "fingerprint": "",\n "id": "",\n "insertTime": "",\n "labels": [\n {\n "key": "",\n "value": ""\n }\n ],\n "manifest": "",\n "name": "",\n "operation": {\n "clientOperationId": "",\n "creationTimestamp": "",\n "description": "",\n "endTime": "",\n "error": {\n "errors": [\n {\n "arguments": [],\n "code": "",\n "debugInfo": {\n "detail": "",\n "stackEntries": []\n },\n "errorDetails": [\n {\n "errorInfo": {\n "domain": "",\n "metadatas": {},\n "reason": ""\n },\n "help": {\n "links": [\n {\n "description": "",\n "url": ""\n }\n ]\n },\n "localizedMessage": {\n "locale": "",\n "message": ""\n },\n "quotaInfo": {\n "dimensions": {},\n "futureLimit": "",\n "limit": "",\n "limitName": "",\n "metricName": "",\n "rolloutStatus": ""\n }\n }\n ],\n "location": "",\n "message": ""\n }\n ]\n },\n "httpErrorMessage": "",\n "httpErrorStatusCode": 0,\n "id": "",\n "insertTime": "",\n "instancesBulkInsertOperationMetadata": {\n "machineType": "",\n "perLocationStatus": {}\n },\n "kind": "",\n "name": "",\n "operationGroupId": "",\n "operationType": "",\n "progress": 0,\n "region": "",\n "selfLink": "",\n "selfLinkWithId": "",\n "setCommonInstanceMetadataOperationMetadata": {\n "clientOperationId": "",\n "perLocationOperations": {}\n },\n "startTime": "",\n "status": "",\n "statusMessage": "",\n "targetId": "",\n "targetLink": "",\n "user": "",\n "warnings": [\n {\n "code": "",\n "data": [\n {\n "key": "",\n "value": ""\n }\n ],\n "message": ""\n }\n ],\n "zone": ""\n },\n "selfLink": "",\n "target": {\n "config": {\n "content": ""\n },\n "imports": [\n {\n "content": "",\n "name": ""\n }\n ]\n },\n "update": {\n "description": "",\n "labels": [\n {\n "key": "",\n "value": ""\n }\n ],\n "manifest": ""\n },\n "updateTime": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:deployment',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
description: '',
fingerprint: '',
id: '',
insertTime: '',
labels: [{key: '', value: ''}],
manifest: '',
name: '',
operation: {
clientOperationId: '',
creationTimestamp: '',
description: '',
endTime: '',
error: {
errors: [
{
arguments: [],
code: '',
debugInfo: {detail: '', stackEntries: []},
errorDetails: [
{
errorInfo: {domain: '', metadatas: {}, reason: ''},
help: {links: [{description: '', url: ''}]},
localizedMessage: {locale: '', message: ''},
quotaInfo: {
dimensions: {},
futureLimit: '',
limit: '',
limitName: '',
metricName: '',
rolloutStatus: ''
}
}
],
location: '',
message: ''
}
]
},
httpErrorMessage: '',
httpErrorStatusCode: 0,
id: '',
insertTime: '',
instancesBulkInsertOperationMetadata: {machineType: '', perLocationStatus: {}},
kind: '',
name: '',
operationGroupId: '',
operationType: '',
progress: 0,
region: '',
selfLink: '',
selfLinkWithId: '',
setCommonInstanceMetadataOperationMetadata: {clientOperationId: '', perLocationOperations: {}},
startTime: '',
status: '',
statusMessage: '',
targetId: '',
targetLink: '',
user: '',
warnings: [{code: '', data: [{key: '', value: ''}], message: ''}],
zone: ''
},
selfLink: '',
target: {config: {content: ''}, imports: [{content: '', name: ''}]},
update: {description: '', labels: [{key: '', value: ''}], manifest: ''},
updateTime: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment',
headers: {'content-type': 'application/json'},
body: {
description: '',
fingerprint: '',
id: '',
insertTime: '',
labels: [{key: '', value: ''}],
manifest: '',
name: '',
operation: {
clientOperationId: '',
creationTimestamp: '',
description: '',
endTime: '',
error: {
errors: [
{
arguments: [],
code: '',
debugInfo: {detail: '', stackEntries: []},
errorDetails: [
{
errorInfo: {domain: '', metadatas: {}, reason: ''},
help: {links: [{description: '', url: ''}]},
localizedMessage: {locale: '', message: ''},
quotaInfo: {
dimensions: {},
futureLimit: '',
limit: '',
limitName: '',
metricName: '',
rolloutStatus: ''
}
}
],
location: '',
message: ''
}
]
},
httpErrorMessage: '',
httpErrorStatusCode: 0,
id: '',
insertTime: '',
instancesBulkInsertOperationMetadata: {machineType: '', perLocationStatus: {}},
kind: '',
name: '',
operationGroupId: '',
operationType: '',
progress: 0,
region: '',
selfLink: '',
selfLinkWithId: '',
setCommonInstanceMetadataOperationMetadata: {clientOperationId: '', perLocationOperations: {}},
startTime: '',
status: '',
statusMessage: '',
targetId: '',
targetLink: '',
user: '',
warnings: [{code: '', data: [{key: '', value: ''}], message: ''}],
zone: ''
},
selfLink: '',
target: {config: {content: ''}, imports: [{content: '', name: ''}]},
update: {description: '', labels: [{key: '', value: ''}], manifest: ''},
updateTime: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
description: '',
fingerprint: '',
id: '',
insertTime: '',
labels: [
{
key: '',
value: ''
}
],
manifest: '',
name: '',
operation: {
clientOperationId: '',
creationTimestamp: '',
description: '',
endTime: '',
error: {
errors: [
{
arguments: [],
code: '',
debugInfo: {
detail: '',
stackEntries: []
},
errorDetails: [
{
errorInfo: {
domain: '',
metadatas: {},
reason: ''
},
help: {
links: [
{
description: '',
url: ''
}
]
},
localizedMessage: {
locale: '',
message: ''
},
quotaInfo: {
dimensions: {},
futureLimit: '',
limit: '',
limitName: '',
metricName: '',
rolloutStatus: ''
}
}
],
location: '',
message: ''
}
]
},
httpErrorMessage: '',
httpErrorStatusCode: 0,
id: '',
insertTime: '',
instancesBulkInsertOperationMetadata: {
machineType: '',
perLocationStatus: {}
},
kind: '',
name: '',
operationGroupId: '',
operationType: '',
progress: 0,
region: '',
selfLink: '',
selfLinkWithId: '',
setCommonInstanceMetadataOperationMetadata: {
clientOperationId: '',
perLocationOperations: {}
},
startTime: '',
status: '',
statusMessage: '',
targetId: '',
targetLink: '',
user: '',
warnings: [
{
code: '',
data: [
{
key: '',
value: ''
}
],
message: ''
}
],
zone: ''
},
selfLink: '',
target: {
config: {
content: ''
},
imports: [
{
content: '',
name: ''
}
]
},
update: {
description: '',
labels: [
{
key: '',
value: ''
}
],
manifest: ''
},
updateTime: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment',
headers: {'content-type': 'application/json'},
data: {
description: '',
fingerprint: '',
id: '',
insertTime: '',
labels: [{key: '', value: ''}],
manifest: '',
name: '',
operation: {
clientOperationId: '',
creationTimestamp: '',
description: '',
endTime: '',
error: {
errors: [
{
arguments: [],
code: '',
debugInfo: {detail: '', stackEntries: []},
errorDetails: [
{
errorInfo: {domain: '', metadatas: {}, reason: ''},
help: {links: [{description: '', url: ''}]},
localizedMessage: {locale: '', message: ''},
quotaInfo: {
dimensions: {},
futureLimit: '',
limit: '',
limitName: '',
metricName: '',
rolloutStatus: ''
}
}
],
location: '',
message: ''
}
]
},
httpErrorMessage: '',
httpErrorStatusCode: 0,
id: '',
insertTime: '',
instancesBulkInsertOperationMetadata: {machineType: '', perLocationStatus: {}},
kind: '',
name: '',
operationGroupId: '',
operationType: '',
progress: 0,
region: '',
selfLink: '',
selfLinkWithId: '',
setCommonInstanceMetadataOperationMetadata: {clientOperationId: '', perLocationOperations: {}},
startTime: '',
status: '',
statusMessage: '',
targetId: '',
targetLink: '',
user: '',
warnings: [{code: '', data: [{key: '', value: ''}], message: ''}],
zone: ''
},
selfLink: '',
target: {config: {content: ''}, imports: [{content: '', name: ''}]},
update: {description: '', labels: [{key: '', value: ''}], manifest: ''},
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"description":"","fingerprint":"","id":"","insertTime":"","labels":[{"key":"","value":""}],"manifest":"","name":"","operation":{"clientOperationId":"","creationTimestamp":"","description":"","endTime":"","error":{"errors":[{"arguments":[],"code":"","debugInfo":{"detail":"","stackEntries":[]},"errorDetails":[{"errorInfo":{"domain":"","metadatas":{},"reason":""},"help":{"links":[{"description":"","url":""}]},"localizedMessage":{"locale":"","message":""},"quotaInfo":{"dimensions":{},"futureLimit":"","limit":"","limitName":"","metricName":"","rolloutStatus":""}}],"location":"","message":""}]},"httpErrorMessage":"","httpErrorStatusCode":0,"id":"","insertTime":"","instancesBulkInsertOperationMetadata":{"machineType":"","perLocationStatus":{}},"kind":"","name":"","operationGroupId":"","operationType":"","progress":0,"region":"","selfLink":"","selfLinkWithId":"","setCommonInstanceMetadataOperationMetadata":{"clientOperationId":"","perLocationOperations":{}},"startTime":"","status":"","statusMessage":"","targetId":"","targetLink":"","user":"","warnings":[{"code":"","data":[{"key":"","value":""}],"message":""}],"zone":""},"selfLink":"","target":{"config":{"content":""},"imports":[{"content":"","name":""}]},"update":{"description":"","labels":[{"key":"","value":""}],"manifest":""},"updateTime":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"description": @"",
@"fingerprint": @"",
@"id": @"",
@"insertTime": @"",
@"labels": @[ @{ @"key": @"", @"value": @"" } ],
@"manifest": @"",
@"name": @"",
@"operation": @{ @"clientOperationId": @"", @"creationTimestamp": @"", @"description": @"", @"endTime": @"", @"error": @{ @"errors": @[ @{ @"arguments": @[ ], @"code": @"", @"debugInfo": @{ @"detail": @"", @"stackEntries": @[ ] }, @"errorDetails": @[ @{ @"errorInfo": @{ @"domain": @"", @"metadatas": @{ }, @"reason": @"" }, @"help": @{ @"links": @[ @{ @"description": @"", @"url": @"" } ] }, @"localizedMessage": @{ @"locale": @"", @"message": @"" }, @"quotaInfo": @{ @"dimensions": @{ }, @"futureLimit": @"", @"limit": @"", @"limitName": @"", @"metricName": @"", @"rolloutStatus": @"" } } ], @"location": @"", @"message": @"" } ] }, @"httpErrorMessage": @"", @"httpErrorStatusCode": @0, @"id": @"", @"insertTime": @"", @"instancesBulkInsertOperationMetadata": @{ @"machineType": @"", @"perLocationStatus": @{ } }, @"kind": @"", @"name": @"", @"operationGroupId": @"", @"operationType": @"", @"progress": @0, @"region": @"", @"selfLink": @"", @"selfLinkWithId": @"", @"setCommonInstanceMetadataOperationMetadata": @{ @"clientOperationId": @"", @"perLocationOperations": @{ } }, @"startTime": @"", @"status": @"", @"statusMessage": @"", @"targetId": @"", @"targetLink": @"", @"user": @"", @"warnings": @[ @{ @"code": @"", @"data": @[ @{ @"key": @"", @"value": @"" } ], @"message": @"" } ], @"zone": @"" },
@"selfLink": @"",
@"target": @{ @"config": @{ @"content": @"" }, @"imports": @[ @{ @"content": @"", @"name": @"" } ] },
@"update": @{ @"description": @"", @"labels": @[ @{ @"key": @"", @"value": @"" } ], @"manifest": @"" },
@"updateTime": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'description' => '',
'fingerprint' => '',
'id' => '',
'insertTime' => '',
'labels' => [
[
'key' => '',
'value' => ''
]
],
'manifest' => '',
'name' => '',
'operation' => [
'clientOperationId' => '',
'creationTimestamp' => '',
'description' => '',
'endTime' => '',
'error' => [
'errors' => [
[
'arguments' => [
],
'code' => '',
'debugInfo' => [
'detail' => '',
'stackEntries' => [
]
],
'errorDetails' => [
[
'errorInfo' => [
'domain' => '',
'metadatas' => [
],
'reason' => ''
],
'help' => [
'links' => [
[
'description' => '',
'url' => ''
]
]
],
'localizedMessage' => [
'locale' => '',
'message' => ''
],
'quotaInfo' => [
'dimensions' => [
],
'futureLimit' => '',
'limit' => '',
'limitName' => '',
'metricName' => '',
'rolloutStatus' => ''
]
]
],
'location' => '',
'message' => ''
]
]
],
'httpErrorMessage' => '',
'httpErrorStatusCode' => 0,
'id' => '',
'insertTime' => '',
'instancesBulkInsertOperationMetadata' => [
'machineType' => '',
'perLocationStatus' => [
]
],
'kind' => '',
'name' => '',
'operationGroupId' => '',
'operationType' => '',
'progress' => 0,
'region' => '',
'selfLink' => '',
'selfLinkWithId' => '',
'setCommonInstanceMetadataOperationMetadata' => [
'clientOperationId' => '',
'perLocationOperations' => [
]
],
'startTime' => '',
'status' => '',
'statusMessage' => '',
'targetId' => '',
'targetLink' => '',
'user' => '',
'warnings' => [
[
'code' => '',
'data' => [
[
'key' => '',
'value' => ''
]
],
'message' => ''
]
],
'zone' => ''
],
'selfLink' => '',
'target' => [
'config' => [
'content' => ''
],
'imports' => [
[
'content' => '',
'name' => ''
]
]
],
'update' => [
'description' => '',
'labels' => [
[
'key' => '',
'value' => ''
]
],
'manifest' => ''
],
'updateTime' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment', [
'body' => '{
"description": "",
"fingerprint": "",
"id": "",
"insertTime": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": "",
"name": "",
"operation": {
"clientOperationId": "",
"creationTimestamp": "",
"description": "",
"endTime": "",
"error": {
"errors": [
{
"arguments": [],
"code": "",
"debugInfo": {
"detail": "",
"stackEntries": []
},
"errorDetails": [
{
"errorInfo": {
"domain": "",
"metadatas": {},
"reason": ""
},
"help": {
"links": [
{
"description": "",
"url": ""
}
]
},
"localizedMessage": {
"locale": "",
"message": ""
},
"quotaInfo": {
"dimensions": {},
"futureLimit": "",
"limit": "",
"limitName": "",
"metricName": "",
"rolloutStatus": ""
}
}
],
"location": "",
"message": ""
}
]
},
"httpErrorMessage": "",
"httpErrorStatusCode": 0,
"id": "",
"insertTime": "",
"instancesBulkInsertOperationMetadata": {
"machineType": "",
"perLocationStatus": {}
},
"kind": "",
"name": "",
"operationGroupId": "",
"operationType": "",
"progress": 0,
"region": "",
"selfLink": "",
"selfLinkWithId": "",
"setCommonInstanceMetadataOperationMetadata": {
"clientOperationId": "",
"perLocationOperations": {}
},
"startTime": "",
"status": "",
"statusMessage": "",
"targetId": "",
"targetLink": "",
"user": "",
"warnings": [
{
"code": "",
"data": [
{
"key": "",
"value": ""
}
],
"message": ""
}
],
"zone": ""
},
"selfLink": "",
"target": {
"config": {
"content": ""
},
"imports": [
{
"content": "",
"name": ""
}
]
},
"update": {
"description": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": ""
},
"updateTime": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'description' => '',
'fingerprint' => '',
'id' => '',
'insertTime' => '',
'labels' => [
[
'key' => '',
'value' => ''
]
],
'manifest' => '',
'name' => '',
'operation' => [
'clientOperationId' => '',
'creationTimestamp' => '',
'description' => '',
'endTime' => '',
'error' => [
'errors' => [
[
'arguments' => [
],
'code' => '',
'debugInfo' => [
'detail' => '',
'stackEntries' => [
]
],
'errorDetails' => [
[
'errorInfo' => [
'domain' => '',
'metadatas' => [
],
'reason' => ''
],
'help' => [
'links' => [
[
'description' => '',
'url' => ''
]
]
],
'localizedMessage' => [
'locale' => '',
'message' => ''
],
'quotaInfo' => [
'dimensions' => [
],
'futureLimit' => '',
'limit' => '',
'limitName' => '',
'metricName' => '',
'rolloutStatus' => ''
]
]
],
'location' => '',
'message' => ''
]
]
],
'httpErrorMessage' => '',
'httpErrorStatusCode' => 0,
'id' => '',
'insertTime' => '',
'instancesBulkInsertOperationMetadata' => [
'machineType' => '',
'perLocationStatus' => [
]
],
'kind' => '',
'name' => '',
'operationGroupId' => '',
'operationType' => '',
'progress' => 0,
'region' => '',
'selfLink' => '',
'selfLinkWithId' => '',
'setCommonInstanceMetadataOperationMetadata' => [
'clientOperationId' => '',
'perLocationOperations' => [
]
],
'startTime' => '',
'status' => '',
'statusMessage' => '',
'targetId' => '',
'targetLink' => '',
'user' => '',
'warnings' => [
[
'code' => '',
'data' => [
[
'key' => '',
'value' => ''
]
],
'message' => ''
]
],
'zone' => ''
],
'selfLink' => '',
'target' => [
'config' => [
'content' => ''
],
'imports' => [
[
'content' => '',
'name' => ''
]
]
],
'update' => [
'description' => '',
'labels' => [
[
'key' => '',
'value' => ''
]
],
'manifest' => ''
],
'updateTime' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'description' => '',
'fingerprint' => '',
'id' => '',
'insertTime' => '',
'labels' => [
[
'key' => '',
'value' => ''
]
],
'manifest' => '',
'name' => '',
'operation' => [
'clientOperationId' => '',
'creationTimestamp' => '',
'description' => '',
'endTime' => '',
'error' => [
'errors' => [
[
'arguments' => [
],
'code' => '',
'debugInfo' => [
'detail' => '',
'stackEntries' => [
]
],
'errorDetails' => [
[
'errorInfo' => [
'domain' => '',
'metadatas' => [
],
'reason' => ''
],
'help' => [
'links' => [
[
'description' => '',
'url' => ''
]
]
],
'localizedMessage' => [
'locale' => '',
'message' => ''
],
'quotaInfo' => [
'dimensions' => [
],
'futureLimit' => '',
'limit' => '',
'limitName' => '',
'metricName' => '',
'rolloutStatus' => ''
]
]
],
'location' => '',
'message' => ''
]
]
],
'httpErrorMessage' => '',
'httpErrorStatusCode' => 0,
'id' => '',
'insertTime' => '',
'instancesBulkInsertOperationMetadata' => [
'machineType' => '',
'perLocationStatus' => [
]
],
'kind' => '',
'name' => '',
'operationGroupId' => '',
'operationType' => '',
'progress' => 0,
'region' => '',
'selfLink' => '',
'selfLinkWithId' => '',
'setCommonInstanceMetadataOperationMetadata' => [
'clientOperationId' => '',
'perLocationOperations' => [
]
],
'startTime' => '',
'status' => '',
'statusMessage' => '',
'targetId' => '',
'targetLink' => '',
'user' => '',
'warnings' => [
[
'code' => '',
'data' => [
[
'key' => '',
'value' => ''
]
],
'message' => ''
]
],
'zone' => ''
],
'selfLink' => '',
'target' => [
'config' => [
'content' => ''
],
'imports' => [
[
'content' => '',
'name' => ''
]
]
],
'update' => [
'description' => '',
'labels' => [
[
'key' => '',
'value' => ''
]
],
'manifest' => ''
],
'updateTime' => ''
]));
$request->setRequestUrl('{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"fingerprint": "",
"id": "",
"insertTime": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": "",
"name": "",
"operation": {
"clientOperationId": "",
"creationTimestamp": "",
"description": "",
"endTime": "",
"error": {
"errors": [
{
"arguments": [],
"code": "",
"debugInfo": {
"detail": "",
"stackEntries": []
},
"errorDetails": [
{
"errorInfo": {
"domain": "",
"metadatas": {},
"reason": ""
},
"help": {
"links": [
{
"description": "",
"url": ""
}
]
},
"localizedMessage": {
"locale": "",
"message": ""
},
"quotaInfo": {
"dimensions": {},
"futureLimit": "",
"limit": "",
"limitName": "",
"metricName": "",
"rolloutStatus": ""
}
}
],
"location": "",
"message": ""
}
]
},
"httpErrorMessage": "",
"httpErrorStatusCode": 0,
"id": "",
"insertTime": "",
"instancesBulkInsertOperationMetadata": {
"machineType": "",
"perLocationStatus": {}
},
"kind": "",
"name": "",
"operationGroupId": "",
"operationType": "",
"progress": 0,
"region": "",
"selfLink": "",
"selfLinkWithId": "",
"setCommonInstanceMetadataOperationMetadata": {
"clientOperationId": "",
"perLocationOperations": {}
},
"startTime": "",
"status": "",
"statusMessage": "",
"targetId": "",
"targetLink": "",
"user": "",
"warnings": [
{
"code": "",
"data": [
{
"key": "",
"value": ""
}
],
"message": ""
}
],
"zone": ""
},
"selfLink": "",
"target": {
"config": {
"content": ""
},
"imports": [
{
"content": "",
"name": ""
}
]
},
"update": {
"description": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": ""
},
"updateTime": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"fingerprint": "",
"id": "",
"insertTime": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": "",
"name": "",
"operation": {
"clientOperationId": "",
"creationTimestamp": "",
"description": "",
"endTime": "",
"error": {
"errors": [
{
"arguments": [],
"code": "",
"debugInfo": {
"detail": "",
"stackEntries": []
},
"errorDetails": [
{
"errorInfo": {
"domain": "",
"metadatas": {},
"reason": ""
},
"help": {
"links": [
{
"description": "",
"url": ""
}
]
},
"localizedMessage": {
"locale": "",
"message": ""
},
"quotaInfo": {
"dimensions": {},
"futureLimit": "",
"limit": "",
"limitName": "",
"metricName": "",
"rolloutStatus": ""
}
}
],
"location": "",
"message": ""
}
]
},
"httpErrorMessage": "",
"httpErrorStatusCode": 0,
"id": "",
"insertTime": "",
"instancesBulkInsertOperationMetadata": {
"machineType": "",
"perLocationStatus": {}
},
"kind": "",
"name": "",
"operationGroupId": "",
"operationType": "",
"progress": 0,
"region": "",
"selfLink": "",
"selfLinkWithId": "",
"setCommonInstanceMetadataOperationMetadata": {
"clientOperationId": "",
"perLocationOperations": {}
},
"startTime": "",
"status": "",
"statusMessage": "",
"targetId": "",
"targetLink": "",
"user": "",
"warnings": [
{
"code": "",
"data": [
{
"key": "",
"value": ""
}
],
"message": ""
}
],
"zone": ""
},
"selfLink": "",
"target": {
"config": {
"content": ""
},
"imports": [
{
"content": "",
"name": ""
}
]
},
"update": {
"description": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": ""
},
"updateTime": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:deployment", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment"
payload = {
"description": "",
"fingerprint": "",
"id": "",
"insertTime": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": "",
"name": "",
"operation": {
"clientOperationId": "",
"creationTimestamp": "",
"description": "",
"endTime": "",
"error": { "errors": [
{
"arguments": [],
"code": "",
"debugInfo": {
"detail": "",
"stackEntries": []
},
"errorDetails": [
{
"errorInfo": {
"domain": "",
"metadatas": {},
"reason": ""
},
"help": { "links": [
{
"description": "",
"url": ""
}
] },
"localizedMessage": {
"locale": "",
"message": ""
},
"quotaInfo": {
"dimensions": {},
"futureLimit": "",
"limit": "",
"limitName": "",
"metricName": "",
"rolloutStatus": ""
}
}
],
"location": "",
"message": ""
}
] },
"httpErrorMessage": "",
"httpErrorStatusCode": 0,
"id": "",
"insertTime": "",
"instancesBulkInsertOperationMetadata": {
"machineType": "",
"perLocationStatus": {}
},
"kind": "",
"name": "",
"operationGroupId": "",
"operationType": "",
"progress": 0,
"region": "",
"selfLink": "",
"selfLinkWithId": "",
"setCommonInstanceMetadataOperationMetadata": {
"clientOperationId": "",
"perLocationOperations": {}
},
"startTime": "",
"status": "",
"statusMessage": "",
"targetId": "",
"targetLink": "",
"user": "",
"warnings": [
{
"code": "",
"data": [
{
"key": "",
"value": ""
}
],
"message": ""
}
],
"zone": ""
},
"selfLink": "",
"target": {
"config": { "content": "" },
"imports": [
{
"content": "",
"name": ""
}
]
},
"update": {
"description": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": ""
},
"updateTime": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment"
payload <- "{\n \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:deployment') do |req|
req.body = "{\n \"description\": \"\",\n \"fingerprint\": \"\",\n \"id\": \"\",\n \"insertTime\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\",\n \"name\": \"\",\n \"operation\": {\n \"clientOperationId\": \"\",\n \"creationTimestamp\": \"\",\n \"description\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"errors\": [\n {\n \"arguments\": [],\n \"code\": \"\",\n \"debugInfo\": {\n \"detail\": \"\",\n \"stackEntries\": []\n },\n \"errorDetails\": [\n {\n \"errorInfo\": {\n \"domain\": \"\",\n \"metadatas\": {},\n \"reason\": \"\"\n },\n \"help\": {\n \"links\": [\n {\n \"description\": \"\",\n \"url\": \"\"\n }\n ]\n },\n \"localizedMessage\": {\n \"locale\": \"\",\n \"message\": \"\"\n },\n \"quotaInfo\": {\n \"dimensions\": {},\n \"futureLimit\": \"\",\n \"limit\": \"\",\n \"limitName\": \"\",\n \"metricName\": \"\",\n \"rolloutStatus\": \"\"\n }\n }\n ],\n \"location\": \"\",\n \"message\": \"\"\n }\n ]\n },\n \"httpErrorMessage\": \"\",\n \"httpErrorStatusCode\": 0,\n \"id\": \"\",\n \"insertTime\": \"\",\n \"instancesBulkInsertOperationMetadata\": {\n \"machineType\": \"\",\n \"perLocationStatus\": {}\n },\n \"kind\": \"\",\n \"name\": \"\",\n \"operationGroupId\": \"\",\n \"operationType\": \"\",\n \"progress\": 0,\n \"region\": \"\",\n \"selfLink\": \"\",\n \"selfLinkWithId\": \"\",\n \"setCommonInstanceMetadataOperationMetadata\": {\n \"clientOperationId\": \"\",\n \"perLocationOperations\": {}\n },\n \"startTime\": \"\",\n \"status\": \"\",\n \"statusMessage\": \"\",\n \"targetId\": \"\",\n \"targetLink\": \"\",\n \"user\": \"\",\n \"warnings\": [\n {\n \"code\": \"\",\n \"data\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"message\": \"\"\n }\n ],\n \"zone\": \"\"\n },\n \"selfLink\": \"\",\n \"target\": {\n \"config\": {\n \"content\": \"\"\n },\n \"imports\": [\n {\n \"content\": \"\",\n \"name\": \"\"\n }\n ]\n },\n \"update\": {\n \"description\": \"\",\n \"labels\": [\n {\n \"key\": \"\",\n \"value\": \"\"\n }\n ],\n \"manifest\": \"\"\n },\n \"updateTime\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment";
let payload = json!({
"description": "",
"fingerprint": "",
"id": "",
"insertTime": "",
"labels": (
json!({
"key": "",
"value": ""
})
),
"manifest": "",
"name": "",
"operation": json!({
"clientOperationId": "",
"creationTimestamp": "",
"description": "",
"endTime": "",
"error": json!({"errors": (
json!({
"arguments": (),
"code": "",
"debugInfo": json!({
"detail": "",
"stackEntries": ()
}),
"errorDetails": (
json!({
"errorInfo": json!({
"domain": "",
"metadatas": json!({}),
"reason": ""
}),
"help": json!({"links": (
json!({
"description": "",
"url": ""
})
)}),
"localizedMessage": json!({
"locale": "",
"message": ""
}),
"quotaInfo": json!({
"dimensions": json!({}),
"futureLimit": "",
"limit": "",
"limitName": "",
"metricName": "",
"rolloutStatus": ""
})
})
),
"location": "",
"message": ""
})
)}),
"httpErrorMessage": "",
"httpErrorStatusCode": 0,
"id": "",
"insertTime": "",
"instancesBulkInsertOperationMetadata": json!({
"machineType": "",
"perLocationStatus": json!({})
}),
"kind": "",
"name": "",
"operationGroupId": "",
"operationType": "",
"progress": 0,
"region": "",
"selfLink": "",
"selfLinkWithId": "",
"setCommonInstanceMetadataOperationMetadata": json!({
"clientOperationId": "",
"perLocationOperations": json!({})
}),
"startTime": "",
"status": "",
"statusMessage": "",
"targetId": "",
"targetLink": "",
"user": "",
"warnings": (
json!({
"code": "",
"data": (
json!({
"key": "",
"value": ""
})
),
"message": ""
})
),
"zone": ""
}),
"selfLink": "",
"target": json!({
"config": json!({"content": ""}),
"imports": (
json!({
"content": "",
"name": ""
})
)
}),
"update": json!({
"description": "",
"labels": (
json!({
"key": "",
"value": ""
})
),
"manifest": ""
}),
"updateTime": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment \
--header 'content-type: application/json' \
--data '{
"description": "",
"fingerprint": "",
"id": "",
"insertTime": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": "",
"name": "",
"operation": {
"clientOperationId": "",
"creationTimestamp": "",
"description": "",
"endTime": "",
"error": {
"errors": [
{
"arguments": [],
"code": "",
"debugInfo": {
"detail": "",
"stackEntries": []
},
"errorDetails": [
{
"errorInfo": {
"domain": "",
"metadatas": {},
"reason": ""
},
"help": {
"links": [
{
"description": "",
"url": ""
}
]
},
"localizedMessage": {
"locale": "",
"message": ""
},
"quotaInfo": {
"dimensions": {},
"futureLimit": "",
"limit": "",
"limitName": "",
"metricName": "",
"rolloutStatus": ""
}
}
],
"location": "",
"message": ""
}
]
},
"httpErrorMessage": "",
"httpErrorStatusCode": 0,
"id": "",
"insertTime": "",
"instancesBulkInsertOperationMetadata": {
"machineType": "",
"perLocationStatus": {}
},
"kind": "",
"name": "",
"operationGroupId": "",
"operationType": "",
"progress": 0,
"region": "",
"selfLink": "",
"selfLinkWithId": "",
"setCommonInstanceMetadataOperationMetadata": {
"clientOperationId": "",
"perLocationOperations": {}
},
"startTime": "",
"status": "",
"statusMessage": "",
"targetId": "",
"targetLink": "",
"user": "",
"warnings": [
{
"code": "",
"data": [
{
"key": "",
"value": ""
}
],
"message": ""
}
],
"zone": ""
},
"selfLink": "",
"target": {
"config": {
"content": ""
},
"imports": [
{
"content": "",
"name": ""
}
]
},
"update": {
"description": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": ""
},
"updateTime": ""
}'
echo '{
"description": "",
"fingerprint": "",
"id": "",
"insertTime": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": "",
"name": "",
"operation": {
"clientOperationId": "",
"creationTimestamp": "",
"description": "",
"endTime": "",
"error": {
"errors": [
{
"arguments": [],
"code": "",
"debugInfo": {
"detail": "",
"stackEntries": []
},
"errorDetails": [
{
"errorInfo": {
"domain": "",
"metadatas": {},
"reason": ""
},
"help": {
"links": [
{
"description": "",
"url": ""
}
]
},
"localizedMessage": {
"locale": "",
"message": ""
},
"quotaInfo": {
"dimensions": {},
"futureLimit": "",
"limit": "",
"limitName": "",
"metricName": "",
"rolloutStatus": ""
}
}
],
"location": "",
"message": ""
}
]
},
"httpErrorMessage": "",
"httpErrorStatusCode": 0,
"id": "",
"insertTime": "",
"instancesBulkInsertOperationMetadata": {
"machineType": "",
"perLocationStatus": {}
},
"kind": "",
"name": "",
"operationGroupId": "",
"operationType": "",
"progress": 0,
"region": "",
"selfLink": "",
"selfLinkWithId": "",
"setCommonInstanceMetadataOperationMetadata": {
"clientOperationId": "",
"perLocationOperations": {}
},
"startTime": "",
"status": "",
"statusMessage": "",
"targetId": "",
"targetLink": "",
"user": "",
"warnings": [
{
"code": "",
"data": [
{
"key": "",
"value": ""
}
],
"message": ""
}
],
"zone": ""
},
"selfLink": "",
"target": {
"config": {
"content": ""
},
"imports": [
{
"content": "",
"name": ""
}
]
},
"update": {
"description": "",
"labels": [
{
"key": "",
"value": ""
}
],
"manifest": ""
},
"updateTime": ""
}' | \
http PUT {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "description": "",\n "fingerprint": "",\n "id": "",\n "insertTime": "",\n "labels": [\n {\n "key": "",\n "value": ""\n }\n ],\n "manifest": "",\n "name": "",\n "operation": {\n "clientOperationId": "",\n "creationTimestamp": "",\n "description": "",\n "endTime": "",\n "error": {\n "errors": [\n {\n "arguments": [],\n "code": "",\n "debugInfo": {\n "detail": "",\n "stackEntries": []\n },\n "errorDetails": [\n {\n "errorInfo": {\n "domain": "",\n "metadatas": {},\n "reason": ""\n },\n "help": {\n "links": [\n {\n "description": "",\n "url": ""\n }\n ]\n },\n "localizedMessage": {\n "locale": "",\n "message": ""\n },\n "quotaInfo": {\n "dimensions": {},\n "futureLimit": "",\n "limit": "",\n "limitName": "",\n "metricName": "",\n "rolloutStatus": ""\n }\n }\n ],\n "location": "",\n "message": ""\n }\n ]\n },\n "httpErrorMessage": "",\n "httpErrorStatusCode": 0,\n "id": "",\n "insertTime": "",\n "instancesBulkInsertOperationMetadata": {\n "machineType": "",\n "perLocationStatus": {}\n },\n "kind": "",\n "name": "",\n "operationGroupId": "",\n "operationType": "",\n "progress": 0,\n "region": "",\n "selfLink": "",\n "selfLinkWithId": "",\n "setCommonInstanceMetadataOperationMetadata": {\n "clientOperationId": "",\n "perLocationOperations": {}\n },\n "startTime": "",\n "status": "",\n "statusMessage": "",\n "targetId": "",\n "targetLink": "",\n "user": "",\n "warnings": [\n {\n "code": "",\n "data": [\n {\n "key": "",\n "value": ""\n }\n ],\n "message": ""\n }\n ],\n "zone": ""\n },\n "selfLink": "",\n "target": {\n "config": {\n "content": ""\n },\n "imports": [\n {\n "content": "",\n "name": ""\n }\n ]\n },\n "update": {\n "description": "",\n "labels": [\n {\n "key": "",\n "value": ""\n }\n ],\n "manifest": ""\n },\n "updateTime": ""\n}' \
--output-document \
- {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"description": "",
"fingerprint": "",
"id": "",
"insertTime": "",
"labels": [
[
"key": "",
"value": ""
]
],
"manifest": "",
"name": "",
"operation": [
"clientOperationId": "",
"creationTimestamp": "",
"description": "",
"endTime": "",
"error": ["errors": [
[
"arguments": [],
"code": "",
"debugInfo": [
"detail": "",
"stackEntries": []
],
"errorDetails": [
[
"errorInfo": [
"domain": "",
"metadatas": [],
"reason": ""
],
"help": ["links": [
[
"description": "",
"url": ""
]
]],
"localizedMessage": [
"locale": "",
"message": ""
],
"quotaInfo": [
"dimensions": [],
"futureLimit": "",
"limit": "",
"limitName": "",
"metricName": "",
"rolloutStatus": ""
]
]
],
"location": "",
"message": ""
]
]],
"httpErrorMessage": "",
"httpErrorStatusCode": 0,
"id": "",
"insertTime": "",
"instancesBulkInsertOperationMetadata": [
"machineType": "",
"perLocationStatus": []
],
"kind": "",
"name": "",
"operationGroupId": "",
"operationType": "",
"progress": 0,
"region": "",
"selfLink": "",
"selfLinkWithId": "",
"setCommonInstanceMetadataOperationMetadata": [
"clientOperationId": "",
"perLocationOperations": []
],
"startTime": "",
"status": "",
"statusMessage": "",
"targetId": "",
"targetLink": "",
"user": "",
"warnings": [
[
"code": "",
"data": [
[
"key": "",
"value": ""
]
],
"message": ""
]
],
"zone": ""
],
"selfLink": "",
"target": [
"config": ["content": ""],
"imports": [
[
"content": "",
"name": ""
]
]
],
"update": [
"description": "",
"labels": [
[
"key": "",
"value": ""
]
],
"manifest": ""
],
"updateTime": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
deploymentmanager.manifests.get
{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests/:manifest
QUERY PARAMS
project
deployment
manifest
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests/:manifest");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests/:manifest")
require "http/client"
url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests/:manifest"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests/:manifest"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests/:manifest");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests/:manifest"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests/:manifest HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests/:manifest")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests/:manifest"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests/:manifest")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests/:manifest")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests/:manifest');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests/:manifest'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests/:manifest';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests/:manifest',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests/:manifest")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests/:manifest',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests/:manifest'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests/:manifest');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests/:manifest'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests/:manifest';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests/:manifest"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests/:manifest" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests/:manifest",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests/:manifest');
echo $response->getBody();
setUrl('{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests/:manifest');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests/:manifest');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests/:manifest' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests/:manifest' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests/:manifest")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests/:manifest"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests/:manifest"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests/:manifest")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests/:manifest') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests/:manifest";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests/:manifest
http GET {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests/:manifest
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests/:manifest
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests/:manifest")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
deploymentmanager.manifests.list
{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests
QUERY PARAMS
project
deployment
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests")
require "http/client"
url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests');
echo $response->getBody();
setUrl('{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests
http GET {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/manifests")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
deploymentmanager.operations.get
{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations/:operation
QUERY PARAMS
project
operation
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations/:operation");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations/:operation")
require "http/client"
url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations/:operation"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations/:operation"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations/:operation");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations/:operation"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/deploymentmanager/v2/projects/:project/global/operations/:operation HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations/:operation")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations/:operation"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations/:operation")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations/:operation")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations/:operation');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations/:operation'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations/:operation';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations/:operation',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations/:operation")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/deploymentmanager/v2/projects/:project/global/operations/:operation',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations/:operation'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations/:operation');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations/:operation'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations/:operation';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations/:operation"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations/:operation" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations/:operation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations/:operation');
echo $response->getBody();
setUrl('{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations/:operation');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations/:operation');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations/:operation' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations/:operation' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/deploymentmanager/v2/projects/:project/global/operations/:operation")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations/:operation"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations/:operation"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations/:operation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/deploymentmanager/v2/projects/:project/global/operations/:operation') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations/:operation";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations/:operation
http GET {{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations/:operation
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations/:operation
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations/:operation")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
deploymentmanager.operations.list
{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations
QUERY PARAMS
project
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations")
require "http/client"
url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/deploymentmanager/v2/projects/:project/global/operations HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/deploymentmanager/v2/projects/:project/global/operations',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations');
echo $response->getBody();
setUrl('{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/deploymentmanager/v2/projects/:project/global/operations")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/deploymentmanager/v2/projects/:project/global/operations') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations
http GET {{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/operations")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
deploymentmanager.resources.get
{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources/:resource
QUERY PARAMS
project
deployment
resource
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources/:resource");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources/:resource")
require "http/client"
url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources/:resource"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources/:resource"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources/:resource");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources/:resource"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources/:resource HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources/:resource")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources/:resource"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources/:resource")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources/:resource")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources/:resource');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources/:resource'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources/:resource';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources/:resource',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources/:resource")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources/:resource',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources/:resource'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources/:resource');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources/:resource'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources/:resource';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources/:resource"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources/:resource" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources/:resource",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources/:resource');
echo $response->getBody();
setUrl('{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources/:resource');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources/:resource');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources/:resource' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources/:resource' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources/:resource")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources/:resource"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources/:resource"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources/:resource")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources/:resource') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources/:resource";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources/:resource
http GET {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources/:resource
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources/:resource
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources/:resource")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
deploymentmanager.resources.list
{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources
QUERY PARAMS
project
deployment
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources")
require "http/client"
url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources');
echo $response->getBody();
setUrl('{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources
http GET {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/deployments/:deployment/resources")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
deploymentmanager.types.list
{{baseUrl}}/deploymentmanager/v2/projects/:project/global/types
QUERY PARAMS
project
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/types");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/types")
require "http/client"
url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/types"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/types"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/types");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/types"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/deploymentmanager/v2/projects/:project/global/types HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/types")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/types"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/types")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/types")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/types');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/types'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/types';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/types',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/types")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/deploymentmanager/v2/projects/:project/global/types',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/types'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/types');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/types'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/types';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/deploymentmanager/v2/projects/:project/global/types"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/types" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/deploymentmanager/v2/projects/:project/global/types",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/types');
echo $response->getBody();
setUrl('{{baseUrl}}/deploymentmanager/v2/projects/:project/global/types');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/deploymentmanager/v2/projects/:project/global/types');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/types' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/deploymentmanager/v2/projects/:project/global/types' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/deploymentmanager/v2/projects/:project/global/types")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/types"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/types"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/deploymentmanager/v2/projects/:project/global/types")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/deploymentmanager/v2/projects/:project/global/types') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/types";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/deploymentmanager/v2/projects/:project/global/types
http GET {{baseUrl}}/deploymentmanager/v2/projects/:project/global/types
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/deploymentmanager/v2/projects/:project/global/types
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/deploymentmanager/v2/projects/:project/global/types")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()