Files
neon-api-python/tests/cassettes/test_integration/test_project.yaml
T

299 lines
15 KiB
YAML

interactions:
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Type:
- application/json
User-Agent:
- neon-client/python version=(0.1.0)
method: GET
uri: https://console.neon.tech/api/v2/projects
response:
body:
string: '{"projects":[{"id":"silent-pine-45061972","platform_id":"aws","region_id":"aws-us-east-2","name":"pytest-1011","provisioner":"k8s-neonvm","default_endpoint_settings":{"autoscaling_limit_min_cu":0,"autoscaling_limit_max_cu":0,"suspend_timeout_seconds":0},"settings":{"allowed_ips":{"primary_branch_only":false},"enable_logical_replication":false},"pg_version":15,"proxy_host":"us-east-2.aws.neon.tech","branch_logical_size_limit":3072,"branch_logical_size_limit_bytes":3221225472,"store_passwords":true,"active_time":312,"cpu_used_sec":84,"creation_source":"console","created_at":"2024-01-25T14:27:07Z","updated_at":"2024-01-25T14:27:09Z","synthetic_storage_size":32658808,"quota_reset_at":"2024-02-01T00:00:00Z","owner_id":"838386f6-b5f1-4c3b-89a2-4f5a130ef3de"}],"pagination":{"cursor":"silent-pine-45061972"}}'
headers:
Connection:
- keep-alive
Content-Length:
- '811'
Content-Type:
- application/json
Date:
- Thu, 25 Jan 2024 15:57:47 GMT
Strict-Transport-Security:
- max-age=15724800; includeSubDomains
Vary:
- Origin
X-Neon-Ret-Request-Id:
- a5d4e69b0b4f61933d29dadb2e796beb
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Length:
- '0'
Content-Type:
- application/json
User-Agent:
- neon-client/python version=(0.1.0)
method: DELETE
uri: https://console.neon.tech/api/v2/projects/silent-pine-45061972
response:
body:
string: '{"project":{"data_storage_bytes_hour":65317616,"data_transfer_bytes":0,"written_data_bytes":32073176,"compute_time_seconds":84,"active_time_seconds":312,"cpu_used_sec":84,"id":"silent-pine-45061972","platform_id":"aws","region_id":"aws-us-east-2","name":"pytest-1011","provisioner":"k8s-neonvm","default_endpoint_settings":{"autoscaling_limit_min_cu":0.25,"autoscaling_limit_max_cu":0.25,"suspend_timeout_seconds":0},"settings":{"allowed_ips":{"ips":[],"primary_branch_only":false},"enable_logical_replication":false},"pg_version":15,"proxy_host":"us-east-2.aws.neon.tech","branch_logical_size_limit":3072,"branch_logical_size_limit_bytes":3221225472,"store_passwords":true,"creation_source":"console","history_retention_seconds":604800,"created_at":"2024-01-25T14:27:07Z","updated_at":"2024-01-25T14:27:09Z","synthetic_storage_size":32658808,"consumption_period_start":"0001-01-01T00:00:00Z","consumption_period_end":"0001-01-01T00:00:00Z","owner_id":"838386f6-b5f1-4c3b-89a2-4f5a130ef3de"}}'
headers:
Connection:
- keep-alive
Content-Length:
- '992'
Content-Type:
- application/json
Date:
- Thu, 25 Jan 2024 15:57:47 GMT
Strict-Transport-Security:
- max-age=15724800; includeSubDomains
Vary:
- Origin
X-Neon-Ret-Request-Id:
- 55730e33b2c3af9c57d58a08ca2c55a7
status:
code: 200
message: OK
- request:
body: '{"project": {"name": "pytest-8512"}}'
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Length:
- '36'
Content-Type:
- application/json
User-Agent:
- neon-client/python version=(0.1.0)
method: POST
uri: https://console.neon.tech/api/v2/projects
response:
body:
string: '{"project":{"data_storage_bytes_hour":0,"data_transfer_bytes":0,"written_data_bytes":0,"compute_time_seconds":0,"active_time_seconds":0,"cpu_used_sec":0,"id":"super-lab-49305559","platform_id":"aws","region_id":"aws-us-east-2","name":"pytest-8512","provisioner":"k8s-neonvm","default_endpoint_settings":{"autoscaling_limit_min_cu":0.25,"autoscaling_limit_max_cu":0.25,"suspend_timeout_seconds":0},"settings":{"allowed_ips":{"ips":[],"primary_branch_only":false},"enable_logical_replication":false},"pg_version":15,"proxy_host":"us-east-2.aws.neon.tech","branch_logical_size_limit":3072,"branch_logical_size_limit_bytes":3221225472,"store_passwords":true,"creation_source":"console","history_retention_seconds":604800,"created_at":"2024-01-25T15:57:47Z","updated_at":"2024-01-25T15:57:47Z","consumption_period_start":"0001-01-01T00:00:00Z","consumption_period_end":"0001-01-01T00:00:00Z","owner_id":"838386f6-b5f1-4c3b-89a2-4f5a130ef3de"},"connection_uris":[{"connection_uri":"postgres://kennethreitz:ZoI8HOCzy2Fq@ep-winter-fog-a5o423he.us-east-2.aws.neon.tech/neondb","connection_parameters":{"database":"neondb","password":"ZoI8HOCzy2Fq","role":"kennethreitz","host":"ep-winter-fog-a5o423he.us-east-2.aws.neon.tech","pooler_host":"ep-winter-fog-a5o423he-pooler.us-east-2.aws.neon.tech"}}],"roles":[{"branch_id":"br-sparkling-limit-a5jhvx7d","name":"kennethreitz","password":"ZoI8HOCzy2Fq","protected":false,"created_at":"2024-01-25T15:57:47Z","updated_at":"2024-01-25T15:57:47Z"}],"databases":[{"id":32656135,"branch_id":"br-sparkling-limit-a5jhvx7d","name":"neondb","owner_name":"kennethreitz","created_at":"2024-01-25T15:57:47Z","updated_at":"2024-01-25T15:57:47Z"}],"operations":[{"id":"eda64e91-c153-4298-b673-ef527bf283de","project_id":"super-lab-49305559","branch_id":"br-sparkling-limit-a5jhvx7d","action":"create_timeline","status":"running","failures_count":0,"created_at":"2024-01-25T15:57:47Z","updated_at":"2024-01-25T15:57:47Z","total_duration_ms":0},{"id":"b91c654b-fa13-48d5-95db-7527481de5de","project_id":"super-lab-49305559","branch_id":"br-sparkling-limit-a5jhvx7d","endpoint_id":"ep-winter-fog-a5o423he","action":"start_compute","status":"scheduling","failures_count":0,"created_at":"2024-01-25T15:57:47Z","updated_at":"2024-01-25T15:57:47Z","total_duration_ms":0}],"branch":{"id":"br-sparkling-limit-a5jhvx7d","project_id":"super-lab-49305559","name":"main","current_state":"init","pending_state":"ready","creation_source":"console","primary":true,"cpu_used_sec":0,"compute_time_seconds":0,"active_time_seconds":0,"written_data_bytes":0,"data_transfer_bytes":0,"created_at":"2024-01-25T15:57:47Z","updated_at":"2024-01-25T15:57:47Z"},"endpoints":[{"host":"ep-winter-fog-a5o423he.us-east-2.aws.neon.tech","id":"ep-winter-fog-a5o423he","project_id":"super-lab-49305559","branch_id":"br-sparkling-limit-a5jhvx7d","autoscaling_limit_min_cu":0.25,"autoscaling_limit_max_cu":0.25,"region_id":"aws-us-east-2","type":"read_write","current_state":"init","pending_state":"active","settings":{},"pooler_enabled":false,"pooler_mode":"transaction","disabled":false,"passwordless_access":true,"creation_source":"console","created_at":"2024-01-25T15:57:47Z","updated_at":"2024-01-25T15:57:47Z","proxy_host":"us-east-2.aws.neon.tech","suspend_timeout_seconds":0,"provisioner":"k8s-neonvm"}]}'
headers:
Connection:
- keep-alive
Content-Type:
- application/json
Date:
- Thu, 25 Jan 2024 15:57:47 GMT
Strict-Transport-Security:
- max-age=15724800; includeSubDomains
Transfer-Encoding:
- chunked
Vary:
- Origin
X-Neon-Ret-Request-Id:
- 410c2128ae97bf7d61ebde01ceea3793
status:
code: 201
message: Created
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Type:
- application/json
User-Agent:
- neon-client/python version=(0.1.0)
method: GET
uri: https://console.neon.tech/api/v2/projects/super-lab-49305559
response:
body:
string: '{"project":{"data_storage_bytes_hour":0,"data_transfer_bytes":0,"written_data_bytes":0,"compute_time_seconds":0,"active_time_seconds":0,"cpu_used_sec":0,"id":"super-lab-49305559","platform_id":"aws","region_id":"aws-us-east-2","name":"pytest-8512","provisioner":"k8s-neonvm","default_endpoint_settings":{"autoscaling_limit_min_cu":0.25,"autoscaling_limit_max_cu":0.25,"suspend_timeout_seconds":0},"settings":{"allowed_ips":{"ips":[],"primary_branch_only":false},"enable_logical_replication":false},"pg_version":15,"proxy_host":"us-east-2.aws.neon.tech","branch_logical_size_limit":3072,"branch_logical_size_limit_bytes":3221225472,"store_passwords":true,"creation_source":"console","history_retention_seconds":604800,"created_at":"2024-01-25T15:57:47Z","updated_at":"2024-01-25T15:57:47Z","synthetic_storage_size":0,"consumption_period_start":"2024-01-13T02:10:30Z","consumption_period_end":"2024-02-01T00:00:00Z","quota_reset_at":"2024-02-01T00:00:00Z","owner_id":"838386f6-b5f1-4c3b-89a2-4f5a130ef3de","owner":{"email":"me@kennethreitz.org","branches_limit":10,"subscription_type":"free"}}}'
headers:
Connection:
- keep-alive
Content-Length:
- '1092'
Content-Type:
- application/json
Date:
- Thu, 25 Jan 2024 15:57:47 GMT
Strict-Transport-Security:
- max-age=15724800; includeSubDomains
Vary:
- Origin
X-Neon-Ret-Request-Id:
- 56cbdf88e090e62e31c8c6215d543e1c
status:
code: 200
message: OK
- request:
body: '{"project": {"name": "pytest-3457"}}'
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Length:
- '36'
Content-Type:
- application/json
User-Agent:
- neon-client/python version=(0.1.0)
method: PATCH
uri: https://console.neon.tech/api/v2/projects/super-lab-49305559
response:
body:
string: '{"project":{"data_storage_bytes_hour":0,"data_transfer_bytes":0,"written_data_bytes":0,"compute_time_seconds":0,"active_time_seconds":0,"cpu_used_sec":0,"id":"super-lab-49305559","platform_id":"aws","region_id":"aws-us-east-2","name":"pytest-3457","provisioner":"k8s-neonvm","default_endpoint_settings":{"autoscaling_limit_min_cu":0.25,"autoscaling_limit_max_cu":0.25,"suspend_timeout_seconds":0},"settings":{"allowed_ips":{"ips":[],"primary_branch_only":false},"enable_logical_replication":false},"pg_version":15,"proxy_host":"us-east-2.aws.neon.tech","branch_logical_size_limit":3072,"branch_logical_size_limit_bytes":3221225472,"store_passwords":true,"creation_source":"console","history_retention_seconds":604800,"created_at":"2024-01-25T15:57:47Z","updated_at":"2024-01-25T15:57:47Z","synthetic_storage_size":0,"consumption_period_start":"0001-01-01T00:00:00Z","consumption_period_end":"0001-01-01T00:00:00Z","owner_id":"838386f6-b5f1-4c3b-89a2-4f5a130ef3de"},"operations":[]}'
headers:
Connection:
- keep-alive
Content-Length:
- '981'
Content-Type:
- application/json
Date:
- Thu, 25 Jan 2024 15:57:47 GMT
Strict-Transport-Security:
- max-age=15724800; includeSubDomains
Vary:
- Origin
X-Neon-Ret-Request-Id:
- d1d56bdad396884634f814b75264026a
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Type:
- application/json
User-Agent:
- neon-client/python version=(0.1.0)
method: GET
uri: https://console.neon.tech/api/v2/projects
response:
body:
string: '{"projects":[{"id":"super-lab-49305559","platform_id":"aws","region_id":"aws-us-east-2","name":"pytest-3457","provisioner":"k8s-neonvm","default_endpoint_settings":{"autoscaling_limit_min_cu":0,"autoscaling_limit_max_cu":0,"suspend_timeout_seconds":0},"settings":{"allowed_ips":{"primary_branch_only":false},"enable_logical_replication":false},"pg_version":15,"proxy_host":"us-east-2.aws.neon.tech","branch_logical_size_limit":3072,"branch_logical_size_limit_bytes":3221225472,"store_passwords":true,"active_time":0,"cpu_used_sec":0,"creation_source":"console","created_at":"2024-01-25T15:57:47Z","updated_at":"2024-01-25T15:57:47Z","synthetic_storage_size":0,"quota_reset_at":"2024-02-01T00:00:00Z","owner_id":"838386f6-b5f1-4c3b-89a2-4f5a130ef3de"}],"pagination":{"cursor":"super-lab-49305559"}}'
headers:
Connection:
- keep-alive
Content-Length:
- '797'
Content-Type:
- application/json
Date:
- Thu, 25 Jan 2024 15:57:47 GMT
Strict-Transport-Security:
- max-age=15724800; includeSubDomains
Vary:
- Origin
X-Neon-Ret-Request-Id:
- 862933986dbbe6776c7dda98c550f11b
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Type:
- application/json
User-Agent:
- neon-client/python version=(0.1.0)
method: GET
uri: https://console.neon.tech/api/v2/projects/shared
response:
body:
string: '{"projects":[]}'
headers:
Connection:
- keep-alive
Content-Length:
- '15'
Content-Type:
- application/json
Date:
- Thu, 25 Jan 2024 15:57:47 GMT
Strict-Transport-Security:
- max-age=15724800; includeSubDomains
Vary:
- Origin
X-Neon-Ret-Request-Id:
- be75936654fe234a16016f9514557189
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Length:
- '0'
Content-Type:
- application/json
User-Agent:
- neon-client/python version=(0.1.0)
method: DELETE
uri: https://console.neon.tech/api/v2/projects/super-lab-49305559
response:
body:
string: '{"project":{"data_storage_bytes_hour":0,"data_transfer_bytes":0,"written_data_bytes":0,"compute_time_seconds":0,"active_time_seconds":0,"cpu_used_sec":0,"id":"super-lab-49305559","platform_id":"aws","region_id":"aws-us-east-2","name":"pytest-3457","provisioner":"k8s-neonvm","default_endpoint_settings":{"autoscaling_limit_min_cu":0.25,"autoscaling_limit_max_cu":0.25,"suspend_timeout_seconds":0},"settings":{"allowed_ips":{"ips":[],"primary_branch_only":false},"enable_logical_replication":false},"pg_version":15,"proxy_host":"us-east-2.aws.neon.tech","branch_logical_size_limit":3072,"branch_logical_size_limit_bytes":3221225472,"store_passwords":true,"creation_source":"console","history_retention_seconds":604800,"created_at":"2024-01-25T15:57:47Z","updated_at":"2024-01-25T15:57:47Z","synthetic_storage_size":0,"consumption_period_start":"0001-01-01T00:00:00Z","consumption_period_end":"0001-01-01T00:00:00Z","owner_id":"838386f6-b5f1-4c3b-89a2-4f5a130ef3de"}}'
headers:
Connection:
- keep-alive
Content-Length:
- '965'
Content-Type:
- application/json
Date:
- Thu, 25 Jan 2024 15:57:48 GMT
Strict-Transport-Security:
- max-age=15724800; includeSubDomains
Vary:
- Origin
X-Neon-Ret-Request-Id:
- 69b49cbf4608fd6738b3ec4fd185e16a
status:
code: 200
message: OK
version: 1