GET
/
cloud
/
v1
/
secrets
/
{project_id}
/
{region_id}
/
{secret_id}
import os
from gcore import Gcore

client = Gcore(
    api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
)
secret = client.cloud.secrets.get(
    secret_id="bfc7824b-31b6-4a28-a0c4-7df137139215",
    project_id=1,
    region_id=1,
)
print(secret.id)
{
  "algorithm": "aes",
  "bit_length": 256,
  "content_types": {
    "default": "application/octet-stream"
  },
  "created": "2023-03-23T20:00:00+00:00",
  "expiration": "2023-06-23T20:00:00+00:00",
  "id": "bfc7824b-31b6-4a28-a0c4-7df137139215",
  "mode": "cbc",
  "name": "AES key",
  "secret_type": "opaque",
  "status": "ACTIVE"
}

Authorizations

APIKey
string
header
required

API key for authentication.

Path Parameters

project_id
integer
required

Project ID

Examples:

1

region_id
integer
required

Region ID

Examples:

1

secret_id
string
required

Secret ID

Examples:

"bfc7824b-31b6-4a28-a0c4-7df137139215"

Response

200 - application/json

OK

The response is of type object.