Skip to main content
PATCH
/
cdn
/
logs_uploader
/
targets
/
{id}
Python
import os
from gcore import Gcore

client = Gcore(
    api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
)
logs_uploader_target = client.cdn.logs_uploader.targets.update(
    id=0,
)
print(logs_uploader_target.id)
{
  "id": 123,
  "client_id": 123,
  "created": "2023-11-07T05:31:56Z",
  "updated": "2023-11-07T05:31:56Z",
  "storage_type": "s3_gcore",
  "name": "<string>",
  "description": "<string>",
  "related_uploader_configs": [
    123
  ],
  "status": {
    "status": "in_progress",
    "code": 123,
    "updated": "2023-11-07T05:31:56Z",
    "details": "<string>"
  },
  "config": {
    "access_key_id": "<string>",
    "region": "<string>",
    "bucket_name": "<string>",
    "directory": "<string>",
    "endpoint": "<string>",
    "use_path_style": true
  }
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Path Parameters

id
integer
required

Body

application/json
storage_type
enum<string>

Type of storage for logs.

Available options:
s3_gcore,
s3_amazon,
s3_oss,
s3_other,
s3_v1,
ftp,
sftp,
http
name
string

Name of the target.

Maximum string length: 255
description
string

Description of the target.

Maximum string length: 255
config
S3 Gcore Config · object

Config for specific storage type.

  • S3 Gcore Config
  • S3 Amazon Config
  • S3 OSS Config
  • S3 Other Config
  • S3 V1 Config
  • FTP Config
  • SFTP Config
  • HTTP Config

Response

Successful.

id
integer
client_id
integer

Client that owns the target.

created
string<date-time>

Time when logs uploader target was created.

updated
string<date-time>

Time when logs uploader target was updated.

storage_type
enum<string>

Type of storage for logs.

Available options:
s3_gcore,
s3_amazon,
s3_oss,
s3_other,
s3_v1,
ftp,
sftp,
http
name
string

Name of the target.

Maximum string length: 255
description
string

Description of the target.

Maximum string length: 255

List of logs uploader configs that use this target.

status
object

Validation status of the logs uploader target. Informs if the specified target is reachable.

config
S3 Gcore Config · object

Config for specific storage type.

  • S3 Gcore Config
  • S3 Amazon Config
  • S3 OSS Config
  • S3 Other Config
  • S3 V1 Config
  • FTP Config
  • SFTP Config
  • HTTP Config