Secrets
Get secrets
read the specified Secret
GET
/
apis
/
cloud.streamnative.io
/
v1alpha1
/
namespaces
/
{namespace}
/
secrets
/
{name}
Get secrets
curl --request GET \
--url https://api.example.com/apis/cloud.streamnative.io/v1alpha1/namespaces/{namespace}/secrets/{name}import requests
url = "https://api.example.com/apis/cloud.streamnative.io/v1alpha1/namespaces/{namespace}/secrets/{name}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/apis/cloud.streamnative.io/v1alpha1/namespaces/{namespace}/secrets/{name}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/apis/cloud.streamnative.io/v1alpha1/namespaces/{namespace}/secrets/{name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/apis/cloud.streamnative.io/v1alpha1/namespaces/{namespace}/secrets/{name}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/apis/cloud.streamnative.io/v1alpha1/namespaces/{namespace}/secrets/{name}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/apis/cloud.streamnative.io/v1alpha1/namespaces/{namespace}/secrets/{name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"instanceName": "",
"location": "",
"apiVersion": "<string>",
"data": {},
"kind": "<string>",
"metadata": {},
"poolMemberRef": {},
"spec": {},
"status": {},
"tolerations": [
{}
]
}Path Parameters
Response
OK
Secret
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Was this page helpful?
⌘I
Get secrets
curl --request GET \
--url https://api.example.com/apis/cloud.streamnative.io/v1alpha1/namespaces/{namespace}/secrets/{name}import requests
url = "https://api.example.com/apis/cloud.streamnative.io/v1alpha1/namespaces/{namespace}/secrets/{name}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/apis/cloud.streamnative.io/v1alpha1/namespaces/{namespace}/secrets/{name}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/apis/cloud.streamnative.io/v1alpha1/namespaces/{namespace}/secrets/{name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/apis/cloud.streamnative.io/v1alpha1/namespaces/{namespace}/secrets/{name}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/apis/cloud.streamnative.io/v1alpha1/namespaces/{namespace}/secrets/{name}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/apis/cloud.streamnative.io/v1alpha1/namespaces/{namespace}/secrets/{name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"instanceName": "",
"location": "",
"apiVersion": "<string>",
"data": {},
"kind": "<string>",
"metadata": {},
"poolMemberRef": {},
"spec": {},
"status": {},
"tolerations": [
{}
]
}