From 13727be95d775d25c0b6ffcf29b4de52f5e70ee5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Ole=C5=9B?= Date: Mon, 6 Jul 2026 10:13:20 +0200 Subject: [PATCH 1/2] Update to the latest spec --- koyeb/api/.openapi-generator/FILES | 48 + koyeb/api/__init__.py | 32 + koyeb/api/api/__init__.py | 1 + koyeb/api/api/instance_snapshots_api.py | 1565 ++ koyeb/api/api_client.py | 8 +- koyeb/api/configuration.py | 17 +- koyeb/api/docs/CreateInstanceSnapshotReply.md | 29 + .../api/docs/CreateInstanceSnapshotRequest.md | 31 + koyeb/api/docs/CreateService.md | 2 + koyeb/api/docs/DeleteInstanceSnapshotReply.md | 29 + koyeb/api/docs/Deployment.md | 2 + koyeb/api/docs/DeploymentDefinition.md | 3 +- koyeb/api/docs/DeploymentListItem.md | 2 + koyeb/api/docs/EgressPolicy.md | 30 + koyeb/api/docs/EgressPolicyMode.md | 12 + koyeb/api/docs/GetInstanceSnapshotReply.md | 29 + koyeb/api/docs/InstanceSnapshot.md | 44 + koyeb/api/docs/InstanceSnapshotEvent.md | 35 + koyeb/api/docs/InstanceSnapshotQuotas.md | 30 + koyeb/api/docs/InstanceSnapshotStatus.md | 20 + koyeb/api/docs/InstanceSnapshotType.md | 14 + koyeb/api/docs/InstanceSnapshotsApi.md | 435 + .../docs/ListInstanceSnapshotEventsReply.md | 33 + koyeb/api/docs/ListInstanceSnapshotsReply.md | 33 + koyeb/api/docs/NetworkPolicy.md | 29 + koyeb/api/docs/NetworkPolicyDestination.md | 29 + koyeb/api/docs/Quotas.md | 1 + koyeb/api/docs/RegionalDeployment.md | 1 + .../api/docs/RegionalDeploymentDefinition.md | 1 + koyeb/api/docs/RegionalDeploymentListItem.md | 1 + koyeb/api/docs/UpdateService.md | 1 + koyeb/api/models/__init__.py | 15 + .../models/create_instance_snapshot_reply.py | 92 + .../create_instance_snapshot_request.py | 93 + koyeb/api/models/create_service.py | 8 +- .../models/delete_instance_snapshot_reply.py | 92 + koyeb/api/models/deployment.py | 8 +- koyeb/api/models/deployment_definition.py | 12 +- koyeb/api/models/deployment_list_item.py | 6 +- koyeb/api/models/egress_policy.py | 99 + koyeb/api/models/egress_policy_mode.py | 37 + .../api/models/get_instance_snapshot_reply.py | 92 + koyeb/api/models/instance_snapshot.py | 121 + koyeb/api/models/instance_snapshot_event.py | 101 + koyeb/api/models/instance_snapshot_quotas.py | 90 + koyeb/api/models/instance_snapshot_status.py | 41 + koyeb/api/models/instance_snapshot_type.py | 38 + .../list_instance_snapshot_events_reply.py | 104 + .../models/list_instance_snapshots_reply.py | 104 + koyeb/api/models/network_policy.py | 92 + .../api/models/network_policy_destination.py | 88 + koyeb/api/models/quotas.py | 10 +- koyeb/api/models/regional_deployment.py | 4 +- .../models/regional_deployment_definition.py | 8 +- .../models/regional_deployment_list_item.py | 6 +- koyeb/api/models/update_service.py | 8 +- .../test_create_instance_snapshot_reply.py | 69 + .../test_create_instance_snapshot_request.py | 53 + .../test_delete_instance_snapshot_reply.py | 69 + koyeb/api/test/test_egress_policy.py | 55 + koyeb/api/test/test_egress_policy_mode.py | 33 + .../test/test_get_instance_snapshot_reply.py | 69 + koyeb/api/test/test_instance_snapshot.py | 68 + .../api/test/test_instance_snapshot_event.py | 57 + .../api/test/test_instance_snapshot_quotas.py | 52 + .../api/test/test_instance_snapshot_status.py | 33 + koyeb/api/test/test_instance_snapshot_type.py | 33 + koyeb/api/test/test_instance_snapshots_api.py | 61 + ...est_list_instance_snapshot_events_reply.py | 64 + .../test_list_instance_snapshots_reply.py | 75 + koyeb/api/test/test_network_policy.py | 56 + .../test/test_network_policy_destination.py | 51 + koyeb/api_README.md | 20 + koyeb/api_async/.openapi-generator/FILES | 48 + koyeb/api_async/__init__.py | 32 + koyeb/api_async/api/__init__.py | 1 + koyeb/api_async/api/instance_snapshots_api.py | 1565 ++ koyeb/api_async/configuration.py | 17 +- .../docs/CreateInstanceSnapshotReply.md | 29 + .../docs/CreateInstanceSnapshotRequest.md | 31 + koyeb/api_async/docs/CreateService.md | 2 + .../docs/DeleteInstanceSnapshotReply.md | 29 + koyeb/api_async/docs/Deployment.md | 2 + koyeb/api_async/docs/DeploymentDefinition.md | 3 +- koyeb/api_async/docs/DeploymentListItem.md | 2 + koyeb/api_async/docs/EgressPolicy.md | 30 + koyeb/api_async/docs/EgressPolicyMode.md | 12 + .../docs/GetInstanceSnapshotReply.md | 29 + koyeb/api_async/docs/InstanceSnapshot.md | 44 + koyeb/api_async/docs/InstanceSnapshotEvent.md | 35 + .../api_async/docs/InstanceSnapshotQuotas.md | 30 + .../api_async/docs/InstanceSnapshotStatus.md | 20 + koyeb/api_async/docs/InstanceSnapshotType.md | 14 + koyeb/api_async/docs/InstanceSnapshotsApi.md | 435 + .../docs/ListInstanceSnapshotEventsReply.md | 33 + .../docs/ListInstanceSnapshotsReply.md | 33 + koyeb/api_async/docs/NetworkPolicy.md | 29 + .../docs/NetworkPolicyDestination.md | 29 + koyeb/api_async/docs/Quotas.md | 1 + koyeb/api_async/docs/RegionalDeployment.md | 1 + .../docs/RegionalDeploymentDefinition.md | 1 + .../docs/RegionalDeploymentListItem.md | 1 + koyeb/api_async/docs/UpdateService.md | 1 + koyeb/api_async/models/__init__.py | 15 + .../models/create_instance_snapshot_reply.py | 92 + .../create_instance_snapshot_request.py | 93 + koyeb/api_async/models/create_service.py | 8 +- .../models/delete_instance_snapshot_reply.py | 92 + koyeb/api_async/models/deployment.py | 8 +- .../api_async/models/deployment_definition.py | 12 +- .../api_async/models/deployment_list_item.py | 6 +- koyeb/api_async/models/egress_policy.py | 99 + koyeb/api_async/models/egress_policy_mode.py | 37 + .../models/get_instance_snapshot_reply.py | 92 + koyeb/api_async/models/instance_snapshot.py | 121 + .../models/instance_snapshot_event.py | 101 + .../models/instance_snapshot_quotas.py | 90 + .../models/instance_snapshot_status.py | 41 + .../models/instance_snapshot_type.py | 38 + .../list_instance_snapshot_events_reply.py | 104 + .../models/list_instance_snapshots_reply.py | 104 + koyeb/api_async/models/network_policy.py | 92 + .../models/network_policy_destination.py | 88 + koyeb/api_async/models/quotas.py | 10 +- koyeb/api_async/models/regional_deployment.py | 4 +- .../models/regional_deployment_definition.py | 8 +- .../models/regional_deployment_list_item.py | 6 +- koyeb/api_async/models/update_service.py | 8 +- .../test_create_instance_snapshot_reply.py | 69 + .../test_create_instance_snapshot_request.py | 53 + .../test_delete_instance_snapshot_reply.py | 69 + koyeb/api_async/test/test_egress_policy.py | 55 + .../api_async/test/test_egress_policy_mode.py | 33 + .../test/test_get_instance_snapshot_reply.py | 69 + .../api_async/test/test_instance_snapshot.py | 68 + .../test/test_instance_snapshot_event.py | 57 + .../test/test_instance_snapshot_quotas.py | 52 + .../test/test_instance_snapshot_status.py | 33 + .../test/test_instance_snapshot_type.py | 33 + .../test/test_instance_snapshots_api.py | 61 + ...est_list_instance_snapshot_events_reply.py | 64 + .../test_list_instance_snapshots_reply.py | 75 + koyeb/api_async/test/test_network_policy.py | 56 + .../test/test_network_policy_destination.py | 51 + koyeb/api_async_README.md | 20 + spec/openapi.json | 17793 ++++++++-------- 146 files changed, 18833 insertions(+), 8620 deletions(-) create mode 100644 koyeb/api/api/instance_snapshots_api.py create mode 100644 koyeb/api/docs/CreateInstanceSnapshotReply.md create mode 100644 koyeb/api/docs/CreateInstanceSnapshotRequest.md create mode 100644 koyeb/api/docs/DeleteInstanceSnapshotReply.md create mode 100644 koyeb/api/docs/EgressPolicy.md create mode 100644 koyeb/api/docs/EgressPolicyMode.md create mode 100644 koyeb/api/docs/GetInstanceSnapshotReply.md create mode 100644 koyeb/api/docs/InstanceSnapshot.md create mode 100644 koyeb/api/docs/InstanceSnapshotEvent.md create mode 100644 koyeb/api/docs/InstanceSnapshotQuotas.md create mode 100644 koyeb/api/docs/InstanceSnapshotStatus.md create mode 100644 koyeb/api/docs/InstanceSnapshotType.md create mode 100644 koyeb/api/docs/InstanceSnapshotsApi.md create mode 100644 koyeb/api/docs/ListInstanceSnapshotEventsReply.md create mode 100644 koyeb/api/docs/ListInstanceSnapshotsReply.md create mode 100644 koyeb/api/docs/NetworkPolicy.md create mode 100644 koyeb/api/docs/NetworkPolicyDestination.md create mode 100644 koyeb/api/models/create_instance_snapshot_reply.py create mode 100644 koyeb/api/models/create_instance_snapshot_request.py create mode 100644 koyeb/api/models/delete_instance_snapshot_reply.py create mode 100644 koyeb/api/models/egress_policy.py create mode 100644 koyeb/api/models/egress_policy_mode.py create mode 100644 koyeb/api/models/get_instance_snapshot_reply.py create mode 100644 koyeb/api/models/instance_snapshot.py create mode 100644 koyeb/api/models/instance_snapshot_event.py create mode 100644 koyeb/api/models/instance_snapshot_quotas.py create mode 100644 koyeb/api/models/instance_snapshot_status.py create mode 100644 koyeb/api/models/instance_snapshot_type.py create mode 100644 koyeb/api/models/list_instance_snapshot_events_reply.py create mode 100644 koyeb/api/models/list_instance_snapshots_reply.py create mode 100644 koyeb/api/models/network_policy.py create mode 100644 koyeb/api/models/network_policy_destination.py create mode 100644 koyeb/api/test/test_create_instance_snapshot_reply.py create mode 100644 koyeb/api/test/test_create_instance_snapshot_request.py create mode 100644 koyeb/api/test/test_delete_instance_snapshot_reply.py create mode 100644 koyeb/api/test/test_egress_policy.py create mode 100644 koyeb/api/test/test_egress_policy_mode.py create mode 100644 koyeb/api/test/test_get_instance_snapshot_reply.py create mode 100644 koyeb/api/test/test_instance_snapshot.py create mode 100644 koyeb/api/test/test_instance_snapshot_event.py create mode 100644 koyeb/api/test/test_instance_snapshot_quotas.py create mode 100644 koyeb/api/test/test_instance_snapshot_status.py create mode 100644 koyeb/api/test/test_instance_snapshot_type.py create mode 100644 koyeb/api/test/test_instance_snapshots_api.py create mode 100644 koyeb/api/test/test_list_instance_snapshot_events_reply.py create mode 100644 koyeb/api/test/test_list_instance_snapshots_reply.py create mode 100644 koyeb/api/test/test_network_policy.py create mode 100644 koyeb/api/test/test_network_policy_destination.py create mode 100644 koyeb/api_async/api/instance_snapshots_api.py create mode 100644 koyeb/api_async/docs/CreateInstanceSnapshotReply.md create mode 100644 koyeb/api_async/docs/CreateInstanceSnapshotRequest.md create mode 100644 koyeb/api_async/docs/DeleteInstanceSnapshotReply.md create mode 100644 koyeb/api_async/docs/EgressPolicy.md create mode 100644 koyeb/api_async/docs/EgressPolicyMode.md create mode 100644 koyeb/api_async/docs/GetInstanceSnapshotReply.md create mode 100644 koyeb/api_async/docs/InstanceSnapshot.md create mode 100644 koyeb/api_async/docs/InstanceSnapshotEvent.md create mode 100644 koyeb/api_async/docs/InstanceSnapshotQuotas.md create mode 100644 koyeb/api_async/docs/InstanceSnapshotStatus.md create mode 100644 koyeb/api_async/docs/InstanceSnapshotType.md create mode 100644 koyeb/api_async/docs/InstanceSnapshotsApi.md create mode 100644 koyeb/api_async/docs/ListInstanceSnapshotEventsReply.md create mode 100644 koyeb/api_async/docs/ListInstanceSnapshotsReply.md create mode 100644 koyeb/api_async/docs/NetworkPolicy.md create mode 100644 koyeb/api_async/docs/NetworkPolicyDestination.md create mode 100644 koyeb/api_async/models/create_instance_snapshot_reply.py create mode 100644 koyeb/api_async/models/create_instance_snapshot_request.py create mode 100644 koyeb/api_async/models/delete_instance_snapshot_reply.py create mode 100644 koyeb/api_async/models/egress_policy.py create mode 100644 koyeb/api_async/models/egress_policy_mode.py create mode 100644 koyeb/api_async/models/get_instance_snapshot_reply.py create mode 100644 koyeb/api_async/models/instance_snapshot.py create mode 100644 koyeb/api_async/models/instance_snapshot_event.py create mode 100644 koyeb/api_async/models/instance_snapshot_quotas.py create mode 100644 koyeb/api_async/models/instance_snapshot_status.py create mode 100644 koyeb/api_async/models/instance_snapshot_type.py create mode 100644 koyeb/api_async/models/list_instance_snapshot_events_reply.py create mode 100644 koyeb/api_async/models/list_instance_snapshots_reply.py create mode 100644 koyeb/api_async/models/network_policy.py create mode 100644 koyeb/api_async/models/network_policy_destination.py create mode 100644 koyeb/api_async/test/test_create_instance_snapshot_reply.py create mode 100644 koyeb/api_async/test/test_create_instance_snapshot_request.py create mode 100644 koyeb/api_async/test/test_delete_instance_snapshot_reply.py create mode 100644 koyeb/api_async/test/test_egress_policy.py create mode 100644 koyeb/api_async/test/test_egress_policy_mode.py create mode 100644 koyeb/api_async/test/test_get_instance_snapshot_reply.py create mode 100644 koyeb/api_async/test/test_instance_snapshot.py create mode 100644 koyeb/api_async/test/test_instance_snapshot_event.py create mode 100644 koyeb/api_async/test/test_instance_snapshot_quotas.py create mode 100644 koyeb/api_async/test/test_instance_snapshot_status.py create mode 100644 koyeb/api_async/test/test_instance_snapshot_type.py create mode 100644 koyeb/api_async/test/test_instance_snapshots_api.py create mode 100644 koyeb/api_async/test/test_list_instance_snapshot_events_reply.py create mode 100644 koyeb/api_async/test/test_list_instance_snapshots_reply.py create mode 100644 koyeb/api_async/test/test_network_policy.py create mode 100644 koyeb/api_async/test/test_network_policy_destination.py diff --git a/koyeb/api/.openapi-generator/FILES b/koyeb/api/.openapi-generator/FILES index 15f841aa..a07b13ce 100644 --- a/koyeb/api/.openapi-generator/FILES +++ b/koyeb/api/.openapi-generator/FILES @@ -15,6 +15,7 @@ koyeb/api/api/credentials_api.py koyeb/api/api/deployments_api.py koyeb/api/api/docker_helper_api.py koyeb/api/api/domains_api.py +koyeb/api/api/instance_snapshots_api.py koyeb/api/api/instances_api.py koyeb/api/api/intercom_api.py koyeb/api/api/invite_api.py @@ -103,6 +104,8 @@ koyeb/api/docs/CreateCredential.md koyeb/api/docs/CreateCredentialReply.md koyeb/api/docs/CreateDomain.md koyeb/api/docs/CreateDomainReply.md +koyeb/api/docs/CreateInstanceSnapshotReply.md +koyeb/api/docs/CreateInstanceSnapshotRequest.md koyeb/api/docs/CreateOrganizationInvitationReply.md koyeb/api/docs/CreateOrganizationInvitationRequest.md koyeb/api/docs/CreateOrganizationReply.md @@ -133,6 +136,7 @@ koyeb/api/docs/DeactivateOrganizationRequest.md koyeb/api/docs/DeclareStageProgressRequest.md koyeb/api/docs/DeclareStepProgressRequest.md koyeb/api/docs/DeclineOrganizationInvitationReply.md +koyeb/api/docs/DeleteInstanceSnapshotReply.md koyeb/api/docs/DeleteOrganizationReply.md koyeb/api/docs/DeletePersistentVolumeReply.md koyeb/api/docs/DeleteSnapshotReply.md @@ -189,6 +193,8 @@ koyeb/api/docs/DomainStatus.md koyeb/api/docs/DomainType.md koyeb/api/docs/DomainsApi.md koyeb/api/docs/DomainsSummary.md +koyeb/api/docs/EgressPolicy.md +koyeb/api/docs/EgressPolicyMode.md koyeb/api/docs/Env.md koyeb/api/docs/Error.md koyeb/api/docs/ErrorField.md @@ -210,6 +216,7 @@ koyeb/api/docs/GetDomainReply.md koyeb/api/docs/GetGithubInstallationReply.md koyeb/api/docs/GetIdenfyTokenReply.md koyeb/api/docs/GetInstanceReply.md +koyeb/api/docs/GetInstanceSnapshotReply.md koyeb/api/docs/GetIntercomProfileReply.md koyeb/api/docs/GetMetricsReply.md koyeb/api/docs/GetMetricsReplyMetric.md @@ -249,6 +256,12 @@ koyeb/api/docs/Instance.md koyeb/api/docs/InstanceAvailability.md koyeb/api/docs/InstanceEvent.md koyeb/api/docs/InstanceListItem.md +koyeb/api/docs/InstanceSnapshot.md +koyeb/api/docs/InstanceSnapshotEvent.md +koyeb/api/docs/InstanceSnapshotQuotas.md +koyeb/api/docs/InstanceSnapshotStatus.md +koyeb/api/docs/InstanceSnapshotType.md +koyeb/api/docs/InstanceSnapshotsApi.md koyeb/api/docs/InstanceStatus.md koyeb/api/docs/InstanceUsage.md koyeb/api/docs/InstancesApi.md @@ -284,6 +297,8 @@ koyeb/api/docs/ListDeploymentEventsReply.md koyeb/api/docs/ListDeploymentsReply.md koyeb/api/docs/ListDomainsReply.md koyeb/api/docs/ListInstanceEventsReply.md +koyeb/api/docs/ListInstanceSnapshotEventsReply.md +koyeb/api/docs/ListInstanceSnapshotsReply.md koyeb/api/docs/ListInstancesReply.md koyeb/api/docs/ListOrganizationInvitationsReply.md koyeb/api/docs/ListOrganizationMembersReply.md @@ -317,6 +332,8 @@ koyeb/api/docs/NeonPostgresDatabaseDeploymentMetadata.md koyeb/api/docs/NeonPostgresDatabaseNeonDatabase.md koyeb/api/docs/NeonPostgresDatabaseNeonRole.md koyeb/api/docs/NeonPostgresSummary.md +koyeb/api/docs/NetworkPolicy.md +koyeb/api/docs/NetworkPolicyDestination.md koyeb/api/docs/NextInvoiceReply.md koyeb/api/docs/NextInvoiceReplyDiscount.md koyeb/api/docs/NextInvoiceReplyDiscountType.md @@ -523,6 +540,8 @@ koyeb/api/models/create_credential.py koyeb/api/models/create_credential_reply.py koyeb/api/models/create_domain.py koyeb/api/models/create_domain_reply.py +koyeb/api/models/create_instance_snapshot_reply.py +koyeb/api/models/create_instance_snapshot_request.py koyeb/api/models/create_organization_invitation_reply.py koyeb/api/models/create_organization_invitation_request.py koyeb/api/models/create_organization_reply.py @@ -552,6 +571,7 @@ koyeb/api/models/deactivate_organization_request.py koyeb/api/models/declare_stage_progress_request.py koyeb/api/models/declare_step_progress_request.py koyeb/api/models/decline_organization_invitation_reply.py +koyeb/api/models/delete_instance_snapshot_reply.py koyeb/api/models/delete_organization_reply.py koyeb/api/models/delete_persistent_volume_reply.py koyeb/api/models/delete_snapshot_reply.py @@ -605,6 +625,8 @@ koyeb/api/models/domain_load_balancer_quotas.py koyeb/api/models/domain_status.py koyeb/api/models/domain_type.py koyeb/api/models/domains_summary.py +koyeb/api/models/egress_policy.py +koyeb/api/models/egress_policy_mode.py koyeb/api/models/env.py koyeb/api/models/error.py koyeb/api/models/error_field.py @@ -626,6 +648,7 @@ koyeb/api/models/get_domain_reply.py koyeb/api/models/get_github_installation_reply.py koyeb/api/models/get_idenfy_token_reply.py koyeb/api/models/get_instance_reply.py +koyeb/api/models/get_instance_snapshot_reply.py koyeb/api/models/get_intercom_profile_reply.py koyeb/api/models/get_metrics_reply.py koyeb/api/models/get_metrics_reply_metric.py @@ -665,6 +688,11 @@ koyeb/api/models/instance.py koyeb/api/models/instance_availability.py koyeb/api/models/instance_event.py koyeb/api/models/instance_list_item.py +koyeb/api/models/instance_snapshot.py +koyeb/api/models/instance_snapshot_event.py +koyeb/api/models/instance_snapshot_quotas.py +koyeb/api/models/instance_snapshot_status.py +koyeb/api/models/instance_snapshot_type.py koyeb/api/models/instance_status.py koyeb/api/models/instance_usage.py koyeb/api/models/instances_summary.py @@ -697,6 +725,8 @@ koyeb/api/models/list_deployment_events_reply.py koyeb/api/models/list_deployments_reply.py koyeb/api/models/list_domains_reply.py koyeb/api/models/list_instance_events_reply.py +koyeb/api/models/list_instance_snapshot_events_reply.py +koyeb/api/models/list_instance_snapshots_reply.py koyeb/api/models/list_instances_reply.py koyeb/api/models/list_organization_invitations_reply.py koyeb/api/models/list_organization_members_reply.py @@ -728,6 +758,8 @@ koyeb/api/models/neon_postgres_database_deployment_metadata.py koyeb/api/models/neon_postgres_database_neon_database.py koyeb/api/models/neon_postgres_database_neon_role.py koyeb/api/models/neon_postgres_summary.py +koyeb/api/models/network_policy.py +koyeb/api/models/network_policy_destination.py koyeb/api/models/next_invoice_reply.py koyeb/api/models/next_invoice_reply_discount.py koyeb/api/models/next_invoice_reply_discount_type.py @@ -864,4 +896,20 @@ koyeb/api/models/verify_docker_image_reply.py koyeb/api/models/verify_docker_image_reply_err_code.py koyeb/api/rest.py koyeb/api/test/__init__.py +koyeb/api/test/test_create_instance_snapshot_reply.py +koyeb/api/test/test_create_instance_snapshot_request.py +koyeb/api/test/test_delete_instance_snapshot_reply.py +koyeb/api/test/test_egress_policy.py +koyeb/api/test/test_egress_policy_mode.py +koyeb/api/test/test_get_instance_snapshot_reply.py +koyeb/api/test/test_instance_snapshot.py +koyeb/api/test/test_instance_snapshot_event.py +koyeb/api/test/test_instance_snapshot_quotas.py +koyeb/api/test/test_instance_snapshot_status.py +koyeb/api/test/test_instance_snapshot_type.py +koyeb/api/test/test_instance_snapshots_api.py +koyeb/api/test/test_list_instance_snapshot_events_reply.py +koyeb/api/test/test_list_instance_snapshots_reply.py +koyeb/api/test/test_network_policy.py +koyeb/api/test/test_network_policy_destination.py koyeb/api_README.md diff --git a/koyeb/api/__init__.py b/koyeb/api/__init__.py index deb88fcc..9f113e39 100644 --- a/koyeb/api/__init__.py +++ b/koyeb/api/__init__.py @@ -30,6 +30,7 @@ "DeploymentsApi", "DockerHelperApi", "DomainsApi", + "InstanceSnapshotsApi", "InstancesApi", "IntercomApi", "LogsApi", @@ -116,6 +117,8 @@ "CreateCredentialReply", "CreateDomain", "CreateDomainReply", + "CreateInstanceSnapshotReply", + "CreateInstanceSnapshotRequest", "CreateOrganizationInvitationReply", "CreateOrganizationInvitationRequest", "CreateOrganizationReply", @@ -145,6 +148,7 @@ "DeclareStageProgressRequest", "DeclareStepProgressRequest", "DeclineOrganizationInvitationReply", + "DeleteInstanceSnapshotReply", "DeleteOrganizationReply", "DeletePersistentVolumeReply", "DeleteSnapshotReply", @@ -198,6 +202,8 @@ "DomainStatus", "DomainType", "DomainsSummary", + "EgressPolicy", + "EgressPolicyMode", "Env", "Error", "ErrorField", @@ -219,6 +225,7 @@ "GetGithubInstallationReply", "GetIdenfyTokenReply", "GetInstanceReply", + "GetInstanceSnapshotReply", "GetIntercomProfileReply", "GetMetricsReply", "GetMetricsReplyMetric", @@ -258,6 +265,11 @@ "InstanceAvailability", "InstanceEvent", "InstanceListItem", + "InstanceSnapshot", + "InstanceSnapshotEvent", + "InstanceSnapshotQuotas", + "InstanceSnapshotStatus", + "InstanceSnapshotType", "InstanceStatus", "InstanceUsage", "InstancesSummary", @@ -290,6 +302,8 @@ "ListDeploymentsReply", "ListDomainsReply", "ListInstanceEventsReply", + "ListInstanceSnapshotEventsReply", + "ListInstanceSnapshotsReply", "ListInstancesReply", "ListOrganizationInvitationsReply", "ListOrganizationMembersReply", @@ -321,6 +335,8 @@ "NeonPostgresDatabaseNeonDatabase", "NeonPostgresDatabaseNeonRole", "NeonPostgresSummary", + "NetworkPolicy", + "NetworkPolicyDestination", "NextInvoiceReply", "NextInvoiceReplyDiscount", "NextInvoiceReplyDiscountType", @@ -470,6 +486,7 @@ from koyeb.api.api.deployments_api import DeploymentsApi as DeploymentsApi from koyeb.api.api.docker_helper_api import DockerHelperApi as DockerHelperApi from koyeb.api.api.domains_api import DomainsApi as DomainsApi +from koyeb.api.api.instance_snapshots_api import InstanceSnapshotsApi as InstanceSnapshotsApi from koyeb.api.api.instances_api import InstancesApi as InstancesApi from koyeb.api.api.intercom_api import IntercomApi as IntercomApi from koyeb.api.api.logs_api import LogsApi as LogsApi @@ -560,6 +577,8 @@ from koyeb.api.models.create_credential_reply import CreateCredentialReply as CreateCredentialReply from koyeb.api.models.create_domain import CreateDomain as CreateDomain from koyeb.api.models.create_domain_reply import CreateDomainReply as CreateDomainReply +from koyeb.api.models.create_instance_snapshot_reply import CreateInstanceSnapshotReply as CreateInstanceSnapshotReply +from koyeb.api.models.create_instance_snapshot_request import CreateInstanceSnapshotRequest as CreateInstanceSnapshotRequest from koyeb.api.models.create_organization_invitation_reply import CreateOrganizationInvitationReply as CreateOrganizationInvitationReply from koyeb.api.models.create_organization_invitation_request import CreateOrganizationInvitationRequest as CreateOrganizationInvitationRequest from koyeb.api.models.create_organization_reply import CreateOrganizationReply as CreateOrganizationReply @@ -589,6 +608,7 @@ from koyeb.api.models.declare_stage_progress_request import DeclareStageProgressRequest as DeclareStageProgressRequest from koyeb.api.models.declare_step_progress_request import DeclareStepProgressRequest as DeclareStepProgressRequest from koyeb.api.models.decline_organization_invitation_reply import DeclineOrganizationInvitationReply as DeclineOrganizationInvitationReply +from koyeb.api.models.delete_instance_snapshot_reply import DeleteInstanceSnapshotReply as DeleteInstanceSnapshotReply from koyeb.api.models.delete_organization_reply import DeleteOrganizationReply as DeleteOrganizationReply from koyeb.api.models.delete_persistent_volume_reply import DeletePersistentVolumeReply as DeletePersistentVolumeReply from koyeb.api.models.delete_snapshot_reply import DeleteSnapshotReply as DeleteSnapshotReply @@ -642,6 +662,8 @@ from koyeb.api.models.domain_status import DomainStatus as DomainStatus from koyeb.api.models.domain_type import DomainType as DomainType from koyeb.api.models.domains_summary import DomainsSummary as DomainsSummary +from koyeb.api.models.egress_policy import EgressPolicy as EgressPolicy +from koyeb.api.models.egress_policy_mode import EgressPolicyMode as EgressPolicyMode from koyeb.api.models.env import Env as Env from koyeb.api.models.error import Error as Error from koyeb.api.models.error_field import ErrorField as ErrorField @@ -663,6 +685,7 @@ from koyeb.api.models.get_github_installation_reply import GetGithubInstallationReply as GetGithubInstallationReply from koyeb.api.models.get_idenfy_token_reply import GetIdenfyTokenReply as GetIdenfyTokenReply from koyeb.api.models.get_instance_reply import GetInstanceReply as GetInstanceReply +from koyeb.api.models.get_instance_snapshot_reply import GetInstanceSnapshotReply as GetInstanceSnapshotReply from koyeb.api.models.get_intercom_profile_reply import GetIntercomProfileReply as GetIntercomProfileReply from koyeb.api.models.get_metrics_reply import GetMetricsReply as GetMetricsReply from koyeb.api.models.get_metrics_reply_metric import GetMetricsReplyMetric as GetMetricsReplyMetric @@ -702,6 +725,11 @@ from koyeb.api.models.instance_availability import InstanceAvailability as InstanceAvailability from koyeb.api.models.instance_event import InstanceEvent as InstanceEvent from koyeb.api.models.instance_list_item import InstanceListItem as InstanceListItem +from koyeb.api.models.instance_snapshot import InstanceSnapshot as InstanceSnapshot +from koyeb.api.models.instance_snapshot_event import InstanceSnapshotEvent as InstanceSnapshotEvent +from koyeb.api.models.instance_snapshot_quotas import InstanceSnapshotQuotas as InstanceSnapshotQuotas +from koyeb.api.models.instance_snapshot_status import InstanceSnapshotStatus as InstanceSnapshotStatus +from koyeb.api.models.instance_snapshot_type import InstanceSnapshotType as InstanceSnapshotType from koyeb.api.models.instance_status import InstanceStatus as InstanceStatus from koyeb.api.models.instance_usage import InstanceUsage as InstanceUsage from koyeb.api.models.instances_summary import InstancesSummary as InstancesSummary @@ -734,6 +762,8 @@ from koyeb.api.models.list_deployments_reply import ListDeploymentsReply as ListDeploymentsReply from koyeb.api.models.list_domains_reply import ListDomainsReply as ListDomainsReply from koyeb.api.models.list_instance_events_reply import ListInstanceEventsReply as ListInstanceEventsReply +from koyeb.api.models.list_instance_snapshot_events_reply import ListInstanceSnapshotEventsReply as ListInstanceSnapshotEventsReply +from koyeb.api.models.list_instance_snapshots_reply import ListInstanceSnapshotsReply as ListInstanceSnapshotsReply from koyeb.api.models.list_instances_reply import ListInstancesReply as ListInstancesReply from koyeb.api.models.list_organization_invitations_reply import ListOrganizationInvitationsReply as ListOrganizationInvitationsReply from koyeb.api.models.list_organization_members_reply import ListOrganizationMembersReply as ListOrganizationMembersReply @@ -765,6 +795,8 @@ from koyeb.api.models.neon_postgres_database_neon_database import NeonPostgresDatabaseNeonDatabase as NeonPostgresDatabaseNeonDatabase from koyeb.api.models.neon_postgres_database_neon_role import NeonPostgresDatabaseNeonRole as NeonPostgresDatabaseNeonRole from koyeb.api.models.neon_postgres_summary import NeonPostgresSummary as NeonPostgresSummary +from koyeb.api.models.network_policy import NetworkPolicy as NetworkPolicy +from koyeb.api.models.network_policy_destination import NetworkPolicyDestination as NetworkPolicyDestination from koyeb.api.models.next_invoice_reply import NextInvoiceReply as NextInvoiceReply from koyeb.api.models.next_invoice_reply_discount import NextInvoiceReplyDiscount as NextInvoiceReplyDiscount from koyeb.api.models.next_invoice_reply_discount_type import NextInvoiceReplyDiscountType as NextInvoiceReplyDiscountType diff --git a/koyeb/api/api/__init__.py b/koyeb/api/api/__init__.py index 0265b8f9..f3cbebef 100644 --- a/koyeb/api/api/__init__.py +++ b/koyeb/api/api/__init__.py @@ -13,6 +13,7 @@ from koyeb.api.api.deployments_api import DeploymentsApi from koyeb.api.api.docker_helper_api import DockerHelperApi from koyeb.api.api.domains_api import DomainsApi +from koyeb.api.api.instance_snapshots_api import InstanceSnapshotsApi from koyeb.api.api.instances_api import InstancesApi from koyeb.api.api.intercom_api import IntercomApi from koyeb.api.api.logs_api import LogsApi diff --git a/koyeb/api/api/instance_snapshots_api.py b/koyeb/api/api/instance_snapshots_api.py new file mode 100644 index 00000000..e6c3fc76 --- /dev/null +++ b/koyeb/api/api/instance_snapshots_api.py @@ -0,0 +1,1565 @@ +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr, field_validator +from typing import List, Optional +from typing_extensions import Annotated +from koyeb.api.models.create_instance_snapshot_reply import CreateInstanceSnapshotReply +from koyeb.api.models.create_instance_snapshot_request import CreateInstanceSnapshotRequest +from koyeb.api.models.delete_instance_snapshot_reply import DeleteInstanceSnapshotReply +from koyeb.api.models.get_instance_snapshot_reply import GetInstanceSnapshotReply +from koyeb.api.models.list_instance_snapshot_events_reply import ListInstanceSnapshotEventsReply +from koyeb.api.models.list_instance_snapshots_reply import ListInstanceSnapshotsReply + +from koyeb.api.api_client import ApiClient, RequestSerialized +from koyeb.api.api_response import ApiResponse +from koyeb.api.rest import RESTResponseType + + +class InstanceSnapshotsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def create_instance_snapshot( + self, + body: CreateInstanceSnapshotRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CreateInstanceSnapshotReply: + """create_instance_snapshot + + + :param body: (required) + :type body: CreateInstanceSnapshotRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_instance_snapshot_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateInstanceSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_instance_snapshot_with_http_info( + self, + body: CreateInstanceSnapshotRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CreateInstanceSnapshotReply]: + """create_instance_snapshot + + + :param body: (required) + :type body: CreateInstanceSnapshotRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_instance_snapshot_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateInstanceSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_instance_snapshot_without_preload_content( + self, + body: CreateInstanceSnapshotRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """create_instance_snapshot + + + :param body: (required) + :type body: CreateInstanceSnapshotRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_instance_snapshot_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateInstanceSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_instance_snapshot_serialize( + self, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'Bearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instance_snapshots', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_instance_snapshot( + self, + id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DeleteInstanceSnapshotReply: + """delete_instance_snapshot + + + :param id: (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_instance_snapshot_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DeleteInstanceSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_instance_snapshot_with_http_info( + self, + id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DeleteInstanceSnapshotReply]: + """delete_instance_snapshot + + + :param id: (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_instance_snapshot_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DeleteInstanceSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_instance_snapshot_without_preload_content( + self, + id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_instance_snapshot + + + :param id: (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_instance_snapshot_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DeleteInstanceSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_instance_snapshot_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'Bearer' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/instance_snapshots/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_instance_snapshot( + self, + id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GetInstanceSnapshotReply: + """get_instance_snapshot + + + :param id: (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_instance_snapshot_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetInstanceSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_instance_snapshot_with_http_info( + self, + id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GetInstanceSnapshotReply]: + """get_instance_snapshot + + + :param id: (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_instance_snapshot_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetInstanceSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_instance_snapshot_without_preload_content( + self, + id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_instance_snapshot + + + :param id: (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_instance_snapshot_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetInstanceSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_instance_snapshot_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'Bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/instance_snapshots/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_instance_snapshot_events( + self, + instance_snapshot_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on instance snapshot id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on instance snapshot event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ListInstanceSnapshotEventsReply: + """list_instance_snapshot_events + + + :param instance_snapshot_id: (Optional) Filter on instance snapshot id + :type instance_snapshot_id: str + :param types: (Optional) Filter on instance snapshot event types + :type types: List[str] + :param limit: (Optional) The number of items to return + :type limit: str + :param offset: (Optional) The offset in the list of item to return + :type offset: str + :param order: (Optional) Sorts the list in the ascending or the descending order + :type order: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_instance_snapshot_events_serialize( + instance_snapshot_id=instance_snapshot_id, + types=types, + limit=limit, + offset=offset, + order=order, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListInstanceSnapshotEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_instance_snapshot_events_with_http_info( + self, + instance_snapshot_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on instance snapshot id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on instance snapshot event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ListInstanceSnapshotEventsReply]: + """list_instance_snapshot_events + + + :param instance_snapshot_id: (Optional) Filter on instance snapshot id + :type instance_snapshot_id: str + :param types: (Optional) Filter on instance snapshot event types + :type types: List[str] + :param limit: (Optional) The number of items to return + :type limit: str + :param offset: (Optional) The offset in the list of item to return + :type offset: str + :param order: (Optional) Sorts the list in the ascending or the descending order + :type order: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_instance_snapshot_events_serialize( + instance_snapshot_id=instance_snapshot_id, + types=types, + limit=limit, + offset=offset, + order=order, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListInstanceSnapshotEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_instance_snapshot_events_without_preload_content( + self, + instance_snapshot_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on instance snapshot id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on instance snapshot event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """list_instance_snapshot_events + + + :param instance_snapshot_id: (Optional) Filter on instance snapshot id + :type instance_snapshot_id: str + :param types: (Optional) Filter on instance snapshot event types + :type types: List[str] + :param limit: (Optional) The number of items to return + :type limit: str + :param offset: (Optional) The offset in the list of item to return + :type offset: str + :param order: (Optional) Sorts the list in the ascending or the descending order + :type order: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_instance_snapshot_events_serialize( + instance_snapshot_id=instance_snapshot_id, + types=types, + limit=limit, + offset=offset, + order=order, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListInstanceSnapshotEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_instance_snapshot_events_serialize( + self, + instance_snapshot_id, + types, + limit, + offset, + order, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'types': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if instance_snapshot_id is not None: + + _query_params.append(('instance_snapshot_id', instance_snapshot_id)) + + if types is not None: + + _query_params.append(('types', types)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + if order is not None: + + _query_params.append(('order', order)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'Bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/instance_snapshot_events', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_instance_snapshots( + self, + limit: Optional[StrictStr] = None, + offset: Optional[StrictStr] = None, + name: Optional[StrictStr] = None, + statuses: Optional[List[StrictStr]] = None, + type: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ListInstanceSnapshotsReply: + """list_instance_snapshots + + + :param limit: + :type limit: str + :param offset: + :type offset: str + :param name: + :type name: str + :param statuses: + :type statuses: List[str] + :param type: + :type type: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_instance_snapshots_serialize( + limit=limit, + offset=offset, + name=name, + statuses=statuses, + type=type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListInstanceSnapshotsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_instance_snapshots_with_http_info( + self, + limit: Optional[StrictStr] = None, + offset: Optional[StrictStr] = None, + name: Optional[StrictStr] = None, + statuses: Optional[List[StrictStr]] = None, + type: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ListInstanceSnapshotsReply]: + """list_instance_snapshots + + + :param limit: + :type limit: str + :param offset: + :type offset: str + :param name: + :type name: str + :param statuses: + :type statuses: List[str] + :param type: + :type type: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_instance_snapshots_serialize( + limit=limit, + offset=offset, + name=name, + statuses=statuses, + type=type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListInstanceSnapshotsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_instance_snapshots_without_preload_content( + self, + limit: Optional[StrictStr] = None, + offset: Optional[StrictStr] = None, + name: Optional[StrictStr] = None, + statuses: Optional[List[StrictStr]] = None, + type: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """list_instance_snapshots + + + :param limit: + :type limit: str + :param offset: + :type offset: str + :param name: + :type name: str + :param statuses: + :type statuses: List[str] + :param type: + :type type: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_instance_snapshots_serialize( + limit=limit, + offset=offset, + name=name, + statuses=statuses, + type=type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListInstanceSnapshotsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_instance_snapshots_serialize( + self, + limit, + offset, + name, + statuses, + type, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'statuses': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + if name is not None: + + _query_params.append(('name', name)) + + if statuses is not None: + + _query_params.append(('statuses', statuses)) + + if type is not None: + + _query_params.append(('type', type)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'Bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/instance_snapshots', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/koyeb/api/api_client.py b/koyeb/api/api_client.py index b53392f4..c6880fc5 100644 --- a/koyeb/api/api_client.py +++ b/koyeb/api/api_client.py @@ -98,13 +98,7 @@ def __enter__(self): return self def __exit__(self, exc_type, exc_value, traceback): - if self.rest_client is not None and hasattr(self.rest_client, 'pool_manager'): - self.rest_client.pool_manager.clear() - - async def close(self): - """Close the underlying HTTP connection pool.""" - if self.rest_client is not None and hasattr(self.rest_client, 'pool_manager'): - self.rest_client.pool_manager.clear() + pass @property def user_agent(self): diff --git a/koyeb/api/configuration.py b/koyeb/api/configuration.py index ff94daa9..2e5c58bf 100644 --- a/koyeb/api/configuration.py +++ b/koyeb/api/configuration.py @@ -17,8 +17,6 @@ import multiprocessing import sys from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union -from urllib.parse import urlparse -from urllib.request import getproxies_environment, proxy_bypass_environment from typing_extensions import NotRequired, Self import urllib3 @@ -331,7 +329,7 @@ def __init__( per pool. None in the constructor is coerced to cpu_count * 5. """ - self.proxy = proxy if proxy is not None else self._get_proxy_from_env() + self.proxy = proxy """Proxy URL """ self.proxy_headers = proxy_headers @@ -358,19 +356,6 @@ def __init__( """date format """ - def _get_proxy_from_env(self) -> Optional[str]: - proxies = getproxies_environment() - if not proxies: - return None - - parsed = urlparse(self._base_path) - host = parsed.hostname or '' - - if proxy_bypass_environment(host): - return None - - return proxies.get(parsed.scheme) or proxies.get('all') or None - def __deepcopy__(self, memo: Dict[int, Any]) -> Self: cls = self.__class__ result = cls.__new__(cls) diff --git a/koyeb/api/docs/CreateInstanceSnapshotReply.md b/koyeb/api/docs/CreateInstanceSnapshotReply.md new file mode 100644 index 00000000..bf86d2c0 --- /dev/null +++ b/koyeb/api/docs/CreateInstanceSnapshotReply.md @@ -0,0 +1,29 @@ +# CreateInstanceSnapshotReply + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**instance_snapshot** | [**InstanceSnapshot**](InstanceSnapshot.md) | | [optional] + +## Example + +```python +from koyeb.api.models.create_instance_snapshot_reply import CreateInstanceSnapshotReply + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateInstanceSnapshotReply from a JSON string +create_instance_snapshot_reply_instance = CreateInstanceSnapshotReply.from_json(json) +# print the JSON string representation of the object +print(CreateInstanceSnapshotReply.to_json()) + +# convert the object into a dict +create_instance_snapshot_reply_dict = create_instance_snapshot_reply_instance.to_dict() +# create an instance of CreateInstanceSnapshotReply from a dict +create_instance_snapshot_reply_from_dict = CreateInstanceSnapshotReply.from_dict(create_instance_snapshot_reply_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/koyeb/api/docs/CreateInstanceSnapshotRequest.md b/koyeb/api/docs/CreateInstanceSnapshotRequest.md new file mode 100644 index 00000000..845d854a --- /dev/null +++ b/koyeb/api/docs/CreateInstanceSnapshotRequest.md @@ -0,0 +1,31 @@ +# CreateInstanceSnapshotRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**instance_id** | **str** | | [optional] +**name** | **str** | | [optional] +**type** | [**InstanceSnapshotType**](InstanceSnapshotType.md) | | [optional] [default to InstanceSnapshotType.INSTANCE_SNAPSHOT_TYPE_INVALID] + +## Example + +```python +from koyeb.api.models.create_instance_snapshot_request import CreateInstanceSnapshotRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateInstanceSnapshotRequest from a JSON string +create_instance_snapshot_request_instance = CreateInstanceSnapshotRequest.from_json(json) +# print the JSON string representation of the object +print(CreateInstanceSnapshotRequest.to_json()) + +# convert the object into a dict +create_instance_snapshot_request_dict = create_instance_snapshot_request_instance.to_dict() +# create an instance of CreateInstanceSnapshotRequest from a dict +create_instance_snapshot_request_from_dict = CreateInstanceSnapshotRequest.from_dict(create_instance_snapshot_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/koyeb/api/docs/CreateService.md b/koyeb/api/docs/CreateService.md index fc96580c..52e62f02 100644 --- a/koyeb/api/docs/CreateService.md +++ b/koyeb/api/docs/CreateService.md @@ -9,6 +9,8 @@ Name | Type | Description | Notes **definition** | [**DeploymentDefinition**](DeploymentDefinition.md) | | [optional] **life_cycle** | [**ServiceLifeCycle**](ServiceLifeCycle.md) | | [optional] **project_id** | **str** | | [optional] +**instance_snapshot_id** | **str** | | [optional] +**name** | **str** | | [optional] ## Example diff --git a/koyeb/api/docs/DeleteInstanceSnapshotReply.md b/koyeb/api/docs/DeleteInstanceSnapshotReply.md new file mode 100644 index 00000000..57d1d409 --- /dev/null +++ b/koyeb/api/docs/DeleteInstanceSnapshotReply.md @@ -0,0 +1,29 @@ +# DeleteInstanceSnapshotReply + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**instance_snapshot** | [**InstanceSnapshot**](InstanceSnapshot.md) | | [optional] + +## Example + +```python +from koyeb.api.models.delete_instance_snapshot_reply import DeleteInstanceSnapshotReply + +# TODO update the JSON string below +json = "{}" +# create an instance of DeleteInstanceSnapshotReply from a JSON string +delete_instance_snapshot_reply_instance = DeleteInstanceSnapshotReply.from_json(json) +# print the JSON string representation of the object +print(DeleteInstanceSnapshotReply.to_json()) + +# convert the object into a dict +delete_instance_snapshot_reply_dict = delete_instance_snapshot_reply_instance.to_dict() +# create an instance of DeleteInstanceSnapshotReply from a dict +delete_instance_snapshot_reply_from_dict = DeleteInstanceSnapshotReply.from_dict(delete_instance_snapshot_reply_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/koyeb/api/docs/Deployment.md b/koyeb/api/docs/Deployment.md index 65137e15..a8b72e64 100644 --- a/koyeb/api/docs/Deployment.md +++ b/koyeb/api/docs/Deployment.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **succeeded_at** | **datetime** | | [optional] **terminated_at** | **datetime** | | [optional] **organization_id** | **str** | | [optional] +**project_id** | **str** | | [optional] **app_id** | **str** | | [optional] **service_id** | **str** | | [optional] **parent_id** | **str** | | [optional] @@ -27,6 +28,7 @@ Name | Type | Description | Notes **role** | [**DeploymentRole**](DeploymentRole.md) | | [optional] [default to DeploymentRole.INVALID] **version** | **str** | | [optional] **deployment_group** | **str** | | [optional] +**instance_snapshot_id** | **str** | | [optional] ## Example diff --git a/koyeb/api/docs/DeploymentDefinition.md b/koyeb/api/docs/DeploymentDefinition.md index 56eed0f3..dadeda09 100644 --- a/koyeb/api/docs/DeploymentDefinition.md +++ b/koyeb/api/docs/DeploymentDefinition.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **str** | | [optional] +**name** | **str** | Service name. Deprecated, set it directly in the Service when creating it. | [optional] **type** | [**DeploymentDefinitionType**](DeploymentDefinitionType.md) | | [optional] [default to DeploymentDefinitionType.INVALID] **strategy** | [**DeploymentStrategy**](DeploymentStrategy.md) | | [optional] **routes** | [**List[DeploymentRoute]**](DeploymentRoute.md) | | [optional] @@ -20,6 +20,7 @@ Name | Type | Description | Notes **config_files** | [**List[ConfigFile]**](ConfigFile.md) | | [optional] **skip_cache** | **bool** | | [optional] **mesh** | [**DeploymentMesh**](DeploymentMesh.md) | | [optional] [default to DeploymentMesh.DEPLOYMENT_MESH_AUTO] +**network_policy** | [**NetworkPolicy**](NetworkPolicy.md) | | [optional] **docker** | [**DockerSource**](DockerSource.md) | | [optional] **git** | [**GitSource**](GitSource.md) | | [optional] **database** | [**DatabaseSource**](DatabaseSource.md) | | [optional] diff --git a/koyeb/api/docs/DeploymentListItem.md b/koyeb/api/docs/DeploymentListItem.md index bdd25f8b..2c5503a0 100644 --- a/koyeb/api/docs/DeploymentListItem.md +++ b/koyeb/api/docs/DeploymentListItem.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **succeeded_at** | **datetime** | | [optional] **terminated_at** | **datetime** | | [optional] **organization_id** | **str** | | [optional] +**project_id** | **str** | | [optional] **app_id** | **str** | | [optional] **service_id** | **str** | | [optional] **parent_id** | **str** | | [optional] @@ -23,6 +24,7 @@ Name | Type | Description | Notes **messages** | **List[str]** | | [optional] **provisioning_info** | [**DeploymentProvisioningInfo**](DeploymentProvisioningInfo.md) | | [optional] **database_info** | [**DeploymentDatabaseInfo**](DeploymentDatabaseInfo.md) | | [optional] +**instance_snapshot_id** | **str** | | [optional] **version** | **str** | | [optional] **deployment_group** | **str** | | [optional] diff --git a/koyeb/api/docs/EgressPolicy.md b/koyeb/api/docs/EgressPolicy.md new file mode 100644 index 00000000..35f1c547 --- /dev/null +++ b/koyeb/api/docs/EgressPolicy.md @@ -0,0 +1,30 @@ +# EgressPolicy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mode** | [**EgressPolicyMode**](EgressPolicyMode.md) | | [optional] [default to EgressPolicyMode.EGRESS_POLICY_MODE_DEFAULT] +**allow_list** | [**List[NetworkPolicyDestination]**](NetworkPolicyDestination.md) | Allowed destinations (deny-by-default semantics under DENY_ALL). Ignored when mode is DEFAULT. | [optional] + +## Example + +```python +from koyeb.api.models.egress_policy import EgressPolicy + +# TODO update the JSON string below +json = "{}" +# create an instance of EgressPolicy from a JSON string +egress_policy_instance = EgressPolicy.from_json(json) +# print the JSON string representation of the object +print(EgressPolicy.to_json()) + +# convert the object into a dict +egress_policy_dict = egress_policy_instance.to_dict() +# create an instance of EgressPolicy from a dict +egress_policy_from_dict = EgressPolicy.from_dict(egress_policy_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/koyeb/api/docs/EgressPolicyMode.md b/koyeb/api/docs/EgressPolicyMode.md new file mode 100644 index 00000000..e532c045 --- /dev/null +++ b/koyeb/api/docs/EgressPolicyMode.md @@ -0,0 +1,12 @@ +# EgressPolicyMode + + +## Enum + +* `EGRESS_POLICY_MODE_DEFAULT` (value: `'EGRESS_POLICY_MODE_DEFAULT'`) + +* `EGRESS_POLICY_MODE_DENY_ALL` (value: `'EGRESS_POLICY_MODE_DENY_ALL'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/koyeb/api/docs/GetInstanceSnapshotReply.md b/koyeb/api/docs/GetInstanceSnapshotReply.md new file mode 100644 index 00000000..852f5734 --- /dev/null +++ b/koyeb/api/docs/GetInstanceSnapshotReply.md @@ -0,0 +1,29 @@ +# GetInstanceSnapshotReply + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**instance_snapshot** | [**InstanceSnapshot**](InstanceSnapshot.md) | | [optional] + +## Example + +```python +from koyeb.api.models.get_instance_snapshot_reply import GetInstanceSnapshotReply + +# TODO update the JSON string below +json = "{}" +# create an instance of GetInstanceSnapshotReply from a JSON string +get_instance_snapshot_reply_instance = GetInstanceSnapshotReply.from_json(json) +# print the JSON string representation of the object +print(GetInstanceSnapshotReply.to_json()) + +# convert the object into a dict +get_instance_snapshot_reply_dict = get_instance_snapshot_reply_instance.to_dict() +# create an instance of GetInstanceSnapshotReply from a dict +get_instance_snapshot_reply_from_dict = GetInstanceSnapshotReply.from_dict(get_instance_snapshot_reply_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/koyeb/api/docs/InstanceSnapshot.md b/koyeb/api/docs/InstanceSnapshot.md new file mode 100644 index 00000000..2fbbae9f --- /dev/null +++ b/koyeb/api/docs/InstanceSnapshot.md @@ -0,0 +1,44 @@ +# InstanceSnapshot + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**name** | **str** | | [optional] +**created_at** | **datetime** | | [optional] +**updated_at** | **datetime** | | [optional] +**available_at** | **datetime** | | [optional] +**deleted_at** | **datetime** | | [optional] +**organization_id** | **str** | | [optional] +**project_id** | **str** | | [optional] +**service_id** | **str** | | [optional] +**deployment_id** | **str** | | [optional] +**regional_deployment_id** | **str** | | [optional] +**instance_id** | **str** | | [optional] +**status** | [**InstanceSnapshotStatus**](InstanceSnapshotStatus.md) | | [optional] [default to InstanceSnapshotStatus.INSTANCE_SNAPSHOT_STATUS_INVALID] +**type** | [**InstanceSnapshotType**](InstanceSnapshotType.md) | | [optional] [default to InstanceSnapshotType.INSTANCE_SNAPSHOT_TYPE_INVALID] +**version** | **str** | | [optional] +**messages** | **List[str]** | | [optional] + +## Example + +```python +from koyeb.api.models.instance_snapshot import InstanceSnapshot + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceSnapshot from a JSON string +instance_snapshot_instance = InstanceSnapshot.from_json(json) +# print the JSON string representation of the object +print(InstanceSnapshot.to_json()) + +# convert the object into a dict +instance_snapshot_dict = instance_snapshot_instance.to_dict() +# create an instance of InstanceSnapshot from a dict +instance_snapshot_from_dict = InstanceSnapshot.from_dict(instance_snapshot_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/koyeb/api/docs/InstanceSnapshotEvent.md b/koyeb/api/docs/InstanceSnapshotEvent.md new file mode 100644 index 00000000..9019dcf1 --- /dev/null +++ b/koyeb/api/docs/InstanceSnapshotEvent.md @@ -0,0 +1,35 @@ +# InstanceSnapshotEvent + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**when** | **datetime** | | [optional] +**organization_id** | **str** | | [optional] +**instance_snapshot_id** | **str** | | [optional] +**type** | **str** | | [optional] +**message** | **str** | | [optional] +**metadata** | **object** | | [optional] + +## Example + +```python +from koyeb.api.models.instance_snapshot_event import InstanceSnapshotEvent + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceSnapshotEvent from a JSON string +instance_snapshot_event_instance = InstanceSnapshotEvent.from_json(json) +# print the JSON string representation of the object +print(InstanceSnapshotEvent.to_json()) + +# convert the object into a dict +instance_snapshot_event_dict = instance_snapshot_event_instance.to_dict() +# create an instance of InstanceSnapshotEvent from a dict +instance_snapshot_event_from_dict = InstanceSnapshotEvent.from_dict(instance_snapshot_event_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/koyeb/api/docs/InstanceSnapshotQuotas.md b/koyeb/api/docs/InstanceSnapshotQuotas.md new file mode 100644 index 00000000..4d2bae54 --- /dev/null +++ b/koyeb/api/docs/InstanceSnapshotQuotas.md @@ -0,0 +1,30 @@ +# InstanceSnapshotQuotas + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filesystem** | **int** | | [optional] +**full** | **int** | | [optional] + +## Example + +```python +from koyeb.api.models.instance_snapshot_quotas import InstanceSnapshotQuotas + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceSnapshotQuotas from a JSON string +instance_snapshot_quotas_instance = InstanceSnapshotQuotas.from_json(json) +# print the JSON string representation of the object +print(InstanceSnapshotQuotas.to_json()) + +# convert the object into a dict +instance_snapshot_quotas_dict = instance_snapshot_quotas_instance.to_dict() +# create an instance of InstanceSnapshotQuotas from a dict +instance_snapshot_quotas_from_dict = InstanceSnapshotQuotas.from_dict(instance_snapshot_quotas_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/koyeb/api/docs/InstanceSnapshotStatus.md b/koyeb/api/docs/InstanceSnapshotStatus.md new file mode 100644 index 00000000..5bdc7e04 --- /dev/null +++ b/koyeb/api/docs/InstanceSnapshotStatus.md @@ -0,0 +1,20 @@ +# InstanceSnapshotStatus + + +## Enum + +* `INSTANCE_SNAPSHOT_STATUS_INVALID` (value: `'INSTANCE_SNAPSHOT_STATUS_INVALID'`) + +* `INSTANCE_SNAPSHOT_STATUS_CREATING` (value: `'INSTANCE_SNAPSHOT_STATUS_CREATING'`) + +* `INSTANCE_SNAPSHOT_STATUS_AVAILABLE` (value: `'INSTANCE_SNAPSHOT_STATUS_AVAILABLE'`) + +* `INSTANCE_SNAPSHOT_STATUS_ERROR` (value: `'INSTANCE_SNAPSHOT_STATUS_ERROR'`) + +* `INSTANCE_SNAPSHOT_STATUS_DELETING` (value: `'INSTANCE_SNAPSHOT_STATUS_DELETING'`) + +* `INSTANCE_SNAPSHOT_STATUS_DELETED` (value: `'INSTANCE_SNAPSHOT_STATUS_DELETED'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/koyeb/api/docs/InstanceSnapshotType.md b/koyeb/api/docs/InstanceSnapshotType.md new file mode 100644 index 00000000..68da5c51 --- /dev/null +++ b/koyeb/api/docs/InstanceSnapshotType.md @@ -0,0 +1,14 @@ +# InstanceSnapshotType + + +## Enum + +* `INSTANCE_SNAPSHOT_TYPE_INVALID` (value: `'INSTANCE_SNAPSHOT_TYPE_INVALID'`) + +* `INSTANCE_SNAPSHOT_TYPE_FILESYSTEM` (value: `'INSTANCE_SNAPSHOT_TYPE_FILESYSTEM'`) + +* `INSTANCE_SNAPSHOT_TYPE_FULL` (value: `'INSTANCE_SNAPSHOT_TYPE_FULL'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/koyeb/api/docs/InstanceSnapshotsApi.md b/koyeb/api/docs/InstanceSnapshotsApi.md new file mode 100644 index 00000000..c01d2bb7 --- /dev/null +++ b/koyeb/api/docs/InstanceSnapshotsApi.md @@ -0,0 +1,435 @@ +# koyeb.api.InstanceSnapshotsApi + +All URIs are relative to *https://app.koyeb.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_instance_snapshot**](InstanceSnapshotsApi.md#create_instance_snapshot) | **POST** /v1/instance_snapshots | +[**delete_instance_snapshot**](InstanceSnapshotsApi.md#delete_instance_snapshot) | **DELETE** /v1/instance_snapshots/{id} | +[**get_instance_snapshot**](InstanceSnapshotsApi.md#get_instance_snapshot) | **GET** /v1/instance_snapshots/{id} | +[**list_instance_snapshot_events**](InstanceSnapshotsApi.md#list_instance_snapshot_events) | **GET** /v1/instance_snapshot_events | +[**list_instance_snapshots**](InstanceSnapshotsApi.md#list_instance_snapshots) | **GET** /v1/instance_snapshots | + + +# **create_instance_snapshot** +> CreateInstanceSnapshotReply create_instance_snapshot(body) + +### Example + +* Api Key Authentication (Bearer): + +```python +import koyeb.api +from koyeb.api.models.create_instance_snapshot_reply import CreateInstanceSnapshotReply +from koyeb.api.models.create_instance_snapshot_request import CreateInstanceSnapshotRequest +from koyeb.api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.koyeb.com +# See configuration.py for a list of all supported configuration parameters. +configuration = koyeb.api.Configuration( + host = "https://app.koyeb.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration.api_key['Bearer'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer'] = 'Bearer' + +# Enter a context with an instance of the API client +with koyeb.api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = koyeb.api.InstanceSnapshotsApi(api_client) + body = koyeb.api.CreateInstanceSnapshotRequest() # CreateInstanceSnapshotRequest | + + try: + api_response = api_instance.create_instance_snapshot(body) + print("The response of InstanceSnapshotsApi->create_instance_snapshot:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstanceSnapshotsApi->create_instance_snapshot: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateInstanceSnapshotRequest**](CreateInstanceSnapshotRequest.md)| | + +### Return type + +[**CreateInstanceSnapshotReply**](CreateInstanceSnapshotReply.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**400** | Validation error | - | +**401** | Returned when the token is not valid. | - | +**403** | Returned when the user does not have permission to access the resource. | - | +**404** | Returned when the resource does not exist. | - | +**500** | Returned in case of server error. | - | +**503** | Service is unavailable. | - | +**0** | An unexpected error response. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_instance_snapshot** +> DeleteInstanceSnapshotReply delete_instance_snapshot(id) + +### Example + +* Api Key Authentication (Bearer): + +```python +import koyeb.api +from koyeb.api.models.delete_instance_snapshot_reply import DeleteInstanceSnapshotReply +from koyeb.api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.koyeb.com +# See configuration.py for a list of all supported configuration parameters. +configuration = koyeb.api.Configuration( + host = "https://app.koyeb.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration.api_key['Bearer'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer'] = 'Bearer' + +# Enter a context with an instance of the API client +with koyeb.api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = koyeb.api.InstanceSnapshotsApi(api_client) + id = 'id_example' # str | + + try: + api_response = api_instance.delete_instance_snapshot(id) + print("The response of InstanceSnapshotsApi->delete_instance_snapshot:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstanceSnapshotsApi->delete_instance_snapshot: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +[**DeleteInstanceSnapshotReply**](DeleteInstanceSnapshotReply.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**400** | Validation error | - | +**401** | Returned when the token is not valid. | - | +**403** | Returned when the user does not have permission to access the resource. | - | +**404** | Returned when the resource does not exist. | - | +**500** | Returned in case of server error. | - | +**503** | Service is unavailable. | - | +**0** | An unexpected error response. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_instance_snapshot** +> GetInstanceSnapshotReply get_instance_snapshot(id) + +### Example + +* Api Key Authentication (Bearer): + +```python +import koyeb.api +from koyeb.api.models.get_instance_snapshot_reply import GetInstanceSnapshotReply +from koyeb.api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.koyeb.com +# See configuration.py for a list of all supported configuration parameters. +configuration = koyeb.api.Configuration( + host = "https://app.koyeb.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration.api_key['Bearer'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer'] = 'Bearer' + +# Enter a context with an instance of the API client +with koyeb.api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = koyeb.api.InstanceSnapshotsApi(api_client) + id = 'id_example' # str | + + try: + api_response = api_instance.get_instance_snapshot(id) + print("The response of InstanceSnapshotsApi->get_instance_snapshot:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstanceSnapshotsApi->get_instance_snapshot: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +[**GetInstanceSnapshotReply**](GetInstanceSnapshotReply.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**400** | Validation error | - | +**401** | Returned when the token is not valid. | - | +**403** | Returned when the user does not have permission to access the resource. | - | +**404** | Returned when the resource does not exist. | - | +**500** | Returned in case of server error. | - | +**503** | Service is unavailable. | - | +**0** | An unexpected error response. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_instance_snapshot_events** +> ListInstanceSnapshotEventsReply list_instance_snapshot_events(instance_snapshot_id=instance_snapshot_id, types=types, limit=limit, offset=offset, order=order) + +### Example + +* Api Key Authentication (Bearer): + +```python +import koyeb.api +from koyeb.api.models.list_instance_snapshot_events_reply import ListInstanceSnapshotEventsReply +from koyeb.api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.koyeb.com +# See configuration.py for a list of all supported configuration parameters. +configuration = koyeb.api.Configuration( + host = "https://app.koyeb.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration.api_key['Bearer'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer'] = 'Bearer' + +# Enter a context with an instance of the API client +with koyeb.api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = koyeb.api.InstanceSnapshotsApi(api_client) + instance_snapshot_id = 'instance_snapshot_id_example' # str | (Optional) Filter on instance snapshot id (optional) + types = ['types_example'] # List[str] | (Optional) Filter on instance snapshot event types (optional) + limit = 'limit_example' # str | (Optional) The number of items to return (optional) + offset = 'offset_example' # str | (Optional) The offset in the list of item to return (optional) + order = 'order_example' # str | (Optional) Sorts the list in the ascending or the descending order (optional) + + try: + api_response = api_instance.list_instance_snapshot_events(instance_snapshot_id=instance_snapshot_id, types=types, limit=limit, offset=offset, order=order) + print("The response of InstanceSnapshotsApi->list_instance_snapshot_events:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstanceSnapshotsApi->list_instance_snapshot_events: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_snapshot_id** | **str**| (Optional) Filter on instance snapshot id | [optional] + **types** | [**List[str]**](str.md)| (Optional) Filter on instance snapshot event types | [optional] + **limit** | **str**| (Optional) The number of items to return | [optional] + **offset** | **str**| (Optional) The offset in the list of item to return | [optional] + **order** | **str**| (Optional) Sorts the list in the ascending or the descending order | [optional] + +### Return type + +[**ListInstanceSnapshotEventsReply**](ListInstanceSnapshotEventsReply.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**400** | Validation error | - | +**401** | Returned when the token is not valid. | - | +**403** | Returned when the user does not have permission to access the resource. | - | +**404** | Returned when the resource does not exist. | - | +**500** | Returned in case of server error. | - | +**503** | Service is unavailable. | - | +**0** | An unexpected error response. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_instance_snapshots** +> ListInstanceSnapshotsReply list_instance_snapshots(limit=limit, offset=offset, name=name, statuses=statuses, type=type) + +### Example + +* Api Key Authentication (Bearer): + +```python +import koyeb.api +from koyeb.api.models.list_instance_snapshots_reply import ListInstanceSnapshotsReply +from koyeb.api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.koyeb.com +# See configuration.py for a list of all supported configuration parameters. +configuration = koyeb.api.Configuration( + host = "https://app.koyeb.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration.api_key['Bearer'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer'] = 'Bearer' + +# Enter a context with an instance of the API client +with koyeb.api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = koyeb.api.InstanceSnapshotsApi(api_client) + limit = 'limit_example' # str | (optional) + offset = 'offset_example' # str | (optional) + name = 'name_example' # str | (optional) + statuses = ['statuses_example'] # List[str] | (optional) + type = INSTANCE_SNAPSHOT_TYPE_INVALID # str | (optional) (default to INSTANCE_SNAPSHOT_TYPE_INVALID) + + try: + api_response = api_instance.list_instance_snapshots(limit=limit, offset=offset, name=name, statuses=statuses, type=type) + print("The response of InstanceSnapshotsApi->list_instance_snapshots:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstanceSnapshotsApi->list_instance_snapshots: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **str**| | [optional] + **offset** | **str**| | [optional] + **name** | **str**| | [optional] + **statuses** | [**List[str]**](str.md)| | [optional] + **type** | **str**| | [optional] [default to INSTANCE_SNAPSHOT_TYPE_INVALID] + +### Return type + +[**ListInstanceSnapshotsReply**](ListInstanceSnapshotsReply.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**400** | Validation error | - | +**401** | Returned when the token is not valid. | - | +**403** | Returned when the user does not have permission to access the resource. | - | +**404** | Returned when the resource does not exist. | - | +**500** | Returned in case of server error. | - | +**503** | Service is unavailable. | - | +**0** | An unexpected error response. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/koyeb/api/docs/ListInstanceSnapshotEventsReply.md b/koyeb/api/docs/ListInstanceSnapshotEventsReply.md new file mode 100644 index 00000000..f06e245b --- /dev/null +++ b/koyeb/api/docs/ListInstanceSnapshotEventsReply.md @@ -0,0 +1,33 @@ +# ListInstanceSnapshotEventsReply + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**events** | [**List[InstanceSnapshotEvent]**](InstanceSnapshotEvent.md) | | [optional] +**limit** | **int** | | [optional] +**offset** | **int** | | [optional] +**order** | **str** | | [optional] +**has_next** | **bool** | | [optional] + +## Example + +```python +from koyeb.api.models.list_instance_snapshot_events_reply import ListInstanceSnapshotEventsReply + +# TODO update the JSON string below +json = "{}" +# create an instance of ListInstanceSnapshotEventsReply from a JSON string +list_instance_snapshot_events_reply_instance = ListInstanceSnapshotEventsReply.from_json(json) +# print the JSON string representation of the object +print(ListInstanceSnapshotEventsReply.to_json()) + +# convert the object into a dict +list_instance_snapshot_events_reply_dict = list_instance_snapshot_events_reply_instance.to_dict() +# create an instance of ListInstanceSnapshotEventsReply from a dict +list_instance_snapshot_events_reply_from_dict = ListInstanceSnapshotEventsReply.from_dict(list_instance_snapshot_events_reply_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/koyeb/api/docs/ListInstanceSnapshotsReply.md b/koyeb/api/docs/ListInstanceSnapshotsReply.md new file mode 100644 index 00000000..8c9226de --- /dev/null +++ b/koyeb/api/docs/ListInstanceSnapshotsReply.md @@ -0,0 +1,33 @@ +# ListInstanceSnapshotsReply + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**instance_snapshots** | [**List[InstanceSnapshot]**](InstanceSnapshot.md) | | [optional] +**limit** | **int** | | [optional] +**offset** | **int** | | [optional] +**count** | **int** | | [optional] +**has_next** | **bool** | | [optional] + +## Example + +```python +from koyeb.api.models.list_instance_snapshots_reply import ListInstanceSnapshotsReply + +# TODO update the JSON string below +json = "{}" +# create an instance of ListInstanceSnapshotsReply from a JSON string +list_instance_snapshots_reply_instance = ListInstanceSnapshotsReply.from_json(json) +# print the JSON string representation of the object +print(ListInstanceSnapshotsReply.to_json()) + +# convert the object into a dict +list_instance_snapshots_reply_dict = list_instance_snapshots_reply_instance.to_dict() +# create an instance of ListInstanceSnapshotsReply from a dict +list_instance_snapshots_reply_from_dict = ListInstanceSnapshotsReply.from_dict(list_instance_snapshots_reply_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/koyeb/api/docs/NetworkPolicy.md b/koyeb/api/docs/NetworkPolicy.md new file mode 100644 index 00000000..2fb4199c --- /dev/null +++ b/koyeb/api/docs/NetworkPolicy.md @@ -0,0 +1,29 @@ +# NetworkPolicy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**egress** | [**EgressPolicy**](EgressPolicy.md) | | [optional] + +## Example + +```python +from koyeb.api.models.network_policy import NetworkPolicy + +# TODO update the JSON string below +json = "{}" +# create an instance of NetworkPolicy from a JSON string +network_policy_instance = NetworkPolicy.from_json(json) +# print the JSON string representation of the object +print(NetworkPolicy.to_json()) + +# convert the object into a dict +network_policy_dict = network_policy_instance.to_dict() +# create an instance of NetworkPolicy from a dict +network_policy_from_dict = NetworkPolicy.from_dict(network_policy_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/koyeb/api/docs/NetworkPolicyDestination.md b/koyeb/api/docs/NetworkPolicyDestination.md new file mode 100644 index 00000000..2af718d0 --- /dev/null +++ b/koyeb/api/docs/NetworkPolicyDestination.md @@ -0,0 +1,29 @@ +# NetworkPolicyDestination + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cidr** | **str** | IPv4 or IPv6 CIDR (e.g. \"10.0.0.0/8\", \"2001:db8::/32\"). Bare IPs are accepted at the API boundary and normalized to /32 (IPv4) or /128 (IPv6) before storage. | [optional] + +## Example + +```python +from koyeb.api.models.network_policy_destination import NetworkPolicyDestination + +# TODO update the JSON string below +json = "{}" +# create an instance of NetworkPolicyDestination from a JSON string +network_policy_destination_instance = NetworkPolicyDestination.from_json(json) +# print the JSON string representation of the object +print(NetworkPolicyDestination.to_json()) + +# convert the object into a dict +network_policy_destination_dict = network_policy_destination_instance.to_dict() +# create an instance of NetworkPolicyDestination from a dict +network_policy_destination_from_dict = NetworkPolicyDestination.from_dict(network_policy_destination_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/koyeb/api/docs/Quotas.md b/koyeb/api/docs/Quotas.md index f1a284fb..4cce6b39 100644 --- a/koyeb/api/docs/Quotas.md +++ b/koyeb/api/docs/Quotas.md @@ -27,6 +27,7 @@ Name | Type | Description | Notes **archive_max_size_mb** | **str** | | [optional] **lifecycle** | [**LifecycleQuotas**](LifecycleQuotas.md) | | [optional] **max_projects** | **str** | | [optional] +**instance_snapshots** | [**InstanceSnapshotQuotas**](InstanceSnapshotQuotas.md) | | [optional] ## Example diff --git a/koyeb/api/docs/RegionalDeployment.md b/koyeb/api/docs/RegionalDeployment.md index c0bce291..73354ced 100644 --- a/koyeb/api/docs/RegionalDeployment.md +++ b/koyeb/api/docs/RegionalDeployment.md @@ -26,6 +26,7 @@ Name | Type | Description | Notes **metadata** | **object** | | [optional] **provisioning_info** | [**DeploymentProvisioningInfo**](DeploymentProvisioningInfo.md) | | [optional] **role** | [**RegionalDeploymentRole**](RegionalDeploymentRole.md) | | [optional] [default to RegionalDeploymentRole.INVALID] +**instance_snapshot_id** | **str** | | [optional] **version** | **str** | | [optional] **deployment_group** | **str** | | [optional] **deployment_id** | **str** | | [optional] diff --git a/koyeb/api/docs/RegionalDeploymentDefinition.md b/koyeb/api/docs/RegionalDeploymentDefinition.md index e3ec1a3f..e60e8779 100644 --- a/koyeb/api/docs/RegionalDeploymentDefinition.md +++ b/koyeb/api/docs/RegionalDeploymentDefinition.md @@ -20,6 +20,7 @@ Name | Type | Description | Notes **config_files** | [**List[ConfigFile]**](ConfigFile.md) | | [optional] **skip_cache** | **bool** | | [optional] **mesh** | [**RegionalDeploymentMesh**](RegionalDeploymentMesh.md) | | [optional] [default to RegionalDeploymentMesh.REGIONAL_DEPLOYMENT_MESH_AUTO] +**network_policy** | [**NetworkPolicy**](NetworkPolicy.md) | | [optional] **docker** | [**DockerSource**](DockerSource.md) | | [optional] **git** | [**GitSource**](GitSource.md) | | [optional] **archive** | [**ArchiveSource**](ArchiveSource.md) | | [optional] diff --git a/koyeb/api/docs/RegionalDeploymentListItem.md b/koyeb/api/docs/RegionalDeploymentListItem.md index 78d2aabb..894f57e0 100644 --- a/koyeb/api/docs/RegionalDeploymentListItem.md +++ b/koyeb/api/docs/RegionalDeploymentListItem.md @@ -12,6 +12,7 @@ Name | Type | Description | Notes **status** | [**RegionalDeploymentStatus**](RegionalDeploymentStatus.md) | | [optional] [default to RegionalDeploymentStatus.PENDING] **messages** | **List[str]** | | [optional] **definition** | [**RegionalDeploymentDefinition**](RegionalDeploymentDefinition.md) | | [optional] +**instance_snapshot_id** | **str** | | [optional] ## Example diff --git a/koyeb/api/docs/UpdateService.md b/koyeb/api/docs/UpdateService.md index f8183f40..512ea4f8 100644 --- a/koyeb/api/docs/UpdateService.md +++ b/koyeb/api/docs/UpdateService.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **skip_build** | **bool** | If set to true, the build stage will be skipped and the image coming from the last successful build step will be used instead. The call fails if no previous successful builds happened. | [optional] **save_only** | **bool** | | [optional] **life_cycle** | [**ServiceLifeCycle**](ServiceLifeCycle.md) | | [optional] +**instance_snapshot_id** | **str** | | [optional] ## Example diff --git a/koyeb/api/models/__init__.py b/koyeb/api/models/__init__.py index 07ccfda1..53134010 100644 --- a/koyeb/api/models/__init__.py +++ b/koyeb/api/models/__init__.py @@ -59,6 +59,8 @@ from koyeb.api.models.create_credential_reply import CreateCredentialReply from koyeb.api.models.create_domain import CreateDomain from koyeb.api.models.create_domain_reply import CreateDomainReply +from koyeb.api.models.create_instance_snapshot_reply import CreateInstanceSnapshotReply +from koyeb.api.models.create_instance_snapshot_request import CreateInstanceSnapshotRequest from koyeb.api.models.create_organization_invitation_reply import CreateOrganizationInvitationReply from koyeb.api.models.create_organization_invitation_request import CreateOrganizationInvitationRequest from koyeb.api.models.create_organization_reply import CreateOrganizationReply @@ -88,6 +90,7 @@ from koyeb.api.models.declare_stage_progress_request import DeclareStageProgressRequest from koyeb.api.models.declare_step_progress_request import DeclareStepProgressRequest from koyeb.api.models.decline_organization_invitation_reply import DeclineOrganizationInvitationReply +from koyeb.api.models.delete_instance_snapshot_reply import DeleteInstanceSnapshotReply from koyeb.api.models.delete_organization_reply import DeleteOrganizationReply from koyeb.api.models.delete_persistent_volume_reply import DeletePersistentVolumeReply from koyeb.api.models.delete_snapshot_reply import DeleteSnapshotReply @@ -141,6 +144,8 @@ from koyeb.api.models.domain_status import DomainStatus from koyeb.api.models.domain_type import DomainType from koyeb.api.models.domains_summary import DomainsSummary +from koyeb.api.models.egress_policy import EgressPolicy +from koyeb.api.models.egress_policy_mode import EgressPolicyMode from koyeb.api.models.env import Env from koyeb.api.models.error import Error from koyeb.api.models.error_field import ErrorField @@ -162,6 +167,7 @@ from koyeb.api.models.get_github_installation_reply import GetGithubInstallationReply from koyeb.api.models.get_idenfy_token_reply import GetIdenfyTokenReply from koyeb.api.models.get_instance_reply import GetInstanceReply +from koyeb.api.models.get_instance_snapshot_reply import GetInstanceSnapshotReply from koyeb.api.models.get_intercom_profile_reply import GetIntercomProfileReply from koyeb.api.models.get_metrics_reply import GetMetricsReply from koyeb.api.models.get_metrics_reply_metric import GetMetricsReplyMetric @@ -201,6 +207,11 @@ from koyeb.api.models.instance_availability import InstanceAvailability from koyeb.api.models.instance_event import InstanceEvent from koyeb.api.models.instance_list_item import InstanceListItem +from koyeb.api.models.instance_snapshot import InstanceSnapshot +from koyeb.api.models.instance_snapshot_event import InstanceSnapshotEvent +from koyeb.api.models.instance_snapshot_quotas import InstanceSnapshotQuotas +from koyeb.api.models.instance_snapshot_status import InstanceSnapshotStatus +from koyeb.api.models.instance_snapshot_type import InstanceSnapshotType from koyeb.api.models.instance_status import InstanceStatus from koyeb.api.models.instance_usage import InstanceUsage from koyeb.api.models.instances_summary import InstancesSummary @@ -233,6 +244,8 @@ from koyeb.api.models.list_deployments_reply import ListDeploymentsReply from koyeb.api.models.list_domains_reply import ListDomainsReply from koyeb.api.models.list_instance_events_reply import ListInstanceEventsReply +from koyeb.api.models.list_instance_snapshot_events_reply import ListInstanceSnapshotEventsReply +from koyeb.api.models.list_instance_snapshots_reply import ListInstanceSnapshotsReply from koyeb.api.models.list_instances_reply import ListInstancesReply from koyeb.api.models.list_organization_invitations_reply import ListOrganizationInvitationsReply from koyeb.api.models.list_organization_members_reply import ListOrganizationMembersReply @@ -264,6 +277,8 @@ from koyeb.api.models.neon_postgres_database_neon_database import NeonPostgresDatabaseNeonDatabase from koyeb.api.models.neon_postgres_database_neon_role import NeonPostgresDatabaseNeonRole from koyeb.api.models.neon_postgres_summary import NeonPostgresSummary +from koyeb.api.models.network_policy import NetworkPolicy +from koyeb.api.models.network_policy_destination import NetworkPolicyDestination from koyeb.api.models.next_invoice_reply import NextInvoiceReply from koyeb.api.models.next_invoice_reply_discount import NextInvoiceReplyDiscount from koyeb.api.models.next_invoice_reply_discount_type import NextInvoiceReplyDiscountType diff --git a/koyeb/api/models/create_instance_snapshot_reply.py b/koyeb/api/models/create_instance_snapshot_reply.py new file mode 100644 index 00000000..f7589938 --- /dev/null +++ b/koyeb/api/models/create_instance_snapshot_reply.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from koyeb.api.models.instance_snapshot import InstanceSnapshot +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class CreateInstanceSnapshotReply(BaseModel): + """ + CreateInstanceSnapshotReply + """ # noqa: E501 + instance_snapshot: Optional[InstanceSnapshot] = None + __properties: ClassVar[List[str]] = ["instance_snapshot"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateInstanceSnapshotReply from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of instance_snapshot + if self.instance_snapshot: + _dict['instance_snapshot'] = self.instance_snapshot.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateInstanceSnapshotReply from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "instance_snapshot": InstanceSnapshot.from_dict(obj["instance_snapshot"]) if obj.get("instance_snapshot") is not None else None + }) + return _obj + + diff --git a/koyeb/api/models/create_instance_snapshot_request.py b/koyeb/api/models/create_instance_snapshot_request.py new file mode 100644 index 00000000..126753cd --- /dev/null +++ b/koyeb/api/models/create_instance_snapshot_request.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from koyeb.api.models.instance_snapshot_type import InstanceSnapshotType +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class CreateInstanceSnapshotRequest(BaseModel): + """ + CreateInstanceSnapshotRequest + """ # noqa: E501 + instance_id: Optional[StrictStr] = None + name: Optional[StrictStr] = None + type: Optional[InstanceSnapshotType] = InstanceSnapshotType.INSTANCE_SNAPSHOT_TYPE_INVALID + __properties: ClassVar[List[str]] = ["instance_id", "name", "type"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateInstanceSnapshotRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateInstanceSnapshotRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "instance_id": obj.get("instance_id"), + "name": obj.get("name"), + "type": obj.get("type") if obj.get("type") is not None else InstanceSnapshotType.INSTANCE_SNAPSHOT_TYPE_INVALID + }) + return _obj + + diff --git a/koyeb/api/models/create_service.py b/koyeb/api/models/create_service.py index 04e5a9e7..399a4ce0 100644 --- a/koyeb/api/models/create_service.py +++ b/koyeb/api/models/create_service.py @@ -33,7 +33,9 @@ class CreateService(BaseModel): definition: Optional[DeploymentDefinition] = None life_cycle: Optional[ServiceLifeCycle] = None project_id: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["app_id", "definition", "life_cycle", "project_id"] + instance_snapshot_id: Optional[StrictStr] = None + name: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["app_id", "definition", "life_cycle", "project_id", "instance_snapshot_id", "name"] model_config = ConfigDict( validate_by_name=True, @@ -95,7 +97,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "app_id": obj.get("app_id"), "definition": DeploymentDefinition.from_dict(obj["definition"]) if obj.get("definition") is not None else None, "life_cycle": ServiceLifeCycle.from_dict(obj["life_cycle"]) if obj.get("life_cycle") is not None else None, - "project_id": obj.get("project_id") + "project_id": obj.get("project_id"), + "instance_snapshot_id": obj.get("instance_snapshot_id"), + "name": obj.get("name") }) return _obj diff --git a/koyeb/api/models/delete_instance_snapshot_reply.py b/koyeb/api/models/delete_instance_snapshot_reply.py new file mode 100644 index 00000000..d7fbc380 --- /dev/null +++ b/koyeb/api/models/delete_instance_snapshot_reply.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from koyeb.api.models.instance_snapshot import InstanceSnapshot +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class DeleteInstanceSnapshotReply(BaseModel): + """ + DeleteInstanceSnapshotReply + """ # noqa: E501 + instance_snapshot: Optional[InstanceSnapshot] = None + __properties: ClassVar[List[str]] = ["instance_snapshot"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DeleteInstanceSnapshotReply from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of instance_snapshot + if self.instance_snapshot: + _dict['instance_snapshot'] = self.instance_snapshot.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeleteInstanceSnapshotReply from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "instance_snapshot": InstanceSnapshot.from_dict(obj["instance_snapshot"]) if obj.get("instance_snapshot") is not None else None + }) + return _obj + + diff --git a/koyeb/api/models/deployment.py b/koyeb/api/models/deployment.py index f5814a35..407c7139 100644 --- a/koyeb/api/models/deployment.py +++ b/koyeb/api/models/deployment.py @@ -42,6 +42,7 @@ class Deployment(BaseModel): succeeded_at: Optional[datetime] = None terminated_at: Optional[datetime] = None organization_id: Optional[StrictStr] = None + project_id: Optional[StrictStr] = None app_id: Optional[StrictStr] = None service_id: Optional[StrictStr] = None parent_id: Optional[StrictStr] = None @@ -56,7 +57,8 @@ class Deployment(BaseModel): role: Optional[DeploymentRole] = DeploymentRole.INVALID version: Optional[StrictStr] = None deployment_group: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["id", "created_at", "updated_at", "allocated_at", "started_at", "succeeded_at", "terminated_at", "organization_id", "app_id", "service_id", "parent_id", "child_id", "status", "metadata", "definition", "messages", "provisioning_info", "database_info", "skip_build", "role", "version", "deployment_group"] + instance_snapshot_id: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["id", "created_at", "updated_at", "allocated_at", "started_at", "succeeded_at", "terminated_at", "organization_id", "project_id", "app_id", "service_id", "parent_id", "child_id", "status", "metadata", "definition", "messages", "provisioning_info", "database_info", "skip_build", "role", "version", "deployment_group", "instance_snapshot_id"] model_config = ConfigDict( validate_by_name=True, @@ -129,6 +131,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "succeeded_at": obj.get("succeeded_at"), "terminated_at": obj.get("terminated_at"), "organization_id": obj.get("organization_id"), + "project_id": obj.get("project_id"), "app_id": obj.get("app_id"), "service_id": obj.get("service_id"), "parent_id": obj.get("parent_id"), @@ -142,7 +145,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "skip_build": obj.get("skip_build"), "role": obj.get("role") if obj.get("role") is not None else DeploymentRole.INVALID, "version": obj.get("version"), - "deployment_group": obj.get("deployment_group") + "deployment_group": obj.get("deployment_group"), + "instance_snapshot_id": obj.get("instance_snapshot_id") }) return _obj diff --git a/koyeb/api/models/deployment_definition.py b/koyeb/api/models/deployment_definition.py index 8b23825a..531b022d 100644 --- a/koyeb/api/models/deployment_definition.py +++ b/koyeb/api/models/deployment_definition.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from koyeb.api.models.archive_source import ArchiveSource from koyeb.api.models.config_file import ConfigFile @@ -35,6 +35,7 @@ from koyeb.api.models.deployment_volume import DeploymentVolume from koyeb.api.models.docker_source import DockerSource from koyeb.api.models.git_source import GitSource +from koyeb.api.models.network_policy import NetworkPolicy from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python @@ -43,7 +44,7 @@ class DeploymentDefinition(BaseModel): """ DeploymentDefinition """ # noqa: E501 - name: Optional[StrictStr] = None + name: Optional[StrictStr] = Field(default=None, description="Service name. Deprecated, set it directly in the Service when creating it.") type: Optional[DeploymentDefinitionType] = DeploymentDefinitionType.INVALID strategy: Optional[DeploymentStrategy] = None routes: Optional[List[DeploymentRoute]] = None @@ -58,11 +59,12 @@ class DeploymentDefinition(BaseModel): config_files: Optional[List[ConfigFile]] = None skip_cache: Optional[StrictBool] = None mesh: Optional[DeploymentMesh] = DeploymentMesh.DEPLOYMENT_MESH_AUTO + network_policy: Optional[NetworkPolicy] = None docker: Optional[DockerSource] = None git: Optional[GitSource] = None database: Optional[DatabaseSource] = None archive: Optional[ArchiveSource] = None - __properties: ClassVar[List[str]] = ["name", "type", "strategy", "routes", "ports", "proxy_ports", "env", "regions", "scalings", "instance_types", "health_checks", "volumes", "config_files", "skip_cache", "mesh", "docker", "git", "database", "archive"] + __properties: ClassVar[List[str]] = ["name", "type", "strategy", "routes", "ports", "proxy_ports", "env", "regions", "scalings", "instance_types", "health_checks", "volumes", "config_files", "skip_cache", "mesh", "network_policy", "docker", "git", "database", "archive"] model_config = ConfigDict( validate_by_name=True, @@ -169,6 +171,9 @@ def to_dict(self) -> Dict[str, Any]: if _item_config_files: _items.append(_item_config_files.to_dict()) _dict['config_files'] = _items + # override the default output from pydantic by calling `to_dict()` of network_policy + if self.network_policy: + _dict['network_policy'] = self.network_policy.to_dict() # override the default output from pydantic by calling `to_dict()` of docker if self.docker: _dict['docker'] = self.docker.to_dict() @@ -208,6 +213,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "config_files": [ConfigFile.from_dict(_item) for _item in obj["config_files"]] if obj.get("config_files") is not None else None, "skip_cache": obj.get("skip_cache"), "mesh": obj.get("mesh") if obj.get("mesh") is not None else DeploymentMesh.DEPLOYMENT_MESH_AUTO, + "network_policy": NetworkPolicy.from_dict(obj["network_policy"]) if obj.get("network_policy") is not None else None, "docker": DockerSource.from_dict(obj["docker"]) if obj.get("docker") is not None else None, "git": GitSource.from_dict(obj["git"]) if obj.get("git") is not None else None, "database": DatabaseSource.from_dict(obj["database"]) if obj.get("database") is not None else None, diff --git a/koyeb/api/models/deployment_list_item.py b/koyeb/api/models/deployment_list_item.py index 854d04fc..b5407a4c 100644 --- a/koyeb/api/models/deployment_list_item.py +++ b/koyeb/api/models/deployment_list_item.py @@ -41,6 +41,7 @@ class DeploymentListItem(BaseModel): succeeded_at: Optional[datetime] = None terminated_at: Optional[datetime] = None organization_id: Optional[StrictStr] = None + project_id: Optional[StrictStr] = None app_id: Optional[StrictStr] = None service_id: Optional[StrictStr] = None parent_id: Optional[StrictStr] = None @@ -51,9 +52,10 @@ class DeploymentListItem(BaseModel): messages: Optional[List[StrictStr]] = None provisioning_info: Optional[DeploymentProvisioningInfo] = None database_info: Optional[DeploymentDatabaseInfo] = None + instance_snapshot_id: Optional[StrictStr] = None version: Optional[StrictStr] = None deployment_group: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["id", "created_at", "updated_at", "allocated_at", "started_at", "succeeded_at", "terminated_at", "organization_id", "app_id", "service_id", "parent_id", "child_id", "status", "metadata", "definition", "messages", "provisioning_info", "database_info", "version", "deployment_group"] + __properties: ClassVar[List[str]] = ["id", "created_at", "updated_at", "allocated_at", "started_at", "succeeded_at", "terminated_at", "organization_id", "project_id", "app_id", "service_id", "parent_id", "child_id", "status", "metadata", "definition", "messages", "provisioning_info", "database_info", "instance_snapshot_id", "version", "deployment_group"] model_config = ConfigDict( validate_by_name=True, @@ -126,6 +128,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "succeeded_at": obj.get("succeeded_at"), "terminated_at": obj.get("terminated_at"), "organization_id": obj.get("organization_id"), + "project_id": obj.get("project_id"), "app_id": obj.get("app_id"), "service_id": obj.get("service_id"), "parent_id": obj.get("parent_id"), @@ -136,6 +139,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "messages": obj.get("messages"), "provisioning_info": DeploymentProvisioningInfo.from_dict(obj["provisioning_info"]) if obj.get("provisioning_info") is not None else None, "database_info": DeploymentDatabaseInfo.from_dict(obj["database_info"]) if obj.get("database_info") is not None else None, + "instance_snapshot_id": obj.get("instance_snapshot_id"), "version": obj.get("version"), "deployment_group": obj.get("deployment_group") }) diff --git a/koyeb/api/models/egress_policy.py b/koyeb/api/models/egress_policy.py new file mode 100644 index 00000000..5aca2b96 --- /dev/null +++ b/koyeb/api/models/egress_policy.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from koyeb.api.models.egress_policy_mode import EgressPolicyMode +from koyeb.api.models.network_policy_destination import NetworkPolicyDestination +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class EgressPolicy(BaseModel): + """ + EgressPolicy + """ # noqa: E501 + mode: Optional[EgressPolicyMode] = EgressPolicyMode.EGRESS_POLICY_MODE_DEFAULT + allow_list: Optional[List[NetworkPolicyDestination]] = Field(default=None, description="Allowed destinations (deny-by-default semantics under DENY_ALL). Ignored when mode is DEFAULT.") + __properties: ClassVar[List[str]] = ["mode", "allow_list"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EgressPolicy from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in allow_list (list) + _items = [] + if self.allow_list: + for _item_allow_list in self.allow_list: + if _item_allow_list: + _items.append(_item_allow_list.to_dict()) + _dict['allow_list'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EgressPolicy from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "mode": obj.get("mode") if obj.get("mode") is not None else EgressPolicyMode.EGRESS_POLICY_MODE_DEFAULT, + "allow_list": [NetworkPolicyDestination.from_dict(_item) for _item in obj["allow_list"]] if obj.get("allow_list") is not None else None + }) + return _obj + + diff --git a/koyeb/api/models/egress_policy_mode.py b/koyeb/api/models/egress_policy_mode.py new file mode 100644 index 00000000..3786f8dd --- /dev/null +++ b/koyeb/api/models/egress_policy_mode.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class EgressPolicyMode(str, Enum): + """ + EgressPolicyMode + """ + + """ + allowed enum values + """ + EGRESS_POLICY_MODE_DEFAULT = 'EGRESS_POLICY_MODE_DEFAULT' + EGRESS_POLICY_MODE_DENY_ALL = 'EGRESS_POLICY_MODE_DENY_ALL' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of EgressPolicyMode from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/get_instance_snapshot_reply.py b/koyeb/api/models/get_instance_snapshot_reply.py new file mode 100644 index 00000000..f90ff55e --- /dev/null +++ b/koyeb/api/models/get_instance_snapshot_reply.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from koyeb.api.models.instance_snapshot import InstanceSnapshot +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class GetInstanceSnapshotReply(BaseModel): + """ + GetInstanceSnapshotReply + """ # noqa: E501 + instance_snapshot: Optional[InstanceSnapshot] = None + __properties: ClassVar[List[str]] = ["instance_snapshot"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetInstanceSnapshotReply from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of instance_snapshot + if self.instance_snapshot: + _dict['instance_snapshot'] = self.instance_snapshot.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetInstanceSnapshotReply from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "instance_snapshot": InstanceSnapshot.from_dict(obj["instance_snapshot"]) if obj.get("instance_snapshot") is not None else None + }) + return _obj + + diff --git a/koyeb/api/models/instance_snapshot.py b/koyeb/api/models/instance_snapshot.py new file mode 100644 index 00000000..249ff387 --- /dev/null +++ b/koyeb/api/models/instance_snapshot.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from koyeb.api.models.instance_snapshot_status import InstanceSnapshotStatus +from koyeb.api.models.instance_snapshot_type import InstanceSnapshotType +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class InstanceSnapshot(BaseModel): + """ + InstanceSnapshot + """ # noqa: E501 + id: Optional[StrictStr] = None + name: Optional[StrictStr] = None + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None + available_at: Optional[datetime] = None + deleted_at: Optional[datetime] = None + organization_id: Optional[StrictStr] = None + project_id: Optional[StrictStr] = None + service_id: Optional[StrictStr] = None + deployment_id: Optional[StrictStr] = None + regional_deployment_id: Optional[StrictStr] = None + instance_id: Optional[StrictStr] = None + status: Optional[InstanceSnapshotStatus] = InstanceSnapshotStatus.INSTANCE_SNAPSHOT_STATUS_INVALID + type: Optional[InstanceSnapshotType] = InstanceSnapshotType.INSTANCE_SNAPSHOT_TYPE_INVALID + version: Optional[StrictStr] = None + messages: Optional[List[StrictStr]] = None + __properties: ClassVar[List[str]] = ["id", "name", "created_at", "updated_at", "available_at", "deleted_at", "organization_id", "project_id", "service_id", "deployment_id", "regional_deployment_id", "instance_id", "status", "type", "version", "messages"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceSnapshot from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceSnapshot from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "available_at": obj.get("available_at"), + "deleted_at": obj.get("deleted_at"), + "organization_id": obj.get("organization_id"), + "project_id": obj.get("project_id"), + "service_id": obj.get("service_id"), + "deployment_id": obj.get("deployment_id"), + "regional_deployment_id": obj.get("regional_deployment_id"), + "instance_id": obj.get("instance_id"), + "status": obj.get("status") if obj.get("status") is not None else InstanceSnapshotStatus.INSTANCE_SNAPSHOT_STATUS_INVALID, + "type": obj.get("type") if obj.get("type") is not None else InstanceSnapshotType.INSTANCE_SNAPSHOT_TYPE_INVALID, + "version": obj.get("version"), + "messages": obj.get("messages") + }) + return _obj + + diff --git a/koyeb/api/models/instance_snapshot_event.py b/koyeb/api/models/instance_snapshot_event.py new file mode 100644 index 00000000..98076760 --- /dev/null +++ b/koyeb/api/models/instance_snapshot_event.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class InstanceSnapshotEvent(BaseModel): + """ + InstanceSnapshotEvent + """ # noqa: E501 + id: Optional[StrictStr] = None + when: Optional[datetime] = None + organization_id: Optional[StrictStr] = None + instance_snapshot_id: Optional[StrictStr] = None + type: Optional[StrictStr] = None + message: Optional[StrictStr] = None + metadata: Optional[Dict[str, Any]] = None + __properties: ClassVar[List[str]] = ["id", "when", "organization_id", "instance_snapshot_id", "type", "message", "metadata"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceSnapshotEvent from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceSnapshotEvent from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "when": obj.get("when"), + "organization_id": obj.get("organization_id"), + "instance_snapshot_id": obj.get("instance_snapshot_id"), + "type": obj.get("type"), + "message": obj.get("message"), + "metadata": obj.get("metadata") + }) + return _obj + + diff --git a/koyeb/api/models/instance_snapshot_quotas.py b/koyeb/api/models/instance_snapshot_quotas.py new file mode 100644 index 00000000..4fb674b8 --- /dev/null +++ b/koyeb/api/models/instance_snapshot_quotas.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class InstanceSnapshotQuotas(BaseModel): + """ + InstanceSnapshotQuotas + """ # noqa: E501 + filesystem: Optional[StrictInt] = None + full: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["filesystem", "full"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceSnapshotQuotas from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceSnapshotQuotas from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "filesystem": obj.get("filesystem"), + "full": obj.get("full") + }) + return _obj + + diff --git a/koyeb/api/models/instance_snapshot_status.py b/koyeb/api/models/instance_snapshot_status.py new file mode 100644 index 00000000..a824eb6b --- /dev/null +++ b/koyeb/api/models/instance_snapshot_status.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class InstanceSnapshotStatus(str, Enum): + """ + InstanceSnapshotStatus + """ + + """ + allowed enum values + """ + INSTANCE_SNAPSHOT_STATUS_INVALID = 'INSTANCE_SNAPSHOT_STATUS_INVALID' + INSTANCE_SNAPSHOT_STATUS_CREATING = 'INSTANCE_SNAPSHOT_STATUS_CREATING' + INSTANCE_SNAPSHOT_STATUS_AVAILABLE = 'INSTANCE_SNAPSHOT_STATUS_AVAILABLE' + INSTANCE_SNAPSHOT_STATUS_ERROR = 'INSTANCE_SNAPSHOT_STATUS_ERROR' + INSTANCE_SNAPSHOT_STATUS_DELETING = 'INSTANCE_SNAPSHOT_STATUS_DELETING' + INSTANCE_SNAPSHOT_STATUS_DELETED = 'INSTANCE_SNAPSHOT_STATUS_DELETED' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of InstanceSnapshotStatus from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/instance_snapshot_type.py b/koyeb/api/models/instance_snapshot_type.py new file mode 100644 index 00000000..a83a50fb --- /dev/null +++ b/koyeb/api/models/instance_snapshot_type.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class InstanceSnapshotType(str, Enum): + """ + InstanceSnapshotType + """ + + """ + allowed enum values + """ + INSTANCE_SNAPSHOT_TYPE_INVALID = 'INSTANCE_SNAPSHOT_TYPE_INVALID' + INSTANCE_SNAPSHOT_TYPE_FILESYSTEM = 'INSTANCE_SNAPSHOT_TYPE_FILESYSTEM' + INSTANCE_SNAPSHOT_TYPE_FULL = 'INSTANCE_SNAPSHOT_TYPE_FULL' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of InstanceSnapshotType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/list_instance_snapshot_events_reply.py b/koyeb/api/models/list_instance_snapshot_events_reply.py new file mode 100644 index 00000000..4420a81a --- /dev/null +++ b/koyeb/api/models/list_instance_snapshot_events_reply.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from koyeb.api.models.instance_snapshot_event import InstanceSnapshotEvent +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ListInstanceSnapshotEventsReply(BaseModel): + """ + ListInstanceSnapshotEventsReply + """ # noqa: E501 + events: Optional[List[InstanceSnapshotEvent]] = None + limit: Optional[StrictInt] = None + offset: Optional[StrictInt] = None + order: Optional[StrictStr] = None + has_next: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["events", "limit", "offset", "order", "has_next"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ListInstanceSnapshotEventsReply from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in events (list) + _items = [] + if self.events: + for _item_events in self.events: + if _item_events: + _items.append(_item_events.to_dict()) + _dict['events'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListInstanceSnapshotEventsReply from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "events": [InstanceSnapshotEvent.from_dict(_item) for _item in obj["events"]] if obj.get("events") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "order": obj.get("order"), + "has_next": obj.get("has_next") + }) + return _obj + + diff --git a/koyeb/api/models/list_instance_snapshots_reply.py b/koyeb/api/models/list_instance_snapshots_reply.py new file mode 100644 index 00000000..ea00c1a1 --- /dev/null +++ b/koyeb/api/models/list_instance_snapshots_reply.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from koyeb.api.models.instance_snapshot import InstanceSnapshot +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ListInstanceSnapshotsReply(BaseModel): + """ + ListInstanceSnapshotsReply + """ # noqa: E501 + instance_snapshots: Optional[List[InstanceSnapshot]] = None + limit: Optional[StrictInt] = None + offset: Optional[StrictInt] = None + count: Optional[StrictInt] = None + has_next: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["instance_snapshots", "limit", "offset", "count", "has_next"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ListInstanceSnapshotsReply from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in instance_snapshots (list) + _items = [] + if self.instance_snapshots: + for _item_instance_snapshots in self.instance_snapshots: + if _item_instance_snapshots: + _items.append(_item_instance_snapshots.to_dict()) + _dict['instance_snapshots'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListInstanceSnapshotsReply from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "instance_snapshots": [InstanceSnapshot.from_dict(_item) for _item in obj["instance_snapshots"]] if obj.get("instance_snapshots") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count"), + "has_next": obj.get("has_next") + }) + return _obj + + diff --git a/koyeb/api/models/network_policy.py b/koyeb/api/models/network_policy.py new file mode 100644 index 00000000..cc00460c --- /dev/null +++ b/koyeb/api/models/network_policy.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from koyeb.api.models.egress_policy import EgressPolicy +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class NetworkPolicy(BaseModel): + """ + NetworkPolicy + """ # noqa: E501 + egress: Optional[EgressPolicy] = None + __properties: ClassVar[List[str]] = ["egress"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NetworkPolicy from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of egress + if self.egress: + _dict['egress'] = self.egress.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NetworkPolicy from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "egress": EgressPolicy.from_dict(obj["egress"]) if obj.get("egress") is not None else None + }) + return _obj + + diff --git a/koyeb/api/models/network_policy_destination.py b/koyeb/api/models/network_policy_destination.py new file mode 100644 index 00000000..d56457b4 --- /dev/null +++ b/koyeb/api/models/network_policy_destination.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class NetworkPolicyDestination(BaseModel): + """ + NetworkPolicyDestination + """ # noqa: E501 + cidr: Optional[StrictStr] = Field(default=None, description="IPv4 or IPv6 CIDR (e.g. \"10.0.0.0/8\", \"2001:db8::/32\"). Bare IPs are accepted at the API boundary and normalized to /32 (IPv4) or /128 (IPv6) before storage.") + __properties: ClassVar[List[str]] = ["cidr"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NetworkPolicyDestination from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NetworkPolicyDestination from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cidr": obj.get("cidr") + }) + return _obj + + diff --git a/koyeb/api/models/quotas.py b/koyeb/api/models/quotas.py index 0eb06f16..6e72a2bb 100644 --- a/koyeb/api/models/quotas.py +++ b/koyeb/api/models/quotas.py @@ -20,6 +20,7 @@ from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from koyeb.api.models.domain_load_balancer_quotas import DomainLoadBalancerQuotas +from koyeb.api.models.instance_snapshot_quotas import InstanceSnapshotQuotas from koyeb.api.models.lifecycle_quotas import LifecycleQuotas from koyeb.api.models.persistent_volume_quotas import PersistentVolumeQuotas from koyeb.api.models.scale_to_zero_quotas import ScaleToZeroQuotas @@ -53,7 +54,8 @@ class Quotas(BaseModel): archive_max_size_mb: Optional[StrictStr] = None lifecycle: Optional[LifecycleQuotas] = None max_projects: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["apps", "services", "domains", "services_by_app", "service_provisioning_concurrency", "memory_mb", "instance_types", "regions", "max_organization_members", "max_instances_by_type", "persistent_volumes_by_region", "custom_domains", "domains_load_balancer", "metrics_retention", "logs_retention", "access_reserved_subdomains", "proxy_ports", "scale_to_zero", "archives", "archive_max_size_mb", "lifecycle", "max_projects"] + instance_snapshots: Optional[InstanceSnapshotQuotas] = None + __properties: ClassVar[List[str]] = ["apps", "services", "domains", "services_by_app", "service_provisioning_concurrency", "memory_mb", "instance_types", "regions", "max_organization_members", "max_instances_by_type", "persistent_volumes_by_region", "custom_domains", "domains_load_balancer", "metrics_retention", "logs_retention", "access_reserved_subdomains", "proxy_ports", "scale_to_zero", "archives", "archive_max_size_mb", "lifecycle", "max_projects", "instance_snapshots"] model_config = ConfigDict( validate_by_name=True, @@ -110,6 +112,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of lifecycle if self.lifecycle: _dict['lifecycle'] = self.lifecycle.to_dict() + # override the default output from pydantic by calling `to_dict()` of instance_snapshots + if self.instance_snapshots: + _dict['instance_snapshots'] = self.instance_snapshots.to_dict() return _dict @classmethod @@ -148,7 +153,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "archives": obj.get("archives"), "archive_max_size_mb": obj.get("archive_max_size_mb"), "lifecycle": LifecycleQuotas.from_dict(obj["lifecycle"]) if obj.get("lifecycle") is not None else None, - "max_projects": obj.get("max_projects") + "max_projects": obj.get("max_projects"), + "instance_snapshots": InstanceSnapshotQuotas.from_dict(obj["instance_snapshots"]) if obj.get("instance_snapshots") is not None else None }) return _obj diff --git a/koyeb/api/models/regional_deployment.py b/koyeb/api/models/regional_deployment.py index 50f7a034..78c58023 100644 --- a/koyeb/api/models/regional_deployment.py +++ b/koyeb/api/models/regional_deployment.py @@ -53,10 +53,11 @@ class RegionalDeployment(BaseModel): metadata: Optional[Dict[str, Any]] = None provisioning_info: Optional[DeploymentProvisioningInfo] = None role: Optional[RegionalDeploymentRole] = RegionalDeploymentRole.INVALID + instance_snapshot_id: Optional[StrictStr] = None version: Optional[StrictStr] = None deployment_group: Optional[StrictStr] = None deployment_id: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["id", "created_at", "updated_at", "scheduled_at", "allocated_at", "started_at", "succeeded_at", "terminated_at", "organization_id", "app_id", "service_id", "region", "parent_id", "child_id", "status", "messages", "definition", "datacenters", "metadata", "provisioning_info", "role", "version", "deployment_group", "deployment_id"] + __properties: ClassVar[List[str]] = ["id", "created_at", "updated_at", "scheduled_at", "allocated_at", "started_at", "succeeded_at", "terminated_at", "organization_id", "app_id", "service_id", "region", "parent_id", "child_id", "status", "messages", "definition", "datacenters", "metadata", "provisioning_info", "role", "instance_snapshot_id", "version", "deployment_group", "deployment_id"] model_config = ConfigDict( validate_by_name=True, @@ -136,6 +137,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "metadata": obj.get("metadata"), "provisioning_info": DeploymentProvisioningInfo.from_dict(obj["provisioning_info"]) if obj.get("provisioning_info") is not None else None, "role": obj.get("role") if obj.get("role") is not None else RegionalDeploymentRole.INVALID, + "instance_snapshot_id": obj.get("instance_snapshot_id"), "version": obj.get("version"), "deployment_group": obj.get("deployment_group"), "deployment_id": obj.get("deployment_id") diff --git a/koyeb/api/models/regional_deployment_definition.py b/koyeb/api/models/regional_deployment_definition.py index 3f783b69..d08b3820 100644 --- a/koyeb/api/models/regional_deployment_definition.py +++ b/koyeb/api/models/regional_deployment_definition.py @@ -26,6 +26,7 @@ from koyeb.api.models.docker_source import DockerSource from koyeb.api.models.env import Env from koyeb.api.models.git_source import GitSource +from koyeb.api.models.network_policy import NetworkPolicy from koyeb.api.models.port import Port from koyeb.api.models.regional_deployment_definition_type import RegionalDeploymentDefinitionType from koyeb.api.models.regional_deployment_mesh import RegionalDeploymentMesh @@ -55,10 +56,11 @@ class RegionalDeploymentDefinition(BaseModel): config_files: Optional[List[ConfigFile]] = None skip_cache: Optional[StrictBool] = None mesh: Optional[RegionalDeploymentMesh] = RegionalDeploymentMesh.REGIONAL_DEPLOYMENT_MESH_AUTO + network_policy: Optional[NetworkPolicy] = None docker: Optional[DockerSource] = None git: Optional[GitSource] = None archive: Optional[ArchiveSource] = None - __properties: ClassVar[List[str]] = ["name", "type", "strategy", "routes", "ports", "env", "region", "scaling", "instance_type", "deployment_group", "health_checks", "volumes", "config_files", "skip_cache", "mesh", "docker", "git", "archive"] + __properties: ClassVar[List[str]] = ["name", "type", "strategy", "routes", "ports", "env", "region", "scaling", "instance_type", "deployment_group", "health_checks", "volumes", "config_files", "skip_cache", "mesh", "network_policy", "docker", "git", "archive"] model_config = ConfigDict( validate_by_name=True, @@ -147,6 +149,9 @@ def to_dict(self) -> Dict[str, Any]: if _item_config_files: _items.append(_item_config_files.to_dict()) _dict['config_files'] = _items + # override the default output from pydantic by calling `to_dict()` of network_policy + if self.network_policy: + _dict['network_policy'] = self.network_policy.to_dict() # override the default output from pydantic by calling `to_dict()` of docker if self.docker: _dict['docker'] = self.docker.to_dict() @@ -183,6 +188,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "config_files": [ConfigFile.from_dict(_item) for _item in obj["config_files"]] if obj.get("config_files") is not None else None, "skip_cache": obj.get("skip_cache"), "mesh": obj.get("mesh") if obj.get("mesh") is not None else RegionalDeploymentMesh.REGIONAL_DEPLOYMENT_MESH_AUTO, + "network_policy": NetworkPolicy.from_dict(obj["network_policy"]) if obj.get("network_policy") is not None else None, "docker": DockerSource.from_dict(obj["docker"]) if obj.get("docker") is not None else None, "git": GitSource.from_dict(obj["git"]) if obj.get("git") is not None else None, "archive": ArchiveSource.from_dict(obj["archive"]) if obj.get("archive") is not None else None diff --git a/koyeb/api/models/regional_deployment_list_item.py b/koyeb/api/models/regional_deployment_list_item.py index f3619e59..5d8c0799 100644 --- a/koyeb/api/models/regional_deployment_list_item.py +++ b/koyeb/api/models/regional_deployment_list_item.py @@ -37,7 +37,8 @@ class RegionalDeploymentListItem(BaseModel): status: Optional[RegionalDeploymentStatus] = RegionalDeploymentStatus.PENDING messages: Optional[List[StrictStr]] = None definition: Optional[RegionalDeploymentDefinition] = None - __properties: ClassVar[List[str]] = ["id", "created_at", "updated_at", "region", "status", "messages", "definition"] + instance_snapshot_id: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["id", "created_at", "updated_at", "region", "status", "messages", "definition", "instance_snapshot_id"] model_config = ConfigDict( validate_by_name=True, @@ -99,7 +100,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "region": obj.get("region"), "status": obj.get("status") if obj.get("status") is not None else RegionalDeploymentStatus.PENDING, "messages": obj.get("messages"), - "definition": RegionalDeploymentDefinition.from_dict(obj["definition"]) if obj.get("definition") is not None else None + "definition": RegionalDeploymentDefinition.from_dict(obj["definition"]) if obj.get("definition") is not None else None, + "instance_snapshot_id": obj.get("instance_snapshot_id") }) return _obj diff --git a/koyeb/api/models/update_service.py b/koyeb/api/models/update_service.py index 89c2394f..44737cd5 100644 --- a/koyeb/api/models/update_service.py +++ b/koyeb/api/models/update_service.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from koyeb.api.models.deployment_definition import DeploymentDefinition from koyeb.api.models.deployment_metadata import DeploymentMetadata @@ -35,7 +35,8 @@ class UpdateService(BaseModel): skip_build: Optional[StrictBool] = Field(default=None, description="If set to true, the build stage will be skipped and the image coming from the last successful build step will be used instead. The call fails if no previous successful builds happened.") save_only: Optional[StrictBool] = None life_cycle: Optional[ServiceLifeCycle] = None - __properties: ClassVar[List[str]] = ["definition", "metadata", "skip_build", "save_only", "life_cycle"] + instance_snapshot_id: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["definition", "metadata", "skip_build", "save_only", "life_cycle", "instance_snapshot_id"] model_config = ConfigDict( validate_by_name=True, @@ -101,7 +102,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "metadata": DeploymentMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, "skip_build": obj.get("skip_build"), "save_only": obj.get("save_only"), - "life_cycle": ServiceLifeCycle.from_dict(obj["life_cycle"]) if obj.get("life_cycle") is not None else None + "life_cycle": ServiceLifeCycle.from_dict(obj["life_cycle"]) if obj.get("life_cycle") is not None else None, + "instance_snapshot_id": obj.get("instance_snapshot_id") }) return _obj diff --git a/koyeb/api/test/test_create_instance_snapshot_reply.py b/koyeb/api/test/test_create_instance_snapshot_reply.py new file mode 100644 index 00000000..a66050a9 --- /dev/null +++ b/koyeb/api/test/test_create_instance_snapshot_reply.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from koyeb.api.models.create_instance_snapshot_reply import CreateInstanceSnapshotReply + +class TestCreateInstanceSnapshotReply(unittest.TestCase): + """CreateInstanceSnapshotReply unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateInstanceSnapshotReply: + """Test CreateInstanceSnapshotReply + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateInstanceSnapshotReply` + """ + model = CreateInstanceSnapshotReply() + if include_optional: + return CreateInstanceSnapshotReply( + instance_snapshot = koyeb.api.models.instance_snapshot.InstanceSnapshot( + id = '', + name = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + available_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + organization_id = '', + project_id = '', + service_id = '', + deployment_id = '', + regional_deployment_id = '', + instance_id = '', + status = 'INSTANCE_SNAPSHOT_STATUS_INVALID', + type = 'INSTANCE_SNAPSHOT_TYPE_INVALID', + version = '', + messages = [ + '' + ], ) + ) + else: + return CreateInstanceSnapshotReply( + ) + """ + + def testCreateInstanceSnapshotReply(self): + """Test CreateInstanceSnapshotReply""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/koyeb/api/test/test_create_instance_snapshot_request.py b/koyeb/api/test/test_create_instance_snapshot_request.py new file mode 100644 index 00000000..ca7c6a9c --- /dev/null +++ b/koyeb/api/test/test_create_instance_snapshot_request.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from koyeb.api.models.create_instance_snapshot_request import CreateInstanceSnapshotRequest + +class TestCreateInstanceSnapshotRequest(unittest.TestCase): + """CreateInstanceSnapshotRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateInstanceSnapshotRequest: + """Test CreateInstanceSnapshotRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateInstanceSnapshotRequest` + """ + model = CreateInstanceSnapshotRequest() + if include_optional: + return CreateInstanceSnapshotRequest( + instance_id = '', + name = '', + type = 'INSTANCE_SNAPSHOT_TYPE_INVALID' + ) + else: + return CreateInstanceSnapshotRequest( + ) + """ + + def testCreateInstanceSnapshotRequest(self): + """Test CreateInstanceSnapshotRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/koyeb/api/test/test_delete_instance_snapshot_reply.py b/koyeb/api/test/test_delete_instance_snapshot_reply.py new file mode 100644 index 00000000..ac3aa346 --- /dev/null +++ b/koyeb/api/test/test_delete_instance_snapshot_reply.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from koyeb.api.models.delete_instance_snapshot_reply import DeleteInstanceSnapshotReply + +class TestDeleteInstanceSnapshotReply(unittest.TestCase): + """DeleteInstanceSnapshotReply unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DeleteInstanceSnapshotReply: + """Test DeleteInstanceSnapshotReply + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DeleteInstanceSnapshotReply` + """ + model = DeleteInstanceSnapshotReply() + if include_optional: + return DeleteInstanceSnapshotReply( + instance_snapshot = koyeb.api.models.instance_snapshot.InstanceSnapshot( + id = '', + name = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + available_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + organization_id = '', + project_id = '', + service_id = '', + deployment_id = '', + regional_deployment_id = '', + instance_id = '', + status = 'INSTANCE_SNAPSHOT_STATUS_INVALID', + type = 'INSTANCE_SNAPSHOT_TYPE_INVALID', + version = '', + messages = [ + '' + ], ) + ) + else: + return DeleteInstanceSnapshotReply( + ) + """ + + def testDeleteInstanceSnapshotReply(self): + """Test DeleteInstanceSnapshotReply""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/koyeb/api/test/test_egress_policy.py b/koyeb/api/test/test_egress_policy.py new file mode 100644 index 00000000..7b1c8742 --- /dev/null +++ b/koyeb/api/test/test_egress_policy.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from koyeb.api.models.egress_policy import EgressPolicy + +class TestEgressPolicy(unittest.TestCase): + """EgressPolicy unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EgressPolicy: + """Test EgressPolicy + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EgressPolicy` + """ + model = EgressPolicy() + if include_optional: + return EgressPolicy( + mode = 'EGRESS_POLICY_MODE_DEFAULT', + allow_list = [ + koyeb.api.models.network_policy_destination.NetworkPolicyDestination( + cidr = '', ) + ] + ) + else: + return EgressPolicy( + ) + """ + + def testEgressPolicy(self): + """Test EgressPolicy""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/koyeb/api/test/test_egress_policy_mode.py b/koyeb/api/test/test_egress_policy_mode.py new file mode 100644 index 00000000..845f3b3b --- /dev/null +++ b/koyeb/api/test/test_egress_policy_mode.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from koyeb.api.models.egress_policy_mode import EgressPolicyMode + +class TestEgressPolicyMode(unittest.TestCase): + """EgressPolicyMode unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEgressPolicyMode(self): + """Test EgressPolicyMode""" + # inst = EgressPolicyMode() + +if __name__ == '__main__': + unittest.main() diff --git a/koyeb/api/test/test_get_instance_snapshot_reply.py b/koyeb/api/test/test_get_instance_snapshot_reply.py new file mode 100644 index 00000000..f8756dd3 --- /dev/null +++ b/koyeb/api/test/test_get_instance_snapshot_reply.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from koyeb.api.models.get_instance_snapshot_reply import GetInstanceSnapshotReply + +class TestGetInstanceSnapshotReply(unittest.TestCase): + """GetInstanceSnapshotReply unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetInstanceSnapshotReply: + """Test GetInstanceSnapshotReply + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetInstanceSnapshotReply` + """ + model = GetInstanceSnapshotReply() + if include_optional: + return GetInstanceSnapshotReply( + instance_snapshot = koyeb.api.models.instance_snapshot.InstanceSnapshot( + id = '', + name = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + available_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + organization_id = '', + project_id = '', + service_id = '', + deployment_id = '', + regional_deployment_id = '', + instance_id = '', + status = 'INSTANCE_SNAPSHOT_STATUS_INVALID', + type = 'INSTANCE_SNAPSHOT_TYPE_INVALID', + version = '', + messages = [ + '' + ], ) + ) + else: + return GetInstanceSnapshotReply( + ) + """ + + def testGetInstanceSnapshotReply(self): + """Test GetInstanceSnapshotReply""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/koyeb/api/test/test_instance_snapshot.py b/koyeb/api/test/test_instance_snapshot.py new file mode 100644 index 00000000..5e9268cb --- /dev/null +++ b/koyeb/api/test/test_instance_snapshot.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from koyeb.api.models.instance_snapshot import InstanceSnapshot + +class TestInstanceSnapshot(unittest.TestCase): + """InstanceSnapshot unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceSnapshot: + """Test InstanceSnapshot + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceSnapshot` + """ + model = InstanceSnapshot() + if include_optional: + return InstanceSnapshot( + id = '', + name = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + available_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + organization_id = '', + project_id = '', + service_id = '', + deployment_id = '', + regional_deployment_id = '', + instance_id = '', + status = 'INSTANCE_SNAPSHOT_STATUS_INVALID', + type = 'INSTANCE_SNAPSHOT_TYPE_INVALID', + version = '', + messages = [ + '' + ] + ) + else: + return InstanceSnapshot( + ) + """ + + def testInstanceSnapshot(self): + """Test InstanceSnapshot""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/koyeb/api/test/test_instance_snapshot_event.py b/koyeb/api/test/test_instance_snapshot_event.py new file mode 100644 index 00000000..d38168ac --- /dev/null +++ b/koyeb/api/test/test_instance_snapshot_event.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from koyeb.api.models.instance_snapshot_event import InstanceSnapshotEvent + +class TestInstanceSnapshotEvent(unittest.TestCase): + """InstanceSnapshotEvent unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceSnapshotEvent: + """Test InstanceSnapshotEvent + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceSnapshotEvent` + """ + model = InstanceSnapshotEvent() + if include_optional: + return InstanceSnapshotEvent( + id = '', + when = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + organization_id = '', + instance_snapshot_id = '', + type = '', + message = '', + metadata = None + ) + else: + return InstanceSnapshotEvent( + ) + """ + + def testInstanceSnapshotEvent(self): + """Test InstanceSnapshotEvent""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/koyeb/api/test/test_instance_snapshot_quotas.py b/koyeb/api/test/test_instance_snapshot_quotas.py new file mode 100644 index 00000000..743b7afe --- /dev/null +++ b/koyeb/api/test/test_instance_snapshot_quotas.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from koyeb.api.models.instance_snapshot_quotas import InstanceSnapshotQuotas + +class TestInstanceSnapshotQuotas(unittest.TestCase): + """InstanceSnapshotQuotas unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceSnapshotQuotas: + """Test InstanceSnapshotQuotas + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceSnapshotQuotas` + """ + model = InstanceSnapshotQuotas() + if include_optional: + return InstanceSnapshotQuotas( + filesystem = 56, + full = 56 + ) + else: + return InstanceSnapshotQuotas( + ) + """ + + def testInstanceSnapshotQuotas(self): + """Test InstanceSnapshotQuotas""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/koyeb/api/test/test_instance_snapshot_status.py b/koyeb/api/test/test_instance_snapshot_status.py new file mode 100644 index 00000000..62d85c83 --- /dev/null +++ b/koyeb/api/test/test_instance_snapshot_status.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from koyeb.api.models.instance_snapshot_status import InstanceSnapshotStatus + +class TestInstanceSnapshotStatus(unittest.TestCase): + """InstanceSnapshotStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInstanceSnapshotStatus(self): + """Test InstanceSnapshotStatus""" + # inst = InstanceSnapshotStatus() + +if __name__ == '__main__': + unittest.main() diff --git a/koyeb/api/test/test_instance_snapshot_type.py b/koyeb/api/test/test_instance_snapshot_type.py new file mode 100644 index 00000000..69bc8cc2 --- /dev/null +++ b/koyeb/api/test/test_instance_snapshot_type.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from koyeb.api.models.instance_snapshot_type import InstanceSnapshotType + +class TestInstanceSnapshotType(unittest.TestCase): + """InstanceSnapshotType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInstanceSnapshotType(self): + """Test InstanceSnapshotType""" + # inst = InstanceSnapshotType() + +if __name__ == '__main__': + unittest.main() diff --git a/koyeb/api/test/test_instance_snapshots_api.py b/koyeb/api/test/test_instance_snapshots_api.py new file mode 100644 index 00000000..c873c375 --- /dev/null +++ b/koyeb/api/test/test_instance_snapshots_api.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from koyeb.api.api.instance_snapshots_api import InstanceSnapshotsApi + + +class TestInstanceSnapshotsApi(unittest.TestCase): + """InstanceSnapshotsApi unit test stubs""" + + def setUp(self) -> None: + self.api = InstanceSnapshotsApi() + + def tearDown(self) -> None: + pass + + def test_create_instance_snapshot(self) -> None: + """Test case for create_instance_snapshot + + """ + pass + + def test_delete_instance_snapshot(self) -> None: + """Test case for delete_instance_snapshot + + """ + pass + + def test_get_instance_snapshot(self) -> None: + """Test case for get_instance_snapshot + + """ + pass + + def test_list_instance_snapshot_events(self) -> None: + """Test case for list_instance_snapshot_events + + """ + pass + + def test_list_instance_snapshots(self) -> None: + """Test case for list_instance_snapshots + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/koyeb/api/test/test_list_instance_snapshot_events_reply.py b/koyeb/api/test/test_list_instance_snapshot_events_reply.py new file mode 100644 index 00000000..d15c993a --- /dev/null +++ b/koyeb/api/test/test_list_instance_snapshot_events_reply.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from koyeb.api.models.list_instance_snapshot_events_reply import ListInstanceSnapshotEventsReply + +class TestListInstanceSnapshotEventsReply(unittest.TestCase): + """ListInstanceSnapshotEventsReply unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListInstanceSnapshotEventsReply: + """Test ListInstanceSnapshotEventsReply + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ListInstanceSnapshotEventsReply` + """ + model = ListInstanceSnapshotEventsReply() + if include_optional: + return ListInstanceSnapshotEventsReply( + events = [ + koyeb.api.models.instance_snapshot_event.InstanceSnapshotEvent( + id = '', + when = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + organization_id = '', + instance_snapshot_id = '', + type = '', + message = '', + metadata = koyeb.api.models.metadata.metadata(), ) + ], + limit = 56, + offset = 56, + order = '', + has_next = True + ) + else: + return ListInstanceSnapshotEventsReply( + ) + """ + + def testListInstanceSnapshotEventsReply(self): + """Test ListInstanceSnapshotEventsReply""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/koyeb/api/test/test_list_instance_snapshots_reply.py b/koyeb/api/test/test_list_instance_snapshots_reply.py new file mode 100644 index 00000000..5207afff --- /dev/null +++ b/koyeb/api/test/test_list_instance_snapshots_reply.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from koyeb.api.models.list_instance_snapshots_reply import ListInstanceSnapshotsReply + +class TestListInstanceSnapshotsReply(unittest.TestCase): + """ListInstanceSnapshotsReply unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListInstanceSnapshotsReply: + """Test ListInstanceSnapshotsReply + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ListInstanceSnapshotsReply` + """ + model = ListInstanceSnapshotsReply() + if include_optional: + return ListInstanceSnapshotsReply( + instance_snapshots = [ + koyeb.api.models.instance_snapshot.InstanceSnapshot( + id = '', + name = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + available_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + organization_id = '', + project_id = '', + service_id = '', + deployment_id = '', + regional_deployment_id = '', + instance_id = '', + status = 'INSTANCE_SNAPSHOT_STATUS_INVALID', + type = 'INSTANCE_SNAPSHOT_TYPE_INVALID', + version = '', + messages = [ + '' + ], ) + ], + limit = 56, + offset = 56, + count = 56, + has_next = True + ) + else: + return ListInstanceSnapshotsReply( + ) + """ + + def testListInstanceSnapshotsReply(self): + """Test ListInstanceSnapshotsReply""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/koyeb/api/test/test_network_policy.py b/koyeb/api/test/test_network_policy.py new file mode 100644 index 00000000..85b6e4c7 --- /dev/null +++ b/koyeb/api/test/test_network_policy.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from koyeb.api.models.network_policy import NetworkPolicy + +class TestNetworkPolicy(unittest.TestCase): + """NetworkPolicy unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> NetworkPolicy: + """Test NetworkPolicy + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `NetworkPolicy` + """ + model = NetworkPolicy() + if include_optional: + return NetworkPolicy( + egress = koyeb.api.models.egress_policy.EgressPolicy( + mode = 'EGRESS_POLICY_MODE_DEFAULT', + allow_list = [ + koyeb.api.models.network_policy_destination.NetworkPolicyDestination( + cidr = '', ) + ], ) + ) + else: + return NetworkPolicy( + ) + """ + + def testNetworkPolicy(self): + """Test NetworkPolicy""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/koyeb/api/test/test_network_policy_destination.py b/koyeb/api/test/test_network_policy_destination.py new file mode 100644 index 00000000..dbf6edd6 --- /dev/null +++ b/koyeb/api/test/test_network_policy_destination.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from koyeb.api.models.network_policy_destination import NetworkPolicyDestination + +class TestNetworkPolicyDestination(unittest.TestCase): + """NetworkPolicyDestination unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> NetworkPolicyDestination: + """Test NetworkPolicyDestination + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `NetworkPolicyDestination` + """ + model = NetworkPolicyDestination() + if include_optional: + return NetworkPolicyDestination( + cidr = '' + ) + else: + return NetworkPolicyDestination( + ) + """ + + def testNetworkPolicyDestination(self): + """Test NetworkPolicyDestination""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/koyeb/api_README.md b/koyeb/api_README.md index c3dd07d7..d928e964 100644 --- a/koyeb/api_README.md +++ b/koyeb/api_README.md @@ -111,6 +111,11 @@ Class | Method | HTTP request | Description *DomainsApi* | [**list_domains**](koyeb/api/docs/DomainsApi.md#list_domains) | **GET** /v1/domains | List Domains *DomainsApi* | [**refresh_domain_status**](koyeb/api/docs/DomainsApi.md#refresh_domain_status) | **POST** /v1/domains/{id}/refresh | Refresh Domain Status *DomainsApi* | [**update_domain**](koyeb/api/docs/DomainsApi.md#update_domain) | **PATCH** /v1/domains/{id} | Update Domain +*InstanceSnapshotsApi* | [**create_instance_snapshot**](koyeb/api/docs/InstanceSnapshotsApi.md#create_instance_snapshot) | **POST** /v1/instance_snapshots | +*InstanceSnapshotsApi* | [**delete_instance_snapshot**](koyeb/api/docs/InstanceSnapshotsApi.md#delete_instance_snapshot) | **DELETE** /v1/instance_snapshots/{id} | +*InstanceSnapshotsApi* | [**get_instance_snapshot**](koyeb/api/docs/InstanceSnapshotsApi.md#get_instance_snapshot) | **GET** /v1/instance_snapshots/{id} | +*InstanceSnapshotsApi* | [**list_instance_snapshot_events**](koyeb/api/docs/InstanceSnapshotsApi.md#list_instance_snapshot_events) | **GET** /v1/instance_snapshot_events | +*InstanceSnapshotsApi* | [**list_instance_snapshots**](koyeb/api/docs/InstanceSnapshotsApi.md#list_instance_snapshots) | **GET** /v1/instance_snapshots | *InstancesApi* | [**exec_command**](koyeb/api/docs/InstancesApi.md#exec_command) | **GET** /v1/streams/instances/exec | Exec Command *InstancesApi* | [**get_instance**](koyeb/api/docs/InstancesApi.md#get_instance) | **GET** /v1/instances/{id} | Get Instance *InstancesApi* | [**list_instance_events**](koyeb/api/docs/InstancesApi.md#list_instance_events) | **GET** /v1/instance_events | List Instance events @@ -296,6 +301,8 @@ Class | Method | HTTP request | Description - [CreateCredentialReply](koyeb/api/docs/CreateCredentialReply.md) - [CreateDomain](koyeb/api/docs/CreateDomain.md) - [CreateDomainReply](koyeb/api/docs/CreateDomainReply.md) + - [CreateInstanceSnapshotReply](koyeb/api/docs/CreateInstanceSnapshotReply.md) + - [CreateInstanceSnapshotRequest](koyeb/api/docs/CreateInstanceSnapshotRequest.md) - [CreateOrganizationInvitationReply](koyeb/api/docs/CreateOrganizationInvitationReply.md) - [CreateOrganizationInvitationRequest](koyeb/api/docs/CreateOrganizationInvitationRequest.md) - [CreateOrganizationReply](koyeb/api/docs/CreateOrganizationReply.md) @@ -325,6 +332,7 @@ Class | Method | HTTP request | Description - [DeclareStageProgressRequest](koyeb/api/docs/DeclareStageProgressRequest.md) - [DeclareStepProgressRequest](koyeb/api/docs/DeclareStepProgressRequest.md) - [DeclineOrganizationInvitationReply](koyeb/api/docs/DeclineOrganizationInvitationReply.md) + - [DeleteInstanceSnapshotReply](koyeb/api/docs/DeleteInstanceSnapshotReply.md) - [DeleteOrganizationReply](koyeb/api/docs/DeleteOrganizationReply.md) - [DeletePersistentVolumeReply](koyeb/api/docs/DeletePersistentVolumeReply.md) - [DeleteSnapshotReply](koyeb/api/docs/DeleteSnapshotReply.md) @@ -378,6 +386,8 @@ Class | Method | HTTP request | Description - [DomainStatus](koyeb/api/docs/DomainStatus.md) - [DomainType](koyeb/api/docs/DomainType.md) - [DomainsSummary](koyeb/api/docs/DomainsSummary.md) + - [EgressPolicy](koyeb/api/docs/EgressPolicy.md) + - [EgressPolicyMode](koyeb/api/docs/EgressPolicyMode.md) - [Env](koyeb/api/docs/Env.md) - [Error](koyeb/api/docs/Error.md) - [ErrorField](koyeb/api/docs/ErrorField.md) @@ -399,6 +409,7 @@ Class | Method | HTTP request | Description - [GetGithubInstallationReply](koyeb/api/docs/GetGithubInstallationReply.md) - [GetIdenfyTokenReply](koyeb/api/docs/GetIdenfyTokenReply.md) - [GetInstanceReply](koyeb/api/docs/GetInstanceReply.md) + - [GetInstanceSnapshotReply](koyeb/api/docs/GetInstanceSnapshotReply.md) - [GetIntercomProfileReply](koyeb/api/docs/GetIntercomProfileReply.md) - [GetMetricsReply](koyeb/api/docs/GetMetricsReply.md) - [GetMetricsReplyMetric](koyeb/api/docs/GetMetricsReplyMetric.md) @@ -438,6 +449,11 @@ Class | Method | HTTP request | Description - [InstanceAvailability](koyeb/api/docs/InstanceAvailability.md) - [InstanceEvent](koyeb/api/docs/InstanceEvent.md) - [InstanceListItem](koyeb/api/docs/InstanceListItem.md) + - [InstanceSnapshot](koyeb/api/docs/InstanceSnapshot.md) + - [InstanceSnapshotEvent](koyeb/api/docs/InstanceSnapshotEvent.md) + - [InstanceSnapshotQuotas](koyeb/api/docs/InstanceSnapshotQuotas.md) + - [InstanceSnapshotStatus](koyeb/api/docs/InstanceSnapshotStatus.md) + - [InstanceSnapshotType](koyeb/api/docs/InstanceSnapshotType.md) - [InstanceStatus](koyeb/api/docs/InstanceStatus.md) - [InstanceUsage](koyeb/api/docs/InstanceUsage.md) - [InstancesSummary](koyeb/api/docs/InstancesSummary.md) @@ -470,6 +486,8 @@ Class | Method | HTTP request | Description - [ListDeploymentsReply](koyeb/api/docs/ListDeploymentsReply.md) - [ListDomainsReply](koyeb/api/docs/ListDomainsReply.md) - [ListInstanceEventsReply](koyeb/api/docs/ListInstanceEventsReply.md) + - [ListInstanceSnapshotEventsReply](koyeb/api/docs/ListInstanceSnapshotEventsReply.md) + - [ListInstanceSnapshotsReply](koyeb/api/docs/ListInstanceSnapshotsReply.md) - [ListInstancesReply](koyeb/api/docs/ListInstancesReply.md) - [ListOrganizationInvitationsReply](koyeb/api/docs/ListOrganizationInvitationsReply.md) - [ListOrganizationMembersReply](koyeb/api/docs/ListOrganizationMembersReply.md) @@ -501,6 +519,8 @@ Class | Method | HTTP request | Description - [NeonPostgresDatabaseNeonDatabase](koyeb/api/docs/NeonPostgresDatabaseNeonDatabase.md) - [NeonPostgresDatabaseNeonRole](koyeb/api/docs/NeonPostgresDatabaseNeonRole.md) - [NeonPostgresSummary](koyeb/api/docs/NeonPostgresSummary.md) + - [NetworkPolicy](koyeb/api/docs/NetworkPolicy.md) + - [NetworkPolicyDestination](koyeb/api/docs/NetworkPolicyDestination.md) - [NextInvoiceReply](koyeb/api/docs/NextInvoiceReply.md) - [NextInvoiceReplyDiscount](koyeb/api/docs/NextInvoiceReplyDiscount.md) - [NextInvoiceReplyDiscountType](koyeb/api/docs/NextInvoiceReplyDiscountType.md) diff --git a/koyeb/api_async/.openapi-generator/FILES b/koyeb/api_async/.openapi-generator/FILES index 98b25f2e..2749fda4 100644 --- a/koyeb/api_async/.openapi-generator/FILES +++ b/koyeb/api_async/.openapi-generator/FILES @@ -15,6 +15,7 @@ koyeb/api_async/api/credentials_api.py koyeb/api_async/api/deployments_api.py koyeb/api_async/api/docker_helper_api.py koyeb/api_async/api/domains_api.py +koyeb/api_async/api/instance_snapshots_api.py koyeb/api_async/api/instances_api.py koyeb/api_async/api/intercom_api.py koyeb/api_async/api/invite_api.py @@ -103,6 +104,8 @@ koyeb/api_async/docs/CreateCredential.md koyeb/api_async/docs/CreateCredentialReply.md koyeb/api_async/docs/CreateDomain.md koyeb/api_async/docs/CreateDomainReply.md +koyeb/api_async/docs/CreateInstanceSnapshotReply.md +koyeb/api_async/docs/CreateInstanceSnapshotRequest.md koyeb/api_async/docs/CreateOrganizationInvitationReply.md koyeb/api_async/docs/CreateOrganizationInvitationRequest.md koyeb/api_async/docs/CreateOrganizationReply.md @@ -133,6 +136,7 @@ koyeb/api_async/docs/DeactivateOrganizationRequest.md koyeb/api_async/docs/DeclareStageProgressRequest.md koyeb/api_async/docs/DeclareStepProgressRequest.md koyeb/api_async/docs/DeclineOrganizationInvitationReply.md +koyeb/api_async/docs/DeleteInstanceSnapshotReply.md koyeb/api_async/docs/DeleteOrganizationReply.md koyeb/api_async/docs/DeletePersistentVolumeReply.md koyeb/api_async/docs/DeleteSnapshotReply.md @@ -189,6 +193,8 @@ koyeb/api_async/docs/DomainStatus.md koyeb/api_async/docs/DomainType.md koyeb/api_async/docs/DomainsApi.md koyeb/api_async/docs/DomainsSummary.md +koyeb/api_async/docs/EgressPolicy.md +koyeb/api_async/docs/EgressPolicyMode.md koyeb/api_async/docs/Env.md koyeb/api_async/docs/Error.md koyeb/api_async/docs/ErrorField.md @@ -210,6 +216,7 @@ koyeb/api_async/docs/GetDomainReply.md koyeb/api_async/docs/GetGithubInstallationReply.md koyeb/api_async/docs/GetIdenfyTokenReply.md koyeb/api_async/docs/GetInstanceReply.md +koyeb/api_async/docs/GetInstanceSnapshotReply.md koyeb/api_async/docs/GetIntercomProfileReply.md koyeb/api_async/docs/GetMetricsReply.md koyeb/api_async/docs/GetMetricsReplyMetric.md @@ -249,6 +256,12 @@ koyeb/api_async/docs/Instance.md koyeb/api_async/docs/InstanceAvailability.md koyeb/api_async/docs/InstanceEvent.md koyeb/api_async/docs/InstanceListItem.md +koyeb/api_async/docs/InstanceSnapshot.md +koyeb/api_async/docs/InstanceSnapshotEvent.md +koyeb/api_async/docs/InstanceSnapshotQuotas.md +koyeb/api_async/docs/InstanceSnapshotStatus.md +koyeb/api_async/docs/InstanceSnapshotType.md +koyeb/api_async/docs/InstanceSnapshotsApi.md koyeb/api_async/docs/InstanceStatus.md koyeb/api_async/docs/InstanceUsage.md koyeb/api_async/docs/InstancesApi.md @@ -284,6 +297,8 @@ koyeb/api_async/docs/ListDeploymentEventsReply.md koyeb/api_async/docs/ListDeploymentsReply.md koyeb/api_async/docs/ListDomainsReply.md koyeb/api_async/docs/ListInstanceEventsReply.md +koyeb/api_async/docs/ListInstanceSnapshotEventsReply.md +koyeb/api_async/docs/ListInstanceSnapshotsReply.md koyeb/api_async/docs/ListInstancesReply.md koyeb/api_async/docs/ListOrganizationInvitationsReply.md koyeb/api_async/docs/ListOrganizationMembersReply.md @@ -317,6 +332,8 @@ koyeb/api_async/docs/NeonPostgresDatabaseDeploymentMetadata.md koyeb/api_async/docs/NeonPostgresDatabaseNeonDatabase.md koyeb/api_async/docs/NeonPostgresDatabaseNeonRole.md koyeb/api_async/docs/NeonPostgresSummary.md +koyeb/api_async/docs/NetworkPolicy.md +koyeb/api_async/docs/NetworkPolicyDestination.md koyeb/api_async/docs/NextInvoiceReply.md koyeb/api_async/docs/NextInvoiceReplyDiscount.md koyeb/api_async/docs/NextInvoiceReplyDiscountType.md @@ -523,6 +540,8 @@ koyeb/api_async/models/create_credential.py koyeb/api_async/models/create_credential_reply.py koyeb/api_async/models/create_domain.py koyeb/api_async/models/create_domain_reply.py +koyeb/api_async/models/create_instance_snapshot_reply.py +koyeb/api_async/models/create_instance_snapshot_request.py koyeb/api_async/models/create_organization_invitation_reply.py koyeb/api_async/models/create_organization_invitation_request.py koyeb/api_async/models/create_organization_reply.py @@ -552,6 +571,7 @@ koyeb/api_async/models/deactivate_organization_request.py koyeb/api_async/models/declare_stage_progress_request.py koyeb/api_async/models/declare_step_progress_request.py koyeb/api_async/models/decline_organization_invitation_reply.py +koyeb/api_async/models/delete_instance_snapshot_reply.py koyeb/api_async/models/delete_organization_reply.py koyeb/api_async/models/delete_persistent_volume_reply.py koyeb/api_async/models/delete_snapshot_reply.py @@ -605,6 +625,8 @@ koyeb/api_async/models/domain_load_balancer_quotas.py koyeb/api_async/models/domain_status.py koyeb/api_async/models/domain_type.py koyeb/api_async/models/domains_summary.py +koyeb/api_async/models/egress_policy.py +koyeb/api_async/models/egress_policy_mode.py koyeb/api_async/models/env.py koyeb/api_async/models/error.py koyeb/api_async/models/error_field.py @@ -626,6 +648,7 @@ koyeb/api_async/models/get_domain_reply.py koyeb/api_async/models/get_github_installation_reply.py koyeb/api_async/models/get_idenfy_token_reply.py koyeb/api_async/models/get_instance_reply.py +koyeb/api_async/models/get_instance_snapshot_reply.py koyeb/api_async/models/get_intercom_profile_reply.py koyeb/api_async/models/get_metrics_reply.py koyeb/api_async/models/get_metrics_reply_metric.py @@ -665,6 +688,11 @@ koyeb/api_async/models/instance.py koyeb/api_async/models/instance_availability.py koyeb/api_async/models/instance_event.py koyeb/api_async/models/instance_list_item.py +koyeb/api_async/models/instance_snapshot.py +koyeb/api_async/models/instance_snapshot_event.py +koyeb/api_async/models/instance_snapshot_quotas.py +koyeb/api_async/models/instance_snapshot_status.py +koyeb/api_async/models/instance_snapshot_type.py koyeb/api_async/models/instance_status.py koyeb/api_async/models/instance_usage.py koyeb/api_async/models/instances_summary.py @@ -697,6 +725,8 @@ koyeb/api_async/models/list_deployment_events_reply.py koyeb/api_async/models/list_deployments_reply.py koyeb/api_async/models/list_domains_reply.py koyeb/api_async/models/list_instance_events_reply.py +koyeb/api_async/models/list_instance_snapshot_events_reply.py +koyeb/api_async/models/list_instance_snapshots_reply.py koyeb/api_async/models/list_instances_reply.py koyeb/api_async/models/list_organization_invitations_reply.py koyeb/api_async/models/list_organization_members_reply.py @@ -728,6 +758,8 @@ koyeb/api_async/models/neon_postgres_database_deployment_metadata.py koyeb/api_async/models/neon_postgres_database_neon_database.py koyeb/api_async/models/neon_postgres_database_neon_role.py koyeb/api_async/models/neon_postgres_summary.py +koyeb/api_async/models/network_policy.py +koyeb/api_async/models/network_policy_destination.py koyeb/api_async/models/next_invoice_reply.py koyeb/api_async/models/next_invoice_reply_discount.py koyeb/api_async/models/next_invoice_reply_discount_type.py @@ -864,4 +896,20 @@ koyeb/api_async/models/verify_docker_image_reply.py koyeb/api_async/models/verify_docker_image_reply_err_code.py koyeb/api_async/rest.py koyeb/api_async/test/__init__.py +koyeb/api_async/test/test_create_instance_snapshot_reply.py +koyeb/api_async/test/test_create_instance_snapshot_request.py +koyeb/api_async/test/test_delete_instance_snapshot_reply.py +koyeb/api_async/test/test_egress_policy.py +koyeb/api_async/test/test_egress_policy_mode.py +koyeb/api_async/test/test_get_instance_snapshot_reply.py +koyeb/api_async/test/test_instance_snapshot.py +koyeb/api_async/test/test_instance_snapshot_event.py +koyeb/api_async/test/test_instance_snapshot_quotas.py +koyeb/api_async/test/test_instance_snapshot_status.py +koyeb/api_async/test/test_instance_snapshot_type.py +koyeb/api_async/test/test_instance_snapshots_api.py +koyeb/api_async/test/test_list_instance_snapshot_events_reply.py +koyeb/api_async/test/test_list_instance_snapshots_reply.py +koyeb/api_async/test/test_network_policy.py +koyeb/api_async/test/test_network_policy_destination.py koyeb/api_async_README.md diff --git a/koyeb/api_async/__init__.py b/koyeb/api_async/__init__.py index 93e0aece..7d6bba74 100644 --- a/koyeb/api_async/__init__.py +++ b/koyeb/api_async/__init__.py @@ -30,6 +30,7 @@ "DeploymentsApi", "DockerHelperApi", "DomainsApi", + "InstanceSnapshotsApi", "InstancesApi", "IntercomApi", "LogsApi", @@ -116,6 +117,8 @@ "CreateCredentialReply", "CreateDomain", "CreateDomainReply", + "CreateInstanceSnapshotReply", + "CreateInstanceSnapshotRequest", "CreateOrganizationInvitationReply", "CreateOrganizationInvitationRequest", "CreateOrganizationReply", @@ -145,6 +148,7 @@ "DeclareStageProgressRequest", "DeclareStepProgressRequest", "DeclineOrganizationInvitationReply", + "DeleteInstanceSnapshotReply", "DeleteOrganizationReply", "DeletePersistentVolumeReply", "DeleteSnapshotReply", @@ -198,6 +202,8 @@ "DomainStatus", "DomainType", "DomainsSummary", + "EgressPolicy", + "EgressPolicyMode", "Env", "Error", "ErrorField", @@ -219,6 +225,7 @@ "GetGithubInstallationReply", "GetIdenfyTokenReply", "GetInstanceReply", + "GetInstanceSnapshotReply", "GetIntercomProfileReply", "GetMetricsReply", "GetMetricsReplyMetric", @@ -258,6 +265,11 @@ "InstanceAvailability", "InstanceEvent", "InstanceListItem", + "InstanceSnapshot", + "InstanceSnapshotEvent", + "InstanceSnapshotQuotas", + "InstanceSnapshotStatus", + "InstanceSnapshotType", "InstanceStatus", "InstanceUsage", "InstancesSummary", @@ -290,6 +302,8 @@ "ListDeploymentsReply", "ListDomainsReply", "ListInstanceEventsReply", + "ListInstanceSnapshotEventsReply", + "ListInstanceSnapshotsReply", "ListInstancesReply", "ListOrganizationInvitationsReply", "ListOrganizationMembersReply", @@ -321,6 +335,8 @@ "NeonPostgresDatabaseNeonDatabase", "NeonPostgresDatabaseNeonRole", "NeonPostgresSummary", + "NetworkPolicy", + "NetworkPolicyDestination", "NextInvoiceReply", "NextInvoiceReplyDiscount", "NextInvoiceReplyDiscountType", @@ -470,6 +486,7 @@ from koyeb.api_async.api.deployments_api import DeploymentsApi as DeploymentsApi from koyeb.api_async.api.docker_helper_api import DockerHelperApi as DockerHelperApi from koyeb.api_async.api.domains_api import DomainsApi as DomainsApi +from koyeb.api_async.api.instance_snapshots_api import InstanceSnapshotsApi as InstanceSnapshotsApi from koyeb.api_async.api.instances_api import InstancesApi as InstancesApi from koyeb.api_async.api.intercom_api import IntercomApi as IntercomApi from koyeb.api_async.api.logs_api import LogsApi as LogsApi @@ -560,6 +577,8 @@ from koyeb.api_async.models.create_credential_reply import CreateCredentialReply as CreateCredentialReply from koyeb.api_async.models.create_domain import CreateDomain as CreateDomain from koyeb.api_async.models.create_domain_reply import CreateDomainReply as CreateDomainReply +from koyeb.api_async.models.create_instance_snapshot_reply import CreateInstanceSnapshotReply as CreateInstanceSnapshotReply +from koyeb.api_async.models.create_instance_snapshot_request import CreateInstanceSnapshotRequest as CreateInstanceSnapshotRequest from koyeb.api_async.models.create_organization_invitation_reply import CreateOrganizationInvitationReply as CreateOrganizationInvitationReply from koyeb.api_async.models.create_organization_invitation_request import CreateOrganizationInvitationRequest as CreateOrganizationInvitationRequest from koyeb.api_async.models.create_organization_reply import CreateOrganizationReply as CreateOrganizationReply @@ -589,6 +608,7 @@ from koyeb.api_async.models.declare_stage_progress_request import DeclareStageProgressRequest as DeclareStageProgressRequest from koyeb.api_async.models.declare_step_progress_request import DeclareStepProgressRequest as DeclareStepProgressRequest from koyeb.api_async.models.decline_organization_invitation_reply import DeclineOrganizationInvitationReply as DeclineOrganizationInvitationReply +from koyeb.api_async.models.delete_instance_snapshot_reply import DeleteInstanceSnapshotReply as DeleteInstanceSnapshotReply from koyeb.api_async.models.delete_organization_reply import DeleteOrganizationReply as DeleteOrganizationReply from koyeb.api_async.models.delete_persistent_volume_reply import DeletePersistentVolumeReply as DeletePersistentVolumeReply from koyeb.api_async.models.delete_snapshot_reply import DeleteSnapshotReply as DeleteSnapshotReply @@ -642,6 +662,8 @@ from koyeb.api_async.models.domain_status import DomainStatus as DomainStatus from koyeb.api_async.models.domain_type import DomainType as DomainType from koyeb.api_async.models.domains_summary import DomainsSummary as DomainsSummary +from koyeb.api_async.models.egress_policy import EgressPolicy as EgressPolicy +from koyeb.api_async.models.egress_policy_mode import EgressPolicyMode as EgressPolicyMode from koyeb.api_async.models.env import Env as Env from koyeb.api_async.models.error import Error as Error from koyeb.api_async.models.error_field import ErrorField as ErrorField @@ -663,6 +685,7 @@ from koyeb.api_async.models.get_github_installation_reply import GetGithubInstallationReply as GetGithubInstallationReply from koyeb.api_async.models.get_idenfy_token_reply import GetIdenfyTokenReply as GetIdenfyTokenReply from koyeb.api_async.models.get_instance_reply import GetInstanceReply as GetInstanceReply +from koyeb.api_async.models.get_instance_snapshot_reply import GetInstanceSnapshotReply as GetInstanceSnapshotReply from koyeb.api_async.models.get_intercom_profile_reply import GetIntercomProfileReply as GetIntercomProfileReply from koyeb.api_async.models.get_metrics_reply import GetMetricsReply as GetMetricsReply from koyeb.api_async.models.get_metrics_reply_metric import GetMetricsReplyMetric as GetMetricsReplyMetric @@ -702,6 +725,11 @@ from koyeb.api_async.models.instance_availability import InstanceAvailability as InstanceAvailability from koyeb.api_async.models.instance_event import InstanceEvent as InstanceEvent from koyeb.api_async.models.instance_list_item import InstanceListItem as InstanceListItem +from koyeb.api_async.models.instance_snapshot import InstanceSnapshot as InstanceSnapshot +from koyeb.api_async.models.instance_snapshot_event import InstanceSnapshotEvent as InstanceSnapshotEvent +from koyeb.api_async.models.instance_snapshot_quotas import InstanceSnapshotQuotas as InstanceSnapshotQuotas +from koyeb.api_async.models.instance_snapshot_status import InstanceSnapshotStatus as InstanceSnapshotStatus +from koyeb.api_async.models.instance_snapshot_type import InstanceSnapshotType as InstanceSnapshotType from koyeb.api_async.models.instance_status import InstanceStatus as InstanceStatus from koyeb.api_async.models.instance_usage import InstanceUsage as InstanceUsage from koyeb.api_async.models.instances_summary import InstancesSummary as InstancesSummary @@ -734,6 +762,8 @@ from koyeb.api_async.models.list_deployments_reply import ListDeploymentsReply as ListDeploymentsReply from koyeb.api_async.models.list_domains_reply import ListDomainsReply as ListDomainsReply from koyeb.api_async.models.list_instance_events_reply import ListInstanceEventsReply as ListInstanceEventsReply +from koyeb.api_async.models.list_instance_snapshot_events_reply import ListInstanceSnapshotEventsReply as ListInstanceSnapshotEventsReply +from koyeb.api_async.models.list_instance_snapshots_reply import ListInstanceSnapshotsReply as ListInstanceSnapshotsReply from koyeb.api_async.models.list_instances_reply import ListInstancesReply as ListInstancesReply from koyeb.api_async.models.list_organization_invitations_reply import ListOrganizationInvitationsReply as ListOrganizationInvitationsReply from koyeb.api_async.models.list_organization_members_reply import ListOrganizationMembersReply as ListOrganizationMembersReply @@ -765,6 +795,8 @@ from koyeb.api_async.models.neon_postgres_database_neon_database import NeonPostgresDatabaseNeonDatabase as NeonPostgresDatabaseNeonDatabase from koyeb.api_async.models.neon_postgres_database_neon_role import NeonPostgresDatabaseNeonRole as NeonPostgresDatabaseNeonRole from koyeb.api_async.models.neon_postgres_summary import NeonPostgresSummary as NeonPostgresSummary +from koyeb.api_async.models.network_policy import NetworkPolicy as NetworkPolicy +from koyeb.api_async.models.network_policy_destination import NetworkPolicyDestination as NetworkPolicyDestination from koyeb.api_async.models.next_invoice_reply import NextInvoiceReply as NextInvoiceReply from koyeb.api_async.models.next_invoice_reply_discount import NextInvoiceReplyDiscount as NextInvoiceReplyDiscount from koyeb.api_async.models.next_invoice_reply_discount_type import NextInvoiceReplyDiscountType as NextInvoiceReplyDiscountType diff --git a/koyeb/api_async/api/__init__.py b/koyeb/api_async/api/__init__.py index 54a7ce1e..0d1e28ff 100644 --- a/koyeb/api_async/api/__init__.py +++ b/koyeb/api_async/api/__init__.py @@ -13,6 +13,7 @@ from koyeb.api_async.api.deployments_api import DeploymentsApi from koyeb.api_async.api.docker_helper_api import DockerHelperApi from koyeb.api_async.api.domains_api import DomainsApi +from koyeb.api_async.api.instance_snapshots_api import InstanceSnapshotsApi from koyeb.api_async.api.instances_api import InstancesApi from koyeb.api_async.api.intercom_api import IntercomApi from koyeb.api_async.api.logs_api import LogsApi diff --git a/koyeb/api_async/api/instance_snapshots_api.py b/koyeb/api_async/api/instance_snapshots_api.py new file mode 100644 index 00000000..ce4f6680 --- /dev/null +++ b/koyeb/api_async/api/instance_snapshots_api.py @@ -0,0 +1,1565 @@ +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr, field_validator +from typing import List, Optional +from typing_extensions import Annotated +from koyeb.api_async.models.create_instance_snapshot_reply import CreateInstanceSnapshotReply +from koyeb.api_async.models.create_instance_snapshot_request import CreateInstanceSnapshotRequest +from koyeb.api_async.models.delete_instance_snapshot_reply import DeleteInstanceSnapshotReply +from koyeb.api_async.models.get_instance_snapshot_reply import GetInstanceSnapshotReply +from koyeb.api_async.models.list_instance_snapshot_events_reply import ListInstanceSnapshotEventsReply +from koyeb.api_async.models.list_instance_snapshots_reply import ListInstanceSnapshotsReply + +from koyeb.api_async.api_client import ApiClient, RequestSerialized +from koyeb.api_async.api_response import ApiResponse +from koyeb.api_async.rest import RESTResponseType + + +class InstanceSnapshotsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + async def create_instance_snapshot( + self, + body: CreateInstanceSnapshotRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CreateInstanceSnapshotReply: + """create_instance_snapshot + + + :param body: (required) + :type body: CreateInstanceSnapshotRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_instance_snapshot_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateInstanceSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def create_instance_snapshot_with_http_info( + self, + body: CreateInstanceSnapshotRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CreateInstanceSnapshotReply]: + """create_instance_snapshot + + + :param body: (required) + :type body: CreateInstanceSnapshotRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_instance_snapshot_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateInstanceSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def create_instance_snapshot_without_preload_content( + self, + body: CreateInstanceSnapshotRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """create_instance_snapshot + + + :param body: (required) + :type body: CreateInstanceSnapshotRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_instance_snapshot_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateInstanceSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_instance_snapshot_serialize( + self, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'Bearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instance_snapshots', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_instance_snapshot( + self, + id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DeleteInstanceSnapshotReply: + """delete_instance_snapshot + + + :param id: (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_instance_snapshot_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DeleteInstanceSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_instance_snapshot_with_http_info( + self, + id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DeleteInstanceSnapshotReply]: + """delete_instance_snapshot + + + :param id: (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_instance_snapshot_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DeleteInstanceSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_instance_snapshot_without_preload_content( + self, + id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_instance_snapshot + + + :param id: (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_instance_snapshot_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DeleteInstanceSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_instance_snapshot_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'Bearer' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/instance_snapshots/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def get_instance_snapshot( + self, + id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GetInstanceSnapshotReply: + """get_instance_snapshot + + + :param id: (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_instance_snapshot_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetInstanceSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def get_instance_snapshot_with_http_info( + self, + id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GetInstanceSnapshotReply]: + """get_instance_snapshot + + + :param id: (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_instance_snapshot_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetInstanceSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def get_instance_snapshot_without_preload_content( + self, + id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_instance_snapshot + + + :param id: (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_instance_snapshot_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetInstanceSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_instance_snapshot_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'Bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/instance_snapshots/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_instance_snapshot_events( + self, + instance_snapshot_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on instance snapshot id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on instance snapshot event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ListInstanceSnapshotEventsReply: + """list_instance_snapshot_events + + + :param instance_snapshot_id: (Optional) Filter on instance snapshot id + :type instance_snapshot_id: str + :param types: (Optional) Filter on instance snapshot event types + :type types: List[str] + :param limit: (Optional) The number of items to return + :type limit: str + :param offset: (Optional) The offset in the list of item to return + :type offset: str + :param order: (Optional) Sorts the list in the ascending or the descending order + :type order: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_instance_snapshot_events_serialize( + instance_snapshot_id=instance_snapshot_id, + types=types, + limit=limit, + offset=offset, + order=order, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListInstanceSnapshotEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_instance_snapshot_events_with_http_info( + self, + instance_snapshot_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on instance snapshot id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on instance snapshot event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ListInstanceSnapshotEventsReply]: + """list_instance_snapshot_events + + + :param instance_snapshot_id: (Optional) Filter on instance snapshot id + :type instance_snapshot_id: str + :param types: (Optional) Filter on instance snapshot event types + :type types: List[str] + :param limit: (Optional) The number of items to return + :type limit: str + :param offset: (Optional) The offset in the list of item to return + :type offset: str + :param order: (Optional) Sorts the list in the ascending or the descending order + :type order: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_instance_snapshot_events_serialize( + instance_snapshot_id=instance_snapshot_id, + types=types, + limit=limit, + offset=offset, + order=order, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListInstanceSnapshotEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_instance_snapshot_events_without_preload_content( + self, + instance_snapshot_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on instance snapshot id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on instance snapshot event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """list_instance_snapshot_events + + + :param instance_snapshot_id: (Optional) Filter on instance snapshot id + :type instance_snapshot_id: str + :param types: (Optional) Filter on instance snapshot event types + :type types: List[str] + :param limit: (Optional) The number of items to return + :type limit: str + :param offset: (Optional) The offset in the list of item to return + :type offset: str + :param order: (Optional) Sorts the list in the ascending or the descending order + :type order: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_instance_snapshot_events_serialize( + instance_snapshot_id=instance_snapshot_id, + types=types, + limit=limit, + offset=offset, + order=order, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListInstanceSnapshotEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_instance_snapshot_events_serialize( + self, + instance_snapshot_id, + types, + limit, + offset, + order, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'types': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if instance_snapshot_id is not None: + + _query_params.append(('instance_snapshot_id', instance_snapshot_id)) + + if types is not None: + + _query_params.append(('types', types)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + if order is not None: + + _query_params.append(('order', order)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'Bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/instance_snapshot_events', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def list_instance_snapshots( + self, + limit: Optional[StrictStr] = None, + offset: Optional[StrictStr] = None, + name: Optional[StrictStr] = None, + statuses: Optional[List[StrictStr]] = None, + type: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ListInstanceSnapshotsReply: + """list_instance_snapshots + + + :param limit: + :type limit: str + :param offset: + :type offset: str + :param name: + :type name: str + :param statuses: + :type statuses: List[str] + :param type: + :type type: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_instance_snapshots_serialize( + limit=limit, + offset=offset, + name=name, + statuses=statuses, + type=type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListInstanceSnapshotsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def list_instance_snapshots_with_http_info( + self, + limit: Optional[StrictStr] = None, + offset: Optional[StrictStr] = None, + name: Optional[StrictStr] = None, + statuses: Optional[List[StrictStr]] = None, + type: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ListInstanceSnapshotsReply]: + """list_instance_snapshots + + + :param limit: + :type limit: str + :param offset: + :type offset: str + :param name: + :type name: str + :param statuses: + :type statuses: List[str] + :param type: + :type type: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_instance_snapshots_serialize( + limit=limit, + offset=offset, + name=name, + statuses=statuses, + type=type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListInstanceSnapshotsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def list_instance_snapshots_without_preload_content( + self, + limit: Optional[StrictStr] = None, + offset: Optional[StrictStr] = None, + name: Optional[StrictStr] = None, + statuses: Optional[List[StrictStr]] = None, + type: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """list_instance_snapshots + + + :param limit: + :type limit: str + :param offset: + :type offset: str + :param name: + :type name: str + :param statuses: + :type statuses: List[str] + :param type: + :type type: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_instance_snapshots_serialize( + limit=limit, + offset=offset, + name=name, + statuses=statuses, + type=type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListInstanceSnapshotsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_instance_snapshots_serialize( + self, + limit, + offset, + name, + statuses, + type, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'statuses': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + if name is not None: + + _query_params.append(('name', name)) + + if statuses is not None: + + _query_params.append(('statuses', statuses)) + + if type is not None: + + _query_params.append(('type', type)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'Bearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/instance_snapshots', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/koyeb/api_async/configuration.py b/koyeb/api_async/configuration.py index e3f22ad9..8cd0513e 100644 --- a/koyeb/api_async/configuration.py +++ b/koyeb/api_async/configuration.py @@ -17,8 +17,6 @@ from logging import FileHandler import sys from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union -from urllib.parse import urlparse -from urllib.request import getproxies_environment, proxy_bypass_environment from typing_extensions import NotRequired, Self @@ -329,7 +327,7 @@ def __init__( None in the constructor is coerced to default 100. """ - self.proxy = proxy if proxy is not None else self._get_proxy_from_env() + self.proxy = proxy """Proxy URL """ self.proxy_headers = proxy_headers @@ -356,19 +354,6 @@ def __init__( """date format """ - def _get_proxy_from_env(self) -> Optional[str]: - proxies = getproxies_environment() - if not proxies: - return None - - parsed = urlparse(self._base_path) - host = parsed.hostname or '' - - if proxy_bypass_environment(host): - return None - - return proxies.get(parsed.scheme) or proxies.get('all') or None - def __deepcopy__(self, memo: Dict[int, Any]) -> Self: cls = self.__class__ result = cls.__new__(cls) diff --git a/koyeb/api_async/docs/CreateInstanceSnapshotReply.md b/koyeb/api_async/docs/CreateInstanceSnapshotReply.md new file mode 100644 index 00000000..23a8d86d --- /dev/null +++ b/koyeb/api_async/docs/CreateInstanceSnapshotReply.md @@ -0,0 +1,29 @@ +# CreateInstanceSnapshotReply + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**instance_snapshot** | [**InstanceSnapshot**](InstanceSnapshot.md) | | [optional] + +## Example + +```python +from koyeb.api_async.models.create_instance_snapshot_reply import CreateInstanceSnapshotReply + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateInstanceSnapshotReply from a JSON string +create_instance_snapshot_reply_instance = CreateInstanceSnapshotReply.from_json(json) +# print the JSON string representation of the object +print(CreateInstanceSnapshotReply.to_json()) + +# convert the object into a dict +create_instance_snapshot_reply_dict = create_instance_snapshot_reply_instance.to_dict() +# create an instance of CreateInstanceSnapshotReply from a dict +create_instance_snapshot_reply_from_dict = CreateInstanceSnapshotReply.from_dict(create_instance_snapshot_reply_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/koyeb/api_async/docs/CreateInstanceSnapshotRequest.md b/koyeb/api_async/docs/CreateInstanceSnapshotRequest.md new file mode 100644 index 00000000..52fa4444 --- /dev/null +++ b/koyeb/api_async/docs/CreateInstanceSnapshotRequest.md @@ -0,0 +1,31 @@ +# CreateInstanceSnapshotRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**instance_id** | **str** | | [optional] +**name** | **str** | | [optional] +**type** | [**InstanceSnapshotType**](InstanceSnapshotType.md) | | [optional] [default to InstanceSnapshotType.INSTANCE_SNAPSHOT_TYPE_INVALID] + +## Example + +```python +from koyeb.api_async.models.create_instance_snapshot_request import CreateInstanceSnapshotRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateInstanceSnapshotRequest from a JSON string +create_instance_snapshot_request_instance = CreateInstanceSnapshotRequest.from_json(json) +# print the JSON string representation of the object +print(CreateInstanceSnapshotRequest.to_json()) + +# convert the object into a dict +create_instance_snapshot_request_dict = create_instance_snapshot_request_instance.to_dict() +# create an instance of CreateInstanceSnapshotRequest from a dict +create_instance_snapshot_request_from_dict = CreateInstanceSnapshotRequest.from_dict(create_instance_snapshot_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/koyeb/api_async/docs/CreateService.md b/koyeb/api_async/docs/CreateService.md index 63f1f302..ecf4951c 100644 --- a/koyeb/api_async/docs/CreateService.md +++ b/koyeb/api_async/docs/CreateService.md @@ -9,6 +9,8 @@ Name | Type | Description | Notes **definition** | [**DeploymentDefinition**](DeploymentDefinition.md) | | [optional] **life_cycle** | [**ServiceLifeCycle**](ServiceLifeCycle.md) | | [optional] **project_id** | **str** | | [optional] +**instance_snapshot_id** | **str** | | [optional] +**name** | **str** | | [optional] ## Example diff --git a/koyeb/api_async/docs/DeleteInstanceSnapshotReply.md b/koyeb/api_async/docs/DeleteInstanceSnapshotReply.md new file mode 100644 index 00000000..9694861e --- /dev/null +++ b/koyeb/api_async/docs/DeleteInstanceSnapshotReply.md @@ -0,0 +1,29 @@ +# DeleteInstanceSnapshotReply + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**instance_snapshot** | [**InstanceSnapshot**](InstanceSnapshot.md) | | [optional] + +## Example + +```python +from koyeb.api_async.models.delete_instance_snapshot_reply import DeleteInstanceSnapshotReply + +# TODO update the JSON string below +json = "{}" +# create an instance of DeleteInstanceSnapshotReply from a JSON string +delete_instance_snapshot_reply_instance = DeleteInstanceSnapshotReply.from_json(json) +# print the JSON string representation of the object +print(DeleteInstanceSnapshotReply.to_json()) + +# convert the object into a dict +delete_instance_snapshot_reply_dict = delete_instance_snapshot_reply_instance.to_dict() +# create an instance of DeleteInstanceSnapshotReply from a dict +delete_instance_snapshot_reply_from_dict = DeleteInstanceSnapshotReply.from_dict(delete_instance_snapshot_reply_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/koyeb/api_async/docs/Deployment.md b/koyeb/api_async/docs/Deployment.md index 5f184e0c..95adfbe5 100644 --- a/koyeb/api_async/docs/Deployment.md +++ b/koyeb/api_async/docs/Deployment.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **succeeded_at** | **datetime** | | [optional] **terminated_at** | **datetime** | | [optional] **organization_id** | **str** | | [optional] +**project_id** | **str** | | [optional] **app_id** | **str** | | [optional] **service_id** | **str** | | [optional] **parent_id** | **str** | | [optional] @@ -27,6 +28,7 @@ Name | Type | Description | Notes **role** | [**DeploymentRole**](DeploymentRole.md) | | [optional] [default to DeploymentRole.INVALID] **version** | **str** | | [optional] **deployment_group** | **str** | | [optional] +**instance_snapshot_id** | **str** | | [optional] ## Example diff --git a/koyeb/api_async/docs/DeploymentDefinition.md b/koyeb/api_async/docs/DeploymentDefinition.md index b4424473..6351b37c 100644 --- a/koyeb/api_async/docs/DeploymentDefinition.md +++ b/koyeb/api_async/docs/DeploymentDefinition.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **str** | | [optional] +**name** | **str** | Service name. Deprecated, set it directly in the Service when creating it. | [optional] **type** | [**DeploymentDefinitionType**](DeploymentDefinitionType.md) | | [optional] [default to DeploymentDefinitionType.INVALID] **strategy** | [**DeploymentStrategy**](DeploymentStrategy.md) | | [optional] **routes** | [**List[DeploymentRoute]**](DeploymentRoute.md) | | [optional] @@ -20,6 +20,7 @@ Name | Type | Description | Notes **config_files** | [**List[ConfigFile]**](ConfigFile.md) | | [optional] **skip_cache** | **bool** | | [optional] **mesh** | [**DeploymentMesh**](DeploymentMesh.md) | | [optional] [default to DeploymentMesh.DEPLOYMENT_MESH_AUTO] +**network_policy** | [**NetworkPolicy**](NetworkPolicy.md) | | [optional] **docker** | [**DockerSource**](DockerSource.md) | | [optional] **git** | [**GitSource**](GitSource.md) | | [optional] **database** | [**DatabaseSource**](DatabaseSource.md) | | [optional] diff --git a/koyeb/api_async/docs/DeploymentListItem.md b/koyeb/api_async/docs/DeploymentListItem.md index e587d5ef..c8eca867 100644 --- a/koyeb/api_async/docs/DeploymentListItem.md +++ b/koyeb/api_async/docs/DeploymentListItem.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **succeeded_at** | **datetime** | | [optional] **terminated_at** | **datetime** | | [optional] **organization_id** | **str** | | [optional] +**project_id** | **str** | | [optional] **app_id** | **str** | | [optional] **service_id** | **str** | | [optional] **parent_id** | **str** | | [optional] @@ -23,6 +24,7 @@ Name | Type | Description | Notes **messages** | **List[str]** | | [optional] **provisioning_info** | [**DeploymentProvisioningInfo**](DeploymentProvisioningInfo.md) | | [optional] **database_info** | [**DeploymentDatabaseInfo**](DeploymentDatabaseInfo.md) | | [optional] +**instance_snapshot_id** | **str** | | [optional] **version** | **str** | | [optional] **deployment_group** | **str** | | [optional] diff --git a/koyeb/api_async/docs/EgressPolicy.md b/koyeb/api_async/docs/EgressPolicy.md new file mode 100644 index 00000000..748f247d --- /dev/null +++ b/koyeb/api_async/docs/EgressPolicy.md @@ -0,0 +1,30 @@ +# EgressPolicy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mode** | [**EgressPolicyMode**](EgressPolicyMode.md) | | [optional] [default to EgressPolicyMode.EGRESS_POLICY_MODE_DEFAULT] +**allow_list** | [**List[NetworkPolicyDestination]**](NetworkPolicyDestination.md) | Allowed destinations (deny-by-default semantics under DENY_ALL). Ignored when mode is DEFAULT. | [optional] + +## Example + +```python +from koyeb.api_async.models.egress_policy import EgressPolicy + +# TODO update the JSON string below +json = "{}" +# create an instance of EgressPolicy from a JSON string +egress_policy_instance = EgressPolicy.from_json(json) +# print the JSON string representation of the object +print(EgressPolicy.to_json()) + +# convert the object into a dict +egress_policy_dict = egress_policy_instance.to_dict() +# create an instance of EgressPolicy from a dict +egress_policy_from_dict = EgressPolicy.from_dict(egress_policy_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/koyeb/api_async/docs/EgressPolicyMode.md b/koyeb/api_async/docs/EgressPolicyMode.md new file mode 100644 index 00000000..e532c045 --- /dev/null +++ b/koyeb/api_async/docs/EgressPolicyMode.md @@ -0,0 +1,12 @@ +# EgressPolicyMode + + +## Enum + +* `EGRESS_POLICY_MODE_DEFAULT` (value: `'EGRESS_POLICY_MODE_DEFAULT'`) + +* `EGRESS_POLICY_MODE_DENY_ALL` (value: `'EGRESS_POLICY_MODE_DENY_ALL'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/koyeb/api_async/docs/GetInstanceSnapshotReply.md b/koyeb/api_async/docs/GetInstanceSnapshotReply.md new file mode 100644 index 00000000..e1a1de80 --- /dev/null +++ b/koyeb/api_async/docs/GetInstanceSnapshotReply.md @@ -0,0 +1,29 @@ +# GetInstanceSnapshotReply + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**instance_snapshot** | [**InstanceSnapshot**](InstanceSnapshot.md) | | [optional] + +## Example + +```python +from koyeb.api_async.models.get_instance_snapshot_reply import GetInstanceSnapshotReply + +# TODO update the JSON string below +json = "{}" +# create an instance of GetInstanceSnapshotReply from a JSON string +get_instance_snapshot_reply_instance = GetInstanceSnapshotReply.from_json(json) +# print the JSON string representation of the object +print(GetInstanceSnapshotReply.to_json()) + +# convert the object into a dict +get_instance_snapshot_reply_dict = get_instance_snapshot_reply_instance.to_dict() +# create an instance of GetInstanceSnapshotReply from a dict +get_instance_snapshot_reply_from_dict = GetInstanceSnapshotReply.from_dict(get_instance_snapshot_reply_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/koyeb/api_async/docs/InstanceSnapshot.md b/koyeb/api_async/docs/InstanceSnapshot.md new file mode 100644 index 00000000..ff13eae2 --- /dev/null +++ b/koyeb/api_async/docs/InstanceSnapshot.md @@ -0,0 +1,44 @@ +# InstanceSnapshot + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**name** | **str** | | [optional] +**created_at** | **datetime** | | [optional] +**updated_at** | **datetime** | | [optional] +**available_at** | **datetime** | | [optional] +**deleted_at** | **datetime** | | [optional] +**organization_id** | **str** | | [optional] +**project_id** | **str** | | [optional] +**service_id** | **str** | | [optional] +**deployment_id** | **str** | | [optional] +**regional_deployment_id** | **str** | | [optional] +**instance_id** | **str** | | [optional] +**status** | [**InstanceSnapshotStatus**](InstanceSnapshotStatus.md) | | [optional] [default to InstanceSnapshotStatus.INSTANCE_SNAPSHOT_STATUS_INVALID] +**type** | [**InstanceSnapshotType**](InstanceSnapshotType.md) | | [optional] [default to InstanceSnapshotType.INSTANCE_SNAPSHOT_TYPE_INVALID] +**version** | **str** | | [optional] +**messages** | **List[str]** | | [optional] + +## Example + +```python +from koyeb.api_async.models.instance_snapshot import InstanceSnapshot + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceSnapshot from a JSON string +instance_snapshot_instance = InstanceSnapshot.from_json(json) +# print the JSON string representation of the object +print(InstanceSnapshot.to_json()) + +# convert the object into a dict +instance_snapshot_dict = instance_snapshot_instance.to_dict() +# create an instance of InstanceSnapshot from a dict +instance_snapshot_from_dict = InstanceSnapshot.from_dict(instance_snapshot_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/koyeb/api_async/docs/InstanceSnapshotEvent.md b/koyeb/api_async/docs/InstanceSnapshotEvent.md new file mode 100644 index 00000000..381a8a70 --- /dev/null +++ b/koyeb/api_async/docs/InstanceSnapshotEvent.md @@ -0,0 +1,35 @@ +# InstanceSnapshotEvent + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**when** | **datetime** | | [optional] +**organization_id** | **str** | | [optional] +**instance_snapshot_id** | **str** | | [optional] +**type** | **str** | | [optional] +**message** | **str** | | [optional] +**metadata** | **object** | | [optional] + +## Example + +```python +from koyeb.api_async.models.instance_snapshot_event import InstanceSnapshotEvent + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceSnapshotEvent from a JSON string +instance_snapshot_event_instance = InstanceSnapshotEvent.from_json(json) +# print the JSON string representation of the object +print(InstanceSnapshotEvent.to_json()) + +# convert the object into a dict +instance_snapshot_event_dict = instance_snapshot_event_instance.to_dict() +# create an instance of InstanceSnapshotEvent from a dict +instance_snapshot_event_from_dict = InstanceSnapshotEvent.from_dict(instance_snapshot_event_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/koyeb/api_async/docs/InstanceSnapshotQuotas.md b/koyeb/api_async/docs/InstanceSnapshotQuotas.md new file mode 100644 index 00000000..69730fbc --- /dev/null +++ b/koyeb/api_async/docs/InstanceSnapshotQuotas.md @@ -0,0 +1,30 @@ +# InstanceSnapshotQuotas + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filesystem** | **int** | | [optional] +**full** | **int** | | [optional] + +## Example + +```python +from koyeb.api_async.models.instance_snapshot_quotas import InstanceSnapshotQuotas + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceSnapshotQuotas from a JSON string +instance_snapshot_quotas_instance = InstanceSnapshotQuotas.from_json(json) +# print the JSON string representation of the object +print(InstanceSnapshotQuotas.to_json()) + +# convert the object into a dict +instance_snapshot_quotas_dict = instance_snapshot_quotas_instance.to_dict() +# create an instance of InstanceSnapshotQuotas from a dict +instance_snapshot_quotas_from_dict = InstanceSnapshotQuotas.from_dict(instance_snapshot_quotas_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/koyeb/api_async/docs/InstanceSnapshotStatus.md b/koyeb/api_async/docs/InstanceSnapshotStatus.md new file mode 100644 index 00000000..5bdc7e04 --- /dev/null +++ b/koyeb/api_async/docs/InstanceSnapshotStatus.md @@ -0,0 +1,20 @@ +# InstanceSnapshotStatus + + +## Enum + +* `INSTANCE_SNAPSHOT_STATUS_INVALID` (value: `'INSTANCE_SNAPSHOT_STATUS_INVALID'`) + +* `INSTANCE_SNAPSHOT_STATUS_CREATING` (value: `'INSTANCE_SNAPSHOT_STATUS_CREATING'`) + +* `INSTANCE_SNAPSHOT_STATUS_AVAILABLE` (value: `'INSTANCE_SNAPSHOT_STATUS_AVAILABLE'`) + +* `INSTANCE_SNAPSHOT_STATUS_ERROR` (value: `'INSTANCE_SNAPSHOT_STATUS_ERROR'`) + +* `INSTANCE_SNAPSHOT_STATUS_DELETING` (value: `'INSTANCE_SNAPSHOT_STATUS_DELETING'`) + +* `INSTANCE_SNAPSHOT_STATUS_DELETED` (value: `'INSTANCE_SNAPSHOT_STATUS_DELETED'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/koyeb/api_async/docs/InstanceSnapshotType.md b/koyeb/api_async/docs/InstanceSnapshotType.md new file mode 100644 index 00000000..68da5c51 --- /dev/null +++ b/koyeb/api_async/docs/InstanceSnapshotType.md @@ -0,0 +1,14 @@ +# InstanceSnapshotType + + +## Enum + +* `INSTANCE_SNAPSHOT_TYPE_INVALID` (value: `'INSTANCE_SNAPSHOT_TYPE_INVALID'`) + +* `INSTANCE_SNAPSHOT_TYPE_FILESYSTEM` (value: `'INSTANCE_SNAPSHOT_TYPE_FILESYSTEM'`) + +* `INSTANCE_SNAPSHOT_TYPE_FULL` (value: `'INSTANCE_SNAPSHOT_TYPE_FULL'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/koyeb/api_async/docs/InstanceSnapshotsApi.md b/koyeb/api_async/docs/InstanceSnapshotsApi.md new file mode 100644 index 00000000..0d692e4c --- /dev/null +++ b/koyeb/api_async/docs/InstanceSnapshotsApi.md @@ -0,0 +1,435 @@ +# koyeb.api_async.InstanceSnapshotsApi + +All URIs are relative to *https://app.koyeb.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_instance_snapshot**](InstanceSnapshotsApi.md#create_instance_snapshot) | **POST** /v1/instance_snapshots | +[**delete_instance_snapshot**](InstanceSnapshotsApi.md#delete_instance_snapshot) | **DELETE** /v1/instance_snapshots/{id} | +[**get_instance_snapshot**](InstanceSnapshotsApi.md#get_instance_snapshot) | **GET** /v1/instance_snapshots/{id} | +[**list_instance_snapshot_events**](InstanceSnapshotsApi.md#list_instance_snapshot_events) | **GET** /v1/instance_snapshot_events | +[**list_instance_snapshots**](InstanceSnapshotsApi.md#list_instance_snapshots) | **GET** /v1/instance_snapshots | + + +# **create_instance_snapshot** +> CreateInstanceSnapshotReply create_instance_snapshot(body) + +### Example + +* Api Key Authentication (Bearer): + +```python +import koyeb.api_async +from koyeb.api_async.models.create_instance_snapshot_reply import CreateInstanceSnapshotReply +from koyeb.api_async.models.create_instance_snapshot_request import CreateInstanceSnapshotRequest +from koyeb.api_async.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.koyeb.com +# See configuration.py for a list of all supported configuration parameters. +configuration = koyeb.api_async.Configuration( + host = "https://app.koyeb.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration.api_key['Bearer'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer'] = 'Bearer' + +# Enter a context with an instance of the API client +async with koyeb.api_async.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = koyeb.api_async.InstanceSnapshotsApi(api_client) + body = koyeb.api_async.CreateInstanceSnapshotRequest() # CreateInstanceSnapshotRequest | + + try: + api_response = await api_instance.create_instance_snapshot(body) + print("The response of InstanceSnapshotsApi->create_instance_snapshot:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstanceSnapshotsApi->create_instance_snapshot: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateInstanceSnapshotRequest**](CreateInstanceSnapshotRequest.md)| | + +### Return type + +[**CreateInstanceSnapshotReply**](CreateInstanceSnapshotReply.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**400** | Validation error | - | +**401** | Returned when the token is not valid. | - | +**403** | Returned when the user does not have permission to access the resource. | - | +**404** | Returned when the resource does not exist. | - | +**500** | Returned in case of server error. | - | +**503** | Service is unavailable. | - | +**0** | An unexpected error response. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_instance_snapshot** +> DeleteInstanceSnapshotReply delete_instance_snapshot(id) + +### Example + +* Api Key Authentication (Bearer): + +```python +import koyeb.api_async +from koyeb.api_async.models.delete_instance_snapshot_reply import DeleteInstanceSnapshotReply +from koyeb.api_async.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.koyeb.com +# See configuration.py for a list of all supported configuration parameters. +configuration = koyeb.api_async.Configuration( + host = "https://app.koyeb.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration.api_key['Bearer'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer'] = 'Bearer' + +# Enter a context with an instance of the API client +async with koyeb.api_async.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = koyeb.api_async.InstanceSnapshotsApi(api_client) + id = 'id_example' # str | + + try: + api_response = await api_instance.delete_instance_snapshot(id) + print("The response of InstanceSnapshotsApi->delete_instance_snapshot:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstanceSnapshotsApi->delete_instance_snapshot: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +[**DeleteInstanceSnapshotReply**](DeleteInstanceSnapshotReply.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**400** | Validation error | - | +**401** | Returned when the token is not valid. | - | +**403** | Returned when the user does not have permission to access the resource. | - | +**404** | Returned when the resource does not exist. | - | +**500** | Returned in case of server error. | - | +**503** | Service is unavailable. | - | +**0** | An unexpected error response. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_instance_snapshot** +> GetInstanceSnapshotReply get_instance_snapshot(id) + +### Example + +* Api Key Authentication (Bearer): + +```python +import koyeb.api_async +from koyeb.api_async.models.get_instance_snapshot_reply import GetInstanceSnapshotReply +from koyeb.api_async.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.koyeb.com +# See configuration.py for a list of all supported configuration parameters. +configuration = koyeb.api_async.Configuration( + host = "https://app.koyeb.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration.api_key['Bearer'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer'] = 'Bearer' + +# Enter a context with an instance of the API client +async with koyeb.api_async.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = koyeb.api_async.InstanceSnapshotsApi(api_client) + id = 'id_example' # str | + + try: + api_response = await api_instance.get_instance_snapshot(id) + print("The response of InstanceSnapshotsApi->get_instance_snapshot:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstanceSnapshotsApi->get_instance_snapshot: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +[**GetInstanceSnapshotReply**](GetInstanceSnapshotReply.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**400** | Validation error | - | +**401** | Returned when the token is not valid. | - | +**403** | Returned when the user does not have permission to access the resource. | - | +**404** | Returned when the resource does not exist. | - | +**500** | Returned in case of server error. | - | +**503** | Service is unavailable. | - | +**0** | An unexpected error response. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_instance_snapshot_events** +> ListInstanceSnapshotEventsReply list_instance_snapshot_events(instance_snapshot_id=instance_snapshot_id, types=types, limit=limit, offset=offset, order=order) + +### Example + +* Api Key Authentication (Bearer): + +```python +import koyeb.api_async +from koyeb.api_async.models.list_instance_snapshot_events_reply import ListInstanceSnapshotEventsReply +from koyeb.api_async.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.koyeb.com +# See configuration.py for a list of all supported configuration parameters. +configuration = koyeb.api_async.Configuration( + host = "https://app.koyeb.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration.api_key['Bearer'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer'] = 'Bearer' + +# Enter a context with an instance of the API client +async with koyeb.api_async.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = koyeb.api_async.InstanceSnapshotsApi(api_client) + instance_snapshot_id = 'instance_snapshot_id_example' # str | (Optional) Filter on instance snapshot id (optional) + types = ['types_example'] # List[str] | (Optional) Filter on instance snapshot event types (optional) + limit = 'limit_example' # str | (Optional) The number of items to return (optional) + offset = 'offset_example' # str | (Optional) The offset in the list of item to return (optional) + order = 'order_example' # str | (Optional) Sorts the list in the ascending or the descending order (optional) + + try: + api_response = await api_instance.list_instance_snapshot_events(instance_snapshot_id=instance_snapshot_id, types=types, limit=limit, offset=offset, order=order) + print("The response of InstanceSnapshotsApi->list_instance_snapshot_events:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstanceSnapshotsApi->list_instance_snapshot_events: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_snapshot_id** | **str**| (Optional) Filter on instance snapshot id | [optional] + **types** | [**List[str]**](str.md)| (Optional) Filter on instance snapshot event types | [optional] + **limit** | **str**| (Optional) The number of items to return | [optional] + **offset** | **str**| (Optional) The offset in the list of item to return | [optional] + **order** | **str**| (Optional) Sorts the list in the ascending or the descending order | [optional] + +### Return type + +[**ListInstanceSnapshotEventsReply**](ListInstanceSnapshotEventsReply.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**400** | Validation error | - | +**401** | Returned when the token is not valid. | - | +**403** | Returned when the user does not have permission to access the resource. | - | +**404** | Returned when the resource does not exist. | - | +**500** | Returned in case of server error. | - | +**503** | Service is unavailable. | - | +**0** | An unexpected error response. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_instance_snapshots** +> ListInstanceSnapshotsReply list_instance_snapshots(limit=limit, offset=offset, name=name, statuses=statuses, type=type) + +### Example + +* Api Key Authentication (Bearer): + +```python +import koyeb.api_async +from koyeb.api_async.models.list_instance_snapshots_reply import ListInstanceSnapshotsReply +from koyeb.api_async.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.koyeb.com +# See configuration.py for a list of all supported configuration parameters. +configuration = koyeb.api_async.Configuration( + host = "https://app.koyeb.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration.api_key['Bearer'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer'] = 'Bearer' + +# Enter a context with an instance of the API client +async with koyeb.api_async.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = koyeb.api_async.InstanceSnapshotsApi(api_client) + limit = 'limit_example' # str | (optional) + offset = 'offset_example' # str | (optional) + name = 'name_example' # str | (optional) + statuses = ['statuses_example'] # List[str] | (optional) + type = INSTANCE_SNAPSHOT_TYPE_INVALID # str | (optional) (default to INSTANCE_SNAPSHOT_TYPE_INVALID) + + try: + api_response = await api_instance.list_instance_snapshots(limit=limit, offset=offset, name=name, statuses=statuses, type=type) + print("The response of InstanceSnapshotsApi->list_instance_snapshots:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstanceSnapshotsApi->list_instance_snapshots: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **str**| | [optional] + **offset** | **str**| | [optional] + **name** | **str**| | [optional] + **statuses** | [**List[str]**](str.md)| | [optional] + **type** | **str**| | [optional] [default to INSTANCE_SNAPSHOT_TYPE_INVALID] + +### Return type + +[**ListInstanceSnapshotsReply**](ListInstanceSnapshotsReply.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**400** | Validation error | - | +**401** | Returned when the token is not valid. | - | +**403** | Returned when the user does not have permission to access the resource. | - | +**404** | Returned when the resource does not exist. | - | +**500** | Returned in case of server error. | - | +**503** | Service is unavailable. | - | +**0** | An unexpected error response. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/koyeb/api_async/docs/ListInstanceSnapshotEventsReply.md b/koyeb/api_async/docs/ListInstanceSnapshotEventsReply.md new file mode 100644 index 00000000..8c857359 --- /dev/null +++ b/koyeb/api_async/docs/ListInstanceSnapshotEventsReply.md @@ -0,0 +1,33 @@ +# ListInstanceSnapshotEventsReply + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**events** | [**List[InstanceSnapshotEvent]**](InstanceSnapshotEvent.md) | | [optional] +**limit** | **int** | | [optional] +**offset** | **int** | | [optional] +**order** | **str** | | [optional] +**has_next** | **bool** | | [optional] + +## Example + +```python +from koyeb.api_async.models.list_instance_snapshot_events_reply import ListInstanceSnapshotEventsReply + +# TODO update the JSON string below +json = "{}" +# create an instance of ListInstanceSnapshotEventsReply from a JSON string +list_instance_snapshot_events_reply_instance = ListInstanceSnapshotEventsReply.from_json(json) +# print the JSON string representation of the object +print(ListInstanceSnapshotEventsReply.to_json()) + +# convert the object into a dict +list_instance_snapshot_events_reply_dict = list_instance_snapshot_events_reply_instance.to_dict() +# create an instance of ListInstanceSnapshotEventsReply from a dict +list_instance_snapshot_events_reply_from_dict = ListInstanceSnapshotEventsReply.from_dict(list_instance_snapshot_events_reply_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/koyeb/api_async/docs/ListInstanceSnapshotsReply.md b/koyeb/api_async/docs/ListInstanceSnapshotsReply.md new file mode 100644 index 00000000..0e6d0f41 --- /dev/null +++ b/koyeb/api_async/docs/ListInstanceSnapshotsReply.md @@ -0,0 +1,33 @@ +# ListInstanceSnapshotsReply + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**instance_snapshots** | [**List[InstanceSnapshot]**](InstanceSnapshot.md) | | [optional] +**limit** | **int** | | [optional] +**offset** | **int** | | [optional] +**count** | **int** | | [optional] +**has_next** | **bool** | | [optional] + +## Example + +```python +from koyeb.api_async.models.list_instance_snapshots_reply import ListInstanceSnapshotsReply + +# TODO update the JSON string below +json = "{}" +# create an instance of ListInstanceSnapshotsReply from a JSON string +list_instance_snapshots_reply_instance = ListInstanceSnapshotsReply.from_json(json) +# print the JSON string representation of the object +print(ListInstanceSnapshotsReply.to_json()) + +# convert the object into a dict +list_instance_snapshots_reply_dict = list_instance_snapshots_reply_instance.to_dict() +# create an instance of ListInstanceSnapshotsReply from a dict +list_instance_snapshots_reply_from_dict = ListInstanceSnapshotsReply.from_dict(list_instance_snapshots_reply_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/koyeb/api_async/docs/NetworkPolicy.md b/koyeb/api_async/docs/NetworkPolicy.md new file mode 100644 index 00000000..b5cb9c7d --- /dev/null +++ b/koyeb/api_async/docs/NetworkPolicy.md @@ -0,0 +1,29 @@ +# NetworkPolicy + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**egress** | [**EgressPolicy**](EgressPolicy.md) | | [optional] + +## Example + +```python +from koyeb.api_async.models.network_policy import NetworkPolicy + +# TODO update the JSON string below +json = "{}" +# create an instance of NetworkPolicy from a JSON string +network_policy_instance = NetworkPolicy.from_json(json) +# print the JSON string representation of the object +print(NetworkPolicy.to_json()) + +# convert the object into a dict +network_policy_dict = network_policy_instance.to_dict() +# create an instance of NetworkPolicy from a dict +network_policy_from_dict = NetworkPolicy.from_dict(network_policy_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/koyeb/api_async/docs/NetworkPolicyDestination.md b/koyeb/api_async/docs/NetworkPolicyDestination.md new file mode 100644 index 00000000..672673a1 --- /dev/null +++ b/koyeb/api_async/docs/NetworkPolicyDestination.md @@ -0,0 +1,29 @@ +# NetworkPolicyDestination + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cidr** | **str** | IPv4 or IPv6 CIDR (e.g. \"10.0.0.0/8\", \"2001:db8::/32\"). Bare IPs are accepted at the API boundary and normalized to /32 (IPv4) or /128 (IPv6) before storage. | [optional] + +## Example + +```python +from koyeb.api_async.models.network_policy_destination import NetworkPolicyDestination + +# TODO update the JSON string below +json = "{}" +# create an instance of NetworkPolicyDestination from a JSON string +network_policy_destination_instance = NetworkPolicyDestination.from_json(json) +# print the JSON string representation of the object +print(NetworkPolicyDestination.to_json()) + +# convert the object into a dict +network_policy_destination_dict = network_policy_destination_instance.to_dict() +# create an instance of NetworkPolicyDestination from a dict +network_policy_destination_from_dict = NetworkPolicyDestination.from_dict(network_policy_destination_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/koyeb/api_async/docs/Quotas.md b/koyeb/api_async/docs/Quotas.md index ec77c1e9..49e46467 100644 --- a/koyeb/api_async/docs/Quotas.md +++ b/koyeb/api_async/docs/Quotas.md @@ -27,6 +27,7 @@ Name | Type | Description | Notes **archive_max_size_mb** | **str** | | [optional] **lifecycle** | [**LifecycleQuotas**](LifecycleQuotas.md) | | [optional] **max_projects** | **str** | | [optional] +**instance_snapshots** | [**InstanceSnapshotQuotas**](InstanceSnapshotQuotas.md) | | [optional] ## Example diff --git a/koyeb/api_async/docs/RegionalDeployment.md b/koyeb/api_async/docs/RegionalDeployment.md index c6da357b..bb04383c 100644 --- a/koyeb/api_async/docs/RegionalDeployment.md +++ b/koyeb/api_async/docs/RegionalDeployment.md @@ -26,6 +26,7 @@ Name | Type | Description | Notes **metadata** | **object** | | [optional] **provisioning_info** | [**DeploymentProvisioningInfo**](DeploymentProvisioningInfo.md) | | [optional] **role** | [**RegionalDeploymentRole**](RegionalDeploymentRole.md) | | [optional] [default to RegionalDeploymentRole.INVALID] +**instance_snapshot_id** | **str** | | [optional] **version** | **str** | | [optional] **deployment_group** | **str** | | [optional] **deployment_id** | **str** | | [optional] diff --git a/koyeb/api_async/docs/RegionalDeploymentDefinition.md b/koyeb/api_async/docs/RegionalDeploymentDefinition.md index 5decbe42..b1cda1ab 100644 --- a/koyeb/api_async/docs/RegionalDeploymentDefinition.md +++ b/koyeb/api_async/docs/RegionalDeploymentDefinition.md @@ -20,6 +20,7 @@ Name | Type | Description | Notes **config_files** | [**List[ConfigFile]**](ConfigFile.md) | | [optional] **skip_cache** | **bool** | | [optional] **mesh** | [**RegionalDeploymentMesh**](RegionalDeploymentMesh.md) | | [optional] [default to RegionalDeploymentMesh.REGIONAL_DEPLOYMENT_MESH_AUTO] +**network_policy** | [**NetworkPolicy**](NetworkPolicy.md) | | [optional] **docker** | [**DockerSource**](DockerSource.md) | | [optional] **git** | [**GitSource**](GitSource.md) | | [optional] **archive** | [**ArchiveSource**](ArchiveSource.md) | | [optional] diff --git a/koyeb/api_async/docs/RegionalDeploymentListItem.md b/koyeb/api_async/docs/RegionalDeploymentListItem.md index 620d46a3..75af0e05 100644 --- a/koyeb/api_async/docs/RegionalDeploymentListItem.md +++ b/koyeb/api_async/docs/RegionalDeploymentListItem.md @@ -12,6 +12,7 @@ Name | Type | Description | Notes **status** | [**RegionalDeploymentStatus**](RegionalDeploymentStatus.md) | | [optional] [default to RegionalDeploymentStatus.PENDING] **messages** | **List[str]** | | [optional] **definition** | [**RegionalDeploymentDefinition**](RegionalDeploymentDefinition.md) | | [optional] +**instance_snapshot_id** | **str** | | [optional] ## Example diff --git a/koyeb/api_async/docs/UpdateService.md b/koyeb/api_async/docs/UpdateService.md index bb3aa9cd..b2802edf 100644 --- a/koyeb/api_async/docs/UpdateService.md +++ b/koyeb/api_async/docs/UpdateService.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **skip_build** | **bool** | If set to true, the build stage will be skipped and the image coming from the last successful build step will be used instead. The call fails if no previous successful builds happened. | [optional] **save_only** | **bool** | | [optional] **life_cycle** | [**ServiceLifeCycle**](ServiceLifeCycle.md) | | [optional] +**instance_snapshot_id** | **str** | | [optional] ## Example diff --git a/koyeb/api_async/models/__init__.py b/koyeb/api_async/models/__init__.py index b08cbf6f..4c8357f8 100644 --- a/koyeb/api_async/models/__init__.py +++ b/koyeb/api_async/models/__init__.py @@ -59,6 +59,8 @@ from koyeb.api_async.models.create_credential_reply import CreateCredentialReply from koyeb.api_async.models.create_domain import CreateDomain from koyeb.api_async.models.create_domain_reply import CreateDomainReply +from koyeb.api_async.models.create_instance_snapshot_reply import CreateInstanceSnapshotReply +from koyeb.api_async.models.create_instance_snapshot_request import CreateInstanceSnapshotRequest from koyeb.api_async.models.create_organization_invitation_reply import CreateOrganizationInvitationReply from koyeb.api_async.models.create_organization_invitation_request import CreateOrganizationInvitationRequest from koyeb.api_async.models.create_organization_reply import CreateOrganizationReply @@ -88,6 +90,7 @@ from koyeb.api_async.models.declare_stage_progress_request import DeclareStageProgressRequest from koyeb.api_async.models.declare_step_progress_request import DeclareStepProgressRequest from koyeb.api_async.models.decline_organization_invitation_reply import DeclineOrganizationInvitationReply +from koyeb.api_async.models.delete_instance_snapshot_reply import DeleteInstanceSnapshotReply from koyeb.api_async.models.delete_organization_reply import DeleteOrganizationReply from koyeb.api_async.models.delete_persistent_volume_reply import DeletePersistentVolumeReply from koyeb.api_async.models.delete_snapshot_reply import DeleteSnapshotReply @@ -141,6 +144,8 @@ from koyeb.api_async.models.domain_status import DomainStatus from koyeb.api_async.models.domain_type import DomainType from koyeb.api_async.models.domains_summary import DomainsSummary +from koyeb.api_async.models.egress_policy import EgressPolicy +from koyeb.api_async.models.egress_policy_mode import EgressPolicyMode from koyeb.api_async.models.env import Env from koyeb.api_async.models.error import Error from koyeb.api_async.models.error_field import ErrorField @@ -162,6 +167,7 @@ from koyeb.api_async.models.get_github_installation_reply import GetGithubInstallationReply from koyeb.api_async.models.get_idenfy_token_reply import GetIdenfyTokenReply from koyeb.api_async.models.get_instance_reply import GetInstanceReply +from koyeb.api_async.models.get_instance_snapshot_reply import GetInstanceSnapshotReply from koyeb.api_async.models.get_intercom_profile_reply import GetIntercomProfileReply from koyeb.api_async.models.get_metrics_reply import GetMetricsReply from koyeb.api_async.models.get_metrics_reply_metric import GetMetricsReplyMetric @@ -201,6 +207,11 @@ from koyeb.api_async.models.instance_availability import InstanceAvailability from koyeb.api_async.models.instance_event import InstanceEvent from koyeb.api_async.models.instance_list_item import InstanceListItem +from koyeb.api_async.models.instance_snapshot import InstanceSnapshot +from koyeb.api_async.models.instance_snapshot_event import InstanceSnapshotEvent +from koyeb.api_async.models.instance_snapshot_quotas import InstanceSnapshotQuotas +from koyeb.api_async.models.instance_snapshot_status import InstanceSnapshotStatus +from koyeb.api_async.models.instance_snapshot_type import InstanceSnapshotType from koyeb.api_async.models.instance_status import InstanceStatus from koyeb.api_async.models.instance_usage import InstanceUsage from koyeb.api_async.models.instances_summary import InstancesSummary @@ -233,6 +244,8 @@ from koyeb.api_async.models.list_deployments_reply import ListDeploymentsReply from koyeb.api_async.models.list_domains_reply import ListDomainsReply from koyeb.api_async.models.list_instance_events_reply import ListInstanceEventsReply +from koyeb.api_async.models.list_instance_snapshot_events_reply import ListInstanceSnapshotEventsReply +from koyeb.api_async.models.list_instance_snapshots_reply import ListInstanceSnapshotsReply from koyeb.api_async.models.list_instances_reply import ListInstancesReply from koyeb.api_async.models.list_organization_invitations_reply import ListOrganizationInvitationsReply from koyeb.api_async.models.list_organization_members_reply import ListOrganizationMembersReply @@ -264,6 +277,8 @@ from koyeb.api_async.models.neon_postgres_database_neon_database import NeonPostgresDatabaseNeonDatabase from koyeb.api_async.models.neon_postgres_database_neon_role import NeonPostgresDatabaseNeonRole from koyeb.api_async.models.neon_postgres_summary import NeonPostgresSummary +from koyeb.api_async.models.network_policy import NetworkPolicy +from koyeb.api_async.models.network_policy_destination import NetworkPolicyDestination from koyeb.api_async.models.next_invoice_reply import NextInvoiceReply from koyeb.api_async.models.next_invoice_reply_discount import NextInvoiceReplyDiscount from koyeb.api_async.models.next_invoice_reply_discount_type import NextInvoiceReplyDiscountType diff --git a/koyeb/api_async/models/create_instance_snapshot_reply.py b/koyeb/api_async/models/create_instance_snapshot_reply.py new file mode 100644 index 00000000..80e055f5 --- /dev/null +++ b/koyeb/api_async/models/create_instance_snapshot_reply.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from koyeb.api_async.models.instance_snapshot import InstanceSnapshot +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class CreateInstanceSnapshotReply(BaseModel): + """ + CreateInstanceSnapshotReply + """ # noqa: E501 + instance_snapshot: Optional[InstanceSnapshot] = None + __properties: ClassVar[List[str]] = ["instance_snapshot"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateInstanceSnapshotReply from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of instance_snapshot + if self.instance_snapshot: + _dict['instance_snapshot'] = self.instance_snapshot.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateInstanceSnapshotReply from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "instance_snapshot": InstanceSnapshot.from_dict(obj["instance_snapshot"]) if obj.get("instance_snapshot") is not None else None + }) + return _obj + + diff --git a/koyeb/api_async/models/create_instance_snapshot_request.py b/koyeb/api_async/models/create_instance_snapshot_request.py new file mode 100644 index 00000000..a6eb8343 --- /dev/null +++ b/koyeb/api_async/models/create_instance_snapshot_request.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from koyeb.api_async.models.instance_snapshot_type import InstanceSnapshotType +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class CreateInstanceSnapshotRequest(BaseModel): + """ + CreateInstanceSnapshotRequest + """ # noqa: E501 + instance_id: Optional[StrictStr] = None + name: Optional[StrictStr] = None + type: Optional[InstanceSnapshotType] = InstanceSnapshotType.INSTANCE_SNAPSHOT_TYPE_INVALID + __properties: ClassVar[List[str]] = ["instance_id", "name", "type"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateInstanceSnapshotRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateInstanceSnapshotRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "instance_id": obj.get("instance_id"), + "name": obj.get("name"), + "type": obj.get("type") if obj.get("type") is not None else InstanceSnapshotType.INSTANCE_SNAPSHOT_TYPE_INVALID + }) + return _obj + + diff --git a/koyeb/api_async/models/create_service.py b/koyeb/api_async/models/create_service.py index ed9b3ae7..1673442d 100644 --- a/koyeb/api_async/models/create_service.py +++ b/koyeb/api_async/models/create_service.py @@ -33,7 +33,9 @@ class CreateService(BaseModel): definition: Optional[DeploymentDefinition] = None life_cycle: Optional[ServiceLifeCycle] = None project_id: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["app_id", "definition", "life_cycle", "project_id"] + instance_snapshot_id: Optional[StrictStr] = None + name: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["app_id", "definition", "life_cycle", "project_id", "instance_snapshot_id", "name"] model_config = ConfigDict( validate_by_name=True, @@ -95,7 +97,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "app_id": obj.get("app_id"), "definition": DeploymentDefinition.from_dict(obj["definition"]) if obj.get("definition") is not None else None, "life_cycle": ServiceLifeCycle.from_dict(obj["life_cycle"]) if obj.get("life_cycle") is not None else None, - "project_id": obj.get("project_id") + "project_id": obj.get("project_id"), + "instance_snapshot_id": obj.get("instance_snapshot_id"), + "name": obj.get("name") }) return _obj diff --git a/koyeb/api_async/models/delete_instance_snapshot_reply.py b/koyeb/api_async/models/delete_instance_snapshot_reply.py new file mode 100644 index 00000000..16141524 --- /dev/null +++ b/koyeb/api_async/models/delete_instance_snapshot_reply.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from koyeb.api_async.models.instance_snapshot import InstanceSnapshot +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class DeleteInstanceSnapshotReply(BaseModel): + """ + DeleteInstanceSnapshotReply + """ # noqa: E501 + instance_snapshot: Optional[InstanceSnapshot] = None + __properties: ClassVar[List[str]] = ["instance_snapshot"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DeleteInstanceSnapshotReply from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of instance_snapshot + if self.instance_snapshot: + _dict['instance_snapshot'] = self.instance_snapshot.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeleteInstanceSnapshotReply from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "instance_snapshot": InstanceSnapshot.from_dict(obj["instance_snapshot"]) if obj.get("instance_snapshot") is not None else None + }) + return _obj + + diff --git a/koyeb/api_async/models/deployment.py b/koyeb/api_async/models/deployment.py index e0a8410b..b76e58f8 100644 --- a/koyeb/api_async/models/deployment.py +++ b/koyeb/api_async/models/deployment.py @@ -42,6 +42,7 @@ class Deployment(BaseModel): succeeded_at: Optional[datetime] = None terminated_at: Optional[datetime] = None organization_id: Optional[StrictStr] = None + project_id: Optional[StrictStr] = None app_id: Optional[StrictStr] = None service_id: Optional[StrictStr] = None parent_id: Optional[StrictStr] = None @@ -56,7 +57,8 @@ class Deployment(BaseModel): role: Optional[DeploymentRole] = DeploymentRole.INVALID version: Optional[StrictStr] = None deployment_group: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["id", "created_at", "updated_at", "allocated_at", "started_at", "succeeded_at", "terminated_at", "organization_id", "app_id", "service_id", "parent_id", "child_id", "status", "metadata", "definition", "messages", "provisioning_info", "database_info", "skip_build", "role", "version", "deployment_group"] + instance_snapshot_id: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["id", "created_at", "updated_at", "allocated_at", "started_at", "succeeded_at", "terminated_at", "organization_id", "project_id", "app_id", "service_id", "parent_id", "child_id", "status", "metadata", "definition", "messages", "provisioning_info", "database_info", "skip_build", "role", "version", "deployment_group", "instance_snapshot_id"] model_config = ConfigDict( validate_by_name=True, @@ -129,6 +131,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "succeeded_at": obj.get("succeeded_at"), "terminated_at": obj.get("terminated_at"), "organization_id": obj.get("organization_id"), + "project_id": obj.get("project_id"), "app_id": obj.get("app_id"), "service_id": obj.get("service_id"), "parent_id": obj.get("parent_id"), @@ -142,7 +145,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "skip_build": obj.get("skip_build"), "role": obj.get("role") if obj.get("role") is not None else DeploymentRole.INVALID, "version": obj.get("version"), - "deployment_group": obj.get("deployment_group") + "deployment_group": obj.get("deployment_group"), + "instance_snapshot_id": obj.get("instance_snapshot_id") }) return _obj diff --git a/koyeb/api_async/models/deployment_definition.py b/koyeb/api_async/models/deployment_definition.py index 687573d1..ae58e0c8 100644 --- a/koyeb/api_async/models/deployment_definition.py +++ b/koyeb/api_async/models/deployment_definition.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from koyeb.api_async.models.archive_source import ArchiveSource from koyeb.api_async.models.config_file import ConfigFile @@ -35,6 +35,7 @@ from koyeb.api_async.models.deployment_volume import DeploymentVolume from koyeb.api_async.models.docker_source import DockerSource from koyeb.api_async.models.git_source import GitSource +from koyeb.api_async.models.network_policy import NetworkPolicy from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python @@ -43,7 +44,7 @@ class DeploymentDefinition(BaseModel): """ DeploymentDefinition """ # noqa: E501 - name: Optional[StrictStr] = None + name: Optional[StrictStr] = Field(default=None, description="Service name. Deprecated, set it directly in the Service when creating it.") type: Optional[DeploymentDefinitionType] = DeploymentDefinitionType.INVALID strategy: Optional[DeploymentStrategy] = None routes: Optional[List[DeploymentRoute]] = None @@ -58,11 +59,12 @@ class DeploymentDefinition(BaseModel): config_files: Optional[List[ConfigFile]] = None skip_cache: Optional[StrictBool] = None mesh: Optional[DeploymentMesh] = DeploymentMesh.DEPLOYMENT_MESH_AUTO + network_policy: Optional[NetworkPolicy] = None docker: Optional[DockerSource] = None git: Optional[GitSource] = None database: Optional[DatabaseSource] = None archive: Optional[ArchiveSource] = None - __properties: ClassVar[List[str]] = ["name", "type", "strategy", "routes", "ports", "proxy_ports", "env", "regions", "scalings", "instance_types", "health_checks", "volumes", "config_files", "skip_cache", "mesh", "docker", "git", "database", "archive"] + __properties: ClassVar[List[str]] = ["name", "type", "strategy", "routes", "ports", "proxy_ports", "env", "regions", "scalings", "instance_types", "health_checks", "volumes", "config_files", "skip_cache", "mesh", "network_policy", "docker", "git", "database", "archive"] model_config = ConfigDict( validate_by_name=True, @@ -169,6 +171,9 @@ def to_dict(self) -> Dict[str, Any]: if _item_config_files: _items.append(_item_config_files.to_dict()) _dict['config_files'] = _items + # override the default output from pydantic by calling `to_dict()` of network_policy + if self.network_policy: + _dict['network_policy'] = self.network_policy.to_dict() # override the default output from pydantic by calling `to_dict()` of docker if self.docker: _dict['docker'] = self.docker.to_dict() @@ -208,6 +213,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "config_files": [ConfigFile.from_dict(_item) for _item in obj["config_files"]] if obj.get("config_files") is not None else None, "skip_cache": obj.get("skip_cache"), "mesh": obj.get("mesh") if obj.get("mesh") is not None else DeploymentMesh.DEPLOYMENT_MESH_AUTO, + "network_policy": NetworkPolicy.from_dict(obj["network_policy"]) if obj.get("network_policy") is not None else None, "docker": DockerSource.from_dict(obj["docker"]) if obj.get("docker") is not None else None, "git": GitSource.from_dict(obj["git"]) if obj.get("git") is not None else None, "database": DatabaseSource.from_dict(obj["database"]) if obj.get("database") is not None else None, diff --git a/koyeb/api_async/models/deployment_list_item.py b/koyeb/api_async/models/deployment_list_item.py index b12ae858..522d209c 100644 --- a/koyeb/api_async/models/deployment_list_item.py +++ b/koyeb/api_async/models/deployment_list_item.py @@ -41,6 +41,7 @@ class DeploymentListItem(BaseModel): succeeded_at: Optional[datetime] = None terminated_at: Optional[datetime] = None organization_id: Optional[StrictStr] = None + project_id: Optional[StrictStr] = None app_id: Optional[StrictStr] = None service_id: Optional[StrictStr] = None parent_id: Optional[StrictStr] = None @@ -51,9 +52,10 @@ class DeploymentListItem(BaseModel): messages: Optional[List[StrictStr]] = None provisioning_info: Optional[DeploymentProvisioningInfo] = None database_info: Optional[DeploymentDatabaseInfo] = None + instance_snapshot_id: Optional[StrictStr] = None version: Optional[StrictStr] = None deployment_group: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["id", "created_at", "updated_at", "allocated_at", "started_at", "succeeded_at", "terminated_at", "organization_id", "app_id", "service_id", "parent_id", "child_id", "status", "metadata", "definition", "messages", "provisioning_info", "database_info", "version", "deployment_group"] + __properties: ClassVar[List[str]] = ["id", "created_at", "updated_at", "allocated_at", "started_at", "succeeded_at", "terminated_at", "organization_id", "project_id", "app_id", "service_id", "parent_id", "child_id", "status", "metadata", "definition", "messages", "provisioning_info", "database_info", "instance_snapshot_id", "version", "deployment_group"] model_config = ConfigDict( validate_by_name=True, @@ -126,6 +128,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "succeeded_at": obj.get("succeeded_at"), "terminated_at": obj.get("terminated_at"), "organization_id": obj.get("organization_id"), + "project_id": obj.get("project_id"), "app_id": obj.get("app_id"), "service_id": obj.get("service_id"), "parent_id": obj.get("parent_id"), @@ -136,6 +139,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "messages": obj.get("messages"), "provisioning_info": DeploymentProvisioningInfo.from_dict(obj["provisioning_info"]) if obj.get("provisioning_info") is not None else None, "database_info": DeploymentDatabaseInfo.from_dict(obj["database_info"]) if obj.get("database_info") is not None else None, + "instance_snapshot_id": obj.get("instance_snapshot_id"), "version": obj.get("version"), "deployment_group": obj.get("deployment_group") }) diff --git a/koyeb/api_async/models/egress_policy.py b/koyeb/api_async/models/egress_policy.py new file mode 100644 index 00000000..fcc9ae50 --- /dev/null +++ b/koyeb/api_async/models/egress_policy.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from koyeb.api_async.models.egress_policy_mode import EgressPolicyMode +from koyeb.api_async.models.network_policy_destination import NetworkPolicyDestination +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class EgressPolicy(BaseModel): + """ + EgressPolicy + """ # noqa: E501 + mode: Optional[EgressPolicyMode] = EgressPolicyMode.EGRESS_POLICY_MODE_DEFAULT + allow_list: Optional[List[NetworkPolicyDestination]] = Field(default=None, description="Allowed destinations (deny-by-default semantics under DENY_ALL). Ignored when mode is DEFAULT.") + __properties: ClassVar[List[str]] = ["mode", "allow_list"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EgressPolicy from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in allow_list (list) + _items = [] + if self.allow_list: + for _item_allow_list in self.allow_list: + if _item_allow_list: + _items.append(_item_allow_list.to_dict()) + _dict['allow_list'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EgressPolicy from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "mode": obj.get("mode") if obj.get("mode") is not None else EgressPolicyMode.EGRESS_POLICY_MODE_DEFAULT, + "allow_list": [NetworkPolicyDestination.from_dict(_item) for _item in obj["allow_list"]] if obj.get("allow_list") is not None else None + }) + return _obj + + diff --git a/koyeb/api_async/models/egress_policy_mode.py b/koyeb/api_async/models/egress_policy_mode.py new file mode 100644 index 00000000..3786f8dd --- /dev/null +++ b/koyeb/api_async/models/egress_policy_mode.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class EgressPolicyMode(str, Enum): + """ + EgressPolicyMode + """ + + """ + allowed enum values + """ + EGRESS_POLICY_MODE_DEFAULT = 'EGRESS_POLICY_MODE_DEFAULT' + EGRESS_POLICY_MODE_DENY_ALL = 'EGRESS_POLICY_MODE_DENY_ALL' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of EgressPolicyMode from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/get_instance_snapshot_reply.py b/koyeb/api_async/models/get_instance_snapshot_reply.py new file mode 100644 index 00000000..2d0980c6 --- /dev/null +++ b/koyeb/api_async/models/get_instance_snapshot_reply.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from koyeb.api_async.models.instance_snapshot import InstanceSnapshot +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class GetInstanceSnapshotReply(BaseModel): + """ + GetInstanceSnapshotReply + """ # noqa: E501 + instance_snapshot: Optional[InstanceSnapshot] = None + __properties: ClassVar[List[str]] = ["instance_snapshot"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetInstanceSnapshotReply from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of instance_snapshot + if self.instance_snapshot: + _dict['instance_snapshot'] = self.instance_snapshot.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetInstanceSnapshotReply from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "instance_snapshot": InstanceSnapshot.from_dict(obj["instance_snapshot"]) if obj.get("instance_snapshot") is not None else None + }) + return _obj + + diff --git a/koyeb/api_async/models/instance_snapshot.py b/koyeb/api_async/models/instance_snapshot.py new file mode 100644 index 00000000..4338a877 --- /dev/null +++ b/koyeb/api_async/models/instance_snapshot.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from koyeb.api_async.models.instance_snapshot_status import InstanceSnapshotStatus +from koyeb.api_async.models.instance_snapshot_type import InstanceSnapshotType +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class InstanceSnapshot(BaseModel): + """ + InstanceSnapshot + """ # noqa: E501 + id: Optional[StrictStr] = None + name: Optional[StrictStr] = None + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None + available_at: Optional[datetime] = None + deleted_at: Optional[datetime] = None + organization_id: Optional[StrictStr] = None + project_id: Optional[StrictStr] = None + service_id: Optional[StrictStr] = None + deployment_id: Optional[StrictStr] = None + regional_deployment_id: Optional[StrictStr] = None + instance_id: Optional[StrictStr] = None + status: Optional[InstanceSnapshotStatus] = InstanceSnapshotStatus.INSTANCE_SNAPSHOT_STATUS_INVALID + type: Optional[InstanceSnapshotType] = InstanceSnapshotType.INSTANCE_SNAPSHOT_TYPE_INVALID + version: Optional[StrictStr] = None + messages: Optional[List[StrictStr]] = None + __properties: ClassVar[List[str]] = ["id", "name", "created_at", "updated_at", "available_at", "deleted_at", "organization_id", "project_id", "service_id", "deployment_id", "regional_deployment_id", "instance_id", "status", "type", "version", "messages"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceSnapshot from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceSnapshot from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "available_at": obj.get("available_at"), + "deleted_at": obj.get("deleted_at"), + "organization_id": obj.get("organization_id"), + "project_id": obj.get("project_id"), + "service_id": obj.get("service_id"), + "deployment_id": obj.get("deployment_id"), + "regional_deployment_id": obj.get("regional_deployment_id"), + "instance_id": obj.get("instance_id"), + "status": obj.get("status") if obj.get("status") is not None else InstanceSnapshotStatus.INSTANCE_SNAPSHOT_STATUS_INVALID, + "type": obj.get("type") if obj.get("type") is not None else InstanceSnapshotType.INSTANCE_SNAPSHOT_TYPE_INVALID, + "version": obj.get("version"), + "messages": obj.get("messages") + }) + return _obj + + diff --git a/koyeb/api_async/models/instance_snapshot_event.py b/koyeb/api_async/models/instance_snapshot_event.py new file mode 100644 index 00000000..98076760 --- /dev/null +++ b/koyeb/api_async/models/instance_snapshot_event.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class InstanceSnapshotEvent(BaseModel): + """ + InstanceSnapshotEvent + """ # noqa: E501 + id: Optional[StrictStr] = None + when: Optional[datetime] = None + organization_id: Optional[StrictStr] = None + instance_snapshot_id: Optional[StrictStr] = None + type: Optional[StrictStr] = None + message: Optional[StrictStr] = None + metadata: Optional[Dict[str, Any]] = None + __properties: ClassVar[List[str]] = ["id", "when", "organization_id", "instance_snapshot_id", "type", "message", "metadata"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceSnapshotEvent from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceSnapshotEvent from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "when": obj.get("when"), + "organization_id": obj.get("organization_id"), + "instance_snapshot_id": obj.get("instance_snapshot_id"), + "type": obj.get("type"), + "message": obj.get("message"), + "metadata": obj.get("metadata") + }) + return _obj + + diff --git a/koyeb/api_async/models/instance_snapshot_quotas.py b/koyeb/api_async/models/instance_snapshot_quotas.py new file mode 100644 index 00000000..4fb674b8 --- /dev/null +++ b/koyeb/api_async/models/instance_snapshot_quotas.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class InstanceSnapshotQuotas(BaseModel): + """ + InstanceSnapshotQuotas + """ # noqa: E501 + filesystem: Optional[StrictInt] = None + full: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["filesystem", "full"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceSnapshotQuotas from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceSnapshotQuotas from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "filesystem": obj.get("filesystem"), + "full": obj.get("full") + }) + return _obj + + diff --git a/koyeb/api_async/models/instance_snapshot_status.py b/koyeb/api_async/models/instance_snapshot_status.py new file mode 100644 index 00000000..a824eb6b --- /dev/null +++ b/koyeb/api_async/models/instance_snapshot_status.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class InstanceSnapshotStatus(str, Enum): + """ + InstanceSnapshotStatus + """ + + """ + allowed enum values + """ + INSTANCE_SNAPSHOT_STATUS_INVALID = 'INSTANCE_SNAPSHOT_STATUS_INVALID' + INSTANCE_SNAPSHOT_STATUS_CREATING = 'INSTANCE_SNAPSHOT_STATUS_CREATING' + INSTANCE_SNAPSHOT_STATUS_AVAILABLE = 'INSTANCE_SNAPSHOT_STATUS_AVAILABLE' + INSTANCE_SNAPSHOT_STATUS_ERROR = 'INSTANCE_SNAPSHOT_STATUS_ERROR' + INSTANCE_SNAPSHOT_STATUS_DELETING = 'INSTANCE_SNAPSHOT_STATUS_DELETING' + INSTANCE_SNAPSHOT_STATUS_DELETED = 'INSTANCE_SNAPSHOT_STATUS_DELETED' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of InstanceSnapshotStatus from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/instance_snapshot_type.py b/koyeb/api_async/models/instance_snapshot_type.py new file mode 100644 index 00000000..a83a50fb --- /dev/null +++ b/koyeb/api_async/models/instance_snapshot_type.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class InstanceSnapshotType(str, Enum): + """ + InstanceSnapshotType + """ + + """ + allowed enum values + """ + INSTANCE_SNAPSHOT_TYPE_INVALID = 'INSTANCE_SNAPSHOT_TYPE_INVALID' + INSTANCE_SNAPSHOT_TYPE_FILESYSTEM = 'INSTANCE_SNAPSHOT_TYPE_FILESYSTEM' + INSTANCE_SNAPSHOT_TYPE_FULL = 'INSTANCE_SNAPSHOT_TYPE_FULL' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of InstanceSnapshotType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/list_instance_snapshot_events_reply.py b/koyeb/api_async/models/list_instance_snapshot_events_reply.py new file mode 100644 index 00000000..404178db --- /dev/null +++ b/koyeb/api_async/models/list_instance_snapshot_events_reply.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from koyeb.api_async.models.instance_snapshot_event import InstanceSnapshotEvent +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ListInstanceSnapshotEventsReply(BaseModel): + """ + ListInstanceSnapshotEventsReply + """ # noqa: E501 + events: Optional[List[InstanceSnapshotEvent]] = None + limit: Optional[StrictInt] = None + offset: Optional[StrictInt] = None + order: Optional[StrictStr] = None + has_next: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["events", "limit", "offset", "order", "has_next"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ListInstanceSnapshotEventsReply from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in events (list) + _items = [] + if self.events: + for _item_events in self.events: + if _item_events: + _items.append(_item_events.to_dict()) + _dict['events'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListInstanceSnapshotEventsReply from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "events": [InstanceSnapshotEvent.from_dict(_item) for _item in obj["events"]] if obj.get("events") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "order": obj.get("order"), + "has_next": obj.get("has_next") + }) + return _obj + + diff --git a/koyeb/api_async/models/list_instance_snapshots_reply.py b/koyeb/api_async/models/list_instance_snapshots_reply.py new file mode 100644 index 00000000..fe7eca60 --- /dev/null +++ b/koyeb/api_async/models/list_instance_snapshots_reply.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from koyeb.api_async.models.instance_snapshot import InstanceSnapshot +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ListInstanceSnapshotsReply(BaseModel): + """ + ListInstanceSnapshotsReply + """ # noqa: E501 + instance_snapshots: Optional[List[InstanceSnapshot]] = None + limit: Optional[StrictInt] = None + offset: Optional[StrictInt] = None + count: Optional[StrictInt] = None + has_next: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["instance_snapshots", "limit", "offset", "count", "has_next"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ListInstanceSnapshotsReply from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in instance_snapshots (list) + _items = [] + if self.instance_snapshots: + for _item_instance_snapshots in self.instance_snapshots: + if _item_instance_snapshots: + _items.append(_item_instance_snapshots.to_dict()) + _dict['instance_snapshots'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListInstanceSnapshotsReply from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "instance_snapshots": [InstanceSnapshot.from_dict(_item) for _item in obj["instance_snapshots"]] if obj.get("instance_snapshots") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count"), + "has_next": obj.get("has_next") + }) + return _obj + + diff --git a/koyeb/api_async/models/network_policy.py b/koyeb/api_async/models/network_policy.py new file mode 100644 index 00000000..c8de8a27 --- /dev/null +++ b/koyeb/api_async/models/network_policy.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from koyeb.api_async.models.egress_policy import EgressPolicy +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class NetworkPolicy(BaseModel): + """ + NetworkPolicy + """ # noqa: E501 + egress: Optional[EgressPolicy] = None + __properties: ClassVar[List[str]] = ["egress"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NetworkPolicy from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of egress + if self.egress: + _dict['egress'] = self.egress.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NetworkPolicy from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "egress": EgressPolicy.from_dict(obj["egress"]) if obj.get("egress") is not None else None + }) + return _obj + + diff --git a/koyeb/api_async/models/network_policy_destination.py b/koyeb/api_async/models/network_policy_destination.py new file mode 100644 index 00000000..d56457b4 --- /dev/null +++ b/koyeb/api_async/models/network_policy_destination.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class NetworkPolicyDestination(BaseModel): + """ + NetworkPolicyDestination + """ # noqa: E501 + cidr: Optional[StrictStr] = Field(default=None, description="IPv4 or IPv6 CIDR (e.g. \"10.0.0.0/8\", \"2001:db8::/32\"). Bare IPs are accepted at the API boundary and normalized to /32 (IPv4) or /128 (IPv6) before storage.") + __properties: ClassVar[List[str]] = ["cidr"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NetworkPolicyDestination from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NetworkPolicyDestination from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cidr": obj.get("cidr") + }) + return _obj + + diff --git a/koyeb/api_async/models/quotas.py b/koyeb/api_async/models/quotas.py index 793993a7..95d4e953 100644 --- a/koyeb/api_async/models/quotas.py +++ b/koyeb/api_async/models/quotas.py @@ -20,6 +20,7 @@ from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from koyeb.api_async.models.domain_load_balancer_quotas import DomainLoadBalancerQuotas +from koyeb.api_async.models.instance_snapshot_quotas import InstanceSnapshotQuotas from koyeb.api_async.models.lifecycle_quotas import LifecycleQuotas from koyeb.api_async.models.persistent_volume_quotas import PersistentVolumeQuotas from koyeb.api_async.models.scale_to_zero_quotas import ScaleToZeroQuotas @@ -53,7 +54,8 @@ class Quotas(BaseModel): archive_max_size_mb: Optional[StrictStr] = None lifecycle: Optional[LifecycleQuotas] = None max_projects: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["apps", "services", "domains", "services_by_app", "service_provisioning_concurrency", "memory_mb", "instance_types", "regions", "max_organization_members", "max_instances_by_type", "persistent_volumes_by_region", "custom_domains", "domains_load_balancer", "metrics_retention", "logs_retention", "access_reserved_subdomains", "proxy_ports", "scale_to_zero", "archives", "archive_max_size_mb", "lifecycle", "max_projects"] + instance_snapshots: Optional[InstanceSnapshotQuotas] = None + __properties: ClassVar[List[str]] = ["apps", "services", "domains", "services_by_app", "service_provisioning_concurrency", "memory_mb", "instance_types", "regions", "max_organization_members", "max_instances_by_type", "persistent_volumes_by_region", "custom_domains", "domains_load_balancer", "metrics_retention", "logs_retention", "access_reserved_subdomains", "proxy_ports", "scale_to_zero", "archives", "archive_max_size_mb", "lifecycle", "max_projects", "instance_snapshots"] model_config = ConfigDict( validate_by_name=True, @@ -110,6 +112,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of lifecycle if self.lifecycle: _dict['lifecycle'] = self.lifecycle.to_dict() + # override the default output from pydantic by calling `to_dict()` of instance_snapshots + if self.instance_snapshots: + _dict['instance_snapshots'] = self.instance_snapshots.to_dict() return _dict @classmethod @@ -148,7 +153,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "archives": obj.get("archives"), "archive_max_size_mb": obj.get("archive_max_size_mb"), "lifecycle": LifecycleQuotas.from_dict(obj["lifecycle"]) if obj.get("lifecycle") is not None else None, - "max_projects": obj.get("max_projects") + "max_projects": obj.get("max_projects"), + "instance_snapshots": InstanceSnapshotQuotas.from_dict(obj["instance_snapshots"]) if obj.get("instance_snapshots") is not None else None }) return _obj diff --git a/koyeb/api_async/models/regional_deployment.py b/koyeb/api_async/models/regional_deployment.py index 28b9a811..183bd6da 100644 --- a/koyeb/api_async/models/regional_deployment.py +++ b/koyeb/api_async/models/regional_deployment.py @@ -53,10 +53,11 @@ class RegionalDeployment(BaseModel): metadata: Optional[Dict[str, Any]] = None provisioning_info: Optional[DeploymentProvisioningInfo] = None role: Optional[RegionalDeploymentRole] = RegionalDeploymentRole.INVALID + instance_snapshot_id: Optional[StrictStr] = None version: Optional[StrictStr] = None deployment_group: Optional[StrictStr] = None deployment_id: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["id", "created_at", "updated_at", "scheduled_at", "allocated_at", "started_at", "succeeded_at", "terminated_at", "organization_id", "app_id", "service_id", "region", "parent_id", "child_id", "status", "messages", "definition", "datacenters", "metadata", "provisioning_info", "role", "version", "deployment_group", "deployment_id"] + __properties: ClassVar[List[str]] = ["id", "created_at", "updated_at", "scheduled_at", "allocated_at", "started_at", "succeeded_at", "terminated_at", "organization_id", "app_id", "service_id", "region", "parent_id", "child_id", "status", "messages", "definition", "datacenters", "metadata", "provisioning_info", "role", "instance_snapshot_id", "version", "deployment_group", "deployment_id"] model_config = ConfigDict( validate_by_name=True, @@ -136,6 +137,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "metadata": obj.get("metadata"), "provisioning_info": DeploymentProvisioningInfo.from_dict(obj["provisioning_info"]) if obj.get("provisioning_info") is not None else None, "role": obj.get("role") if obj.get("role") is not None else RegionalDeploymentRole.INVALID, + "instance_snapshot_id": obj.get("instance_snapshot_id"), "version": obj.get("version"), "deployment_group": obj.get("deployment_group"), "deployment_id": obj.get("deployment_id") diff --git a/koyeb/api_async/models/regional_deployment_definition.py b/koyeb/api_async/models/regional_deployment_definition.py index 1f4c054b..abcbb4a5 100644 --- a/koyeb/api_async/models/regional_deployment_definition.py +++ b/koyeb/api_async/models/regional_deployment_definition.py @@ -26,6 +26,7 @@ from koyeb.api_async.models.docker_source import DockerSource from koyeb.api_async.models.env import Env from koyeb.api_async.models.git_source import GitSource +from koyeb.api_async.models.network_policy import NetworkPolicy from koyeb.api_async.models.port import Port from koyeb.api_async.models.regional_deployment_definition_type import RegionalDeploymentDefinitionType from koyeb.api_async.models.regional_deployment_mesh import RegionalDeploymentMesh @@ -55,10 +56,11 @@ class RegionalDeploymentDefinition(BaseModel): config_files: Optional[List[ConfigFile]] = None skip_cache: Optional[StrictBool] = None mesh: Optional[RegionalDeploymentMesh] = RegionalDeploymentMesh.REGIONAL_DEPLOYMENT_MESH_AUTO + network_policy: Optional[NetworkPolicy] = None docker: Optional[DockerSource] = None git: Optional[GitSource] = None archive: Optional[ArchiveSource] = None - __properties: ClassVar[List[str]] = ["name", "type", "strategy", "routes", "ports", "env", "region", "scaling", "instance_type", "deployment_group", "health_checks", "volumes", "config_files", "skip_cache", "mesh", "docker", "git", "archive"] + __properties: ClassVar[List[str]] = ["name", "type", "strategy", "routes", "ports", "env", "region", "scaling", "instance_type", "deployment_group", "health_checks", "volumes", "config_files", "skip_cache", "mesh", "network_policy", "docker", "git", "archive"] model_config = ConfigDict( validate_by_name=True, @@ -147,6 +149,9 @@ def to_dict(self) -> Dict[str, Any]: if _item_config_files: _items.append(_item_config_files.to_dict()) _dict['config_files'] = _items + # override the default output from pydantic by calling `to_dict()` of network_policy + if self.network_policy: + _dict['network_policy'] = self.network_policy.to_dict() # override the default output from pydantic by calling `to_dict()` of docker if self.docker: _dict['docker'] = self.docker.to_dict() @@ -183,6 +188,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "config_files": [ConfigFile.from_dict(_item) for _item in obj["config_files"]] if obj.get("config_files") is not None else None, "skip_cache": obj.get("skip_cache"), "mesh": obj.get("mesh") if obj.get("mesh") is not None else RegionalDeploymentMesh.REGIONAL_DEPLOYMENT_MESH_AUTO, + "network_policy": NetworkPolicy.from_dict(obj["network_policy"]) if obj.get("network_policy") is not None else None, "docker": DockerSource.from_dict(obj["docker"]) if obj.get("docker") is not None else None, "git": GitSource.from_dict(obj["git"]) if obj.get("git") is not None else None, "archive": ArchiveSource.from_dict(obj["archive"]) if obj.get("archive") is not None else None diff --git a/koyeb/api_async/models/regional_deployment_list_item.py b/koyeb/api_async/models/regional_deployment_list_item.py index 8943ee24..3a6a3a96 100644 --- a/koyeb/api_async/models/regional_deployment_list_item.py +++ b/koyeb/api_async/models/regional_deployment_list_item.py @@ -37,7 +37,8 @@ class RegionalDeploymentListItem(BaseModel): status: Optional[RegionalDeploymentStatus] = RegionalDeploymentStatus.PENDING messages: Optional[List[StrictStr]] = None definition: Optional[RegionalDeploymentDefinition] = None - __properties: ClassVar[List[str]] = ["id", "created_at", "updated_at", "region", "status", "messages", "definition"] + instance_snapshot_id: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["id", "created_at", "updated_at", "region", "status", "messages", "definition", "instance_snapshot_id"] model_config = ConfigDict( validate_by_name=True, @@ -99,7 +100,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "region": obj.get("region"), "status": obj.get("status") if obj.get("status") is not None else RegionalDeploymentStatus.PENDING, "messages": obj.get("messages"), - "definition": RegionalDeploymentDefinition.from_dict(obj["definition"]) if obj.get("definition") is not None else None + "definition": RegionalDeploymentDefinition.from_dict(obj["definition"]) if obj.get("definition") is not None else None, + "instance_snapshot_id": obj.get("instance_snapshot_id") }) return _obj diff --git a/koyeb/api_async/models/update_service.py b/koyeb/api_async/models/update_service.py index e8f7bad4..ef64dd45 100644 --- a/koyeb/api_async/models/update_service.py +++ b/koyeb/api_async/models/update_service.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from koyeb.api_async.models.deployment_definition import DeploymentDefinition from koyeb.api_async.models.deployment_metadata import DeploymentMetadata @@ -35,7 +35,8 @@ class UpdateService(BaseModel): skip_build: Optional[StrictBool] = Field(default=None, description="If set to true, the build stage will be skipped and the image coming from the last successful build step will be used instead. The call fails if no previous successful builds happened.") save_only: Optional[StrictBool] = None life_cycle: Optional[ServiceLifeCycle] = None - __properties: ClassVar[List[str]] = ["definition", "metadata", "skip_build", "save_only", "life_cycle"] + instance_snapshot_id: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["definition", "metadata", "skip_build", "save_only", "life_cycle", "instance_snapshot_id"] model_config = ConfigDict( validate_by_name=True, @@ -101,7 +102,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "metadata": DeploymentMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, "skip_build": obj.get("skip_build"), "save_only": obj.get("save_only"), - "life_cycle": ServiceLifeCycle.from_dict(obj["life_cycle"]) if obj.get("life_cycle") is not None else None + "life_cycle": ServiceLifeCycle.from_dict(obj["life_cycle"]) if obj.get("life_cycle") is not None else None, + "instance_snapshot_id": obj.get("instance_snapshot_id") }) return _obj diff --git a/koyeb/api_async/test/test_create_instance_snapshot_reply.py b/koyeb/api_async/test/test_create_instance_snapshot_reply.py new file mode 100644 index 00000000..ad439231 --- /dev/null +++ b/koyeb/api_async/test/test_create_instance_snapshot_reply.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from koyeb.api_async.models.create_instance_snapshot_reply import CreateInstanceSnapshotReply + +class TestCreateInstanceSnapshotReply(unittest.TestCase): + """CreateInstanceSnapshotReply unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateInstanceSnapshotReply: + """Test CreateInstanceSnapshotReply + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateInstanceSnapshotReply` + """ + model = CreateInstanceSnapshotReply() + if include_optional: + return CreateInstanceSnapshotReply( + instance_snapshot = koyeb.api_async.models.instance_snapshot.InstanceSnapshot( + id = '', + name = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + available_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + organization_id = '', + project_id = '', + service_id = '', + deployment_id = '', + regional_deployment_id = '', + instance_id = '', + status = 'INSTANCE_SNAPSHOT_STATUS_INVALID', + type = 'INSTANCE_SNAPSHOT_TYPE_INVALID', + version = '', + messages = [ + '' + ], ) + ) + else: + return CreateInstanceSnapshotReply( + ) + """ + + def testCreateInstanceSnapshotReply(self): + """Test CreateInstanceSnapshotReply""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/koyeb/api_async/test/test_create_instance_snapshot_request.py b/koyeb/api_async/test/test_create_instance_snapshot_request.py new file mode 100644 index 00000000..21e98fba --- /dev/null +++ b/koyeb/api_async/test/test_create_instance_snapshot_request.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from koyeb.api_async.models.create_instance_snapshot_request import CreateInstanceSnapshotRequest + +class TestCreateInstanceSnapshotRequest(unittest.TestCase): + """CreateInstanceSnapshotRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateInstanceSnapshotRequest: + """Test CreateInstanceSnapshotRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateInstanceSnapshotRequest` + """ + model = CreateInstanceSnapshotRequest() + if include_optional: + return CreateInstanceSnapshotRequest( + instance_id = '', + name = '', + type = 'INSTANCE_SNAPSHOT_TYPE_INVALID' + ) + else: + return CreateInstanceSnapshotRequest( + ) + """ + + def testCreateInstanceSnapshotRequest(self): + """Test CreateInstanceSnapshotRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/koyeb/api_async/test/test_delete_instance_snapshot_reply.py b/koyeb/api_async/test/test_delete_instance_snapshot_reply.py new file mode 100644 index 00000000..e18b57b8 --- /dev/null +++ b/koyeb/api_async/test/test_delete_instance_snapshot_reply.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from koyeb.api_async.models.delete_instance_snapshot_reply import DeleteInstanceSnapshotReply + +class TestDeleteInstanceSnapshotReply(unittest.TestCase): + """DeleteInstanceSnapshotReply unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DeleteInstanceSnapshotReply: + """Test DeleteInstanceSnapshotReply + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DeleteInstanceSnapshotReply` + """ + model = DeleteInstanceSnapshotReply() + if include_optional: + return DeleteInstanceSnapshotReply( + instance_snapshot = koyeb.api_async.models.instance_snapshot.InstanceSnapshot( + id = '', + name = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + available_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + organization_id = '', + project_id = '', + service_id = '', + deployment_id = '', + regional_deployment_id = '', + instance_id = '', + status = 'INSTANCE_SNAPSHOT_STATUS_INVALID', + type = 'INSTANCE_SNAPSHOT_TYPE_INVALID', + version = '', + messages = [ + '' + ], ) + ) + else: + return DeleteInstanceSnapshotReply( + ) + """ + + def testDeleteInstanceSnapshotReply(self): + """Test DeleteInstanceSnapshotReply""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/koyeb/api_async/test/test_egress_policy.py b/koyeb/api_async/test/test_egress_policy.py new file mode 100644 index 00000000..5a949753 --- /dev/null +++ b/koyeb/api_async/test/test_egress_policy.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from koyeb.api_async.models.egress_policy import EgressPolicy + +class TestEgressPolicy(unittest.TestCase): + """EgressPolicy unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EgressPolicy: + """Test EgressPolicy + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EgressPolicy` + """ + model = EgressPolicy() + if include_optional: + return EgressPolicy( + mode = 'EGRESS_POLICY_MODE_DEFAULT', + allow_list = [ + koyeb.api_async.models.network_policy_destination.NetworkPolicyDestination( + cidr = '', ) + ] + ) + else: + return EgressPolicy( + ) + """ + + def testEgressPolicy(self): + """Test EgressPolicy""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/koyeb/api_async/test/test_egress_policy_mode.py b/koyeb/api_async/test/test_egress_policy_mode.py new file mode 100644 index 00000000..4e422a63 --- /dev/null +++ b/koyeb/api_async/test/test_egress_policy_mode.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from koyeb.api_async.models.egress_policy_mode import EgressPolicyMode + +class TestEgressPolicyMode(unittest.TestCase): + """EgressPolicyMode unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEgressPolicyMode(self): + """Test EgressPolicyMode""" + # inst = EgressPolicyMode() + +if __name__ == '__main__': + unittest.main() diff --git a/koyeb/api_async/test/test_get_instance_snapshot_reply.py b/koyeb/api_async/test/test_get_instance_snapshot_reply.py new file mode 100644 index 00000000..eb1fc54e --- /dev/null +++ b/koyeb/api_async/test/test_get_instance_snapshot_reply.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from koyeb.api_async.models.get_instance_snapshot_reply import GetInstanceSnapshotReply + +class TestGetInstanceSnapshotReply(unittest.TestCase): + """GetInstanceSnapshotReply unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetInstanceSnapshotReply: + """Test GetInstanceSnapshotReply + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetInstanceSnapshotReply` + """ + model = GetInstanceSnapshotReply() + if include_optional: + return GetInstanceSnapshotReply( + instance_snapshot = koyeb.api_async.models.instance_snapshot.InstanceSnapshot( + id = '', + name = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + available_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + organization_id = '', + project_id = '', + service_id = '', + deployment_id = '', + regional_deployment_id = '', + instance_id = '', + status = 'INSTANCE_SNAPSHOT_STATUS_INVALID', + type = 'INSTANCE_SNAPSHOT_TYPE_INVALID', + version = '', + messages = [ + '' + ], ) + ) + else: + return GetInstanceSnapshotReply( + ) + """ + + def testGetInstanceSnapshotReply(self): + """Test GetInstanceSnapshotReply""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/koyeb/api_async/test/test_instance_snapshot.py b/koyeb/api_async/test/test_instance_snapshot.py new file mode 100644 index 00000000..327e3794 --- /dev/null +++ b/koyeb/api_async/test/test_instance_snapshot.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from koyeb.api_async.models.instance_snapshot import InstanceSnapshot + +class TestInstanceSnapshot(unittest.TestCase): + """InstanceSnapshot unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceSnapshot: + """Test InstanceSnapshot + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceSnapshot` + """ + model = InstanceSnapshot() + if include_optional: + return InstanceSnapshot( + id = '', + name = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + available_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + organization_id = '', + project_id = '', + service_id = '', + deployment_id = '', + regional_deployment_id = '', + instance_id = '', + status = 'INSTANCE_SNAPSHOT_STATUS_INVALID', + type = 'INSTANCE_SNAPSHOT_TYPE_INVALID', + version = '', + messages = [ + '' + ] + ) + else: + return InstanceSnapshot( + ) + """ + + def testInstanceSnapshot(self): + """Test InstanceSnapshot""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/koyeb/api_async/test/test_instance_snapshot_event.py b/koyeb/api_async/test/test_instance_snapshot_event.py new file mode 100644 index 00000000..fb9229c2 --- /dev/null +++ b/koyeb/api_async/test/test_instance_snapshot_event.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from koyeb.api_async.models.instance_snapshot_event import InstanceSnapshotEvent + +class TestInstanceSnapshotEvent(unittest.TestCase): + """InstanceSnapshotEvent unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceSnapshotEvent: + """Test InstanceSnapshotEvent + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceSnapshotEvent` + """ + model = InstanceSnapshotEvent() + if include_optional: + return InstanceSnapshotEvent( + id = '', + when = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + organization_id = '', + instance_snapshot_id = '', + type = '', + message = '', + metadata = None + ) + else: + return InstanceSnapshotEvent( + ) + """ + + def testInstanceSnapshotEvent(self): + """Test InstanceSnapshotEvent""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/koyeb/api_async/test/test_instance_snapshot_quotas.py b/koyeb/api_async/test/test_instance_snapshot_quotas.py new file mode 100644 index 00000000..54455e07 --- /dev/null +++ b/koyeb/api_async/test/test_instance_snapshot_quotas.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from koyeb.api_async.models.instance_snapshot_quotas import InstanceSnapshotQuotas + +class TestInstanceSnapshotQuotas(unittest.TestCase): + """InstanceSnapshotQuotas unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceSnapshotQuotas: + """Test InstanceSnapshotQuotas + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceSnapshotQuotas` + """ + model = InstanceSnapshotQuotas() + if include_optional: + return InstanceSnapshotQuotas( + filesystem = 56, + full = 56 + ) + else: + return InstanceSnapshotQuotas( + ) + """ + + def testInstanceSnapshotQuotas(self): + """Test InstanceSnapshotQuotas""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/koyeb/api_async/test/test_instance_snapshot_status.py b/koyeb/api_async/test/test_instance_snapshot_status.py new file mode 100644 index 00000000..745776fb --- /dev/null +++ b/koyeb/api_async/test/test_instance_snapshot_status.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from koyeb.api_async.models.instance_snapshot_status import InstanceSnapshotStatus + +class TestInstanceSnapshotStatus(unittest.TestCase): + """InstanceSnapshotStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInstanceSnapshotStatus(self): + """Test InstanceSnapshotStatus""" + # inst = InstanceSnapshotStatus() + +if __name__ == '__main__': + unittest.main() diff --git a/koyeb/api_async/test/test_instance_snapshot_type.py b/koyeb/api_async/test/test_instance_snapshot_type.py new file mode 100644 index 00000000..ada2c0f6 --- /dev/null +++ b/koyeb/api_async/test/test_instance_snapshot_type.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from koyeb.api_async.models.instance_snapshot_type import InstanceSnapshotType + +class TestInstanceSnapshotType(unittest.TestCase): + """InstanceSnapshotType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInstanceSnapshotType(self): + """Test InstanceSnapshotType""" + # inst = InstanceSnapshotType() + +if __name__ == '__main__': + unittest.main() diff --git a/koyeb/api_async/test/test_instance_snapshots_api.py b/koyeb/api_async/test/test_instance_snapshots_api.py new file mode 100644 index 00000000..8da2f5c7 --- /dev/null +++ b/koyeb/api_async/test/test_instance_snapshots_api.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from koyeb.api_async.api.instance_snapshots_api import InstanceSnapshotsApi + + +class TestInstanceSnapshotsApi(unittest.IsolatedAsyncioTestCase): + """InstanceSnapshotsApi unit test stubs""" + + async def asyncSetUp(self) -> None: + self.api = InstanceSnapshotsApi() + + async def asyncTearDown(self) -> None: + await self.api.api_client.close() + + async def test_create_instance_snapshot(self) -> None: + """Test case for create_instance_snapshot + + """ + pass + + async def test_delete_instance_snapshot(self) -> None: + """Test case for delete_instance_snapshot + + """ + pass + + async def test_get_instance_snapshot(self) -> None: + """Test case for get_instance_snapshot + + """ + pass + + async def test_list_instance_snapshot_events(self) -> None: + """Test case for list_instance_snapshot_events + + """ + pass + + async def test_list_instance_snapshots(self) -> None: + """Test case for list_instance_snapshots + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/koyeb/api_async/test/test_list_instance_snapshot_events_reply.py b/koyeb/api_async/test/test_list_instance_snapshot_events_reply.py new file mode 100644 index 00000000..082d1745 --- /dev/null +++ b/koyeb/api_async/test/test_list_instance_snapshot_events_reply.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from koyeb.api_async.models.list_instance_snapshot_events_reply import ListInstanceSnapshotEventsReply + +class TestListInstanceSnapshotEventsReply(unittest.TestCase): + """ListInstanceSnapshotEventsReply unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListInstanceSnapshotEventsReply: + """Test ListInstanceSnapshotEventsReply + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ListInstanceSnapshotEventsReply` + """ + model = ListInstanceSnapshotEventsReply() + if include_optional: + return ListInstanceSnapshotEventsReply( + events = [ + koyeb.api_async.models.instance_snapshot_event.InstanceSnapshotEvent( + id = '', + when = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + organization_id = '', + instance_snapshot_id = '', + type = '', + message = '', + metadata = koyeb.api_async.models.metadata.metadata(), ) + ], + limit = 56, + offset = 56, + order = '', + has_next = True + ) + else: + return ListInstanceSnapshotEventsReply( + ) + """ + + def testListInstanceSnapshotEventsReply(self): + """Test ListInstanceSnapshotEventsReply""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/koyeb/api_async/test/test_list_instance_snapshots_reply.py b/koyeb/api_async/test/test_list_instance_snapshots_reply.py new file mode 100644 index 00000000..c0bd0f9a --- /dev/null +++ b/koyeb/api_async/test/test_list_instance_snapshots_reply.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from koyeb.api_async.models.list_instance_snapshots_reply import ListInstanceSnapshotsReply + +class TestListInstanceSnapshotsReply(unittest.TestCase): + """ListInstanceSnapshotsReply unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListInstanceSnapshotsReply: + """Test ListInstanceSnapshotsReply + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ListInstanceSnapshotsReply` + """ + model = ListInstanceSnapshotsReply() + if include_optional: + return ListInstanceSnapshotsReply( + instance_snapshots = [ + koyeb.api_async.models.instance_snapshot.InstanceSnapshot( + id = '', + name = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + available_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + organization_id = '', + project_id = '', + service_id = '', + deployment_id = '', + regional_deployment_id = '', + instance_id = '', + status = 'INSTANCE_SNAPSHOT_STATUS_INVALID', + type = 'INSTANCE_SNAPSHOT_TYPE_INVALID', + version = '', + messages = [ + '' + ], ) + ], + limit = 56, + offset = 56, + count = 56, + has_next = True + ) + else: + return ListInstanceSnapshotsReply( + ) + """ + + def testListInstanceSnapshotsReply(self): + """Test ListInstanceSnapshotsReply""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/koyeb/api_async/test/test_network_policy.py b/koyeb/api_async/test/test_network_policy.py new file mode 100644 index 00000000..084d72ea --- /dev/null +++ b/koyeb/api_async/test/test_network_policy.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from koyeb.api_async.models.network_policy import NetworkPolicy + +class TestNetworkPolicy(unittest.TestCase): + """NetworkPolicy unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> NetworkPolicy: + """Test NetworkPolicy + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `NetworkPolicy` + """ + model = NetworkPolicy() + if include_optional: + return NetworkPolicy( + egress = koyeb.api_async.models.egress_policy.EgressPolicy( + mode = 'EGRESS_POLICY_MODE_DEFAULT', + allow_list = [ + koyeb.api_async.models.network_policy_destination.NetworkPolicyDestination( + cidr = '', ) + ], ) + ) + else: + return NetworkPolicy( + ) + """ + + def testNetworkPolicy(self): + """Test NetworkPolicy""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/koyeb/api_async/test/test_network_policy_destination.py b/koyeb/api_async/test/test_network_policy_destination.py new file mode 100644 index 00000000..e1476102 --- /dev/null +++ b/koyeb/api_async/test/test_network_policy_destination.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + Koyeb Rest API + + The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from koyeb.api_async.models.network_policy_destination import NetworkPolicyDestination + +class TestNetworkPolicyDestination(unittest.TestCase): + """NetworkPolicyDestination unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> NetworkPolicyDestination: + """Test NetworkPolicyDestination + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `NetworkPolicyDestination` + """ + model = NetworkPolicyDestination() + if include_optional: + return NetworkPolicyDestination( + cidr = '' + ) + else: + return NetworkPolicyDestination( + ) + """ + + def testNetworkPolicyDestination(self): + """Test NetworkPolicyDestination""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/koyeb/api_async_README.md b/koyeb/api_async_README.md index 3e7ee571..25177aa4 100644 --- a/koyeb/api_async_README.md +++ b/koyeb/api_async_README.md @@ -113,6 +113,11 @@ Class | Method | HTTP request | Description *DomainsApi* | [**list_domains**](koyeb/api_async/docs/DomainsApi.md#list_domains) | **GET** /v1/domains | List Domains *DomainsApi* | [**refresh_domain_status**](koyeb/api_async/docs/DomainsApi.md#refresh_domain_status) | **POST** /v1/domains/{id}/refresh | Refresh Domain Status *DomainsApi* | [**update_domain**](koyeb/api_async/docs/DomainsApi.md#update_domain) | **PATCH** /v1/domains/{id} | Update Domain +*InstanceSnapshotsApi* | [**create_instance_snapshot**](koyeb/api_async/docs/InstanceSnapshotsApi.md#create_instance_snapshot) | **POST** /v1/instance_snapshots | +*InstanceSnapshotsApi* | [**delete_instance_snapshot**](koyeb/api_async/docs/InstanceSnapshotsApi.md#delete_instance_snapshot) | **DELETE** /v1/instance_snapshots/{id} | +*InstanceSnapshotsApi* | [**get_instance_snapshot**](koyeb/api_async/docs/InstanceSnapshotsApi.md#get_instance_snapshot) | **GET** /v1/instance_snapshots/{id} | +*InstanceSnapshotsApi* | [**list_instance_snapshot_events**](koyeb/api_async/docs/InstanceSnapshotsApi.md#list_instance_snapshot_events) | **GET** /v1/instance_snapshot_events | +*InstanceSnapshotsApi* | [**list_instance_snapshots**](koyeb/api_async/docs/InstanceSnapshotsApi.md#list_instance_snapshots) | **GET** /v1/instance_snapshots | *InstancesApi* | [**exec_command**](koyeb/api_async/docs/InstancesApi.md#exec_command) | **GET** /v1/streams/instances/exec | Exec Command *InstancesApi* | [**get_instance**](koyeb/api_async/docs/InstancesApi.md#get_instance) | **GET** /v1/instances/{id} | Get Instance *InstancesApi* | [**list_instance_events**](koyeb/api_async/docs/InstancesApi.md#list_instance_events) | **GET** /v1/instance_events | List Instance events @@ -298,6 +303,8 @@ Class | Method | HTTP request | Description - [CreateCredentialReply](koyeb/api_async/docs/CreateCredentialReply.md) - [CreateDomain](koyeb/api_async/docs/CreateDomain.md) - [CreateDomainReply](koyeb/api_async/docs/CreateDomainReply.md) + - [CreateInstanceSnapshotReply](koyeb/api_async/docs/CreateInstanceSnapshotReply.md) + - [CreateInstanceSnapshotRequest](koyeb/api_async/docs/CreateInstanceSnapshotRequest.md) - [CreateOrganizationInvitationReply](koyeb/api_async/docs/CreateOrganizationInvitationReply.md) - [CreateOrganizationInvitationRequest](koyeb/api_async/docs/CreateOrganizationInvitationRequest.md) - [CreateOrganizationReply](koyeb/api_async/docs/CreateOrganizationReply.md) @@ -327,6 +334,7 @@ Class | Method | HTTP request | Description - [DeclareStageProgressRequest](koyeb/api_async/docs/DeclareStageProgressRequest.md) - [DeclareStepProgressRequest](koyeb/api_async/docs/DeclareStepProgressRequest.md) - [DeclineOrganizationInvitationReply](koyeb/api_async/docs/DeclineOrganizationInvitationReply.md) + - [DeleteInstanceSnapshotReply](koyeb/api_async/docs/DeleteInstanceSnapshotReply.md) - [DeleteOrganizationReply](koyeb/api_async/docs/DeleteOrganizationReply.md) - [DeletePersistentVolumeReply](koyeb/api_async/docs/DeletePersistentVolumeReply.md) - [DeleteSnapshotReply](koyeb/api_async/docs/DeleteSnapshotReply.md) @@ -380,6 +388,8 @@ Class | Method | HTTP request | Description - [DomainStatus](koyeb/api_async/docs/DomainStatus.md) - [DomainType](koyeb/api_async/docs/DomainType.md) - [DomainsSummary](koyeb/api_async/docs/DomainsSummary.md) + - [EgressPolicy](koyeb/api_async/docs/EgressPolicy.md) + - [EgressPolicyMode](koyeb/api_async/docs/EgressPolicyMode.md) - [Env](koyeb/api_async/docs/Env.md) - [Error](koyeb/api_async/docs/Error.md) - [ErrorField](koyeb/api_async/docs/ErrorField.md) @@ -401,6 +411,7 @@ Class | Method | HTTP request | Description - [GetGithubInstallationReply](koyeb/api_async/docs/GetGithubInstallationReply.md) - [GetIdenfyTokenReply](koyeb/api_async/docs/GetIdenfyTokenReply.md) - [GetInstanceReply](koyeb/api_async/docs/GetInstanceReply.md) + - [GetInstanceSnapshotReply](koyeb/api_async/docs/GetInstanceSnapshotReply.md) - [GetIntercomProfileReply](koyeb/api_async/docs/GetIntercomProfileReply.md) - [GetMetricsReply](koyeb/api_async/docs/GetMetricsReply.md) - [GetMetricsReplyMetric](koyeb/api_async/docs/GetMetricsReplyMetric.md) @@ -440,6 +451,11 @@ Class | Method | HTTP request | Description - [InstanceAvailability](koyeb/api_async/docs/InstanceAvailability.md) - [InstanceEvent](koyeb/api_async/docs/InstanceEvent.md) - [InstanceListItem](koyeb/api_async/docs/InstanceListItem.md) + - [InstanceSnapshot](koyeb/api_async/docs/InstanceSnapshot.md) + - [InstanceSnapshotEvent](koyeb/api_async/docs/InstanceSnapshotEvent.md) + - [InstanceSnapshotQuotas](koyeb/api_async/docs/InstanceSnapshotQuotas.md) + - [InstanceSnapshotStatus](koyeb/api_async/docs/InstanceSnapshotStatus.md) + - [InstanceSnapshotType](koyeb/api_async/docs/InstanceSnapshotType.md) - [InstanceStatus](koyeb/api_async/docs/InstanceStatus.md) - [InstanceUsage](koyeb/api_async/docs/InstanceUsage.md) - [InstancesSummary](koyeb/api_async/docs/InstancesSummary.md) @@ -472,6 +488,8 @@ Class | Method | HTTP request | Description - [ListDeploymentsReply](koyeb/api_async/docs/ListDeploymentsReply.md) - [ListDomainsReply](koyeb/api_async/docs/ListDomainsReply.md) - [ListInstanceEventsReply](koyeb/api_async/docs/ListInstanceEventsReply.md) + - [ListInstanceSnapshotEventsReply](koyeb/api_async/docs/ListInstanceSnapshotEventsReply.md) + - [ListInstanceSnapshotsReply](koyeb/api_async/docs/ListInstanceSnapshotsReply.md) - [ListInstancesReply](koyeb/api_async/docs/ListInstancesReply.md) - [ListOrganizationInvitationsReply](koyeb/api_async/docs/ListOrganizationInvitationsReply.md) - [ListOrganizationMembersReply](koyeb/api_async/docs/ListOrganizationMembersReply.md) @@ -503,6 +521,8 @@ Class | Method | HTTP request | Description - [NeonPostgresDatabaseNeonDatabase](koyeb/api_async/docs/NeonPostgresDatabaseNeonDatabase.md) - [NeonPostgresDatabaseNeonRole](koyeb/api_async/docs/NeonPostgresDatabaseNeonRole.md) - [NeonPostgresSummary](koyeb/api_async/docs/NeonPostgresSummary.md) + - [NetworkPolicy](koyeb/api_async/docs/NetworkPolicy.md) + - [NetworkPolicyDestination](koyeb/api_async/docs/NetworkPolicyDestination.md) - [NextInvoiceReply](koyeb/api_async/docs/NextInvoiceReply.md) - [NextInvoiceReplyDiscount](koyeb/api_async/docs/NextInvoiceReplyDiscount.md) - [NextInvoiceReplyDiscountType](koyeb/api_async/docs/NextInvoiceReplyDiscountType.md) diff --git a/spec/openapi.json b/spec/openapi.json index ddbfa5e9..40dbf0ac 100644 --- a/spec/openapi.json +++ b/spec/openapi.json @@ -68,146 +68,51 @@ } ], "paths": { - "/v1/catalog/datacenters": { + "/v1/search": { "get": { - "summary": "List datacenters", - "operationId": "ListDatacenters", + "summary": "Search", + "operationId": "Search", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ListDatacentersReply" + "$ref": "#/definitions/ksearch.SearchReply" } }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "tags": [ - "CatalogDatacenters" - ] - } - }, - "/v1/catalog/instances": { - "get": { - "summary": "List Instances", - "operationId": "ListCatalogInstances", - "responses": { - "200": { - "description": "A successful response.", + "400": { + "description": "Validation error", "schema": { - "$ref": "#/definitions/ListCatalogInstancesReply" + "$ref": "#/definitions/ErrorWithFields" } }, - "default": { - "description": "An unexpected error response.", + "401": { + "description": "Returned when the token is not valid.", "schema": { - "$ref": "#/definitions/google.rpc.Status" + "$ref": "#/definitions/Error" } - } - }, - "parameters": [ - { - "name": "limit", - "description": "(Optional) The number of items to return", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "offset", - "description": "(Optional) The offset in the list of item to return", - "in": "query", - "required": false, - "type": "string" }, - { - "name": "id", - "description": "(Optional) A filter for instances", - "in": "query", - "required": false, - "type": "string" - } - ], - "tags": [ - "CatalogInstances" - ] - } - }, - "/v1/catalog/instances/{id}": { - "get": { - "summary": "Get Instance", - "operationId": "GetCatalogInstance", - "responses": { - "200": { - "description": "A successful response.", + "403": { + "description": "Returned when the user does not have permission to access the resource.", "schema": { - "$ref": "#/definitions/GetCatalogInstanceReply" + "$ref": "#/definitions/Error" } }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "id", - "description": "The name of the instance", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": [ - "CatalogInstances" - ] - } - }, - "/v1/catalog/usage": { - "get": { - "operationId": "ListUsage", - "responses": { - "200": { - "description": "A successful response.", + "404": { + "description": "Returned when the resource does not exist.", "schema": { - "$ref": "#/definitions/ListUsageReply" + "$ref": "#/definitions/Error" } }, - "default": { - "description": "An unexpected error response.", + "500": { + "description": "Returned in case of server error.", "schema": { - "$ref": "#/definitions/google.rpc.Status" + "$ref": "#/definitions/Error" } - } - }, - "parameters": [ - { - "name": "region", - "in": "query", - "required": false, - "type": "string" - } - ], - "tags": [ - "CatalogInstanceUsage" - ] - } - }, - "/v1/catalog/regions": { - "get": { - "summary": "List Region", - "operationId": "ListRegions", - "responses": { - "200": { - "description": "A successful response.", + }, + "503": { + "description": "Service is unavailable.", "schema": { - "$ref": "#/definitions/ListRegionsReply" + "$ref": "#/definitions/Error" } }, "default": { @@ -219,73 +124,27 @@ }, "parameters": [ { - "name": "limit", - "description": "(Optional) The number of items to return", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "offset", - "description": "(Optional) The offset in the list of item to return", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "id", - "description": "(Optional) A filter for regions", + "name": "query", + "description": "(Optional) Search query", "in": "query", "required": false, "type": "string" } ], "tags": [ - "CatalogRegions" - ] - } - }, - "/v1/catalog/regions/{id}": { - "get": { - "summary": "Get Region", - "operationId": "GetRegion", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/GetRegionReply" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "id", - "description": "The name of the region", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": [ - "CatalogRegions" + "Search" ] } }, - "/v1/organization_members": { + "/v1/git/branches": { "get": { - "summary": "List organization members", - "operationId": "ListOrganizationMembers", + "summary": "List Branches", + "operationId": "ListBranches", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ListOrganizationMembersReply" + "$ref": "#/definitions/kgitproxy.ListBranchesReply" } }, "400": { @@ -333,68 +192,48 @@ }, "parameters": [ { - "name": "limit", - "description": "(Optional) The number of items to return", + "name": "repository_id", + "description": "(Optional) Filter on one repository.", "in": "query", "required": false, "type": "string" }, { - "name": "offset", - "description": "(Optional) The offset in the list of item to return", + "name": "name", + "description": "(Optional) Filter on branch name using a fuzzy search.\nRepository filter is required to enable this filter.", "in": "query", "required": false, "type": "string" }, { - "name": "organization_id", - "description": "(Optional) Filter for an organization", + "name": "limit", + "description": "(Optional) The number of items to return.", "in": "query", "required": false, "type": "string" }, { - "name": "user_id", - "description": "(Optional) Filter for an user", + "name": "offset", + "description": "(Optional) The offset in the list of item to return.", "in": "query", "required": false, "type": "string" - }, - { - "name": "organization_statuses", - "description": "(Optional) Filter for organization statuses", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string", - "enum": [ - "WARNING", - "LOCKED", - "ACTIVE", - "DEACTIVATING", - "DEACTIVATED", - "DELETING", - "DELETED" - ] - }, - "collectionFormat": "multi" } ], "tags": [ - "OrganizationMembers" + "Repositories" ] } }, - "/v1/organization_members/{id}": { - "delete": { - "summary": "Remove an organization member", - "operationId": "RemoveOrganizationMember", + "/v1/git/repositories": { + "get": { + "summary": "List Repositories", + "operationId": "ListRepositories", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/RemoveOrganizationMemberReply" + "$ref": "#/definitions/kgitproxy.ListRepositoriesReply" } }, "400": { @@ -442,119 +281,48 @@ }, "parameters": [ { - "name": "id", - "in": "path", - "required": true, + "name": "name", + "description": "(Optional) Filter on repository name using a fuzzy search.", + "in": "query", + "required": false, "type": "string" - } - ], - "tags": [ - "OrganizationMembers" - ] - } - }, - "/v1/payment_methods": { - "get": { - "summary": "List payment methods", - "operationId": "ListPaymentMethods", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/ListPaymentMethodsReply" - } - }, - "400": { - "description": "Validation error", - "schema": { - "$ref": "#/definitions/ErrorWithFields" - } - }, - "401": { - "description": "Returned when the token is not valid.", - "schema": { - "$ref": "#/definitions/Error" - } - }, - "403": { - "description": "Returned when the user does not have permission to access the resource.", - "schema": { - "$ref": "#/definitions/Error" - } - }, - "404": { - "description": "Returned when the resource does not exist.", - "schema": { - "$ref": "#/definitions/Error" - } - }, - "500": { - "description": "Returned in case of server error.", - "schema": { - "$ref": "#/definitions/Error" - } - }, - "503": { - "description": "Service is unavailable.", - "schema": { - "$ref": "#/definitions/Error" - } }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ { - "name": "limit", - "description": "(Optional) The number of items to return", + "name": "name_search_op", + "description": "(Optional) Define search operation for repository name. Accept either \"fuzzy\" or \"equality\", use \"fuzzy\" by default.", "in": "query", "required": false, "type": "string" }, { - "name": "offset", - "description": "(Optional) The offset in the list of item to return", + "name": "limit", + "description": "(Optional) The number of items to return.", "in": "query", "required": false, "type": "string" }, { - "name": "statuses", - "description": "(Optional) Filter on payment method statuses", + "name": "offset", + "description": "(Optional) The offset in the list of item to return.", "in": "query", "required": false, - "type": "array", - "items": { - "type": "string", - "enum": [ - "INVALID", - "CREATED", - "AUTHORIZED", - "DECLINED", - "CANCELED", - "EXPIRED", - "UNCHECKED" - ] - }, - "collectionFormat": "multi" + "type": "string" } ], "tags": [ - "PaymentMethods" + "Repositories" ] - }, + } + }, + "/v1/git/sync/organization/{organization_id}": { "post": { - "summary": "Create payment authorization", - "operationId": "CreatePaymentAuthorization", + "summary": "Resync Organization", + "operationId": "ResyncOrganization", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/CreatePaymentAuthorizationReply" + "$ref": "#/definitions/kgitproxy.ResyncOrganizationReply" } }, "400": { @@ -602,28 +370,26 @@ }, "parameters": [ { - "name": "body", - "in": "body", + "name": "organization_id", + "in": "path", "required": true, - "schema": { - "$ref": "#/definitions/CreatePaymentAuthorizationRequest" - } + "type": "string" } ], "tags": [ - "PaymentMethods" + "Repositories" ] } }, - "/v1/payment_methods/{id}": { - "get": { - "summary": "Get payment method", - "operationId": "GetPaymentMethod", + "/v1/provisioning/{deployment_id}/status/{stage}/{attempt}": { + "post": { + "summary": "Create an attempt for a stage", + "operationId": "CreateStageAttempt", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/GetPaymentMethodReply" + "$ref": "#/definitions/CreateStageAttemptReply" } }, "400": { @@ -671,24 +437,68 @@ }, "parameters": [ { - "name": "id", + "name": "deployment_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "stage", "in": "path", "required": true, "type": "string" + }, + { + "name": "attempt", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "secret": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/DeploymentProvisioningInfo.Stage.Status" + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "messages": { + "type": "array", + "items": { + "type": "string" + } + }, + "steps": { + "type": "array", + "items": { + "type": "string" + } + } + } + } } ], "tags": [ - "PaymentMethods" + "Provisioning" ] }, - "delete": { - "summary": "Delete payment method", - "operationId": "DeletePaymentMethod", + "patch": { + "summary": "Declare stage progress", + "operationId": "DeclareStageProgress", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/DeletePaymentMethodReply" + "$ref": "#/definitions/DeclareStageProgressReply" } }, "400": { @@ -736,26 +546,73 @@ }, "parameters": [ { - "name": "id", + "name": "deployment_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "stage", "in": "path", "required": true, "type": "string" + }, + { + "name": "attempt", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "secret": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/DeploymentProvisioningInfo.Stage.Status" + }, + "finished_at": { + "type": "string", + "format": "date-time" + }, + "messages": { + "type": "array", + "items": { + "type": "string" + } + }, + "image_pushed": { + "type": "boolean" + }, + "internal_failure": { + "type": "boolean" + }, + "retryable_failure": { + "type": "boolean" + } + } + } } ], "tags": [ - "PaymentMethods" + "Provisioning" ] } }, - "/v1/payment_methods/{id}/confirm": { - "post": { - "summary": "Confirm payment authorization", - "operationId": "ConfirmPaymentAuthorization", + "/v1/provisioning/{deployment_id}/status/{stage}/{attempt}/{step}": { + "patch": { + "summary": "Declare step progress", + "operationId": "DeclareStepProgress", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ConfirmPaymentAuthorizationReply" + "$ref": "#/definitions/DeclareStepProgressReply" } }, "400": { @@ -803,70 +660,115 @@ }, "parameters": [ { - "name": "id", + "name": "deployment_id", "in": "path", "required": true, "type": "string" }, { - "name": "body", - "in": "body", + "name": "stage", + "in": "path", "required": true, - "schema": { - "type": "object" - } - } - ], - "tags": [ - "PaymentMethods" - ] - } - }, - "/v1/users/{id}": { - "delete": { - "summary": "Delete user", - "operationId": "DeleteUser", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/DeleteUserReply" - } + "type": "string" }, - "400": { - "description": "Validation error", - "schema": { - "$ref": "#/definitions/ErrorWithFields" - } + { + "name": "attempt", + "in": "path", + "required": true, + "type": "string" }, - "401": { - "description": "Returned when the token is not valid.", - "schema": { - "$ref": "#/definitions/Error" - } + { + "name": "step", + "in": "path", + "required": true, + "type": "string" }, - "403": { - "description": "Returned when the user does not have permission to access the resource.", + { + "name": "body", + "in": "body", + "required": true, "schema": { - "$ref": "#/definitions/Error" + "type": "object", + "properties": { + "secret": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/DeploymentProvisioningInfo.Stage.Status" + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "finished_at": { + "type": "string", + "format": "date-time" + }, + "messages": { + "type": "array", + "items": { + "type": "string" + } + } + } } - }, - "404": { - "description": "Returned when the resource does not exist.", + } + ], + "tags": [ + "Provisioning" + ] + } + }, + "/v1/usages": { + "get": { + "summary": "Get organization usage", + "operationId": "GetOrganizationUsage", + "responses": { + "200": { + "description": "A successful response.", "schema": { - "$ref": "#/definitions/Error" + "$ref": "#/definitions/GetOrganizationUsageReply" } }, - "500": { - "description": "Returned in case of server error.", + "default": { + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/Error" + "$ref": "#/definitions/google.rpc.Status" } + } + }, + "parameters": [ + { + "name": "starting_time", + "description": "The starting time of the period to get data from", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" }, - "503": { - "description": "Service is unavailable.", + { + "name": "ending_time", + "description": "The ending time of the period to get data from", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + } + ], + "tags": [ + "Usages" + ] + } + }, + "/v1/usages/details": { + "get": { + "summary": "Get organization usage details", + "operationId": "GetOrganizationUsageDetails", + "responses": { + "200": { + "description": "A successful response.", "schema": { - "$ref": "#/definitions/Error" + "$ref": "#/definitions/GetOrganizationUsageDetailsReply" } }, "default": { @@ -878,27 +780,64 @@ }, "parameters": [ { - "name": "id", - "description": "The id of the user", - "in": "path", - "required": true, + "name": "starting_time", + "description": "The starting time of the period to get data from", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "ending_time", + "description": "The ending time of the period to get data from", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "limit", + "description": "(Optional) The number of items to return", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "offset", + "description": "(Optional) The offset in the list of item to return", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "order", + "description": "(Optional) Sorts the list in the ascending or the descending order", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "Accept", + "description": "If defined with the value 'text/csv', a csv file is returned", + "in": "header", + "required": false, "type": "string" } ], "tags": [ - "Users" + "Usages" ] } }, - "/v2/users/{id}": { - "delete": { - "summary": "V2 Delete user", - "operationId": "DeleteUserV2", + "/v1/service_events": { + "get": { + "summary": "List Service events", + "operationId": "ListServiceEvents", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/DeleteUserReply" + "$ref": "#/definitions/ListServiceEventsReply" } }, "400": { @@ -946,27 +885,59 @@ }, "parameters": [ { - "name": "id", - "description": "The id of the user", - "in": "path", - "required": true, + "name": "service_id", + "description": "(Optional) Filter on service id", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "types", + "description": "(Optional) Filter on service event types", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "limit", + "description": "(Optional) The number of items to return", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "offset", + "description": "(Optional) The offset in the list of item to return", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "order", + "description": "(Optional) Sorts the list in the ascending or the descending order", + "in": "query", + "required": false, "type": "string" } ], "tags": [ - "Users" + "Services" ] } }, - "/v1/intercom/profile": { + "/v1/services": { "get": { - "summary": "Get intercom profile", - "operationId": "GetIntercomProfile", + "summary": "List Services", + "operationId": "ListServices", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/GetIntercomProfileReply" + "$ref": "#/definitions/ListServicesReply" } }, "400": { @@ -1012,87 +983,106 @@ } } }, - "tags": [ - "Intercom" - ] - } - }, - "/v1/subscriptions/{id}": { - "get": { - "summary": "Get Subscription", - "operationId": "GetSubscription", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/GetSubscriptionReply" - } - }, - "400": { - "description": "Validation error", - "schema": { - "$ref": "#/definitions/ErrorWithFields" - } + "parameters": [ + { + "name": "app_id", + "description": "(Optional) The id of the app", + "in": "query", + "required": false, + "type": "string" }, - "401": { - "description": "Returned when the token is not valid.", - "schema": { - "$ref": "#/definitions/Error" - } + { + "name": "limit", + "description": "(Optional) The number of items to return", + "in": "query", + "required": false, + "type": "string" }, - "403": { - "description": "Returned when the user does not have permission to access the resource.", - "schema": { - "$ref": "#/definitions/Error" - } + { + "name": "offset", + "description": "(Optional) The offset in the list of item to return", + "in": "query", + "required": false, + "type": "string" }, - "404": { - "description": "Returned when the resource does not exist.", - "schema": { - "$ref": "#/definitions/Error" - } + { + "name": "name", + "description": "(Optional) A filter for name", + "in": "query", + "required": false, + "type": "string" }, - "500": { - "description": "Returned in case of server error.", - "schema": { - "$ref": "#/definitions/Error" - } + { + "name": "types", + "description": "(Optional) Filter on service types", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string", + "enum": [ + "INVALID_TYPE", + "WEB", + "WORKER", + "DATABASE", + "SANDBOX" + ] + }, + "collectionFormat": "multi" }, - "503": { - "description": "Service is unavailable.", - "schema": { - "$ref": "#/definitions/Error" - } + { + "name": "statuses", + "description": "(Optional) Filter on service statuses", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string", + "enum": [ + "STARTING", + "HEALTHY", + "DEGRADED", + "UNHEALTHY", + "DELETING", + "DELETED", + "PAUSING", + "PAUSED", + "RESUMING" + ] + }, + "collectionFormat": "multi" }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ { - "name": "id", - "description": "The id of the instance", - "in": "path", - "required": true, + "name": "regions", + "description": "(Optional) Filter on regions", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "project_id", + "description": "(Optional) A filter for the project ID", + "in": "query", + "required": false, "type": "string" } ], "tags": [ - "Subscriptions" + "Services" ] - } - }, - "/v1/account/activities": { - "get": { - "operationId": "GetAccountActivities", + }, + "post": { + "summary": "Create Service", + "operationId": "CreateService", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ActivityList" + "$ref": "#/definitions/CreateServiceReply" } }, "400": { @@ -1140,32 +1130,36 @@ }, "parameters": [ { - "name": "limit", - "in": "query", - "required": false, - "type": "string" + "name": "service", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateService" + } }, { - "name": "offset", + "name": "dry_run", + "description": "If set only run validation", "in": "query", "required": false, - "type": "string" + "type": "boolean" } ], "tags": [ - "activity" + "Services" ] } }, - "/v1/account/idenfy": { - "get": { - "summary": "Begin a session with iDenfy, emit an authToken", - "operationId": "GetIdenfyToken", + "/v1/services-autocomplete": { + "post": { + "summary": "Autocomplete definition", + "description": "Generate autocomplete definition for a service", + "operationId": "Autocomplete", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/GetIdenfyTokenReply" + "$ref": "#/definitions/AutocompleteReply" } }, "400": { @@ -1211,18 +1205,30 @@ } } }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/AutocompleteRequest" + } + } + ], "tags": [ - "Profile" + "Services" ] - }, - "post": { - "summary": "ClearIdenfyVerificationResult marks the current result for idenfy as\nsuperseded", - "operationId": "ClearIdenfyVerificationResult", + } + }, + "/v1/services/{id}": { + "get": { + "summary": "Get Service", + "operationId": "GetService", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ClearIdenfyVerificationResultReply" + "$ref": "#/definitions/GetServiceReply" } }, "400": { @@ -1270,28 +1276,26 @@ }, "parameters": [ { - "name": "body", - "in": "body", + "name": "id", + "description": "The id of the Service", + "in": "path", "required": true, - "schema": { - "$ref": "#/definitions/ClearIdenfyVerificationResultRequest" - } + "type": "string" } ], "tags": [ - "Profile" + "Services" ] - } - }, - "/v1/account/invite": { - "post": { - "summary": "DEPRECATED: this has been replaced by WorkOS and will be dropped soon.", - "operationId": "CreateInvite", + }, + "delete": { + "summary": "Delete Service", + "description": "Service deletion is allowed for all status.", + "operationId": "DeleteService", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/Empty" + "$ref": "#/definitions/DeleteServiceReply" } }, "400": { @@ -1339,28 +1343,25 @@ }, "parameters": [ { - "name": "body", - "in": "body", + "name": "id", + "description": "The id of the entity to delete", + "in": "path", "required": true, - "schema": { - "$ref": "#/definitions/InviteUserRequest" - } + "type": "string" } ], "tags": [ - "invite" + "Services" ] - } - }, - "/v1/account/login_method": { - "get": { - "summary": "Get the login method for an email address\nDEPRECATED: this has been replaced by WorkOS and will be dropped soon.", - "operationId": "LoginMethod", + }, + "put": { + "summary": "Update Service", + "operationId": "UpdateService", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/LoginMethodReply" + "$ref": "#/definitions/UpdateServiceReply" } }, "400": { @@ -1408,26 +1409,46 @@ }, "parameters": [ { - "name": "email", + "name": "id", + "description": "The id of the entity to update", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "service", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateService" + } + }, + { + "name": "update_mask", "in": "query", "required": false, "type": "string" + }, + { + "name": "dry_run", + "description": "If set, run validation and check that the service exists", + "in": "query", + "required": false, + "type": "boolean" } ], "tags": [ - "Profile" + "Services" ] - } - }, - "/v1/account/oauth": { - "get": { - "summary": "Get OAuth Providers", - "operationId": "GetOAuthOptions", + }, + "patch": { + "summary": "Update Service", + "operationId": "UpdateService2", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/GetOAuthOptionsReply" + "$ref": "#/definitions/UpdateServiceReply" } }, "400": { @@ -1475,38 +1496,49 @@ }, "parameters": [ { - "name": "action", - "description": "Which authentication flow is being initiated", + "name": "id", + "description": "The id of the entity to update", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "service", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateService" + } + }, + { + "name": "update_mask", "in": "query", "required": false, - "type": "string", - "enum": [ - "signin", - "signup", - "register" - ], - "default": "signin" + "type": "string" }, { - "name": "metadata", - "description": "A small (limited to 400 characters) string of arbitrary metadata which will\nbe encoded in the state", + "name": "dry_run", + "description": "If set, run validation and check that the service exists", "in": "query", "required": false, - "type": "string" + "type": "boolean" } ], "tags": [ - "Profile" + "Services" ] - }, + } + }, + "/v1/services/{id}/pause": { "post": { - "summary": "Authenticate using OAuth", - "operationId": "OAuthCallback", + "summary": "Pause Service", + "description": "Service pause action is allowed for the following status:\n - starting\n - healthy\n - degraded\n - unhealthy\n - resuming", + "operationId": "PauseService", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/OAuthCallbackReply" + "$ref": "#/definitions/PauseServiceReply" } }, "400": { @@ -1554,35 +1586,27 @@ }, "parameters": [ { - "name": "body", - "in": "body", + "name": "id", + "description": "The id of the service to pause.", + "in": "path", "required": true, - "schema": { - "$ref": "#/definitions/OAuthCallbackRequest" - } - }, - { - "name": "seon-fp", - "description": "Seon Fingerprint", - "in": "header", - "required": false, "type": "string" } ], "tags": [ - "Profile" + "Services" ] } }, - "/v1/account/organization": { - "get": { - "summary": "Get Current Organization", - "operationId": "GetCurrentOrganization", + "/v1/services/{id}/redeploy": { + "post": { + "summary": "ReDeploy Service", + "operationId": "ReDeploy", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/GetOrganizationReply" + "$ref": "#/definitions/RedeployReply" } }, "400": { @@ -1628,20 +1652,37 @@ } } }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "info", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/RedeployRequest.Info" + } + } + ], "tags": [ - "Profile" + "Services" ] } }, - "/v1/account/organization_invitations": { - "get": { - "summary": "List User Organization Invitations\nDEPRECATED: this has been replaced by WorkOS and will be dropped soon.", - "operationId": "ListUserOrganizationInvitations", + "/v1/services/{id}/resume": { + "post": { + "summary": "Resume Service", + "description": "Service resume action is allowed for the following status:\n - paused", + "operationId": "ResumeService", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ListUserOrganizationInvitationsReply" + "$ref": "#/definitions/ResumeServiceReply" } }, "400": { @@ -1689,52 +1730,41 @@ }, "parameters": [ { - "name": "limit", - "description": "(Optional) The number of items to return", - "in": "query", - "required": false, + "name": "id", + "description": "The id of the service to pause.", + "in": "path", + "required": true, "type": "string" }, { - "name": "offset", - "description": "(Optional) The offset in the list of item to return", + "name": "skip_build", + "description": "If set to true, the build stage will be skipped and the image coming from the last successful build step will be used instead.\nThe call fails if no previous successful builds happened.", "in": "query", "required": false, - "type": "string" + "type": "boolean" }, { - "name": "statuses", - "description": "(Optional) Filter on organization invitation statuses", + "name": "use_cache", "in": "query", "required": false, - "type": "array", - "items": { - "type": "string", - "enum": [ - "INVALID", - "PENDING", - "ACCEPTED", - "REFUSED", - "EXPIRED" - ] - }, - "collectionFormat": "multi" + "type": "boolean" } ], "tags": [ - "Profile" + "Services" ] } }, - "/v1/account/organization_invitations/{id}": { + "/v1/services/{id}/scale": { "get": { - "summary": "Get User Organization Invitation\nDEPRECATED: this has been replaced by WorkOS and will be dropped soon.", - "operationId": "GetUserOrganizationInvitation", + "summary": "Get Service Scaling", + "description": "Returns the current scaling configuration for a service", + "operationId": "GetServiceScaling", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/GetUserOrganizationInvitationReply" + "$ref": "#/definitions/GetServiceScalingReply" } }, "400": { @@ -1783,26 +1813,25 @@ "parameters": [ { "name": "id", - "description": "The id of the organization invitation to get", + "description": "The id of the service", "in": "path", "required": true, "type": "string" } ], "tags": [ - "Profile" + "Services" ] - } - }, - "/v1/account/organization_invitations/{id}/accept": { - "post": { - "summary": "Accept Organization Invitation\nDEPRECATED: this has been replaced by WorkOS and will be dropped soon.", - "operationId": "AcceptOrganizationInvitation", + }, + "delete": { + "summary": "Delete Service Scaling", + "description": "Deletes the manual scaling configuration for a service, reverting to \nthe scaling defined in the deployment definition.", + "operationId": "DeleteServiceScaling", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/AcceptOrganizationInvitationReply" + "$ref": "#/definitions/DeleteServiceScalingReply" } }, "400": { @@ -1851,34 +1880,25 @@ "parameters": [ { "name": "id", - "description": "The id of the organization invitation to accept", + "description": "The id of the service", "in": "path", "required": true, "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } } ], "tags": [ - "Profile" + "Services" ] - } - }, - "/v1/account/organization_invitations/{id}/decline": { - "post": { - "summary": "Decline Organization Invitation\nDEPRECATED: this has been replaced by WorkOS and will be dropped soon.", - "operationId": "DeclineOrganizationInvitation", + }, + "put": { + "summary": "Update Service Scaling", + "description": "Stores or updates the scaling configuration for a service to use manual scaling", + "operationId": "UpdateServiceScaling", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/DeclineOrganizationInvitationReply" + "$ref": "#/definitions/UpdateServiceScalingReply" } }, "400": { @@ -1927,7 +1947,7 @@ "parameters": [ { "name": "id", - "description": "The id of the organization invitation to decline", + "description": "The id of the service to scale", "in": "path", "required": true, "type": "string" @@ -1937,25 +1957,33 @@ "in": "body", "required": true, "schema": { - "type": "object" + "type": "object", + "properties": { + "scalings": { + "type": "array", + "items": { + "$ref": "#/definitions/ManualServiceScaling" + }, + "title": "The new scaling configuration" + } + } } } ], "tags": [ - "Profile" + "Services" ] } }, - "/v1/account/organizations": { + "/v1/app_events": { "get": { - "summary": "List User Organizations", - "description": "List all organizations that the current user is a member of.", - "operationId": "ListUserOrganizations", + "summary": "List App events", + "operationId": "ListAppEvents", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ListUserOrganizationsReply" + "$ref": "#/definitions/ListAppEventsReply" } }, "400": { @@ -2003,68 +2031,59 @@ }, "parameters": [ { - "name": "limit", - "description": "(Optional) Define pagination limit", + "name": "app_id", + "description": "(Optional) Filter on app id", "in": "query", "required": false, "type": "string" }, { - "name": "offset", - "description": "(Optional) Define pagination offset", + "name": "types", + "description": "(Optional) Filter on app event types", "in": "query", "required": false, - "type": "string" + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" }, { - "name": "order", - "description": "(Optional) Sorts the list in the ascending or the descending order", + "name": "limit", + "description": "(Optional) The number of items to return", "in": "query", "required": false, "type": "string" }, { - "name": "search", - "description": "(Optional) Fuzzy case-insensitive search based on organization name or\norganization id", + "name": "offset", + "description": "(Optional) The offset in the list of item to return", "in": "query", "required": false, "type": "string" }, { - "name": "statuses", - "description": "(Optional) Only return organizations which status match one in the list", + "name": "order", + "description": "(Optional) Sorts the list in the ascending or the descending order", "in": "query", "required": false, - "type": "array", - "items": { - "type": "string", - "enum": [ - "WARNING", - "LOCKED", - "ACTIVE", - "DEACTIVATING", - "DEACTIVATED", - "DELETING", - "DELETED" - ] - }, - "collectionFormat": "multi" + "type": "string" } ], "tags": [ - "Profile" + "Apps" ] } }, - "/v1/account/profile": { + "/v1/apps": { "get": { - "summary": "Get Current User", - "operationId": "GetCurrentUser", + "summary": "List App", + "operationId": "ListApps", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/UserReply" + "$ref": "#/definitions/ListAppsReply" } }, "400": { @@ -2112,25 +2131,46 @@ }, "parameters": [ { - "name": "seon-fp", - "description": "Seon Fingerprint", - "in": "header", + "name": "limit", + "description": "(Optional) The number of items to return", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "offset", + "description": "(Optional) The offset in the list of item to return", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "name", + "description": "(Optional) A filter for name", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "project_id", + "description": "(Optional) A filter for the project ID", + "in": "query", "required": false, "type": "string" } ], "tags": [ - "Profile" + "Apps" ] }, - "put": { - "summary": "Update User", - "operationId": "UpdateUser", + "post": { + "summary": "Create App", + "operationId": "CreateApp", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/UserReply" + "$ref": "#/definitions/CreateAppReply" } }, "400": { @@ -2178,32 +2218,28 @@ }, "parameters": [ { - "name": "user", + "name": "app", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/UpdateUserRequest.UserUpdateBody" + "$ref": "#/definitions/CreateApp" } - }, - { - "name": "update_mask", - "in": "query", - "required": false, - "type": "string" } ], "tags": [ - "Profile" + "Apps" ] - }, - "patch": { - "summary": "Update User", - "operationId": "UpdateUser2", + } + }, + "/v1/apps/{id}": { + "get": { + "summary": "Get App", + "operationId": "GetApp", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/UserReply" + "$ref": "#/definitions/GetAppReply" } }, "400": { @@ -2251,34 +2287,26 @@ }, "parameters": [ { - "name": "user", - "in": "body", + "name": "id", + "description": "The id of the App", + "in": "path", "required": true, - "schema": { - "$ref": "#/definitions/UpdateUserRequest.UserUpdateBody" - } - }, - { - "name": "update_mask", - "in": "query", - "required": false, "type": "string" } ], "tags": [ - "Profile" + "Apps" ] - } - }, - "/v1/account/resend_validation": { - "post": { - "summary": "Resend Email Verification\nDEPRECATED: this has been replaced by WorkOS and will be dropped soon.", - "operationId": "ResendEmailValidation", + }, + "delete": { + "summary": "Delete App", + "description": "App deletion is allowed for all status.", + "operationId": "DeleteApp", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ResendEmailValidationReply" + "$ref": "#/definitions/DeleteAppReply" } }, "400": { @@ -2326,28 +2354,25 @@ }, "parameters": [ { - "name": "body", - "in": "body", + "name": "id", + "description": "The id of the App to delete", + "in": "path", "required": true, - "schema": { - "$ref": "#/definitions/ResendEmailValidationRequest" - } + "type": "string" } ], "tags": [ - "Profile" + "Apps" ] - } - }, - "/v1/account/reset_password": { - "post": { - "summary": "Reset Password\nDEPRECATED: this has been replaced by WorkOS and will be dropped soon.", - "operationId": "ResetPassword", + }, + "put": { + "summary": "Update App", + "operationId": "UpdateApp", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ResetPasswordReply" + "$ref": "#/definitions/UpdateAppReply" } }, "400": { @@ -2395,27 +2420,39 @@ }, "parameters": [ { - "name": "body", + "name": "id", + "description": "The id of the app to update.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "app", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/ResetPasswordRequest" + "$ref": "#/definitions/UpdateApp" } + }, + { + "name": "update_mask", + "in": "query", + "required": false, + "type": "string" } ], "tags": [ - "Profile" + "Apps" ] - } - }, - "/v1/account/settings": { - "get": { - "operationId": "GetUserSettings", + }, + "patch": { + "summary": "Update App", + "operationId": "UpdateApp2", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/GetUserSettingsReply" + "$ref": "#/definitions/UpdateAppReply" } }, "400": { @@ -2461,17 +2498,44 @@ } } }, + "parameters": [ + { + "name": "id", + "description": "The id of the app to update.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "app", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateApp" + } + }, + { + "name": "update_mask", + "in": "query", + "required": false, + "type": "string" + } + ], "tags": [ - "Profile" + "Apps" ] - }, - "patch": { - "operationId": "UpdateUserSettings", + } + }, + "/v1/apps/{id}/pause": { + "post": { + "summary": "Pause App", + "description": "App pause action is allowed for the following status:\n - starting\n - healthy\n - degraded\n - unhealthy\n - resuming", + "operationId": "PauseApp", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/UpdateUserSettingsReply" + "$ref": "#/definitions/PauseAppReply" } }, "400": { @@ -2519,28 +2583,28 @@ }, "parameters": [ { - "name": "body", - "in": "body", + "name": "id", + "description": "The id of the app to pause.", + "in": "path", "required": true, - "schema": { - "$ref": "#/definitions/UpdateUserSettingsRequest" - } + "type": "string" } ], "tags": [ - "Profile" + "Apps" ] } }, - "/v1/account/signup": { + "/v1/apps/{id}/resume": { "post": { - "summary": "Signup\nDEPRECATED: this has been replaced by WorkOS and will be dropped soon.", - "operationId": "Signup", + "summary": "Resume App", + "description": "App resume action is allowed for the following status:\n - paused", + "operationId": "ResumeApp", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/LoginReply" + "$ref": "#/definitions/ResumeAppReply" } }, "400": { @@ -2588,36 +2652,27 @@ }, "parameters": [ { - "name": "body", - "description": "Create new account", - "in": "body", + "name": "id", + "description": "The id of the app to resume.", + "in": "path", "required": true, - "schema": { - "$ref": "#/definitions/CreateAccountRequest" - } - }, - { - "name": "seon-fp", - "description": "Seon Fingerprint", - "in": "header", - "required": false, "type": "string" } ], "tags": [ - "Profile" + "Apps" ] } }, - "/v1/account/update_password": { - "post": { - "summary": "Update Password\nDEPRECATED: this has been replaced by WorkOS and will be dropped soon.", - "operationId": "UpdatePassword", + "/v1/deployment/{id}/scaling": { + "get": { + "summary": "Get Deployment Scaling", + "operationId": "GetDeploymentScaling", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/LoginReply" + "$ref": "#/definitions/GetDeploymentScalingReply" } }, "400": { @@ -2665,35 +2720,41 @@ }, "parameters": [ { - "name": "body", - "in": "body", + "name": "id", + "in": "path", "required": true, - "schema": { - "$ref": "#/definitions/UpdatePasswordRequest" - } + "type": "string" }, { - "name": "seon-fp", - "description": "Seon Fingerprint", - "in": "header", + "name": "region", + "description": "(Optional) Filter on region", + "in": "query", "required": false, "type": "string" + }, + { + "name": "replica_index", + "description": "(Optional) Filter on replica_index", + "in": "query", + "required": false, + "type": "integer", + "format": "int64" } ], "tags": [ - "Profile" + "Deployments" ] } }, - "/v1/account/validate/{id}": { - "post": { - "summary": "Validate\nDEPRECATED: this has been replaced by WorkOS and will be dropped soon.", - "operationId": "Validate", - "responses": { + "/v1/deployment_events": { + "get": { + "summary": "List Deployment events", + "operationId": "ListDeploymentEvents", + "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/LoginReply" + "$ref": "#/definitions/ListDeploymentEventsReply" } }, "400": { @@ -2741,34 +2802,59 @@ }, "parameters": [ { - "name": "id", - "in": "path", - "required": true, + "name": "deployment_id", + "description": "(Optional) Filter on deployment id", + "in": "query", + "required": false, "type": "string" }, { - "name": "seon-fp", - "description": "Seon Fingerprint", - "in": "header", + "name": "types", + "description": "(Optional) Filter on deployment event types", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "limit", + "description": "(Optional) The number of items to return", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "offset", + "description": "(Optional) The offset in the list of item to return", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "order", + "description": "(Optional) Sorts the list in the ascending or the descending order", + "in": "query", "required": false, "type": "string" } ], "tags": [ - "Profile" + "Deployments" ] } }, - "/v1/billing/has_unpaid_invoices": { + "/v1/deployments": { "get": { - "summary": "Experimental: Has unpaid invoices", - "description": "WARNING: Please don't use the following method.\nKoyeb doesn't guarantee backwards compatible breaking change and reserve\nthe right to completely drop it without notice. USE AT YOUR OWN RISK.", - "operationId": "HasUnpaidInvoices", + "summary": "List Deployments", + "operationId": "ListDeployments", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/HasUnpaidInvoicesReply" + "$ref": "#/definitions/ListDeploymentsReply" } }, "400": { @@ -2814,19 +2900,79 @@ } } }, + "parameters": [ + { + "name": "app_id", + "description": "(Optional) Filter on application id", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "service_id", + "description": "(Optional) Filter on service id", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "limit", + "description": "(Optional) The number of items to return", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "offset", + "description": "(Optional) The offset in the list of item to return", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "statuses", + "description": "(Optional) Filter on statuses", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string", + "enum": [ + "PENDING", + "PROVISIONING", + "SCHEDULED", + "CANCELING", + "CANCELED", + "ALLOCATING", + "STARTING", + "HEALTHY", + "DEGRADED", + "UNHEALTHY", + "STOPPING", + "STOPPED", + "ERRORING", + "ERROR", + "STASHED", + "SLEEPING" + ] + }, + "collectionFormat": "multi" + } + ], "tags": [ - "billing" + "Deployments" ] } }, - "/v1/billing/manage": { + "/v1/deployments/{id}": { "get": { - "operationId": "Manage", + "summary": "Get Deployment", + "operationId": "GetDeployment", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ManageReply" + "$ref": "#/definitions/GetDeploymentReply" } }, "400": { @@ -2872,21 +3018,30 @@ } } }, + "parameters": [ + { + "name": "id", + "description": "The id of the deployment", + "in": "path", + "required": true, + "type": "string" + } + ], "tags": [ - "billing" + "Deployments" ] } }, - "/v1/billing/next_invoice": { - "get": { - "summary": "Experimental: Fetch next invoice", - "description": "WARNING: Please don't use the following method.\nKoyeb doesn't guarantee backwards compatible breaking change and reserve\nthe right to completely drop it without notice. USE AT YOUR OWN RISK.", - "operationId": "NextInvoice", + "/v1/deployments/{id}/cancel": { + "post": { + "summary": "Cancel Deployment", + "description": "Deployment cancellation is allowed for the following status:\n - pending\n - provisioning\n - scheduled", + "operationId": "CancelDeployment", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/NextInvoiceReply" + "$ref": "#/definitions/CancelDeploymentReply" } }, "400": { @@ -2932,20 +3087,29 @@ } } }, + "parameters": [ + { + "name": "id", + "description": "The id of the deployment to cancel.", + "in": "path", + "required": true, + "type": "string" + } + ], "tags": [ - "billing" + "Deployments" ] } }, - "/v1/github/installation": { + "/v1/regional_deployment_events": { "get": { - "summary": "Fetch Github Installation configuration", - "operationId": "GetGithubInstallation", + "summary": "List Regional Deployment events", + "operationId": "ListRegionalDeploymentEvents", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/GetGithubInstallationReply" + "$ref": "#/definitions/ListRegionalDeploymentEventsReply" } }, "400": { @@ -2991,18 +3155,62 @@ } } }, + "parameters": [ + { + "name": "regional_deployment_id", + "description": "(Optional) Filter on regional deployment id", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "types", + "description": "(Optional) Filter on regional deployment event types", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "limit", + "description": "(Optional) The number of items to return", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "offset", + "description": "(Optional) The offset in the list of item to return", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "order", + "description": "(Optional) Sorts the list in the ascending or the descending order", + "in": "query", + "required": false, + "type": "string" + } + ], "tags": [ - "organization" + "RegionalDeployments" ] - }, - "post": { - "summary": "Start Github Installation", - "operationId": "GithubInstallation", + } + }, + "/v1/regional_deployments": { + "get": { + "summary": "List Regional Deployments", + "description": "Experimental: use at your own risk", + "operationId": "ListRegionalDeployments", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/GithubInstallationReply" + "$ref": "#/definitions/ListRegionalDeploymentsReply" } }, "400": { @@ -3050,28 +3258,42 @@ }, "parameters": [ { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/GithubInstallationRequest" - } + "name": "deployment_id", + "description": "(Optional) Filter on deployment id", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "limit", + "description": "(Optional) The number of items to return", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "offset", + "description": "(Optional) The offset in the list of item to return", + "in": "query", + "required": false, + "type": "string" } ], "tags": [ - "organization" + "RegionalDeployments" ] } }, - "/v1/organizations": { - "post": { - "summary": "Create Organization", - "operationId": "CreateOrganization", - "responses": { - "200": { - "description": "A successful response.", + "/v1/regional_deployments/{id}": { + "get": { + "summary": "Get Regional Deployment", + "description": "Experimental: use at your own risk", + "operationId": "GetRegionalDeployment", + "responses": { + "200": { + "description": "A successful response.", "schema": { - "$ref": "#/definitions/CreateOrganizationReply" + "$ref": "#/definitions/GetRegionalDeploymentReply" } }, "400": { @@ -3119,28 +3341,28 @@ }, "parameters": [ { - "name": "body", - "in": "body", + "name": "id", + "description": "The id of the regional deployment", + "in": "path", "required": true, - "schema": { - "$ref": "#/definitions/CreateOrganizationRequest" - } + "type": "string" } ], "tags": [ - "organization" + "RegionalDeployments" ] } }, - "/v1/organizations/{id}": { + "/v1/docker-helper/verify": { "get": { - "summary": "Get Organization", - "operationId": "GetOrganization", + "summary": "Verify Docker Image", + "description": "Verify if a docker image is reachable", + "operationId": "VerifyDockerImage", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/GetOrganizationReply" + "$ref": "#/definitions/VerifyDockerImageReply" } }, "400": { @@ -3188,24 +3410,34 @@ }, "parameters": [ { - "name": "id", - "in": "path", - "required": true, + "name": "image", + "description": "The full image uri to be verified", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "secret_id", + "description": "(Optional) the id of the secret to use to authenticate to the registry", + "in": "query", + "required": false, "type": "string" } ], "tags": [ - "organization" + "DockerHelper" ] - }, - "delete": { - "summary": "Delete an Organization", - "operationId": "DeleteOrganization", + } + }, + "/v1/volume_events": { + "get": { + "summary": "List Persistent Volume events", + "operationId": "ListPersistentVolumeEvents", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/DeleteOrganizationReply" + "$ref": "#/definitions/ListPersistentVolumeEventsReply" } }, "400": { @@ -3253,24 +3485,59 @@ }, "parameters": [ { - "name": "id", - "in": "path", - "required": true, + "name": "persistent_volume_id", + "description": "(Optional) Filter on persistent volume id", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "types", + "description": "(Optional) Filter on persistent volume event types", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "limit", + "description": "(Optional) The number of items to return", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "offset", + "description": "(Optional) The offset in the list of item to return", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "order", + "description": "(Optional) Sorts the list in the ascending or the descending order", + "in": "query", + "required": false, "type": "string" } ], "tags": [ - "organization" + "PersistentVolumes" ] - }, - "put": { - "summary": "Update Organization", - "operationId": "UpdateOrganization", + } + }, + "/v1/volumes": { + "get": { + "summary": "List all PersistentVolumes", + "operationId": "ListPersistentVolumes", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/UpdateOrganizationReply" + "$ref": "#/definitions/ListPersistentVolumesReply" } }, "400": { @@ -3318,38 +3585,60 @@ }, "parameters": [ { - "name": "id", - "in": "path", - "required": true, + "name": "limit", + "description": "(Optional) The number of items to return", + "in": "query", + "required": false, "type": "string" }, { - "name": "organization", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/Organization" - } + "name": "offset", + "description": "(Optional) The offset in the list of item to return", + "in": "query", + "required": false, + "type": "string" }, { - "name": "update_mask", + "name": "service_id", + "description": "(Optional) A filter for the service id", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "region", + "description": "(Optional) A filter for the region", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "name", + "description": "(Optional) A filter for the name", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "project_id", + "description": "(Optional) A filter for the project ID", "in": "query", "required": false, "type": "string" } ], "tags": [ - "organization" + "PersistentVolumes" ] }, - "patch": { - "summary": "Update Organization", - "operationId": "UpdateOrganization2", + "post": { + "summary": "Create a PersistentVolume", + "operationId": "CreatePersistentVolume", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/UpdateOrganizationReply" + "$ref": "#/definitions/CreatePersistentVolumeReply" } }, "400": { @@ -3397,41 +3686,28 @@ }, "parameters": [ { - "name": "id", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "organization", + "name": "body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/Organization" + "$ref": "#/definitions/CreatePersistentVolumeRequest" } - }, - { - "name": "update_mask", - "in": "query", - "required": false, - "type": "string" } ], "tags": [ - "organization" + "PersistentVolumes" ] } }, - "/v1/organizations/{id}/access_token": { - "post": { - "summary": "CreateAccessToken", - "description": "CreateAccessToken creates a short-lived access token in the scope of the\nspecified organization, provided the user making the request is part of\nsaid organization.\n\nIt's possible to specify a validity for the token, which defaults to 1h\nand must be no more than 24h. The format is `s`, where ``\nis a floating point in seconds (so `123.456789012s` means 123 seconds and\n456789012 nanoseconds). See:\nhttps://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration.html.", - "operationId": "CreateAccessToken", + "/v1/volumes/{id}": { + "get": { + "summary": "Get a PersistentVolume", + "operationId": "GetPersistentVolume", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/CreateAccessTokenReply" + "$ref": "#/definitions/GetPersistentVolumeReply" } }, "400": { @@ -3480,40 +3756,23 @@ "parameters": [ { "name": "id", - "description": "Organization id for ephemeral credential", "in": "path", "required": true, "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "validity": { - "type": "string", - "title": "Validity of the credential" - } - } - } } ], "tags": [ - "organization" + "PersistentVolumes" ] - } - }, - "/v1/organizations/{id}/deactivate": { - "post": { - "summary": "Deactivate an Organization", - "operationId": "DeactivateOrganization", + }, + "delete": { + "summary": "Delete a PersistentVolume", + "operationId": "DeletePersistentVolume", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/DeactivateOrganizationReply" + "$ref": "#/definitions/DeletePersistentVolumeReply" } }, "400": { @@ -3565,36 +3824,20 @@ "in": "path", "required": true, "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "skip_confirmation": { - "type": "boolean", - "description": "if set to true, skip_confirmation will directly start the deactivation\nprocess, without sending a confirmation email beforehand." - } - } - } } ], "tags": [ - "organization" + "PersistentVolumes" ] - } - }, - "/v1/organizations/{id}/default_project": { - "put": { - "summary": "Update Organization's default project", - "operationId": "UpdateOrganizationDefaultProject", + }, + "post": { + "summary": "Update a PersistentVolume", + "operationId": "UpdatePersistentVolume", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/UpdateOrganizationDefaultProjectReply" + "$ref": "#/definitions/UpdatePersistentVolumeReply" } }, "400": { @@ -3654,27 +3897,34 @@ "schema": { "type": "object", "properties": { - "default_project_id": { - "type": "string" - } - } - } - } - ], + "name": { + "type": "string", + "title": "(Optional) change the name of the volume" + }, + "max_size": { + "type": "integer", + "format": "int64", + "title": "(Optional) increase the volume size (in Gigabyte / GB)" + } + } + } + } + ], "tags": [ - "organization" + "PersistentVolumes" ] } }, - "/v1/organizations/{id}/name": { - "put": { - "summary": "Update Organization Name", - "operationId": "UpdateOrganizationName", + "/v1/archives": { + "post": { + "summary": "Create Archive", + "description": "Create a signed URL to upload an archive.", + "operationId": "CreateArchive", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/UpdateOrganizationNameReply" + "$ref": "#/definitions/CreateArchiveReply" } }, "400": { @@ -3722,39 +3972,28 @@ }, "parameters": [ { - "name": "id", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", + "name": "archive", "in": "body", "required": true, "schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - } - } + "$ref": "#/definitions/CreateArchive" } } ], "tags": [ - "organization" + "Archives" ] } }, - "/v1/organizations/{id}/plan": { - "post": { - "summary": "Update Organization plan", - "operationId": "UpdateOrganizationPlan", + "/v1/instance_events": { + "get": { + "summary": "List Instance events", + "operationId": "ListInstanceEvents", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/UpdateOrganizationPlanReply" + "$ref": "#/definitions/ListInstanceEventsReply" } }, "400": { @@ -3802,42 +4041,63 @@ }, "parameters": [ { - "name": "id", - "in": "path", - "required": true, + "name": "instance_ids", + "description": "(Optional) Filter on list of instance id", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "types", + "description": "(Optional) Filter on instance event types", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "limit", + "description": "(Optional) The number of items to return", + "in": "query", + "required": false, "type": "string" }, { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "plan": { - "$ref": "#/definitions/Plan" - }, - "coupon_code": { - "type": "string" - } - } - } + "name": "offset", + "description": "(Optional) The offset in the list of item to return", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "order", + "description": "(Optional) Sorts the list in the ascending or the descending order", + "in": "query", + "required": false, + "type": "string" } ], "tags": [ - "organization" + "Instances" ] } }, - "/v1/organizations/{id}/reactivate": { - "post": { - "summary": "Reactivate an Organization", - "operationId": "ReactivateOrganization", + "/v1/instances": { + "get": { + "summary": "List Instances", + "operationId": "ListInstances", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ReactivateOrganizationReply" + "$ref": "#/definitions/ListInstancesReply" } }, "400": { @@ -3885,34 +4145,120 @@ }, "parameters": [ { - "name": "id", - "in": "path", - "required": true, + "name": "app_id", + "description": "(Optional) Filter on application id", + "in": "query", + "required": false, "type": "string" }, { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } + "name": "service_id", + "description": "(Optional) Filter on service id", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "deployment_id", + "description": "(Optional) Filter on deployment id", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "regional_deployment_id", + "description": "(Optional) Filter on regional deployment id", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "allocation_id", + "description": "(Optional) Filter on allocation id", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "replica_index", + "description": "(Optional) Filter on replica index", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "statuses", + "description": "(Optional) Filter on instance statuses", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string", + "enum": [ + "ALLOCATING", + "STARTING", + "HEALTHY", + "UNHEALTHY", + "STOPPING", + "STOPPED", + "ERROR", + "SLEEPING" + ] + }, + "collectionFormat": "multi" + }, + { + "name": "limit", + "description": "(Optional) The number of items to return", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "offset", + "description": "(Optional) The offset in the list of item to return", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "order", + "description": "(Optional) Sorts the list in the ascending or the descending order", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "starting_time", + "description": "(Optional) The starting time of the period of running instance", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "ending_time", + "description": "(Optional) The ending time of the period of running instance", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" } ], "tags": [ - "organization" + "Instances" ] } }, - "/v1/organizations/{id}/signup_qualification": { - "post": { - "summary": "Upsert Organization's signup qualification", - "operationId": "UpsertSignupQualification", + "/v1/instances/{id}": { + "get": { + "summary": "Get Instance", + "operationId": "GetInstance", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/UpsertSignupQualificationReply" + "$ref": "#/definitions/GetInstanceReply" } }, "400": { @@ -3961,38 +4307,26 @@ "parameters": [ { "name": "id", + "description": "The id of the instance", "in": "path", "required": true, "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "signup_qualification": { - "type": "object" - } - } - } } ], "tags": [ - "organization" + "Instances" ] } }, - "/v1/organizations/{id}/switch": { - "post": { - "summary": "Switch Organization context\nDEPRECATED: this has been replaced by WorkOS and will be dropped soon.", - "operationId": "SwitchOrganization", + "/v1/snapshots": { + "get": { + "summary": "List all Snapshots", + "operationId": "ListSnapshots", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/LoginReply" + "$ref": "#/definitions/ListSnapshotsReply" } }, "400": { @@ -4040,41 +4374,65 @@ }, "parameters": [ { - "name": "id", - "in": "path", - "required": true, + "name": "limit", + "description": "(Optional) The number of items to return", + "in": "query", + "required": false, "type": "string" }, { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } + "name": "offset", + "description": "(Optional) The offset in the list of item to return", + "in": "query", + "required": false, + "type": "string" }, { - "name": "seon-fp", - "description": "Seon Fingerprint", - "in": "header", + "name": "organization_id", + "description": "(Optional) Filter by organization_id", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "statuses", + "description": "(Optional) Filter by status\n\n - SNAPSHOT_STATUS_INVALID: zero value, invalid\n - SNAPSHOT_STATUS_CREATING: the snapshot is being created\n - SNAPSHOT_STATUS_AVAILABLE: the snapshot is complete and available\n - SNAPSHOT_STATUS_MIGRATING: the snapshot is being migrated\n - SNAPSHOT_STATUS_DELETING: the snapshot is being deleted\n - SNAPSHOT_STATUS_DELETED: the snapshot is deleted", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string", + "enum": [ + "SNAPSHOT_STATUS_INVALID", + "SNAPSHOT_STATUS_CREATING", + "SNAPSHOT_STATUS_AVAILABLE", + "SNAPSHOT_STATUS_MIGRATING", + "SNAPSHOT_STATUS_DELETING", + "SNAPSHOT_STATUS_DELETED" + ] + }, + "collectionFormat": "multi" + }, + { + "name": "region", + "description": "(Optional) A filter for the region", + "in": "query", "required": false, "type": "string" } ], "tags": [ - "organization" + "Snapshots" ] - } - }, - "/v1/organizations/{organization_id}/budget": { - "get": { - "summary": "Get Budget", - "operationId": "GetBudget", + }, + "post": { + "summary": "Create a Snapshot", + "operationId": "CreateSnapshot", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/GetBudgetReply" + "$ref": "#/definitions/CreateSnapshotReply" } }, "400": { @@ -4122,24 +4480,28 @@ }, "parameters": [ { - "name": "organization_id", - "in": "path", + "name": "body", + "in": "body", "required": true, - "type": "string" + "schema": { + "$ref": "#/definitions/CreateSnapshotRequest" + } } ], "tags": [ - "organization" + "Snapshots" ] - }, - "delete": { - "summary": "Delete Budget", - "operationId": "DeleteBudget", + } + }, + "/v1/snapshots/{id}": { + "get": { + "summary": "Get a Snapshot", + "operationId": "GetSnapshot", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/DeleteBudgetReply" + "$ref": "#/definitions/GetSnapshotReply" } }, "400": { @@ -4187,24 +4549,24 @@ }, "parameters": [ { - "name": "organization_id", + "name": "id", "in": "path", "required": true, "type": "string" } ], "tags": [ - "organization" + "Snapshots" ] }, - "post": { - "summary": "Create Budget", - "operationId": "CreateBudget", + "delete": { + "summary": "Delete a Snapshot", + "operationId": "DeleteSnapshot", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/CreateBudgetReply" + "$ref": "#/definitions/DeleteSnapshotReply" } }, "400": { @@ -4252,39 +4614,24 @@ }, "parameters": [ { - "name": "organization_id", + "name": "id", "in": "path", "required": true, "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "amount": { - "type": "string", - "format": "int64", - "description": "In cents." - } - } - } } ], "tags": [ - "organization" + "Snapshots" ] }, - "put": { - "summary": "Update Budget", - "operationId": "UpdateBudget", + "post": { + "summary": "Update a Snapshot", + "operationId": "UpdateSnapshot", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/UpdateBudgetReply" + "$ref": "#/definitions/UpdateSnapshotReply" } }, "400": { @@ -4332,7 +4679,8 @@ }, "parameters": [ { - "name": "organization_id", + "name": "id", + "description": "The id of the snapshot", "in": "path", "required": true, "type": "string" @@ -4344,28 +4692,28 @@ "schema": { "type": "object", "properties": { - "amount": { + "name": { "type": "string", - "format": "int64", - "description": "In cents." + "title": "Change the name of the snapshot" } } } } ], "tags": [ - "organization" + "Snapshots" ] } }, - "/v1/sso/canny": { - "post": { - "operationId": "CannyAuth", + "/v1/secrets": { + "get": { + "summary": "List Secrets", + "operationId": "ListSecrets", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/CannyAuthReply" + "$ref": "#/definitions/ListSecretsReply" } }, "400": { @@ -4413,27 +4761,59 @@ }, "parameters": [ { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CannyAuthRequest" - } + "name": "name", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "limit", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "offset", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "types", + "description": "Filter by secret types", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string", + "enum": [ + "SIMPLE", + "REGISTRY", + "MANAGED" + ] + }, + "collectionFormat": "multi" + }, + { + "name": "project_id", + "description": "(Optional) A filter for the project ID", + "in": "query", + "required": false, + "type": "string" } ], "tags": [ - "sso" + "Secrets" ] - } - }, - "/v1/sso/discourse": { + }, "post": { - "operationId": "DiscourseAuth", + "summary": "Create Secret", + "operationId": "CreateSecret", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/DiscourseAuthReply" + "$ref": "#/definitions/CreateSecretReply" } }, "400": { @@ -4481,29 +4861,28 @@ }, "parameters": [ { - "name": "body", + "name": "secret", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/DiscourseAuthRequest" + "$ref": "#/definitions/CreateSecret" } } ], "tags": [ - "sso" + "Secrets" ] } }, - "/v1/unscope_organization_token": { - "post": { - "summary": "Unscope Organization Token", - "description": "UnscopeOrganizationToken removes the organization scope from a token. This\nendpoint is useful when a user wants to remove an organization: by\nunscoping the token first, the user can then delete the organization\nwithout invalidating his token.", - "operationId": "UnscopeOrganizationToken", + "/v1/secrets/{id}": { + "get": { + "summary": "Get Secret", + "operationId": "GetSecret", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/LoginReply" + "$ref": "#/definitions/GetSecretReply" } }, "400": { @@ -4551,35 +4930,24 @@ }, "parameters": [ { - "name": "body", - "in": "body", + "name": "id", + "in": "path", "required": true, - "schema": { - "$ref": "#/definitions/UnscopeOrganizationTokenRequest" - } - }, - { - "name": "seon-fp", - "description": "Seon Fingerprint", - "in": "header", - "required": false, "type": "string" } ], "tags": [ - "organization" + "Secrets" ] - } - }, - "/v2/account/profile": { - "put": { - "summary": "Update User V2", - "operationId": "UpdateUserV2", + }, + "delete": { + "summary": "Delete Secret", + "operationId": "DeleteSecret", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/UserReply" + "$ref": "#/definitions/DeleteSecretReply" } }, "400": { @@ -4627,32 +4995,24 @@ }, "parameters": [ { - "name": "user", - "in": "body", + "name": "id", + "in": "path", "required": true, - "schema": { - "$ref": "#/definitions/UpdateUserRequest.UserUpdateBody" - } - }, - { - "name": "update_mask", - "in": "query", - "required": false, "type": "string" } ], "tags": [ - "Profile" + "Secrets" ] }, - "patch": { - "summary": "Update User V2", - "operationId": "UpdateUserV22", + "put": { + "summary": "Update Secret", + "operationId": "UpdateSecret", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/UserReply" + "$ref": "#/definitions/UpdateSecretReply" } }, "400": { @@ -4700,11 +5060,17 @@ }, "parameters": [ { - "name": "user", + "name": "id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "secret", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/UpdateUserRequest.UserUpdateBody" + "$ref": "#/definitions/Secret" } }, { @@ -4715,20 +5081,17 @@ } ], "tags": [ - "Profile" + "Secrets" ] - } - }, - "/v1/coupons": { - "post": { - "summary": "Redeem Coupon", - "description": "This API allows to redeem a coupon. Pass the code you received in the body.", - "operationId": "RedeemCoupon", + }, + "patch": { + "summary": "Update Secret", + "operationId": "UpdateSecret2", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/RedeemCouponReply" + "$ref": "#/definitions/UpdateSecretReply" } }, "400": { @@ -4776,29 +5139,40 @@ }, "parameters": [ { - "name": "body", + "name": "id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "secret", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/RedeemCouponRequest" + "$ref": "#/definitions/Secret" } + }, + { + "name": "update_mask", + "in": "query", + "required": false, + "type": "string" } ], "tags": [ - "Coupons" + "Secrets" ] } }, - "/v1/coupons/{code}": { - "get": { - "summary": "Check Coupon", - "description": "This API allows to check if a given coupon is valid. It is heavily rate-limited.", - "operationId": "CheckCoupon", + "/v1/secrets/{id}/reveal": { + "post": { + "summary": "Reveal Secret", + "operationId": "RevealSecret", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/CheckCouponReply" + "$ref": "#/definitions/RevealSecretReply" } }, "400": { @@ -4846,26 +5220,34 @@ }, "parameters": [ { - "name": "code", + "name": "id", "in": "path", "required": true, "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object" + } } ], "tags": [ - "Coupons" + "Secrets" ] } }, - "/v1/organization_invitations": { + "/v1/domains": { "get": { - "summary": "List Organization Invitations", - "operationId": "ListOrganizationInvitations", + "summary": "List Domains", + "operationId": "ListDomains", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ListOrganizationInvitationsReply" + "$ref": "#/definitions/ListDomainsReply" } }, "400": { @@ -4926,44 +5308,77 @@ "required": false, "type": "string" }, + { + "name": "types", + "description": "(Optional) A filter for types\n\n - AUTOASSIGNED: Domain like -.koyeb.app", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string", + "enum": [ + "AUTOASSIGNED", + "CUSTOM" + ] + }, + "collectionFormat": "multi" + }, { "name": "statuses", - "description": "(Optional) Filter on organization invitation statuses", + "description": "(Optional) A filter for statuses", "in": "query", "required": false, "type": "array", "items": { "type": "string", "enum": [ - "INVALID", "PENDING", - "ACCEPTED", - "REFUSED", - "EXPIRED" + "ACTIVE", + "ERROR", + "DELETING", + "DELETED" ] }, "collectionFormat": "multi" }, { - "name": "user_id", - "description": "(Optional) Filter on invitee ID. Will match both invitations sent to\nthat user_id and invitations sent to the email of that user_id.\nThe only valid value is the requester's user_id", + "name": "app_ids", + "description": "(Optional) A filter for apps", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "name", + "description": "(Optional) A filter for name", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "project_id", + "description": "(Optional) A filter for the project ID", "in": "query", "required": false, "type": "string" } ], "tags": [ - "OrganizationInvitations" + "Domains" ] }, "post": { - "summary": "Create Organization Invitation", - "operationId": "CreateOrganizationInvitation", + "summary": "Create Domain", + "operationId": "CreateDomain", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/CreateOrganizationInvitationReply" + "$ref": "#/definitions/CreateDomainReply" } }, "400": { @@ -5011,28 +5426,28 @@ }, "parameters": [ { - "name": "body", + "name": "domain", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/CreateOrganizationInvitationRequest" + "$ref": "#/definitions/CreateDomain" } } ], "tags": [ - "OrganizationInvitations" + "Domains" ] } }, - "/v1/organization_invitations/{id}": { + "/v1/domains/{id}": { "get": { - "summary": "Get Organization Invitation", - "operationId": "GetOrganizationInvitation", + "summary": "Get Domain", + "operationId": "GetDomain", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/GetOrganizationInvitationReply" + "$ref": "#/definitions/GetDomainReply" } }, "400": { @@ -5081,24 +5496,23 @@ "parameters": [ { "name": "id", - "description": "The id of the invitation to get", "in": "path", "required": true, "type": "string" } ], "tags": [ - "OrganizationInvitations" + "Domains" ] }, "delete": { - "summary": "Delete Organization Invitation", - "operationId": "DeleteOrganizationInvitation", + "summary": "Delete Domain", + "operationId": "DeleteDomain", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/DeleteOrganizationInvitationReply" + "$ref": "#/definitions/DeleteDomainReply" } }, "400": { @@ -5147,26 +5561,23 @@ "parameters": [ { "name": "id", - "description": "The id of the organization invitation to delete", "in": "path", "required": true, "type": "string" } ], "tags": [ - "OrganizationInvitations" + "Domains" ] - } - }, - "/v1/organization_invitations/{id}/resend": { - "post": { - "summary": "Resend Organization Invitation", - "operationId": "ResendOrganizationInvitation", + }, + "patch": { + "summary": "Update Domain", + "operationId": "UpdateDomain", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ResendOrganizationInvitationReply" + "$ref": "#/definitions/UpdateDomainReply" } }, "400": { @@ -5215,34 +5626,46 @@ "parameters": [ { "name": "id", - "description": "The id of the organization invitation to resend", "in": "path", "required": true, "type": "string" }, { - "name": "body", + "name": "domain", "in": "body", "required": true, "schema": { - "type": "object" + "$ref": "#/definitions/UpdateDomain" } + }, + { + "name": "update_mask", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "dry_run", + "description": "If set, run validation and check that the domain is available.", + "in": "query", + "required": false, + "type": "boolean" } ], "tags": [ - "OrganizationInvitations" + "Domains" ] } }, - "/v1/organization_confirmations/{id}": { + "/v1/domains/{id}/refresh": { "post": { - "summary": "Confirm organization action", - "operationId": "ConfirmOrganizationAction", + "summary": "Refresh Domain Status", + "operationId": "RefreshDomainStatus", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ConfirmOrganizationActionReply" + "$ref": "#/definitions/RefreshDomainStatusReply" } }, "400": { @@ -5297,19 +5720,19 @@ } ], "tags": [ - "OrganizationConfirmations" + "Domains" ] } }, - "/v1/credentials": { - "get": { - "summary": "List credentials", - "operationId": "ListCredentials", + "/v1/quotas/capacity": { + "post": { + "summary": "DEPRECATED: Review Organization Capacity", + "operationId": "ReviewOrganizationCapacity", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ListCredentialsReply" + "$ref": "#/definitions/ReviewOrganizationCapacityReply" } }, "400": { @@ -5357,66 +5780,28 @@ }, "parameters": [ { - "name": "type", - "description": "(Optional) A filter for type", - "in": "query", - "required": false, - "type": "string", - "enum": [ - "INVALID", - "USER", - "ORGANIZATION" - ], - "default": "INVALID" - }, - { - "name": "name", - "description": "(Optional) A filter for name", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "organization_id", - "description": "(Optional) Filter for an organization", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "user_id", - "description": "(Optional) Filter for an user", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "limit", - "description": "(Optional) The number of items to return", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "offset", - "description": "(Optional) The offset in the list of item to return", - "in": "query", - "required": false, - "type": "string" + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReviewOrganizationCapacityRequest" + } } ], "tags": [ - "Credentials" + "Quotas" ] - }, + } + }, + "/v1/compose": { "post": { - "summary": "Create credential", - "operationId": "CreateCredential", + "summary": "Create resources from compose.", + "operationId": "Compose", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/CreateCredentialReply" + "$ref": "#/definitions/ComposeReply" } }, "400": { @@ -5464,28 +5849,27 @@ }, "parameters": [ { - "name": "credential", + "name": "compose", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/CreateCredential" + "$ref": "#/definitions/CreateCompose" } } ], "tags": [ - "Credentials" + "Compose" ] } }, - "/v1/credentials/{id}": { + "/v1/instance_snapshot_events": { "get": { - "summary": "Get credential", - "operationId": "GetCredential", + "operationId": "ListInstanceSnapshotEvents", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/GetCredentialReply" + "$ref": "#/definitions/ListInstanceSnapshotEventsReply" } }, "400": { @@ -5533,24 +5917,58 @@ }, "parameters": [ { - "name": "id", - "in": "path", - "required": true, + "name": "instance_snapshot_id", + "description": "(Optional) Filter on instance snapshot id", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "types", + "description": "(Optional) Filter on instance snapshot event types", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "limit", + "description": "(Optional) The number of items to return", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "offset", + "description": "(Optional) The offset in the list of item to return", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "order", + "description": "(Optional) Sorts the list in the ascending or the descending order", + "in": "query", + "required": false, "type": "string" } ], "tags": [ - "Credentials" + "InstanceSnapshots" ] - }, - "delete": { - "summary": "Delete credential", - "operationId": "DeleteCredential", + } + }, + "/v1/instance_snapshots": { + "get": { + "operationId": "ListInstanceSnapshots", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/DeleteCredentialReply" + "$ref": "#/definitions/ListInstanceSnapshotsReply" } }, "400": { @@ -5598,24 +6016,65 @@ }, "parameters": [ { - "name": "id", - "in": "path", - "required": true, + "name": "limit", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "offset", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "name", + "in": "query", + "required": false, "type": "string" + }, + { + "name": "statuses", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string", + "enum": [ + "INSTANCE_SNAPSHOT_STATUS_INVALID", + "INSTANCE_SNAPSHOT_STATUS_CREATING", + "INSTANCE_SNAPSHOT_STATUS_AVAILABLE", + "INSTANCE_SNAPSHOT_STATUS_ERROR", + "INSTANCE_SNAPSHOT_STATUS_DELETING", + "INSTANCE_SNAPSHOT_STATUS_DELETED" + ] + }, + "collectionFormat": "multi" + }, + { + "name": "type", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "INSTANCE_SNAPSHOT_TYPE_INVALID", + "INSTANCE_SNAPSHOT_TYPE_FILESYSTEM", + "INSTANCE_SNAPSHOT_TYPE_FULL" + ], + "default": "INSTANCE_SNAPSHOT_TYPE_INVALID" } ], "tags": [ - "Credentials" + "InstanceSnapshots" ] }, - "put": { - "summary": "Update credential", - "operationId": "UpdateCredential", + "post": { + "operationId": "CreateInstanceSnapshot", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/UpdateCredentialReply" + "$ref": "#/definitions/CreateInstanceSnapshotReply" } }, "400": { @@ -5663,38 +6122,27 @@ }, "parameters": [ { - "name": "id", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "credential", + "name": "body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/Credential" + "$ref": "#/definitions/CreateInstanceSnapshotRequest" } - }, - { - "name": "update_mask", - "in": "query", - "required": false, - "type": "string" } ], "tags": [ - "Credentials" + "InstanceSnapshots" ] - }, - "patch": { - "summary": "Update credential", - "operationId": "UpdateCredential2", + } + }, + "/v1/instance_snapshots/{id}": { + "get": { + "operationId": "GetInstanceSnapshot", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/UpdateCredentialReply" + "$ref": "#/definitions/GetInstanceSnapshotReply" } }, "400": { @@ -5746,36 +6194,19 @@ "in": "path", "required": true, "type": "string" - }, - { - "name": "credential", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/Credential" - } - }, - { - "name": "update_mask", - "in": "query", - "required": false, - "type": "string" } ], "tags": [ - "Credentials" + "InstanceSnapshots" ] - } - }, - "/v1/projects": { - "get": { - "summary": "List projects", - "operationId": "ListProjects", + }, + "delete": { + "operationId": "DeleteInstanceSnapshot", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ListProjectsReply" + "$ref": "#/definitions/DeleteInstanceSnapshotReply" } }, "400": { @@ -5823,39 +6254,26 @@ }, "parameters": [ { - "name": "limit", - "description": "(Optional) The number of items to return", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "offset", - "description": "(Optional) The offset in the list of item to return", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "name", - "description": "(Optional) Filter by project name", - "in": "query", - "required": false, + "name": "id", + "in": "path", + "required": true, "type": "string" } ], "tags": [ - "Projects" + "InstanceSnapshots" ] - }, - "post": { - "summary": "Create project", - "operationId": "CreateProject", + } + }, + "/v1/test/anon": { + "get": { + "summary": "Test anonymous call", + "operationId": "TestAnon", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/CreateProjectReply" + "$ref": "#/definitions/ktest.TestAnonReply" } }, "400": { @@ -5901,30 +6319,20 @@ } } }, - "parameters": [ - { - "name": "project", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateProject" - } - } - ], "tags": [ - "Projects" + "Test" ] } }, - "/v1/projects/{id}": { - "get": { - "summary": "Get project", - "operationId": "GetProject", + "/v1/test/auth": { + "post": { + "summary": "Test authenticated call", + "operationId": "TestAuth", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/GetProjectReply" + "$ref": "#/definitions/ktest.TestAuthReply" } }, "400": { @@ -5972,24 +6380,28 @@ }, "parameters": [ { - "name": "id", - "in": "path", + "name": "body", + "in": "body", "required": true, - "type": "string" + "schema": { + "$ref": "#/definitions/ktest.TestAuthRequest" + } } ], "tags": [ - "Projects" + "Test" ] - }, - "delete": { - "summary": "Delete project", - "operationId": "DeleteProject", + } + }, + "/v1/streams/logs/query": { + "get": { + "summary": "Query logs", + "operationId": "QueryLogs", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/DeleteProjectReply" + "$ref": "#/definitions/QueryLogsReply" } }, "400": { @@ -6037,184 +6449,156 @@ }, "parameters": [ { - "name": "id", - "in": "path", - "required": true, + "name": "type", + "description": "Type of logs to retrieve, either \"build\" or \"runtime\". Defaults to \"runtime\".", + "in": "query", + "required": false, "type": "string" - } - ], - "tags": [ - "Projects" - ] - }, - "put": { - "summary": "Update project", - "operationId": "UpdateProject", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/UpdateProjectReply" - } - }, - "400": { - "description": "Validation error", - "schema": { - "$ref": "#/definitions/ErrorWithFields" - } - }, - "401": { - "description": "Returned when the token is not valid.", - "schema": { - "$ref": "#/definitions/Error" - } }, - "403": { - "description": "Returned when the user does not have permission to access the resource.", - "schema": { - "$ref": "#/definitions/Error" - } + { + "name": "app_id", + "description": "(Optional) Filter on the provided app_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.", + "in": "query", + "required": false, + "type": "string" }, - "404": { - "description": "Returned when the resource does not exist.", - "schema": { - "$ref": "#/definitions/Error" - } + { + "name": "service_id", + "description": "(Optional) Filter on the provided service_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.", + "in": "query", + "required": false, + "type": "string" }, - "500": { - "description": "Returned in case of server error.", - "schema": { - "$ref": "#/definitions/Error" - } + { + "name": "deployment_id", + "description": "(Optional) Filter on the provided deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.", + "in": "query", + "required": false, + "type": "string" }, - "503": { - "description": "Service is unavailable.", - "schema": { - "$ref": "#/definitions/Error" - } + { + "name": "regional_deployment_id", + "description": "(Optional) Filter on the provided regional_deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.", + "in": "query", + "required": false, + "type": "string" }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ { - "name": "id", - "in": "path", - "required": true, + "name": "instance_id", + "description": "Deprecated, prefer using instance_ids instead.", + "in": "query", + "required": false, "type": "string" }, { - "name": "project", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/Project" - } + "name": "instance_ids", + "description": "(Optional) Filter on the provided instance_ids. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" }, { - "name": "update_mask", + "name": "stream", + "description": "Deprecated, prefer using streams instead.", "in": "query", "required": false, "type": "string" - } - ], - "tags": [ - "Projects" - ] - }, - "patch": { - "summary": "Update project", - "operationId": "UpdateProject2", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/UpdateProjectReply" - } - }, - "400": { - "description": "Validation error", - "schema": { - "$ref": "#/definitions/ErrorWithFields" - } }, - "401": { - "description": "Returned when the token is not valid.", - "schema": { - "$ref": "#/definitions/Error" - } + { + "name": "streams", + "description": "(Optional) Filter on stream: either \"stdout\", \"stderr\" or \"koyeb\" (for system logs).", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" }, - "403": { - "description": "Returned when the user does not have permission to access the resource.", - "schema": { - "$ref": "#/definitions/Error" - } + { + "name": "start", + "description": "(Optional) Must always be before `end`. Defaults to 15 minutes ago.", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" }, - "404": { - "description": "Returned when the resource does not exist.", - "schema": { - "$ref": "#/definitions/Error" - } + { + "name": "end", + "description": "(Optional) Must always be after `start`. Defaults to now.", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" }, - "500": { - "description": "Returned in case of server error.", - "schema": { - "$ref": "#/definitions/Error" - } + { + "name": "order", + "description": "(Optional) `asc` or `desc`. Defaults to `desc`.", + "in": "query", + "required": false, + "type": "string" }, - "503": { - "description": "Service is unavailable.", - "schema": { - "$ref": "#/definitions/Error" - } + { + "name": "limit", + "description": "(Optional) Defaults to 100. Maximum of 1000.", + "in": "query", + "required": false, + "type": "string", + "format": "int64" }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ { - "name": "id", - "in": "path", - "required": true, + "name": "regex", + "description": "(Optional) Apply a regex to filter logs. Can't be used with `text`.", + "in": "query", + "required": false, "type": "string" }, { - "name": "project", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/Project" - } + "name": "text", + "description": "(Optional) Looks for this string in logs. Can't be used with `regex`.", + "in": "query", + "required": false, + "type": "string" }, { - "name": "update_mask", + "name": "regions", + "description": "(Optional) Filter on the provided regions (e.g. [\"fra\", \"was\"]).", "in": "query", "required": false, - "type": "string" + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" } ], "tags": [ - "Projects" + "Logs" ] } }, - "/v1/organizations/{organization_id}/summary": { + "/v1/streams/logs/tail": { "get": { - "summary": "Get organization usage summary", - "operationId": "GetOrganizationSummary", + "summary": "Tails logs", + "operationId": "TailLogs", "responses": { "200": { - "description": "A successful response.", + "description": "A successful response.(streaming responses)", "schema": { - "$ref": "#/definitions/GetOrganizationSummaryReply" + "type": "object", + "properties": { + "result": { + "$ref": "#/definitions/LogEntry" + }, + "error": { + "$ref": "#/definitions/google.rpc.Status" + } + }, + "title": "Stream result of LogEntry" } }, "400": { @@ -6262,103 +6646,132 @@ }, "parameters": [ { - "name": "organization_id", - "description": "Organization ID", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": [ - "Summary" - ] - } - }, - "/v1/account/login": { - "post": { - "summary": "Login user\nDEPRECATED: this has been replaced by WorkOS and will be dropped soon.", - "operationId": "Login", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/LoginReply" - } + "name": "type", + "description": "Type of logs to retrieve, either \"build\" or \"runtime\". Defaults to \"runtime\".", + "in": "query", + "required": false, + "type": "string" }, - "400": { - "description": "Validation error", - "schema": { - "$ref": "#/definitions/ErrorWithFields" - } + { + "name": "app_id", + "description": "(Optional) Filter on the provided app_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.", + "in": "query", + "required": false, + "type": "string" }, - "401": { - "description": "Returned when the token is not valid.", - "schema": { - "$ref": "#/definitions/Error" - } + { + "name": "service_id", + "description": "(Optional) Filter on the provided service_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.", + "in": "query", + "required": false, + "type": "string" }, - "403": { - "description": "Returned when the user does not have permission to access the resource.", - "schema": { - "$ref": "#/definitions/Error" - } + { + "name": "deployment_id", + "description": "(Optional) Filter on the provided deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.", + "in": "query", + "required": false, + "type": "string" }, - "404": { - "description": "Returned when the resource does not exist.", - "schema": { - "$ref": "#/definitions/Error" - } + { + "name": "regional_deployment_id", + "description": "(Optional) Filter on the provided regional_deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.", + "in": "query", + "required": false, + "type": "string" }, - "500": { - "description": "Returned in case of server error.", - "schema": { - "$ref": "#/definitions/Error" - } + { + "name": "instance_id", + "description": "Deprecated, prefer using instance_ids instead.", + "in": "query", + "required": false, + "type": "string" }, - "503": { - "description": "Service is unavailable.", - "schema": { - "$ref": "#/definitions/Error" - } + { + "name": "instance_ids", + "description": "(Optional) Filter on the provided instance_ids. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/LoginRequest" - } + "name": "stream", + "description": "Deprecated, prefer using streams instead.", + "in": "query", + "required": false, + "type": "string" }, { - "name": "seon-fp", - "description": "Seon Fingerprint", - "in": "header", + "name": "streams", + "description": "(Optional) Filter on stream: either \"stdout\", \"stderr\" or \"koyeb\" (for system logs).", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "start", + "description": "(Optional) Defaults to 24 hours ago.", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "limit", + "description": "(Optional) Defaults to 1000. Maximum of 1000.", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "regex", + "description": "(Optional) Apply a regex to filter logs. Can't be used with `text`.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "text", + "description": "(Optional) Looks for this string in logs. Can't be used with `regex`.", + "in": "query", "required": false, "type": "string" + }, + { + "name": "regions", + "description": "(Optional) Filter on the provided regions (e.g. [\"fra\", \"was\"]).", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" } ], "tags": [ - "Sessions" + "Logs" ] } }, - "/v1/account/logout": { - "delete": { - "summary": "Logout user\nDEPRECATED: this has been replaced by WorkOS and will be dropped soon.", - "operationId": "Logout", + "/v1/streams/metrics": { + "get": { + "summary": "Get Metrics", + "operationId": "GetMetrics", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/LogoutReply" + "$ref": "#/definitions/GetMetricsReply" } }, "400": { @@ -6404,20 +6817,89 @@ } } }, + "parameters": [ + { + "name": "service_id", + "description": "ID of the service to query instances metrics for. Ignored if instance_id is set.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "instance_id", + "description": "ID of the instance to query metrics for.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "name", + "description": "Metric to query.", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "UNKNOWN", + "CPU_TOTAL_PERCENT", + "MEM_RSS", + "HTTP_THROUGHPUT", + "HTTP_RESPONSE_TIME_50P", + "HTTP_RESPONSE_TIME_90P", + "HTTP_RESPONSE_TIME_99P", + "HTTP_RESPONSE_TIME_MAX", + "PUBLIC_DATA_TRANSFER_IN", + "PUBLIC_DATA_TRANSFER_OUT" + ], + "default": "UNKNOWN" + }, + { + "name": "start", + "description": "(Optional) Defaults to an hour prior to end.", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "end", + "description": "(Optional) Defaults to now.", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "step", + "description": "(Optional) Must be a valid duration in hours (h) or minutes (m). Defaulst to 5m.", + "in": "query", + "required": false, + "type": "string" + } + ], "tags": [ - "Sessions" + "Metrics" ] } }, - "/v1/account/refresh": { - "put": { - "summary": "Refresh token\nDEPRECATED: this has been replaced by WorkOS and will be dropped soon.", - "operationId": "RefreshToken", + "/v1/streams/instances/exec": { + "get": { + "summary": "Exec Command", + "description": "This endpoint opens a websocket. Once open, all frames going through the websocket should be formatted in JSON. Input frames should match the format specified below. Output frames will match the response schema.", + "operationId": "ExecCommand", "responses": { "200": { - "description": "A successful response.", + "description": "A successful response.(streaming responses)", "schema": { - "$ref": "#/definitions/LoginReply" + "type": "object", + "properties": { + "result": { + "$ref": "#/definitions/ExecCommandReply" + }, + "error": { + "$ref": "#/definitions/google.rpc.Status" + } + }, + "title": "Stream result of ExecCommandReply" } }, "400": { @@ -6463,21 +6945,88 @@ } } }, + "parameters": [ + { + "name": "id", + "description": "ID of the resource to exec on.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "body.command", + "description": "Command to exec. Mandatory in the first frame sent", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "body.tty_size.height", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "body.tty_size.width", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "body.stdin.data", + "description": "Data is base64 encoded", + "in": "query", + "required": false, + "type": "string", + "format": "byte" + }, + { + "name": "body.stdin.close", + "description": "Indicate last data frame", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "body.disableTty", + "description": "Disable TTY. It's enough to specify it in the first frame", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "id_type", + "description": "When specified, it is used to determine if the kind of resource the id refers to. If missing, defaults to the instance id.", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "INVALID", + "INSTANCE_ID", + "SERVICE_ID" + ], + "default": "INVALID" + } + ], "tags": [ - "Sessions" + "Instances" ] } }, - "/v1/account/session": { - "post": { - "summary": "New session", - "description": "Creates a new session without an organization for current user.\nNOTE: If you want a session linked to another organization, please use \"Switch organization\".\nDEPRECATED: this has been replaced by WorkOS and will be dropped soon.", - "operationId": "NewSession", + "/v1/account/activities": { + "get": { + "operationId": "GetAccountActivities", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/LoginReply" + "$ref": "#/definitions/ActivityList" } }, "400": { @@ -6523,19 +7072,34 @@ } } }, + "parameters": [ + { + "name": "limit", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "offset", + "in": "query", + "required": false, + "type": "string" + } + ], "tags": [ - "Sessions" + "activity" ] } }, - "/v1/organizations/{organization_id}/quotas": { + "/v1/account/idenfy": { "get": { - "operationId": "GetQuotas", + "summary": "Begin a session with iDenfy, emit an authToken", + "operationId": "GetIdenfyToken", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/GetQuotasReply" + "$ref": "#/definitions/GetIdenfyTokenReply" } }, "400": { @@ -6581,28 +7145,18 @@ } } }, - "parameters": [ - { - "name": "organization_id", - "in": "path", - "required": true, - "type": "string" - } - ], "tags": [ - "OrganizationQuotas" + "Profile" ] - } - }, - "/v1/provisioning/{deployment_id}/status/{stage}/{attempt}": { + }, "post": { - "summary": "Create an attempt for a stage", - "operationId": "CreateStageAttempt", + "summary": "ClearIdenfyVerificationResult marks the current result for idenfy as\nsuperseded", + "operationId": "ClearIdenfyVerificationResult", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/CreateStageAttemptReply" + "$ref": "#/definitions/ClearIdenfyVerificationResultReply" } }, "400": { @@ -6649,69 +7203,29 @@ } }, "parameters": [ - { - "name": "deployment_id", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "stage", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "attempt", - "in": "path", - "required": true, - "type": "string" - }, { "name": "body", "in": "body", "required": true, "schema": { - "type": "object", - "properties": { - "secret": { - "type": "string" - }, - "status": { - "$ref": "#/definitions/DeploymentProvisioningInfo.Stage.Status" - }, - "started_at": { - "type": "string", - "format": "date-time" - }, - "messages": { - "type": "array", - "items": { - "type": "string" - } - }, - "steps": { - "type": "array", - "items": { - "type": "string" - } - } - } + "$ref": "#/definitions/ClearIdenfyVerificationResultRequest" } } ], "tags": [ - "Provisioning" + "Profile" ] - }, - "patch": { - "summary": "Declare stage progress", - "operationId": "DeclareStageProgress", + } + }, + "/v1/account/invite": { + "post": { + "summary": "DEPRECATED: this has been replaced by WorkOS and will be dropped soon.", + "operationId": "CreateInvite", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/DeclareStageProgressReply" + "$ref": "#/definitions/Empty" } }, "400": { @@ -6758,74 +7272,29 @@ } }, "parameters": [ - { - "name": "deployment_id", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "stage", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "attempt", - "in": "path", - "required": true, - "type": "string" - }, { "name": "body", "in": "body", "required": true, "schema": { - "type": "object", - "properties": { - "secret": { - "type": "string" - }, - "status": { - "$ref": "#/definitions/DeploymentProvisioningInfo.Stage.Status" - }, - "finished_at": { - "type": "string", - "format": "date-time" - }, - "messages": { - "type": "array", - "items": { - "type": "string" - } - }, - "image_pushed": { - "type": "boolean" - }, - "internal_failure": { - "type": "boolean" - }, - "retryable_failure": { - "type": "boolean" - } - } + "$ref": "#/definitions/InviteUserRequest" } } ], "tags": [ - "Provisioning" + "invite" ] } }, - "/v1/provisioning/{deployment_id}/status/{stage}/{attempt}/{step}": { - "patch": { - "summary": "Declare step progress", - "operationId": "DeclareStepProgress", + "/v1/account/login_method": { + "get": { + "summary": "Get the login method for an email address\nDEPRECATED: this has been replaced by WorkOS and will be dropped soon.", + "operationId": "LoginMethod", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/DeclareStepProgressReply" + "$ref": "#/definitions/LoginMethodReply" } }, "400": { @@ -6873,74 +7342,26 @@ }, "parameters": [ { - "name": "deployment_id", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "stage", - "in": "path", - "required": true, + "name": "email", + "in": "query", + "required": false, "type": "string" - }, - { - "name": "attempt", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "step", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "secret": { - "type": "string" - }, - "status": { - "$ref": "#/definitions/DeploymentProvisioningInfo.Stage.Status" - }, - "started_at": { - "type": "string", - "format": "date-time" - }, - "finished_at": { - "type": "string", - "format": "date-time" - }, - "messages": { - "type": "array", - "items": { - "type": "string" - } - } - } - } } ], "tags": [ - "Provisioning" + "Profile" ] } }, - "/v1/compose": { - "post": { - "summary": "Create resources from compose.", - "operationId": "Compose", + "/v1/account/oauth": { + "get": { + "summary": "Get OAuth Providers", + "operationId": "GetOAuthOptions", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ComposeReply" + "$ref": "#/definitions/GetOAuthOptionsReply" } }, "400": { @@ -6988,28 +7409,38 @@ }, "parameters": [ { - "name": "compose", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateCompose" - } + "name": "action", + "description": "Which authentication flow is being initiated", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "signin", + "signup", + "register" + ], + "default": "signin" + }, + { + "name": "metadata", + "description": "A small (limited to 400 characters) string of arbitrary metadata which will\nbe encoded in the state", + "in": "query", + "required": false, + "type": "string" } ], "tags": [ - "Compose" + "Profile" ] - } - }, - "/v1/domains": { - "get": { - "summary": "List Domains", - "operationId": "ListDomains", + }, + "post": { + "summary": "Authenticate using OAuth", + "operationId": "OAuthCallback", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ListDomainsReply" + "$ref": "#/definitions/OAuthCallbackReply" } }, "400": { @@ -7057,90 +7488,35 @@ }, "parameters": [ { - "name": "limit", - "description": "(Optional) The number of items to return", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "offset", - "description": "(Optional) The offset in the list of item to return", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "types", - "description": "(Optional) A filter for types\n\n - AUTOASSIGNED: Domain like -.koyeb.app", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string", - "enum": [ - "AUTOASSIGNED", - "CUSTOM" - ] - }, - "collectionFormat": "multi" - }, - { - "name": "statuses", - "description": "(Optional) A filter for statuses", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string", - "enum": [ - "PENDING", - "ACTIVE", - "ERROR", - "DELETING", - "DELETED" - ] - }, - "collectionFormat": "multi" - }, - { - "name": "app_ids", - "description": "(Optional) A filter for apps", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" - }, - { - "name": "name", - "description": "(Optional) A filter for name", - "in": "query", - "required": false, - "type": "string" + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/OAuthCallbackRequest" + } }, { - "name": "project_id", - "description": "(Optional) A filter for the project ID", - "in": "query", + "name": "seon-fp", + "description": "Seon Fingerprint", + "in": "header", "required": false, "type": "string" } ], "tags": [ - "Domains" + "Profile" ] - }, - "post": { - "summary": "Create Domain", - "operationId": "CreateDomain", + } + }, + "/v1/account/organization": { + "get": { + "summary": "Get Current Organization", + "operationId": "GetCurrentOrganization", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/CreateDomainReply" + "$ref": "#/definitions/GetOrganizationReply" } }, "400": { @@ -7186,30 +7562,20 @@ } } }, - "parameters": [ - { - "name": "domain", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateDomain" - } - } - ], "tags": [ - "Domains" + "Profile" ] } }, - "/v1/domains/{id}": { + "/v1/account/organization_invitations": { "get": { - "summary": "Get Domain", - "operationId": "GetDomain", + "summary": "List User Organization Invitations\nDEPRECATED: this has been replaced by WorkOS and will be dropped soon.", + "operationId": "ListUserOrganizationInvitations", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/GetDomainReply" + "$ref": "#/definitions/ListUserOrganizationInvitationsReply" } }, "400": { @@ -7257,24 +7623,52 @@ }, "parameters": [ { - "name": "id", - "in": "path", - "required": true, + "name": "limit", + "description": "(Optional) The number of items to return", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "offset", + "description": "(Optional) The offset in the list of item to return", + "in": "query", + "required": false, "type": "string" + }, + { + "name": "statuses", + "description": "(Optional) Filter on organization invitation statuses", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string", + "enum": [ + "INVALID", + "PENDING", + "ACCEPTED", + "REFUSED", + "EXPIRED" + ] + }, + "collectionFormat": "multi" } ], "tags": [ - "Domains" + "Profile" ] - }, - "delete": { - "summary": "Delete Domain", - "operationId": "DeleteDomain", + } + }, + "/v1/account/organization_invitations/{id}": { + "get": { + "summary": "Get User Organization Invitation\nDEPRECATED: this has been replaced by WorkOS and will be dropped soon.", + "operationId": "GetUserOrganizationInvitation", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/DeleteDomainReply" + "$ref": "#/definitions/GetUserOrganizationInvitationReply" } }, "400": { @@ -7323,23 +7717,26 @@ "parameters": [ { "name": "id", + "description": "The id of the organization invitation to get", "in": "path", "required": true, "type": "string" } ], "tags": [ - "Domains" + "Profile" ] - }, - "patch": { - "summary": "Update Domain", - "operationId": "UpdateDomain", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/UpdateDomainReply" + } + }, + "/v1/account/organization_invitations/{id}/accept": { + "post": { + "summary": "Accept Organization Invitation\nDEPRECATED: this has been replaced by WorkOS and will be dropped soon.", + "operationId": "AcceptOrganizationInvitation", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/AcceptOrganizationInvitationReply" } }, "400": { @@ -7388,46 +7785,34 @@ "parameters": [ { "name": "id", + "description": "The id of the organization invitation to accept", "in": "path", "required": true, "type": "string" }, { - "name": "domain", + "name": "body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/UpdateDomain" + "type": "object" } - }, - { - "name": "update_mask", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "dry_run", - "description": "If set, run validation and check that the domain is available.", - "in": "query", - "required": false, - "type": "boolean" } ], "tags": [ - "Domains" + "Profile" ] } }, - "/v1/domains/{id}/refresh": { + "/v1/account/organization_invitations/{id}/decline": { "post": { - "summary": "Refresh Domain Status", - "operationId": "RefreshDomainStatus", + "summary": "Decline Organization Invitation\nDEPRECATED: this has been replaced by WorkOS and will be dropped soon.", + "operationId": "DeclineOrganizationInvitation", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/RefreshDomainStatusReply" + "$ref": "#/definitions/DeclineOrganizationInvitationReply" } }, "400": { @@ -7476,25 +7861,35 @@ "parameters": [ { "name": "id", + "description": "The id of the organization invitation to decline", "in": "path", "required": true, "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object" + } } ], "tags": [ - "Domains" + "Profile" ] } }, - "/v1/app_events": { + "/v1/account/organizations": { "get": { - "summary": "List App events", - "operationId": "ListAppEvents", + "summary": "List User Organizations", + "description": "List all organizations that the current user is a member of.", + "operationId": "ListUserOrganizations", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ListAppEventsReply" + "$ref": "#/definitions/ListUserOrganizationsReply" } }, "400": { @@ -7542,59 +7937,68 @@ }, "parameters": [ { - "name": "app_id", - "description": "(Optional) Filter on app id", + "name": "limit", + "description": "(Optional) Define pagination limit", "in": "query", "required": false, "type": "string" }, { - "name": "types", - "description": "(Optional) Filter on app event types", + "name": "offset", + "description": "(Optional) Define pagination offset", "in": "query", "required": false, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" + "type": "string" }, { - "name": "limit", - "description": "(Optional) The number of items to return", + "name": "order", + "description": "(Optional) Sorts the list in the ascending or the descending order", "in": "query", "required": false, "type": "string" }, { - "name": "offset", - "description": "(Optional) The offset in the list of item to return", + "name": "search", + "description": "(Optional) Fuzzy case-insensitive search based on organization name or\norganization id", "in": "query", "required": false, "type": "string" }, { - "name": "order", - "description": "(Optional) Sorts the list in the ascending or the descending order", + "name": "statuses", + "description": "(Optional) Only return organizations which status match one in the list", "in": "query", "required": false, - "type": "string" + "type": "array", + "items": { + "type": "string", + "enum": [ + "WARNING", + "LOCKED", + "ACTIVE", + "DEACTIVATING", + "DEACTIVATED", + "DELETING", + "DELETED" + ] + }, + "collectionFormat": "multi" } ], "tags": [ - "Apps" + "Profile" ] } }, - "/v1/apps": { + "/v1/account/profile": { "get": { - "summary": "List App", - "operationId": "ListApps", + "summary": "Get Current User", + "operationId": "GetCurrentUser", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ListAppsReply" + "$ref": "#/definitions/UserReply" } }, "400": { @@ -7642,46 +8046,25 @@ }, "parameters": [ { - "name": "limit", - "description": "(Optional) The number of items to return", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "offset", - "description": "(Optional) The offset in the list of item to return", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "name", - "description": "(Optional) A filter for name", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "project_id", - "description": "(Optional) A filter for the project ID", - "in": "query", + "name": "seon-fp", + "description": "Seon Fingerprint", + "in": "header", "required": false, "type": "string" } ], "tags": [ - "Apps" + "Profile" ] }, - "post": { - "summary": "Create App", - "operationId": "CreateApp", + "put": { + "summary": "Update User", + "operationId": "UpdateUser", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/CreateAppReply" + "$ref": "#/definitions/UserReply" } }, "400": { @@ -7729,28 +8112,32 @@ }, "parameters": [ { - "name": "app", + "name": "user", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/CreateApp" + "$ref": "#/definitions/UpdateUserRequest.UserUpdateBody" } + }, + { + "name": "update_mask", + "in": "query", + "required": false, + "type": "string" } ], "tags": [ - "Apps" + "Profile" ] - } - }, - "/v1/apps/{id}": { - "get": { - "summary": "Get App", - "operationId": "GetApp", + }, + "patch": { + "summary": "Update User", + "operationId": "UpdateUser2", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/GetAppReply" + "$ref": "#/definitions/UserReply" } }, "400": { @@ -7798,26 +8185,34 @@ }, "parameters": [ { - "name": "id", - "description": "The id of the App", - "in": "path", + "name": "user", + "in": "body", "required": true, + "schema": { + "$ref": "#/definitions/UpdateUserRequest.UserUpdateBody" + } + }, + { + "name": "update_mask", + "in": "query", + "required": false, "type": "string" } ], "tags": [ - "Apps" + "Profile" ] - }, - "delete": { - "summary": "Delete App", - "description": "App deletion is allowed for all status.", - "operationId": "DeleteApp", + } + }, + "/v1/account/resend_validation": { + "post": { + "summary": "Resend Email Verification\nDEPRECATED: this has been replaced by WorkOS and will be dropped soon.", + "operationId": "ResendEmailValidation", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/DeleteAppReply" + "$ref": "#/definitions/ResendEmailValidationReply" } }, "400": { @@ -7865,25 +8260,28 @@ }, "parameters": [ { - "name": "id", - "description": "The id of the App to delete", - "in": "path", + "name": "body", + "in": "body", "required": true, - "type": "string" + "schema": { + "$ref": "#/definitions/ResendEmailValidationRequest" + } } ], "tags": [ - "Apps" + "Profile" ] - }, - "put": { - "summary": "Update App", - "operationId": "UpdateApp", + } + }, + "/v1/account/reset_password": { + "post": { + "summary": "Reset Password\nDEPRECATED: this has been replaced by WorkOS and will be dropped soon.", + "operationId": "ResetPassword", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/UpdateAppReply" + "$ref": "#/definitions/ResetPasswordReply" } }, "400": { @@ -7931,39 +8329,27 @@ }, "parameters": [ { - "name": "id", - "description": "The id of the app to update.", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "app", + "name": "body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/UpdateApp" + "$ref": "#/definitions/ResetPasswordRequest" } - }, - { - "name": "update_mask", - "in": "query", - "required": false, - "type": "string" } ], "tags": [ - "Apps" + "Profile" ] - }, - "patch": { - "summary": "Update App", - "operationId": "UpdateApp2", + } + }, + "/v1/account/settings": { + "get": { + "operationId": "GetUserSettings", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/UpdateAppReply" + "$ref": "#/definitions/GetUserSettingsReply" } }, "400": { @@ -8009,44 +8395,17 @@ } } }, - "parameters": [ - { - "name": "id", - "description": "The id of the app to update.", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "app", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/UpdateApp" - } - }, - { - "name": "update_mask", - "in": "query", - "required": false, - "type": "string" - } - ], "tags": [ - "Apps" + "Profile" ] - } - }, - "/v1/apps/{id}/pause": { - "post": { - "summary": "Pause App", - "description": "App pause action is allowed for the following status:\n - starting\n - healthy\n - degraded\n - unhealthy\n - resuming", - "operationId": "PauseApp", + }, + "patch": { + "operationId": "UpdateUserSettings", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/PauseAppReply" + "$ref": "#/definitions/UpdateUserSettingsReply" } }, "400": { @@ -8094,28 +8453,28 @@ }, "parameters": [ { - "name": "id", - "description": "The id of the app to pause.", - "in": "path", + "name": "body", + "in": "body", "required": true, - "type": "string" + "schema": { + "$ref": "#/definitions/UpdateUserSettingsRequest" + } } ], "tags": [ - "Apps" + "Profile" ] } }, - "/v1/apps/{id}/resume": { + "/v1/account/signup": { "post": { - "summary": "Resume App", - "description": "App resume action is allowed for the following status:\n - paused", - "operationId": "ResumeApp", + "summary": "Signup\nDEPRECATED: this has been replaced by WorkOS and will be dropped soon.", + "operationId": "Signup", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ResumeAppReply" + "$ref": "#/definitions/LoginReply" } }, "400": { @@ -8163,27 +8522,36 @@ }, "parameters": [ { - "name": "id", - "description": "The id of the app to resume.", - "in": "path", + "name": "body", + "description": "Create new account", + "in": "body", "required": true, + "schema": { + "$ref": "#/definitions/CreateAccountRequest" + } + }, + { + "name": "seon-fp", + "description": "Seon Fingerprint", + "in": "header", + "required": false, "type": "string" } ], "tags": [ - "Apps" + "Profile" ] } }, - "/v1/service_events": { - "get": { - "summary": "List Service events", - "operationId": "ListServiceEvents", + "/v1/account/update_password": { + "post": { + "summary": "Update Password\nDEPRECATED: this has been replaced by WorkOS and will be dropped soon.", + "operationId": "UpdatePassword", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ListServiceEventsReply" + "$ref": "#/definitions/LoginReply" } }, "400": { @@ -8231,59 +8599,35 @@ }, "parameters": [ { - "name": "service_id", - "description": "(Optional) Filter on service id", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "types", - "description": "(Optional) Filter on service event types", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" - }, - { - "name": "limit", - "description": "(Optional) The number of items to return", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "offset", - "description": "(Optional) The offset in the list of item to return", - "in": "query", - "required": false, - "type": "string" + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/UpdatePasswordRequest" + } }, { - "name": "order", - "description": "(Optional) Sorts the list in the ascending or the descending order", - "in": "query", + "name": "seon-fp", + "description": "Seon Fingerprint", + "in": "header", "required": false, "type": "string" } ], "tags": [ - "Services" + "Profile" ] } }, - "/v1/services": { - "get": { - "summary": "List Services", - "operationId": "ListServices", + "/v1/account/validate/{id}": { + "post": { + "summary": "Validate\nDEPRECATED: this has been replaced by WorkOS and will be dropped soon.", + "operationId": "Validate", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ListServicesReply" + "$ref": "#/definitions/LoginReply" } }, "400": { @@ -8331,104 +8675,34 @@ }, "parameters": [ { - "name": "app_id", - "description": "(Optional) The id of the app", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "limit", - "description": "(Optional) The number of items to return", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "offset", - "description": "(Optional) The offset in the list of item to return", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "name", - "description": "(Optional) A filter for name", - "in": "query", - "required": false, + "name": "id", + "in": "path", + "required": true, "type": "string" }, { - "name": "types", - "description": "(Optional) Filter on service types", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string", - "enum": [ - "INVALID_TYPE", - "WEB", - "WORKER", - "DATABASE", - "SANDBOX" - ] - }, - "collectionFormat": "multi" - }, - { - "name": "statuses", - "description": "(Optional) Filter on service statuses", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string", - "enum": [ - "STARTING", - "HEALTHY", - "DEGRADED", - "UNHEALTHY", - "DELETING", - "DELETED", - "PAUSING", - "PAUSED", - "RESUMING" - ] - }, - "collectionFormat": "multi" - }, - { - "name": "regions", - "description": "(Optional) Filter on regions", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" - }, - { - "name": "project_id", - "description": "(Optional) A filter for the project ID", - "in": "query", + "name": "seon-fp", + "description": "Seon Fingerprint", + "in": "header", "required": false, "type": "string" } ], "tags": [ - "Services" + "Profile" ] - }, - "post": { - "summary": "Create Service", - "operationId": "CreateService", + } + }, + "/v1/billing/has_unpaid_invoices": { + "get": { + "summary": "Experimental: Has unpaid invoices", + "description": "WARNING: Please don't use the following method.\nKoyeb doesn't guarantee backwards compatible breaking change and reserve\nthe right to completely drop it without notice. USE AT YOUR OWN RISK.", + "operationId": "HasUnpaidInvoices", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/CreateServiceReply" + "$ref": "#/definitions/HasUnpaidInvoicesReply" } }, "400": { @@ -8474,38 +8748,19 @@ } } }, - "parameters": [ - { - "name": "service", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateService" - } - }, - { - "name": "dry_run", - "description": "If set only run validation", - "in": "query", - "required": false, - "type": "boolean" - } - ], "tags": [ - "Services" + "billing" ] } }, - "/v1/services-autocomplete": { - "post": { - "summary": "Autocomplete definition", - "description": "Generate autocomplete definition for a service", - "operationId": "Autocomplete", + "/v1/billing/manage": { + "get": { + "operationId": "Manage", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/AutocompleteReply" + "$ref": "#/definitions/ManageReply" } }, "400": { @@ -8551,30 +8806,21 @@ } } }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/AutocompleteRequest" - } - } - ], "tags": [ - "Services" + "billing" ] } }, - "/v1/services/{id}": { + "/v1/billing/next_invoice": { "get": { - "summary": "Get Service", - "operationId": "GetService", + "summary": "Experimental: Fetch next invoice", + "description": "WARNING: Please don't use the following method.\nKoyeb doesn't guarantee backwards compatible breaking change and reserve\nthe right to completely drop it without notice. USE AT YOUR OWN RISK.", + "operationId": "NextInvoice", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/GetServiceReply" + "$ref": "#/definitions/NextInvoiceReply" } }, "400": { @@ -8620,28 +8866,20 @@ } } }, - "parameters": [ - { - "name": "id", - "description": "The id of the Service", - "in": "path", - "required": true, - "type": "string" - } - ], "tags": [ - "Services" + "billing" ] - }, - "delete": { - "summary": "Delete Service", - "description": "Service deletion is allowed for all status.", - "operationId": "DeleteService", + } + }, + "/v1/github/installation": { + "get": { + "summary": "Fetch Github Installation configuration", + "operationId": "GetGithubInstallation", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/DeleteServiceReply" + "$ref": "#/definitions/GetGithubInstallationReply" } }, "400": { @@ -8687,27 +8925,18 @@ } } }, - "parameters": [ - { - "name": "id", - "description": "The id of the entity to delete", - "in": "path", - "required": true, - "type": "string" - } - ], "tags": [ - "Services" + "organization" ] }, - "put": { - "summary": "Update Service", - "operationId": "UpdateService", + "post": { + "summary": "Start Github Installation", + "operationId": "GithubInstallation", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/UpdateServiceReply" + "$ref": "#/definitions/GithubInstallationReply" } }, "400": { @@ -8755,46 +8984,28 @@ }, "parameters": [ { - "name": "id", - "description": "The id of the entity to update", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "service", + "name": "body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/UpdateService" + "$ref": "#/definitions/GithubInstallationRequest" } - }, - { - "name": "update_mask", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "dry_run", - "description": "If set, run validation and check that the service exists", - "in": "query", - "required": false, - "type": "boolean" } ], "tags": [ - "Services" + "organization" ] - }, - "patch": { - "summary": "Update Service", - "operationId": "UpdateService2", + } + }, + "/v1/organizations": { + "post": { + "summary": "Create Organization", + "operationId": "CreateOrganization", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/UpdateServiceReply" + "$ref": "#/definitions/CreateOrganizationReply" } }, "400": { @@ -8842,49 +9053,28 @@ }, "parameters": [ { - "name": "id", - "description": "The id of the entity to update", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "service", + "name": "body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/UpdateService" + "$ref": "#/definitions/CreateOrganizationRequest" } - }, - { - "name": "update_mask", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "dry_run", - "description": "If set, run validation and check that the service exists", - "in": "query", - "required": false, - "type": "boolean" } ], "tags": [ - "Services" + "organization" ] } }, - "/v1/services/{id}/pause": { - "post": { - "summary": "Pause Service", - "description": "Service pause action is allowed for the following status:\n - starting\n - healthy\n - degraded\n - unhealthy\n - resuming", - "operationId": "PauseService", + "/v1/organizations/{id}": { + "get": { + "summary": "Get Organization", + "operationId": "GetOrganization", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/PauseServiceReply" + "$ref": "#/definitions/GetOrganizationReply" } }, "400": { @@ -8933,26 +9123,23 @@ "parameters": [ { "name": "id", - "description": "The id of the service to pause.", "in": "path", "required": true, "type": "string" } ], "tags": [ - "Services" + "organization" ] - } - }, - "/v1/services/{id}/redeploy": { - "post": { - "summary": "ReDeploy Service", - "operationId": "ReDeploy", + }, + "delete": { + "summary": "Delete an Organization", + "operationId": "DeleteOrganization", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/RedeployReply" + "$ref": "#/definitions/DeleteOrganizationReply" } }, "400": { @@ -9004,31 +9191,20 @@ "in": "path", "required": true, "type": "string" - }, - { - "name": "info", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/RedeployRequest.Info" - } } ], "tags": [ - "Services" + "organization" ] - } - }, - "/v1/services/{id}/resume": { - "post": { - "summary": "Resume Service", - "description": "Service resume action is allowed for the following status:\n - paused", - "operationId": "ResumeService", + }, + "put": { + "summary": "Update Organization", + "operationId": "UpdateOrganization", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ResumeServiceReply" + "$ref": "#/definitions/UpdateOrganizationReply" } }, "400": { @@ -9077,40 +9253,37 @@ "parameters": [ { "name": "id", - "description": "The id of the service to pause.", "in": "path", "required": true, "type": "string" }, { - "name": "skip_build", - "description": "If set to true, the build stage will be skipped and the image coming from the last successful build step will be used instead.\nThe call fails if no previous successful builds happened.", - "in": "query", - "required": false, - "type": "boolean" + "name": "organization", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Organization" + } }, { - "name": "use_cache", + "name": "update_mask", "in": "query", "required": false, - "type": "boolean" + "type": "string" } ], "tags": [ - "Services" + "organization" ] - } - }, - "/v1/services/{id}/scale": { - "get": { - "summary": "Get Service Scaling", - "description": "Returns the current scaling configuration for a service", - "operationId": "GetServiceScaling", + }, + "patch": { + "summary": "Update Organization", + "operationId": "UpdateOrganization2", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/GetServiceScalingReply" + "$ref": "#/definitions/UpdateOrganizationReply" } }, "400": { @@ -9159,25 +9332,40 @@ "parameters": [ { "name": "id", - "description": "The id of the service", "in": "path", "required": true, "type": "string" + }, + { + "name": "organization", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Organization" + } + }, + { + "name": "update_mask", + "in": "query", + "required": false, + "type": "string" } ], "tags": [ - "Services" + "organization" ] - }, - "delete": { - "summary": "Delete Service Scaling", - "description": "Deletes the manual scaling configuration for a service, reverting to \nthe scaling defined in the deployment definition.", - "operationId": "DeleteServiceScaling", + } + }, + "/v1/organizations/{id}/access_token": { + "post": { + "summary": "CreateAccessToken", + "description": "CreateAccessToken creates a short-lived access token in the scope of the\nspecified organization, provided the user making the request is part of\nsaid organization.\n\nIt's possible to specify a validity for the token, which defaults to 1h\nand must be no more than 24h. The format is `s`, where ``\nis a floating point in seconds (so `123.456789012s` means 123 seconds and\n456789012 nanoseconds). See:\nhttps://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration.html.", + "operationId": "CreateAccessToken", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/DeleteServiceScalingReply" + "$ref": "#/definitions/CreateAccessTokenReply" } }, "400": { @@ -9226,25 +9414,40 @@ "parameters": [ { "name": "id", - "description": "The id of the service", + "description": "Organization id for ephemeral credential", "in": "path", "required": true, "type": "string" - } - ], - "tags": [ - "Services" - ] - }, - "put": { - "summary": "Update Service Scaling", - "description": "Stores or updates the scaling configuration for a service to use manual scaling", - "operationId": "UpdateServiceScaling", + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "validity": { + "type": "string", + "title": "Validity of the credential" + } + } + } + } + ], + "tags": [ + "organization" + ] + } + }, + "/v1/organizations/{id}/deactivate": { + "post": { + "summary": "Deactivate an Organization", + "operationId": "DeactivateOrganization", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/UpdateServiceScalingReply" + "$ref": "#/definitions/DeactivateOrganizationReply" } }, "400": { @@ -9293,7 +9496,6 @@ "parameters": [ { "name": "id", - "description": "The id of the service to scale", "in": "path", "required": true, "type": "string" @@ -9305,31 +9507,28 @@ "schema": { "type": "object", "properties": { - "scalings": { - "type": "array", - "items": { - "$ref": "#/definitions/ManualServiceScaling" - }, - "title": "The new scaling configuration" + "skip_confirmation": { + "type": "boolean", + "description": "if set to true, skip_confirmation will directly start the deactivation\nprocess, without sending a confirmation email beforehand." } } } } ], "tags": [ - "Services" + "organization" ] } }, - "/v1/deployment/{id}/scaling": { - "get": { - "summary": "Get Deployment Scaling", - "operationId": "GetDeploymentScaling", + "/v1/organizations/{id}/default_project": { + "put": { + "summary": "Update Organization's default project", + "operationId": "UpdateOrganizationDefaultProject", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/GetDeploymentScalingReply" + "$ref": "#/definitions/UpdateOrganizationDefaultProjectReply" } }, "400": { @@ -9383,35 +9582,33 @@ "type": "string" }, { - "name": "region", - "description": "(Optional) Filter on region", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "replica_index", - "description": "(Optional) Filter on replica_index", - "in": "query", - "required": false, - "type": "integer", - "format": "int64" + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "default_project_id": { + "type": "string" + } + } + } } ], "tags": [ - "Deployments" + "organization" ] } }, - "/v1/deployment_events": { - "get": { - "summary": "List Deployment events", - "operationId": "ListDeploymentEvents", + "/v1/organizations/{id}/name": { + "put": { + "summary": "Update Organization Name", + "operationId": "UpdateOrganizationName", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ListDeploymentEventsReply" + "$ref": "#/definitions/UpdateOrganizationNameReply" } }, "400": { @@ -9459,59 +9656,39 @@ }, "parameters": [ { - "name": "deployment_id", - "description": "(Optional) Filter on deployment id", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "types", - "description": "(Optional) Filter on deployment event types", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" - }, - { - "name": "limit", - "description": "(Optional) The number of items to return", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "offset", - "description": "(Optional) The offset in the list of item to return", - "in": "query", - "required": false, + "name": "id", + "in": "path", + "required": true, "type": "string" }, { - "name": "order", - "description": "(Optional) Sorts the list in the ascending or the descending order", - "in": "query", - "required": false, - "type": "string" + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + } } ], "tags": [ - "Deployments" + "organization" ] } }, - "/v1/deployments": { - "get": { - "summary": "List Deployments", - "operationId": "ListDeployments", + "/v1/organizations/{id}/plan": { + "post": { + "summary": "Update Organization plan", + "operationId": "UpdateOrganizationPlan", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ListDeploymentsReply" + "$ref": "#/definitions/UpdateOrganizationPlanReply" } }, "400": { @@ -9559,77 +9736,42 @@ }, "parameters": [ { - "name": "app_id", - "description": "(Optional) Filter on application id", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "service_id", - "description": "(Optional) Filter on service id", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "limit", - "description": "(Optional) The number of items to return", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "offset", - "description": "(Optional) The offset in the list of item to return", - "in": "query", - "required": false, + "name": "id", + "in": "path", + "required": true, "type": "string" }, { - "name": "statuses", - "description": "(Optional) Filter on statuses", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string", - "enum": [ - "PENDING", - "PROVISIONING", - "SCHEDULED", - "CANCELING", - "CANCELED", - "ALLOCATING", - "STARTING", - "HEALTHY", - "DEGRADED", - "UNHEALTHY", - "STOPPING", - "STOPPED", - "ERRORING", - "ERROR", - "STASHED", - "SLEEPING" - ] - }, - "collectionFormat": "multi" + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "plan": { + "$ref": "#/definitions/Plan" + }, + "coupon_code": { + "type": "string" + } + } + } } ], "tags": [ - "Deployments" + "organization" ] } }, - "/v1/deployments/{id}": { - "get": { - "summary": "Get Deployment", - "operationId": "GetDeployment", + "/v1/organizations/{id}/reactivate": { + "post": { + "summary": "Reactivate an Organization", + "operationId": "ReactivateOrganization", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/GetDeploymentReply" + "$ref": "#/definitions/ReactivateOrganizationReply" } }, "400": { @@ -9678,27 +9820,33 @@ "parameters": [ { "name": "id", - "description": "The id of the deployment", "in": "path", "required": true, "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object" + } } ], "tags": [ - "Deployments" + "organization" ] } }, - "/v1/deployments/{id}/cancel": { + "/v1/organizations/{id}/signup_qualification": { "post": { - "summary": "Cancel Deployment", - "description": "Deployment cancellation is allowed for the following status:\n - pending\n - provisioning\n - scheduled", - "operationId": "CancelDeployment", + "summary": "Upsert Organization's signup qualification", + "operationId": "UpsertSignupQualification", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/CancelDeploymentReply" + "$ref": "#/definitions/UpsertSignupQualificationReply" } }, "400": { @@ -9747,27 +9895,38 @@ "parameters": [ { "name": "id", - "description": "The id of the deployment to cancel.", "in": "path", "required": true, "type": "string" - } - ], - "tags": [ - "Deployments" - ] - } - }, - "/v1/archives": { + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "signup_qualification": { + "type": "object" + } + } + } + } + ], + "tags": [ + "organization" + ] + } + }, + "/v1/organizations/{id}/switch": { "post": { - "summary": "Create Archive", - "description": "Create a signed URL to upload an archive.", - "operationId": "CreateArchive", + "summary": "Switch Organization context\nDEPRECATED: this has been replaced by WorkOS and will be dropped soon.", + "operationId": "SwitchOrganization", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/CreateArchiveReply" + "$ref": "#/definitions/LoginReply" } }, "400": { @@ -9815,28 +9974,41 @@ }, "parameters": [ { - "name": "archive", + "name": "id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/CreateArchive" + "type": "object" } + }, + { + "name": "seon-fp", + "description": "Seon Fingerprint", + "in": "header", + "required": false, + "type": "string" } ], "tags": [ - "Archives" + "organization" ] } }, - "/v1/volume_events": { + "/v1/organizations/{organization_id}/budget": { "get": { - "summary": "List Persistent Volume events", - "operationId": "ListPersistentVolumeEvents", + "summary": "Get Budget", + "operationId": "GetBudget", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ListPersistentVolumeEventsReply" + "$ref": "#/definitions/GetBudgetReply" } }, "400": { @@ -9884,59 +10056,24 @@ }, "parameters": [ { - "name": "persistent_volume_id", - "description": "(Optional) Filter on persistent volume id", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "types", - "description": "(Optional) Filter on persistent volume event types", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" - }, - { - "name": "limit", - "description": "(Optional) The number of items to return", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "offset", - "description": "(Optional) The offset in the list of item to return", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "order", - "description": "(Optional) Sorts the list in the ascending or the descending order", - "in": "query", - "required": false, + "name": "organization_id", + "in": "path", + "required": true, "type": "string" } ], "tags": [ - "PersistentVolumes" + "organization" ] - } - }, - "/v1/volumes": { - "get": { - "summary": "List all PersistentVolumes", - "operationId": "ListPersistentVolumes", + }, + "delete": { + "summary": "Delete Budget", + "operationId": "DeleteBudget", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ListPersistentVolumesReply" + "$ref": "#/definitions/DeleteBudgetReply" } }, "400": { @@ -9984,60 +10121,24 @@ }, "parameters": [ { - "name": "limit", - "description": "(Optional) The number of items to return", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "offset", - "description": "(Optional) The offset in the list of item to return", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "service_id", - "description": "(Optional) A filter for the service id", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "region", - "description": "(Optional) A filter for the region", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "name", - "description": "(Optional) A filter for the name", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "project_id", - "description": "(Optional) A filter for the project ID", - "in": "query", - "required": false, + "name": "organization_id", + "in": "path", + "required": true, "type": "string" } ], "tags": [ - "PersistentVolumes" + "organization" ] }, "post": { - "summary": "Create a PersistentVolume", - "operationId": "CreatePersistentVolume", + "summary": "Create Budget", + "operationId": "CreateBudget", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/CreatePersistentVolumeReply" + "$ref": "#/definitions/CreateBudgetReply" } }, "400": { @@ -10084,29 +10185,40 @@ } }, "parameters": [ + { + "name": "organization_id", + "in": "path", + "required": true, + "type": "string" + }, { "name": "body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/CreatePersistentVolumeRequest" + "type": "object", + "properties": { + "amount": { + "type": "string", + "format": "int64", + "description": "In cents." + } + } } } ], "tags": [ - "PersistentVolumes" + "organization" ] - } - }, - "/v1/volumes/{id}": { - "get": { - "summary": "Get a PersistentVolume", - "operationId": "GetPersistentVolume", + }, + "put": { + "summary": "Update Budget", + "operationId": "UpdateBudget", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/GetPersistentVolumeReply" + "$ref": "#/definitions/UpdateBudgetReply" } }, "400": { @@ -10154,24 +10266,40 @@ }, "parameters": [ { - "name": "id", + "name": "organization_id", "in": "path", "required": true, "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "amount": { + "type": "string", + "format": "int64", + "description": "In cents." + } + } + } } ], "tags": [ - "PersistentVolumes" + "organization" ] - }, - "delete": { - "summary": "Delete a PersistentVolume", - "operationId": "DeletePersistentVolume", + } + }, + "/v1/sso/canny": { + "post": { + "operationId": "CannyAuth", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/DeletePersistentVolumeReply" + "$ref": "#/definitions/CannyAuthReply" } }, "400": { @@ -10219,24 +10347,27 @@ }, "parameters": [ { - "name": "id", - "in": "path", + "name": "body", + "in": "body", "required": true, - "type": "string" + "schema": { + "$ref": "#/definitions/CannyAuthRequest" + } } ], "tags": [ - "PersistentVolumes" + "sso" ] - }, + } + }, + "/v1/sso/discourse": { "post": { - "summary": "Update a PersistentVolume", - "operationId": "UpdatePersistentVolume", + "operationId": "DiscourseAuth", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/UpdatePersistentVolumeReply" + "$ref": "#/definitions/DiscourseAuthReply" } }, "400": { @@ -10283,47 +10414,30 @@ } }, "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "type": "string" - }, { "name": "body", "in": "body", "required": true, "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "title": "(Optional) change the name of the volume" - }, - "max_size": { - "type": "integer", - "format": "int64", - "title": "(Optional) increase the volume size (in Gigabyte / GB)" - } - } + "$ref": "#/definitions/DiscourseAuthRequest" } } ], "tags": [ - "PersistentVolumes" + "sso" ] } }, - "/v1/docker-helper/verify": { - "get": { - "summary": "Verify Docker Image", - "description": "Verify if a docker image is reachable", - "operationId": "VerifyDockerImage", + "/v1/unscope_organization_token": { + "post": { + "summary": "Unscope Organization Token", + "description": "UnscopeOrganizationToken removes the organization scope from a token. This\nendpoint is useful when a user wants to remove an organization: by\nunscoping the token first, the user can then delete the organization\nwithout invalidating his token.", + "operationId": "UnscopeOrganizationToken", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/VerifyDockerImageReply" + "$ref": "#/definitions/LoginReply" } }, "400": { @@ -10371,34 +10485,35 @@ }, "parameters": [ { - "name": "image", - "description": "The full image uri to be verified", - "in": "query", - "required": false, - "type": "string" + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/UnscopeOrganizationTokenRequest" + } }, { - "name": "secret_id", - "description": "(Optional) the id of the secret to use to authenticate to the registry", - "in": "query", + "name": "seon-fp", + "description": "Seon Fingerprint", + "in": "header", "required": false, "type": "string" } ], "tags": [ - "DockerHelper" + "organization" ] } }, - "/v1/secrets": { - "get": { - "summary": "List Secrets", - "operationId": "ListSecrets", + "/v2/account/profile": { + "put": { + "summary": "Update User V2", + "operationId": "UpdateUserV2", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ListSecretsReply" + "$ref": "#/definitions/UserReply" } }, "400": { @@ -10446,59 +10561,32 @@ }, "parameters": [ { - "name": "name", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "limit", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "offset", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "types", - "description": "Filter by secret types", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string", - "enum": [ - "SIMPLE", - "REGISTRY", - "MANAGED" - ] - }, - "collectionFormat": "multi" + "name": "user", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateUserRequest.UserUpdateBody" + } }, { - "name": "project_id", - "description": "(Optional) A filter for the project ID", + "name": "update_mask", "in": "query", "required": false, "type": "string" } ], "tags": [ - "Secrets" + "Profile" ] }, - "post": { - "summary": "Create Secret", - "operationId": "CreateSecret", + "patch": { + "summary": "Update User V2", + "operationId": "UpdateUserV22", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/CreateSecretReply" + "$ref": "#/definitions/UserReply" } }, "400": { @@ -10546,28 +10634,34 @@ }, "parameters": [ { - "name": "secret", + "name": "user", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/CreateSecret" + "$ref": "#/definitions/UpdateUserRequest.UserUpdateBody" } + }, + { + "name": "update_mask", + "in": "query", + "required": false, + "type": "string" } ], "tags": [ - "Secrets" + "Profile" ] } }, - "/v1/secrets/{id}": { + "/v1/organization_members": { "get": { - "summary": "Get Secret", - "operationId": "GetSecret", + "summary": "List organization members", + "operationId": "ListOrganizationMembers", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/GetSecretReply" + "$ref": "#/definitions/ListOrganizationMembersReply" } }, "400": { @@ -10615,24 +10709,68 @@ }, "parameters": [ { - "name": "id", - "in": "path", - "required": true, + "name": "limit", + "description": "(Optional) The number of items to return", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "offset", + "description": "(Optional) The offset in the list of item to return", + "in": "query", + "required": false, "type": "string" + }, + { + "name": "organization_id", + "description": "(Optional) Filter for an organization", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "user_id", + "description": "(Optional) Filter for an user", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "organization_statuses", + "description": "(Optional) Filter for organization statuses", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string", + "enum": [ + "WARNING", + "LOCKED", + "ACTIVE", + "DEACTIVATING", + "DEACTIVATED", + "DELETING", + "DELETED" + ] + }, + "collectionFormat": "multi" } ], "tags": [ - "Secrets" + "OrganizationMembers" ] - }, + } + }, + "/v1/organization_members/{id}": { "delete": { - "summary": "Delete Secret", - "operationId": "DeleteSecret", + "summary": "Remove an organization member", + "operationId": "RemoveOrganizationMember", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/DeleteSecretReply" + "$ref": "#/definitions/RemoveOrganizationMemberReply" } }, "400": { @@ -10687,17 +10825,19 @@ } ], "tags": [ - "Secrets" + "OrganizationMembers" ] - }, - "put": { - "summary": "Update Secret", - "operationId": "UpdateSecret", + } + }, + "/v1/users/{id}": { + "delete": { + "summary": "Delete user", + "operationId": "DeleteUser", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/UpdateSecretReply" + "$ref": "#/definitions/DeleteUserReply" } }, "400": { @@ -10746,37 +10886,26 @@ "parameters": [ { "name": "id", + "description": "The id of the user", "in": "path", "required": true, "type": "string" - }, - { - "name": "secret", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/Secret" - } - }, - { - "name": "update_mask", - "in": "query", - "required": false, - "type": "string" } ], "tags": [ - "Secrets" + "Users" ] - }, - "patch": { - "summary": "Update Secret", - "operationId": "UpdateSecret2", + } + }, + "/v2/users/{id}": { + "delete": { + "summary": "V2 Delete user", + "operationId": "DeleteUserV2", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/UpdateSecretReply" + "$ref": "#/definitions/DeleteUserReply" } }, "400": { @@ -10825,39 +10954,26 @@ "parameters": [ { "name": "id", + "description": "The id of the user", "in": "path", "required": true, "type": "string" - }, - { - "name": "secret", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/Secret" - } - }, - { - "name": "update_mask", - "in": "query", - "required": false, - "type": "string" } ], "tags": [ - "Secrets" + "Users" ] } }, - "/v1/secrets/{id}/reveal": { - "post": { - "summary": "Reveal Secret", - "operationId": "RevealSecret", + "/v1/credentials": { + "get": { + "summary": "List credentials", + "operationId": "ListCredentials", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/RevealSecretReply" + "$ref": "#/definitions/ListCredentialsReply" } }, "400": { @@ -10905,34 +11021,66 @@ }, "parameters": [ { - "name": "id", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } + "name": "type", + "description": "(Optional) A filter for type", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "INVALID", + "USER", + "ORGANIZATION" + ], + "default": "INVALID" + }, + { + "name": "name", + "description": "(Optional) A filter for name", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "organization_id", + "description": "(Optional) Filter for an organization", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "user_id", + "description": "(Optional) Filter for an user", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "limit", + "description": "(Optional) The number of items to return", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "offset", + "description": "(Optional) The offset in the list of item to return", + "in": "query", + "required": false, + "type": "string" } ], "tags": [ - "Secrets" + "Credentials" ] - } - }, - "/v1/instance_events": { - "get": { - "summary": "List Instance events", - "operationId": "ListInstanceEvents", + }, + "post": { + "summary": "Create credential", + "operationId": "CreateCredential", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ListInstanceEventsReply" + "$ref": "#/definitions/CreateCredentialReply" } }, "400": { @@ -10980,63 +11128,28 @@ }, "parameters": [ { - "name": "instance_ids", - "description": "(Optional) Filter on list of instance id", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" - }, - { - "name": "types", - "description": "(Optional) Filter on instance event types", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" - }, - { - "name": "limit", - "description": "(Optional) The number of items to return", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "offset", - "description": "(Optional) The offset in the list of item to return", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "order", - "description": "(Optional) Sorts the list in the ascending or the descending order", - "in": "query", - "required": false, - "type": "string" + "name": "credential", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateCredential" + } } ], "tags": [ - "Instances" + "Credentials" ] } }, - "/v1/instances": { + "/v1/credentials/{id}": { "get": { - "summary": "List Instances", - "operationId": "ListInstances", + "summary": "Get credential", + "operationId": "GetCredential", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ListInstancesReply" + "$ref": "#/definitions/GetCredentialReply" } }, "400": { @@ -11084,120 +11197,24 @@ }, "parameters": [ { - "name": "app_id", - "description": "(Optional) Filter on application id", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "service_id", - "description": "(Optional) Filter on service id", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "deployment_id", - "description": "(Optional) Filter on deployment id", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "regional_deployment_id", - "description": "(Optional) Filter on regional deployment id", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "allocation_id", - "description": "(Optional) Filter on allocation id", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "replica_index", - "description": "(Optional) Filter on replica index", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "statuses", - "description": "(Optional) Filter on instance statuses", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string", - "enum": [ - "ALLOCATING", - "STARTING", - "HEALTHY", - "UNHEALTHY", - "STOPPING", - "STOPPED", - "ERROR", - "SLEEPING" - ] - }, - "collectionFormat": "multi" - }, - { - "name": "limit", - "description": "(Optional) The number of items to return", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "offset", - "description": "(Optional) The offset in the list of item to return", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "order", - "description": "(Optional) Sorts the list in the ascending or the descending order", - "in": "query", - "required": false, + "name": "id", + "in": "path", + "required": true, "type": "string" - }, - { - "name": "starting_time", - "description": "(Optional) The starting time of the period of running instance", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - }, - { - "name": "ending_time", - "description": "(Optional) The ending time of the period of running instance", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" } ], "tags": [ - "Instances" + "Credentials" ] - } - }, - "/v1/instances/{id}": { - "get": { - "summary": "Get Instance", - "operationId": "GetInstance", + }, + "delete": { + "summary": "Delete credential", + "operationId": "DeleteCredential", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/GetInstanceReply" + "$ref": "#/definitions/DeleteCredentialReply" } }, "400": { @@ -11246,26 +11263,23 @@ "parameters": [ { "name": "id", - "description": "The id of the instance", "in": "path", "required": true, "type": "string" } ], "tags": [ - "Instances" + "Credentials" ] - } - }, - "/v1/regional_deployment_events": { - "get": { - "summary": "List Regional Deployment events", - "operationId": "ListRegionalDeploymentEvents", + }, + "put": { + "summary": "Update credential", + "operationId": "UpdateCredential", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ListRegionalDeploymentEventsReply" + "$ref": "#/definitions/UpdateCredentialReply" } }, "400": { @@ -11313,60 +11327,38 @@ }, "parameters": [ { - "name": "regional_deployment_id", - "description": "(Optional) Filter on regional deployment id", - "in": "query", - "required": false, + "name": "id", + "in": "path", + "required": true, "type": "string" }, { - "name": "types", - "description": "(Optional) Filter on regional deployment event types", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" - }, - { - "name": "limit", - "description": "(Optional) The number of items to return", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "offset", - "description": "(Optional) The offset in the list of item to return", - "in": "query", - "required": false, - "type": "string" + "name": "credential", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Credential" + } }, { - "name": "order", - "description": "(Optional) Sorts the list in the ascending or the descending order", + "name": "update_mask", "in": "query", "required": false, "type": "string" } ], "tags": [ - "RegionalDeployments" + "Credentials" ] - } - }, - "/v1/regional_deployments": { - "get": { - "summary": "List Regional Deployments", - "description": "Experimental: use at your own risk", - "operationId": "ListRegionalDeployments", + }, + "patch": { + "summary": "Update credential", + "operationId": "UpdateCredential2", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ListRegionalDeploymentsReply" + "$ref": "#/definitions/UpdateCredentialReply" } }, "400": { @@ -11414,42 +11406,40 @@ }, "parameters": [ { - "name": "deployment_id", - "description": "(Optional) Filter on deployment id", - "in": "query", - "required": false, + "name": "id", + "in": "path", + "required": true, "type": "string" }, { - "name": "limit", - "description": "(Optional) The number of items to return", - "in": "query", - "required": false, - "type": "string" + "name": "credential", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Credential" + } }, { - "name": "offset", - "description": "(Optional) The offset in the list of item to return", + "name": "update_mask", "in": "query", "required": false, "type": "string" } ], "tags": [ - "RegionalDeployments" + "Credentials" ] } }, - "/v1/regional_deployments/{id}": { + "/v1/projects": { "get": { - "summary": "Get Regional Deployment", - "description": "Experimental: use at your own risk", - "operationId": "GetRegionalDeployment", + "summary": "List projects", + "operationId": "ListProjects", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/GetRegionalDeploymentReply" + "$ref": "#/definitions/ListProjectsReply" } }, "400": { @@ -11496,95 +11486,6 @@ } }, "parameters": [ - { - "name": "id", - "description": "The id of the regional deployment", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": [ - "RegionalDeployments" - ] - } - }, - "/v1/usages": { - "get": { - "summary": "Get organization usage", - "operationId": "GetOrganizationUsage", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/GetOrganizationUsageReply" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "starting_time", - "description": "The starting time of the period to get data from", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - }, - { - "name": "ending_time", - "description": "The ending time of the period to get data from", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - } - ], - "tags": [ - "Usages" - ] - } - }, - "/v1/usages/details": { - "get": { - "summary": "Get organization usage details", - "operationId": "GetOrganizationUsageDetails", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/GetOrganizationUsageDetailsReply" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "starting_time", - "description": "The starting time of the period to get data from", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - }, - { - "name": "ending_time", - "description": "The ending time of the period to get data from", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - }, { "name": "limit", "description": "(Optional) The number of items to return", @@ -11600,34 +11501,25 @@ "type": "string" }, { - "name": "order", - "description": "(Optional) Sorts the list in the ascending or the descending order", + "name": "name", + "description": "(Optional) Filter by project name", "in": "query", "required": false, "type": "string" - }, - { - "name": "Accept", - "description": "If defined with the value 'text/csv', a csv file is returned", - "in": "header", - "required": false, - "type": "string" } ], "tags": [ - "Usages" + "Projects" ] - } - }, - "/v1/snapshots": { - "get": { - "summary": "List all Snapshots", - "operationId": "ListSnapshots", + }, + "post": { + "summary": "Create project", + "operationId": "CreateProject", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ListSnapshotsReply" + "$ref": "#/definitions/CreateProjectReply" } }, "400": { @@ -11675,65 +11567,28 @@ }, "parameters": [ { - "name": "limit", - "description": "(Optional) The number of items to return", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "offset", - "description": "(Optional) The offset in the list of item to return", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "organization_id", - "description": "(Optional) Filter by organization_id", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "statuses", - "description": "(Optional) Filter by status\n\n - SNAPSHOT_STATUS_INVALID: zero value, invalid\n - SNAPSHOT_STATUS_CREATING: the snapshot is being created\n - SNAPSHOT_STATUS_AVAILABLE: the snapshot is complete and available\n - SNAPSHOT_STATUS_MIGRATING: the snapshot is being migrated\n - SNAPSHOT_STATUS_DELETING: the snapshot is being deleted\n - SNAPSHOT_STATUS_DELETED: the snapshot is deleted", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string", - "enum": [ - "SNAPSHOT_STATUS_INVALID", - "SNAPSHOT_STATUS_CREATING", - "SNAPSHOT_STATUS_AVAILABLE", - "SNAPSHOT_STATUS_MIGRATING", - "SNAPSHOT_STATUS_DELETING", - "SNAPSHOT_STATUS_DELETED" - ] - }, - "collectionFormat": "multi" - }, - { - "name": "region", - "description": "(Optional) A filter for the region", - "in": "query", - "required": false, - "type": "string" + "name": "project", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateProject" + } } ], "tags": [ - "Snapshots" + "Projects" ] - }, - "post": { - "summary": "Create a Snapshot", - "operationId": "CreateSnapshot", + } + }, + "/v1/projects/{id}": { + "get": { + "summary": "Get project", + "operationId": "GetProject", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/CreateSnapshotReply" + "$ref": "#/definitions/GetProjectReply" } }, "400": { @@ -11781,28 +11636,24 @@ }, "parameters": [ { - "name": "body", - "in": "body", + "name": "id", + "in": "path", "required": true, - "schema": { - "$ref": "#/definitions/CreateSnapshotRequest" - } + "type": "string" } ], "tags": [ - "Snapshots" + "Projects" ] - } - }, - "/v1/snapshots/{id}": { - "get": { - "summary": "Get a Snapshot", - "operationId": "GetSnapshot", + }, + "delete": { + "summary": "Delete project", + "operationId": "DeleteProject", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/GetSnapshotReply" + "$ref": "#/definitions/DeleteProjectReply" } }, "400": { @@ -11857,17 +11708,17 @@ } ], "tags": [ - "Snapshots" + "Projects" ] }, - "delete": { - "summary": "Delete a Snapshot", - "operationId": "DeleteSnapshot", + "put": { + "summary": "Update project", + "operationId": "UpdateProject", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/DeleteSnapshotReply" + "$ref": "#/definitions/UpdateProjectReply" } }, "400": { @@ -11919,20 +11770,34 @@ "in": "path", "required": true, "type": "string" + }, + { + "name": "project", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Project" + } + }, + { + "name": "update_mask", + "in": "query", + "required": false, + "type": "string" } ], "tags": [ - "Snapshots" + "Projects" ] }, - "post": { - "summary": "Update a Snapshot", - "operationId": "UpdateSnapshot", + "patch": { + "summary": "Update project", + "operationId": "UpdateProject2", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/UpdateSnapshotReply" + "$ref": "#/definitions/UpdateProjectReply" } }, "400": { @@ -11981,40 +11846,108 @@ "parameters": [ { "name": "id", - "description": "The id of the snapshot", "in": "path", "required": true, "type": "string" }, { - "name": "body", + "name": "project", "in": "body", "required": true, "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "title": "Change the name of the snapshot" - } - } + "$ref": "#/definitions/Project" } + }, + { + "name": "update_mask", + "in": "query", + "required": false, + "type": "string" } ], "tags": [ - "Snapshots" + "Projects" ] } }, - "/v1/quotas/capacity": { + "/v1/subscriptions/{id}": { + "get": { + "summary": "Get Subscription", + "operationId": "GetSubscription", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/GetSubscriptionReply" + } + }, + "400": { + "description": "Validation error", + "schema": { + "$ref": "#/definitions/ErrorWithFields" + } + }, + "401": { + "description": "Returned when the token is not valid.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "500": { + "description": "Returned in case of server error.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "503": { + "description": "Service is unavailable.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/google.rpc.Status" + } + } + }, + "parameters": [ + { + "name": "id", + "description": "The id of the instance", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "Subscriptions" + ] + } + }, + "/v1/coupons": { "post": { - "summary": "DEPRECATED: Review Organization Capacity", - "operationId": "ReviewOrganizationCapacity", + "summary": "Redeem Coupon", + "description": "This API allows to redeem a coupon. Pass the code you received in the body.", + "operationId": "RedeemCoupon", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ReviewOrganizationCapacityReply" + "$ref": "#/definitions/RedeemCouponReply" } }, "400": { @@ -12066,24 +11999,25 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/ReviewOrganizationCapacityRequest" + "$ref": "#/definitions/RedeemCouponRequest" } } ], "tags": [ - "Quotas" + "Coupons" ] } }, - "/v1/streams/logs/query": { + "/v1/coupons/{code}": { "get": { - "summary": "Query logs", - "operationId": "QueryLogs", + "summary": "Check Coupon", + "description": "This API allows to check if a given coupon is valid. It is heavily rate-limited.", + "operationId": "CheckCoupon", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/QueryLogsReply" + "$ref": "#/definitions/CheckCouponReply" } }, "400": { @@ -12131,156 +12065,93 @@ }, "parameters": [ { - "name": "type", - "description": "Type of logs to retrieve, either \"build\" or \"runtime\". Defaults to \"runtime\".", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "app_id", - "description": "(Optional) Filter on the provided app_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.", - "in": "query", - "required": false, + "name": "code", + "in": "path", + "required": true, "type": "string" + } + ], + "tags": [ + "Coupons" + ] + } + }, + "/v1/organization_confirmations/{id}": { + "post": { + "summary": "Confirm organization action", + "operationId": "ConfirmOrganizationAction", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ConfirmOrganizationActionReply" + } }, - { - "name": "service_id", - "description": "(Optional) Filter on the provided service_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.", - "in": "query", - "required": false, - "type": "string" + "400": { + "description": "Validation error", + "schema": { + "$ref": "#/definitions/ErrorWithFields" + } }, - { - "name": "deployment_id", - "description": "(Optional) Filter on the provided deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.", - "in": "query", - "required": false, - "type": "string" + "401": { + "description": "Returned when the token is not valid.", + "schema": { + "$ref": "#/definitions/Error" + } }, - { - "name": "regional_deployment_id", - "description": "(Optional) Filter on the provided regional_deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.", - "in": "query", - "required": false, - "type": "string" + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": { + "$ref": "#/definitions/Error" + } }, - { - "name": "instance_id", - "description": "Deprecated, prefer using instance_ids instead.", - "in": "query", - "required": false, - "type": "string" + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "$ref": "#/definitions/Error" + } }, - { - "name": "instance_ids", - "description": "(Optional) Filter on the provided instance_ids. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" + "500": { + "description": "Returned in case of server error.", + "schema": { + "$ref": "#/definitions/Error" + } }, - { - "name": "stream", - "description": "Deprecated, prefer using streams instead.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "streams", - "description": "(Optional) Filter on stream: either \"stdout\", \"stderr\" or \"koyeb\" (for system logs).", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" - }, - { - "name": "start", - "description": "(Optional) Must always be before `end`. Defaults to 15 minutes ago.", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - }, - { - "name": "end", - "description": "(Optional) Must always be after `start`. Defaults to now.", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - }, - { - "name": "order", - "description": "(Optional) `asc` or `desc`. Defaults to `desc`.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "limit", - "description": "(Optional) Defaults to 100. Maximum of 1000.", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "regex", - "description": "(Optional) Apply a regex to filter logs. Can't be used with `text`.", - "in": "query", - "required": false, - "type": "string" + "503": { + "description": "Service is unavailable.", + "schema": { + "$ref": "#/definitions/Error" + } }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/google.rpc.Status" + } + } + }, + "parameters": [ { - "name": "text", - "description": "(Optional) Looks for this string in logs. Can't be used with `regex`.", - "in": "query", - "required": false, + "name": "id", + "in": "path", + "required": true, "type": "string" - }, - { - "name": "regions", - "description": "(Optional) Filter on the provided regions (e.g. [\"fra\", \"was\"]).", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" } ], "tags": [ - "Logs" + "OrganizationConfirmations" ] } }, - "/v1/streams/logs/tail": { - "get": { - "summary": "Tails logs", - "operationId": "TailLogs", + "/v1/account/login": { + "post": { + "summary": "Login user\nDEPRECATED: this has been replaced by WorkOS and will be dropped soon.", + "operationId": "Login", "responses": { "200": { - "description": "A successful response.(streaming responses)", + "description": "A successful response.", "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/LogEntry" - }, - "error": { - "$ref": "#/definitions/google.rpc.Status" - } - }, - "title": "Stream result of LogEntry" + "$ref": "#/definitions/LoginReply" } }, "400": { @@ -12328,132 +12199,35 @@ }, "parameters": [ { - "name": "type", - "description": "Type of logs to retrieve, either \"build\" or \"runtime\". Defaults to \"runtime\".", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "app_id", - "description": "(Optional) Filter on the provided app_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "service_id", - "description": "(Optional) Filter on the provided service_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "deployment_id", - "description": "(Optional) Filter on the provided deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "regional_deployment_id", - "description": "(Optional) Filter on the provided regional_deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "instance_id", - "description": "Deprecated, prefer using instance_ids instead.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "instance_ids", - "description": "(Optional) Filter on the provided instance_ids. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" - }, - { - "name": "stream", - "description": "Deprecated, prefer using streams instead.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "streams", - "description": "(Optional) Filter on stream: either \"stdout\", \"stderr\" or \"koyeb\" (for system logs).", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" - }, - { - "name": "start", - "description": "(Optional) Defaults to 24 hours ago.", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - }, - { - "name": "limit", - "description": "(Optional) Defaults to 1000. Maximum of 1000.", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "regex", - "description": "(Optional) Apply a regex to filter logs. Can't be used with `text`.", - "in": "query", - "required": false, - "type": "string" + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/LoginRequest" + } }, { - "name": "text", - "description": "(Optional) Looks for this string in logs. Can't be used with `regex`.", - "in": "query", + "name": "seon-fp", + "description": "Seon Fingerprint", + "in": "header", "required": false, "type": "string" - }, - { - "name": "regions", - "description": "(Optional) Filter on the provided regions (e.g. [\"fra\", \"was\"]).", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" } ], "tags": [ - "Logs" + "Sessions" ] } }, - "/v1/streams/metrics": { - "get": { - "summary": "Get Metrics", - "operationId": "GetMetrics", + "/v1/account/logout": { + "delete": { + "summary": "Logout user\nDEPRECATED: this has been replaced by WorkOS and will be dropped soon.", + "operationId": "Logout", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/GetMetricsReply" + "$ref": "#/definitions/LogoutReply" } }, "400": { @@ -12499,90 +12273,21 @@ } } }, - "parameters": [ - { - "name": "service_id", - "description": "ID of the service to query instances metrics for. Ignored if instance_id is set.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "instance_id", - "description": "ID of the instance to query metrics for.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "name", - "description": "Metric to query.", - "in": "query", - "required": false, - "type": "string", - "enum": [ - "UNKNOWN", - "CPU_TOTAL_PERCENT", - "MEM_RSS", - "HTTP_THROUGHPUT", - "HTTP_RESPONSE_TIME_50P", - "HTTP_RESPONSE_TIME_90P", - "HTTP_RESPONSE_TIME_99P", - "HTTP_RESPONSE_TIME_MAX", - "PUBLIC_DATA_TRANSFER_IN", - "PUBLIC_DATA_TRANSFER_OUT" - ], - "default": "UNKNOWN" - }, - { - "name": "start", - "description": "(Optional) Defaults to an hour prior to end.", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - }, - { - "name": "end", - "description": "(Optional) Defaults to now.", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - }, - { - "name": "step", - "description": "(Optional) Must be a valid duration in hours (h) or minutes (m). Defaulst to 5m.", - "in": "query", - "required": false, - "type": "string" - } - ], - "tags": [ - "Metrics" - ] - } - }, - "/v1/streams/instances/exec": { - "get": { - "summary": "Exec Command", - "description": "This endpoint opens a websocket. Once open, all frames going through the websocket should be formatted in JSON. Input frames should match the format specified below. Output frames will match the response schema.", - "operationId": "ExecCommand", - "responses": { - "200": { - "description": "A successful response.(streaming responses)", - "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/ExecCommandReply" - }, - "error": { - "$ref": "#/definitions/google.rpc.Status" - } - }, - "title": "Stream result of ExecCommandReply" - } + "tags": [ + "Sessions" + ] + } + }, + "/v1/account/refresh": { + "put": { + "summary": "Refresh token\nDEPRECATED: this has been replaced by WorkOS and will be dropped soon.", + "operationId": "RefreshToken", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/LoginReply" + } }, "400": { "description": "Validation error", @@ -12627,89 +12332,21 @@ } } }, - "parameters": [ - { - "name": "id", - "description": "ID of the resource to exec on.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "body.command", - "description": "Command to exec. Mandatory in the first frame sent", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" - }, - { - "name": "body.tty_size.height", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - }, - { - "name": "body.tty_size.width", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - }, - { - "name": "body.stdin.data", - "description": "Data is base64 encoded", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - }, - { - "name": "body.stdin.close", - "description": "Indicate last data frame", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "body.disableTty", - "description": "Disable TTY. It's enough to specify it in the first frame", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "id_type", - "description": "When specified, it is used to determine if the kind of resource the id refers to. If missing, defaults to the instance id.", - "in": "query", - "required": false, - "type": "string", - "enum": [ - "INVALID", - "INSTANCE_ID", - "SERVICE_ID" - ], - "default": "INVALID" - } - ], "tags": [ - "Instances" + "Sessions" ] } }, - "/v1/activities": { - "get": { - "summary": "List Activities", - "operationId": "ListActivities", + "/v1/account/session": { + "post": { + "summary": "New session", + "description": "Creates a new session without an organization for current user.\nNOTE: If you want a session linked to another organization, please use \"Switch organization\".\nDEPRECATED: this has been replaced by WorkOS and will be dropped soon.", + "operationId": "NewSession", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ActivityList" + "$ref": "#/definitions/LoginReply" } }, "400": { @@ -12755,45 +12392,20 @@ } } }, - "parameters": [ - { - "name": "limit", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "offset", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "types", - "description": "(Optional) Filter on object type", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" - } - ], "tags": [ - "activity" + "Sessions" ] } }, - "/v1/notifications": { + "/v1/organization_invitations": { "get": { - "summary": "List Notifications", - "operationId": "ListNotifications", + "summary": "List Organization Invitations", + "operationId": "ListOrganizationInvitations", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/NotificationList" + "$ref": "#/definitions/ListOrganizationInvitationsReply" } }, "400": { @@ -12842,55 +12454,56 @@ "parameters": [ { "name": "limit", + "description": "(Optional) The number of items to return", "in": "query", "required": false, "type": "string" }, { "name": "offset", + "description": "(Optional) The offset in the list of item to return", "in": "query", "required": false, "type": "string" }, { - "name": "mark_read", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "mark_seen", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "unread", + "name": "statuses", + "description": "(Optional) Filter on organization invitation statuses", "in": "query", "required": false, - "type": "string" + "type": "array", + "items": { + "type": "string", + "enum": [ + "INVALID", + "PENDING", + "ACCEPTED", + "REFUSED", + "EXPIRED" + ] + }, + "collectionFormat": "multi" }, { - "name": "unseen", + "name": "user_id", + "description": "(Optional) Filter on invitee ID. Will match both invitations sent to\nthat user_id and invitations sent to the email of that user_id.\nThe only valid value is the requester's user_id", "in": "query", "required": false, "type": "string" } ], "tags": [ - "activity" + "OrganizationInvitations" ] - } - }, - "/v1/test/anon": { - "get": { - "summary": "Test anonymous call", - "operationId": "TestAnon", + }, + "post": { + "summary": "Create Organization Invitation", + "operationId": "CreateOrganizationInvitation", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ktest.TestAnonReply" + "$ref": "#/definitions/CreateOrganizationInvitationReply" } }, "400": { @@ -12936,20 +12549,30 @@ } } }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateOrganizationInvitationRequest" + } + } + ], "tags": [ - "Test" + "OrganizationInvitations" ] } }, - "/v1/test/auth": { - "post": { - "summary": "Test authenticated call", - "operationId": "TestAuth", + "/v1/organization_invitations/{id}": { + "get": { + "summary": "Get Organization Invitation", + "operationId": "GetOrganizationInvitation", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ktest.TestAuthReply" + "$ref": "#/definitions/GetOrganizationInvitationReply" } }, "400": { @@ -12997,28 +12620,25 @@ }, "parameters": [ { - "name": "body", - "in": "body", + "name": "id", + "description": "The id of the invitation to get", + "in": "path", "required": true, - "schema": { - "$ref": "#/definitions/ktest.TestAuthRequest" - } + "type": "string" } ], "tags": [ - "Test" + "OrganizationInvitations" ] - } - }, - "/v1/git/branches": { - "get": { - "summary": "List Branches", - "operationId": "ListBranches", + }, + "delete": { + "summary": "Delete Organization Invitation", + "operationId": "DeleteOrganizationInvitation", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/kgitproxy.ListBranchesReply" + "$ref": "#/definitions/DeleteOrganizationInvitationReply" } }, "400": { @@ -13066,48 +12686,103 @@ }, "parameters": [ { - "name": "repository_id", - "description": "(Optional) Filter on one repository.", - "in": "query", - "required": false, + "name": "id", + "description": "The id of the organization invitation to delete", + "in": "path", + "required": true, "type": "string" + } + ], + "tags": [ + "OrganizationInvitations" + ] + } + }, + "/v1/organization_invitations/{id}/resend": { + "post": { + "summary": "Resend Organization Invitation", + "operationId": "ResendOrganizationInvitation", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ResendOrganizationInvitationReply" + } }, - { - "name": "name", - "description": "(Optional) Filter on branch name using a fuzzy search.\nRepository filter is required to enable this filter.", - "in": "query", - "required": false, - "type": "string" + "400": { + "description": "Validation error", + "schema": { + "$ref": "#/definitions/ErrorWithFields" + } + }, + "401": { + "description": "Returned when the token is not valid.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "500": { + "description": "Returned in case of server error.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "503": { + "description": "Service is unavailable.", + "schema": { + "$ref": "#/definitions/Error" + } }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/google.rpc.Status" + } + } + }, + "parameters": [ { - "name": "limit", - "description": "(Optional) The number of items to return.", - "in": "query", - "required": false, + "name": "id", + "description": "The id of the organization invitation to resend", + "in": "path", + "required": true, "type": "string" }, { - "name": "offset", - "description": "(Optional) The offset in the list of item to return.", - "in": "query", - "required": false, - "type": "string" + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object" + } } ], "tags": [ - "Repositories" + "OrganizationInvitations" ] } }, - "/v1/git/repositories": { + "/v1/payment_methods": { "get": { - "summary": "List Repositories", - "operationId": "ListRepositories", + "summary": "List payment methods", + "operationId": "ListPaymentMethods", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/kgitproxy.ListRepositoriesReply" + "$ref": "#/definitions/ListPaymentMethodsReply" } }, "400": { @@ -13155,48 +12830,52 @@ }, "parameters": [ { - "name": "name", - "description": "(Optional) Filter on repository name using a fuzzy search.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "name_search_op", - "description": "(Optional) Define search operation for repository name. Accept either \"fuzzy\" or \"equality\", use \"fuzzy\" by default.", + "name": "limit", + "description": "(Optional) The number of items to return", "in": "query", "required": false, "type": "string" }, { - "name": "limit", - "description": "(Optional) The number of items to return.", + "name": "offset", + "description": "(Optional) The offset in the list of item to return", "in": "query", "required": false, "type": "string" }, { - "name": "offset", - "description": "(Optional) The offset in the list of item to return.", + "name": "statuses", + "description": "(Optional) Filter on payment method statuses", "in": "query", "required": false, - "type": "string" + "type": "array", + "items": { + "type": "string", + "enum": [ + "INVALID", + "CREATED", + "AUTHORIZED", + "DECLINED", + "CANCELED", + "EXPIRED", + "UNCHECKED" + ] + }, + "collectionFormat": "multi" } ], "tags": [ - "Repositories" + "PaymentMethods" ] - } - }, - "/v1/git/sync/organization/{organization_id}": { + }, "post": { - "summary": "Resync Organization", - "operationId": "ResyncOrganization", + "summary": "Create payment authorization", + "operationId": "CreatePaymentAuthorization", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/kgitproxy.ResyncOrganizationReply" + "$ref": "#/definitions/CreatePaymentAuthorizationReply" } }, "400": { @@ -13244,26 +12923,28 @@ }, "parameters": [ { - "name": "organization_id", - "in": "path", + "name": "body", + "in": "body", "required": true, - "type": "string" + "schema": { + "$ref": "#/definitions/CreatePaymentAuthorizationRequest" + } } ], "tags": [ - "Repositories" + "PaymentMethods" ] } }, - "/v1/search": { + "/v1/payment_methods/{id}": { "get": { - "summary": "Search", - "operationId": "Search", + "summary": "Get payment method", + "operationId": "GetPaymentMethod", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ksearch.SearchReply" + "$ref": "#/definitions/GetPaymentMethodReply" } }, "400": { @@ -13311,528 +12992,1232 @@ }, "parameters": [ { - "name": "query", - "description": "(Optional) Search query", - "in": "query", - "required": false, + "name": "id", + "in": "path", + "required": true, "type": "string" } ], "tags": [ - "Search" + "PaymentMethods" ] - } - } - }, - "definitions": { - "google.protobuf.Any": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } }, - "additionalProperties": {} - }, - "google.rpc.Status": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/google.protobuf.Any" - } - } - } - }, - "DatacenterListItem": { - "type": "object", - "properties": { - "id": { - "type": "string", - "title": "e.g. \"par1\"" - }, - "region_id": { - "type": "string", - "title": "e.g. \"par\"" - }, - "domain": { - "type": "string", - "title": "e.g. \"all-par1.infra.prod.koyeb.com\"" - }, - "coordinates": { - "type": "array", - "items": { - "type": "string" - }, - "title": "e.g. \"8.856614\" ,\"2.352221\"?" + "delete": { + "summary": "Delete payment method", + "operationId": "DeletePaymentMethod", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/DeletePaymentMethodReply" + } + }, + "400": { + "description": "Validation error", + "schema": { + "$ref": "#/definitions/ErrorWithFields" + } + }, + "401": { + "description": "Returned when the token is not valid.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "500": { + "description": "Returned in case of server error.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "503": { + "description": "Service is unavailable.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/google.rpc.Status" + } + } + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "PaymentMethods" + ] + } + }, + "/v1/payment_methods/{id}/confirm": { + "post": { + "summary": "Confirm payment authorization", + "operationId": "ConfirmPaymentAuthorization", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ConfirmPaymentAuthorizationReply" + } + }, + "400": { + "description": "Validation error", + "schema": { + "$ref": "#/definitions/ErrorWithFields" + } + }, + "401": { + "description": "Returned when the token is not valid.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "500": { + "description": "Returned in case of server error.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "503": { + "description": "Service is unavailable.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/google.rpc.Status" + } + } + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object" + } + } + ], + "tags": [ + "PaymentMethods" + ] + } + }, + "/v1/intercom/profile": { + "get": { + "summary": "Get intercom profile", + "operationId": "GetIntercomProfile", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/GetIntercomProfileReply" + } + }, + "400": { + "description": "Validation error", + "schema": { + "$ref": "#/definitions/ErrorWithFields" + } + }, + "401": { + "description": "Returned when the token is not valid.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "500": { + "description": "Returned in case of server error.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "503": { + "description": "Service is unavailable.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/google.rpc.Status" + } + } + }, + "tags": [ + "Intercom" + ] + } + }, + "/v1/organizations/{organization_id}/quotas": { + "get": { + "operationId": "GetQuotas", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/GetQuotasReply" + } + }, + "400": { + "description": "Validation error", + "schema": { + "$ref": "#/definitions/ErrorWithFields" + } + }, + "401": { + "description": "Returned when the token is not valid.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "500": { + "description": "Returned in case of server error.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "503": { + "description": "Service is unavailable.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/google.rpc.Status" + } + } + }, + "parameters": [ + { + "name": "organization_id", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "OrganizationQuotas" + ] + } + }, + "/v1/organizations/{organization_id}/summary": { + "get": { + "summary": "Get organization usage summary", + "operationId": "GetOrganizationSummary", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/GetOrganizationSummaryReply" + } + }, + "400": { + "description": "Validation error", + "schema": { + "$ref": "#/definitions/ErrorWithFields" + } + }, + "401": { + "description": "Returned when the token is not valid.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "500": { + "description": "Returned in case of server error.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "503": { + "description": "Service is unavailable.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/google.rpc.Status" + } + } }, - "use_gpu": { - "type": "boolean", - "title": "e.g. true" + "parameters": [ + { + "name": "organization_id", + "description": "Organization ID", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "Summary" + ] + } + }, + "/v1/activities": { + "get": { + "summary": "List Activities", + "operationId": "ListActivities", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ActivityList" + } + }, + "400": { + "description": "Validation error", + "schema": { + "$ref": "#/definitions/ErrorWithFields" + } + }, + "401": { + "description": "Returned when the token is not valid.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "500": { + "description": "Returned in case of server error.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "503": { + "description": "Service is unavailable.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/google.rpc.Status" + } + } + }, + "parameters": [ + { + "name": "limit", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "offset", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "types", + "description": "(Optional) Filter on object type", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + } + ], + "tags": [ + "activity" + ] + } + }, + "/v1/notifications": { + "get": { + "summary": "List Notifications", + "operationId": "ListNotifications", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/NotificationList" + } + }, + "400": { + "description": "Validation error", + "schema": { + "$ref": "#/definitions/ErrorWithFields" + } + }, + "401": { + "description": "Returned when the token is not valid.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "500": { + "description": "Returned in case of server error.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "503": { + "description": "Service is unavailable.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/google.rpc.Status" + } + } + }, + "parameters": [ + { + "name": "limit", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "offset", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "mark_read", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "mark_seen", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "unread", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "unseen", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "activity" + ] + } + }, + "/v1/catalog/regions": { + "get": { + "summary": "List Region", + "operationId": "ListRegions", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ListRegionsReply" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/google.rpc.Status" + } + } }, - "regions": { - "type": "array", - "items": { + "parameters": [ + { + "name": "limit", + "description": "(Optional) The number of items to return", + "in": "query", + "required": false, "type": "string" }, - "title": "e.g. \"par\", \"fra\"" - } + { + "name": "offset", + "description": "(Optional) The offset in the list of item to return", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "id", + "description": "(Optional) A filter for regions", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "CatalogRegions" + ] } }, - "ListDatacentersReply": { - "type": "object", - "properties": { - "datacenters": { - "type": "array", - "items": { - "$ref": "#/definitions/DatacenterListItem" + "/v1/catalog/regions/{id}": { + "get": { + "summary": "Get Region", + "operationId": "GetRegion", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/GetRegionReply" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/google.rpc.Status" + } } - } + }, + "parameters": [ + { + "name": "id", + "description": "The name of the region", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "CatalogRegions" + ] } }, - "CatalogGPUDetails": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "format": "int64", - "title": "The number of GPUs" + "/v1/catalog/datacenters": { + "get": { + "summary": "List datacenters", + "operationId": "ListDatacenters", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ListDatacentersReply" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/google.rpc.Status" + } + } }, - "brand": { - "type": "string", - "title": "The brand of GPU" + "tags": [ + "CatalogDatacenters" + ] + } + }, + "/v1/catalog/usage": { + "get": { + "operationId": "ListUsage", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ListUsageReply" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/google.rpc.Status" + } + } }, - "memory": { - "type": "string", - "title": "GPU memory" + "parameters": [ + { + "name": "region", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "CatalogInstanceUsage" + ] + } + }, + "/v1/catalog/instances": { + "get": { + "summary": "List Instances", + "operationId": "ListCatalogInstances", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ListCatalogInstancesReply" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/google.rpc.Status" + } + } }, - "name": { - "type": "string", - "title": "Name of GPU" - } + "parameters": [ + { + "name": "limit", + "description": "(Optional) The number of items to return", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "offset", + "description": "(Optional) The offset in the list of item to return", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "id", + "description": "(Optional) A filter for instances", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "CatalogInstances" + ] } }, - "CatalogInstance": { + "/v1/catalog/instances/{id}": { + "get": { + "summary": "Get Instance", + "operationId": "GetCatalogInstance", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/GetCatalogInstanceReply" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/google.rpc.Status" + } + } + }, + "parameters": [ + { + "name": "id", + "description": "The name of the instance", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "CatalogInstances" + ] + } + } + }, + "definitions": { + "google.protobuf.Any": { "type": "object", "properties": { - "id": { - "type": "string", - "title": "The name of the instance" - }, - "description": { - "type": "string", - "title": "A short description of the instance" - }, - "vcpu": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "google.rpc.Status": { + "type": "object", + "properties": { + "code": { "type": "integer", - "format": "int64", - "description": "The number of cpus. Deprecated. Use vcpu_shares instead." - }, - "memory": { - "type": "string", - "title": "The memory in bytes in a format like 5MB" - }, - "disk": { - "type": "string", - "title": "The size of the disk in bytes in a format like 5MB" - }, - "price_per_second": { - "type": "string", - "title": "The price to pay per second" - }, - "price_hourly": { - "type": "string", - "title": "The price to pay per hour" + "format": "int32" }, - "price_monthly": { - "type": "string", - "title": "The price to pay per month" + "message": { + "type": "string" }, - "regions": { + "details": { "type": "array", "items": { - "type": "string" - }, - "title": "The regions where this instance type is available" - }, + "$ref": "#/definitions/google.protobuf.Any" + } + } + } + }, + "Error": { + "type": "object", + "properties": { "status": { - "type": "string", - "title": "The status of the instance" + "type": "integer", + "format": "int32" }, - "require_plan": { - "type": "array", - "items": { - "type": "string" - }, - "title": "The plan required to use instance" + "code": { + "type": "string" }, - "vcpu_shares": { - "type": "number", - "format": "float", - "description": "The number of vcpu shares reserved for the instance." + "message": { + "type": "string" + } + } + }, + "ErrorField": { + "type": "object", + "properties": { + "field": { + "type": "string" }, - "display_name": { - "type": "string", - "title": "The display name of the instance" + "description": { + "type": "string" + } + } + }, + "ErrorWithFields": { + "type": "object", + "properties": { + "status": { + "type": "integer", + "format": "int32" }, - "aliases": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "fields": { "type": "array", "items": { - "type": "string" - }, - "title": "Aliases" + "$ref": "#/definitions/ErrorField" + } + } + } + }, + "ksearch.App": { + "type": "object", + "properties": { + "id": { + "type": "string" }, - "type": { - "type": "string", - "title": "The type of the instance (e.g. \"gpu\")" + "organization_id": { + "type": "string" }, - "gpu": { - "$ref": "#/definitions/CatalogGPUDetails", - "title": "GPU details" + "name": { + "type": "string" + } + } + }, + "ksearch.GlobalDeployment": { + "type": "object", + "properties": { + "id": { + "type": "string" }, - "service_types": { - "type": "array", - "items": { - "type": "string" - }, - "title": "Allowed service types for this instance (e.g. [\"web\", \"worker\"])" + "organization_id": { + "type": "string" }, - "volumes_enabled": { - "type": "boolean", - "title": "Are the volumes enabled for this instance type" + "app_id": { + "type": "string" }, - "light_sleep_enabled": { - "type": "boolean", - "title": "Is light sleep enabled for this instance type" + "service_id": { + "type": "string" } } }, - "CatalogInstanceListItem": { + "ksearch.Instance": { "type": "object", "properties": { "id": { - "type": "string", - "title": "The name of the instance" + "type": "string" }, - "description": { - "type": "string", - "title": "A short description of the instance" + "organization_id": { + "type": "string" }, - "vcpu": { - "type": "integer", - "format": "int64", - "description": "The number of cpus. Deprecated. Use vcpu_shares instead." + "app_id": { + "type": "string" }, - "memory": { - "type": "string", - "title": "The memory in bytes in a format like 5MB" + "service_id": { + "type": "string" }, - "disk": { - "type": "string", - "title": "The size of the disk in bytes in a format like 5MB" + "allocation_id": { + "type": "string" + } + } + }, + "ksearch.Organization": { + "type": "object", + "properties": { + "id": { + "type": "string" }, - "price_per_second": { - "type": "string", - "title": "The price to pay per second" + "name": { + "type": "string" + } + } + }, + "ksearch.RegionalDeployment": { + "type": "object", + "properties": { + "id": { + "type": "string" }, - "price_hourly": { - "type": "string", - "title": "The price to pay per hour" + "organization_id": { + "type": "string" }, - "price_monthly": { - "type": "string", - "title": "The price to pay per month" + "app_id": { + "type": "string" }, - "regions": { + "service_id": { + "type": "string" + }, + "region": { + "type": "string" + } + } + }, + "ksearch.SearchReply": { + "type": "object", + "properties": { + "organizations": { "type": "array", "items": { - "type": "string" - }, - "title": "The regions where this instance type is available" - }, - "status": { - "type": "string", - "title": "The status of the instance" + "$ref": "#/definitions/ksearch.Organization" + } }, - "require_plan": { + "users": { "type": "array", "items": { - "type": "string" - }, - "title": "The plan required to use instance" - }, - "vcpu_shares": { - "type": "number", - "format": "float", - "description": "The number of vcpu shares reserved for the instance." - }, - "display_name": { - "type": "string", - "title": "The display name of the instance" + "$ref": "#/definitions/ksearch.User" + } }, - "aliases": { + "apps": { "type": "array", "items": { - "type": "string" - }, - "title": "Aliases" - }, - "type": { - "type": "string", - "title": "The type of the instance (e.g. \"gpu\")" - }, - "gpu": { - "$ref": "#/definitions/CatalogGPUDetails", - "title": "GPU details" + "$ref": "#/definitions/ksearch.App" + } }, - "service_types": { + "services": { "type": "array", "items": { - "type": "string" - }, - "title": "Allowed service types for this instance (e.g. [\"web\", \"worker\"])" - }, - "volumes_enabled": { - "type": "boolean", - "title": "Are the volumes enabled for this instance type" + "$ref": "#/definitions/ksearch.Service" + } }, - "light_sleep_enabled": { - "type": "boolean", - "title": "Is light sleep enabled for this instance type" - } - } - }, - "GetCatalogInstanceReply": { - "type": "object", - "properties": { - "instance": { - "$ref": "#/definitions/CatalogInstance", - "title": "The instance retrieved" - } - } - }, - "ListCatalogInstancesReply": { - "type": "object", - "properties": { - "instances": { + "global_deployments": { + "type": "array", + "items": { + "$ref": "#/definitions/ksearch.GlobalDeployment" + } + }, + "regional_deployments": { "type": "array", "items": { - "$ref": "#/definitions/CatalogInstanceListItem" + "$ref": "#/definitions/ksearch.RegionalDeployment" } }, - "limit": { - "type": "integer", - "format": "int64", - "title": "The limit in the request" - }, - "offset": { - "type": "integer", - "format": "int64", - "title": "The offset in the request" - }, - "count": { - "type": "integer", - "format": "int64", - "title": "The total number of items" + "instances": { + "type": "array", + "items": { + "$ref": "#/definitions/ksearch.Instance" + } } } }, - "AvailabilityLevel": { - "type": "string", - "enum": [ - "UNKNOWN", - "LOW", - "MEDIUM", - "HIGH" - ], - "default": "UNKNOWN" - }, - "CatalogUsage": { + "ksearch.Service": { "type": "object", "properties": { - "instances": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/InstanceAvailability" - } + "id": { + "type": "string" + }, + "organization_id": { + "type": "string" + }, + "app_id": { + "type": "string" + }, + "name": { + "type": "string" } } }, - "InstanceAvailability": { + "ksearch.User": { "type": "object", "properties": { - "regions": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/RegionAvailability" - } + "id": { + "type": "string" }, - "availability": { - "$ref": "#/definitions/AvailabilityLevel" + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "github_user": { + "type": "string" } } }, - "ListUsageReply": { + "kgitproxy.Branch": { "type": "object", "properties": { - "usage": { - "$ref": "#/definitions/CatalogUsage", - "title": "The Usage retrieved" + "id": { + "type": "string" + }, + "organization_id": { + "type": "string" + }, + "repository_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "is_default": { + "type": "boolean" + }, + "is_protected": { + "type": "boolean" + }, + "provider": { + "$ref": "#/definitions/kgitproxy.RepositoryProvider" } } }, - "RegionAvailability": { + "kgitproxy.GitHubRepository": { "type": "object", "properties": { - "availability": { - "$ref": "#/definitions/AvailabilityLevel" + "github_id": { + "type": "string" } } }, - "GetRegionReply": { + "kgitproxy.ListBranchesReply": { "type": "object", "properties": { - "region": { - "$ref": "#/definitions/Region", - "title": "The Region retrieved" + "branches": { + "type": "array", + "items": { + "$ref": "#/definitions/kgitproxy.Branch" + }, + "description": "The collection of branches." + }, + "limit": { + "type": "integer", + "format": "int64", + "description": "The limit in the request." + }, + "offset": { + "type": "integer", + "format": "int64", + "description": "The offset in the request." + }, + "count": { + "type": "integer", + "format": "int64", + "description": "The total number of items." } } }, - "ListRegionsReply": { + "kgitproxy.ListRepositoriesReply": { "type": "object", "properties": { - "regions": { + "repositories": { "type": "array", "items": { - "$ref": "#/definitions/RegionListItem" - } + "$ref": "#/definitions/kgitproxy.Repository" + }, + "description": "The collection of repositories." }, "limit": { "type": "integer", "format": "int64", - "title": "The limit in the request" + "description": "The limit in the request." }, "offset": { "type": "integer", "format": "int64", - "title": "The offset in the request" + "description": "The offset in the request." }, "count": { "type": "integer", "format": "int64", - "title": "The total number of items" + "description": "The total number of items." } } }, - "Region": { + "kgitproxy.Repository": { "type": "object", "properties": { "id": { - "type": "string", - "title": "The id of the region" + "type": "string" + }, + "organization_id": { + "type": "string" }, "name": { - "type": "string", - "title": "The name of the region" + "type": "string" }, - "coordinates": { - "type": "array", - "items": { - "type": "string" - }, - "title": "The coordinates of the region (lat/long)" + "url": { + "type": "string" }, - "status": { + "description": { + "type": "string" + }, + "is_private": { + "type": "boolean" + }, + "is_disabled": { + "type": "boolean" + }, + "default_branch": { + "type": "string" + }, + "provider": { + "$ref": "#/definitions/kgitproxy.RepositoryProvider" + }, + "last_push_date": { "type": "string", - "title": "The status of the region" + "format": "date-time" }, - "instances": { + "github": { + "$ref": "#/definitions/kgitproxy.GitHubRepository" + } + } + }, + "kgitproxy.RepositoryProvider": { + "type": "string", + "enum": [ + "INVALID_PROVIDER", + "GITHUB" + ], + "default": "INVALID_PROVIDER" + }, + "kgitproxy.ResyncOrganizationReply": { + "type": "object" + }, + "CreateStageAttemptReply": { + "type": "object" + }, + "DeclareStageProgressReply": { + "type": "object" + }, + "DeclareStepProgressReply": { + "type": "object" + }, + "DeploymentProvisioningInfo.Stage.Status": { + "type": "string", + "enum": [ + "UNKNOWN", + "PENDING", + "RUNNING", + "FAILED", + "COMPLETED", + "ABORTED" + ], + "default": "UNKNOWN" + }, + "AppUsage": { + "type": "object", + "properties": { + "app_id": { + "type": "string" + }, + "app_name": { + "type": "string" + }, + "services": { "type": "array", "items": { - "type": "string" - }, - "title": "A list of instances available in this region" + "$ref": "#/definitions/ServiceUsage" + } }, - "datacenters": { + "databases": { "type": "array", "items": { - "type": "string" - }, - "title": "A list of datacenters available in this region" + "$ref": "#/definitions/DatabaseUsage" + } + } + } + }, + "DatabaseUsage": { + "type": "object", + "properties": { + "service_id": { + "type": "string" }, - "volumes_enabled": { - "type": "boolean", - "title": "Are the volumes enabled for this instance type" + "service_name": { + "type": "string" + }, + "compute_time_seconds": { + "type": "integer", + "format": "int64" }, - "scope": { - "type": "string", - "description": "The scope of the region, continent, metropolitan area, etc." + "data_storage_megabytes_hours": { + "type": "integer", + "format": "int64" } } }, - "RegionListItem": { + "DatabaseUsageDetails": { "type": "object", "properties": { - "id": { - "type": "string", - "title": "The id of the region" + "organization_id": { + "type": "string" }, - "name": { - "type": "string", - "title": "The name of the region" + "app_id": { + "type": "string" }, - "coordinates": { - "type": "array", - "items": { - "type": "string" - }, - "title": "The coordinates of the region (lat/long)" + "app_name": { + "type": "string" }, - "status": { - "type": "string", - "title": "The status of the region" + "service_id": { + "type": "string" }, - "instances": { - "type": "array", - "items": { - "type": "string" - }, - "title": "A list of instances available in this region" + "service_name": { + "type": "string" }, - "datacenters": { - "type": "array", - "items": { - "type": "string" - }, - "title": "A list of datacenters available in this region" + "compute_time_seconds": { + "type": "integer", + "format": "int64" }, - "volumes_enabled": { - "type": "boolean", - "title": "Are the volumes enabled for this instance type" + "data_storage_megabytes_hour": { + "type": "integer", + "format": "int64" }, - "scope": { + "started_at": { "type": "string", - "description": "The scope of the region, continent, metropolitan area, etc." + "format": "date-time" + }, + "terminated_at": { + "type": "string", + "format": "date-time" } } }, - "ListOrganizationMembersReply": { + "GetOrganizationUsageDetailsReply": { "type": "object", "properties": { - "members": { + "usage_details": { "type": "array", "items": { - "$ref": "#/definitions/OrganizationMember" + "$ref": "#/definitions/UsageDetails" }, - "title": "The collection of organization members" + "title": "The collection of usage instances" + }, + "database_details": { + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseUsageDetails" + }, + "title": "The collection of database deployments used during the month" }, "limit": { "type": "integer", @@ -13848,453 +14233,357 @@ "type": "integer", "format": "int64", "title": "The total number of items" + }, + "order": { + "type": "string", + "title": "The order in the request" } } }, - "Organization.Status": { - "type": "string", - "enum": [ - "WARNING", - "LOCKED", - "ACTIVE", - "DEACTIVATING", - "DEACTIVATED", - "DELETING", - "DELETED" - ], - "default": "WARNING" + "GetOrganizationUsageReply": { + "type": "object", + "properties": { + "usage": { + "$ref": "#/definitions/Usage", + "title": "The computed usage of instances per month" + } + } }, - "OrganizationMember": { + "InstanceUsage": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "organization_id": { - "type": "string" - }, - "user_id": { - "type": "string" - }, - "external_id": { - "type": "string" - }, - "joined_at": { + "duration_seconds": { + "type": "integer", + "format": "int64" + } + } + }, + "PeriodUsage": { + "type": "object", + "properties": { + "starting_time": { "type": "string", "format": "date-time" }, - "role": { - "$ref": "#/definitions/UserRole.Role" - }, - "status": { - "$ref": "#/definitions/OrganizationMember.Status" - }, - "user": { - "$ref": "#/definitions/PublicUser" + "ending_time": { + "type": "string", + "format": "date-time" }, - "organization": { - "$ref": "#/definitions/PublicOrganization" + "apps": { + "type": "array", + "items": { + "$ref": "#/definitions/AppUsage" + } } } }, - "OrganizationMember.Status": { - "type": "string", - "enum": [ - "INVALID", - "ACTIVE", - "DELETED" - ], - "default": "INVALID" - }, - "Plan": { - "type": "string", - "enum": [ - "hobby", - "starter", - "startup", - "business", - "enterprise", - "internal", - "hobby23", - "no_plan", - "pro", - "scale", - "partner_csp", - "partner_csp_unit" - ], - "default": "hobby" + "RegionUsage": { + "type": "object", + "properties": { + "instances": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/InstanceUsage" + } + } + } }, - "PublicOrganization": { + "ServiceUsage": { "type": "object", "properties": { - "id": { + "service_id": { "type": "string" }, - "name": { + "service_name": { "type": "string" }, - "plan": { - "$ref": "#/definitions/Plan" - }, - "status": { - "$ref": "#/definitions/Organization.Status" - }, - "external_id": { + "regions": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/RegionUsage" + } + } + } + }, + "Usage": { + "type": "object", + "properties": { + "organization_id": { "type": "string" + }, + "periods": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/PeriodUsage" + } } } }, - "PublicUser": { + "UsageDetails": { "type": "object", "properties": { - "id": { + "organization_id": { "type": "string" }, - "email": { + "instance_id": { "type": "string" }, - "name": { + "app_id": { "type": "string" }, - "avatar_url": { + "app_name": { "type": "string" }, - "github_id": { + "service_id": { "type": "string" }, - "github_user": { + "service_name": { + "type": "string" + }, + "regional_deployment_id": { + "type": "string" + }, + "region": { "type": "string" - } - } - }, - "RemoveOrganizationMemberReply": { - "type": "object", - "properties": { - "member": { - "$ref": "#/definitions/OrganizationMember" - } - } - }, - "UserRole.Role": { - "type": "string", - "enum": [ - "INVALID", - "OWNER" - ], - "default": "INVALID" - }, - "Error": { - "type": "object", - "properties": { - "status": { - "type": "integer", - "format": "int32" }, - "code": { + "deployment_id": { "type": "string" }, - "message": { + "instance_type": { "type": "string" + }, + "duration_seconds": { + "type": "integer", + "format": "int64" + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "terminated_at": { + "type": "string", + "format": "date-time" } } }, - "ErrorField": { + "google.protobuf.NullValue": { + "type": "string", + "enum": [ + "NULL_VALUE" + ], + "default": "NULL_VALUE", + "description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\n The JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value." + }, + "BasicAuthPolicy": { "type": "object", "properties": { - "field": { + "username": { "type": "string" }, - "description": { + "password": { "type": "string" } } }, - "ErrorWithFields": { + "SecurityPolicies": { "type": "object", "properties": { - "status": { - "type": "integer", - "format": "int32" - }, - "code": { - "type": "string" - }, - "message": { - "type": "string" + "basic_auths": { + "type": "array", + "items": { + "$ref": "#/definitions/BasicAuthPolicy" + } }, - "fields": { + "api_keys": { "type": "array", "items": { - "$ref": "#/definitions/ErrorField" + "type": "string" } } } }, - "ConfirmPaymentAuthorizationReply": { - "type": "object", - "properties": { - "payment_method": { - "$ref": "#/definitions/PaymentMethod" - } - } - }, - "CreatePaymentAuthorizationReply": { + "ArchiveDeploymentMetadata": { "type": "object", "properties": { - "payment_method": { - "$ref": "#/definitions/PaymentMethod" + "last_provisioned_deployment_id": { + "type": "string" } } }, - "CreatePaymentAuthorizationRequest": { - "type": "object" - }, - "DeletePaymentMethodReply": { - "type": "object" - }, - "GetPaymentMethodReply": { + "ArchiveSource": { "type": "object", "properties": { - "payment_method": { - "$ref": "#/definitions/PaymentMethod" + "id": { + "type": "string", + "title": "The ID of the archive to deploy" + }, + "buildpack": { + "$ref": "#/definitions/BuildpackBuilder" + }, + "docker": { + "$ref": "#/definitions/DockerBuilder" } } }, - "ListPaymentMethodsReply": { + "AutoRelease": { "type": "object", "properties": { - "payment_methods": { + "groups": { "type": "array", "items": { - "$ref": "#/definitions/PaymentMethod" - }, - "title": "The collection of payment methods" - }, - "limit": { - "type": "integer", - "format": "int64", - "title": "The limit in the request" - }, - "offset": { - "type": "integer", - "format": "int64", - "title": "The offset in the request" - }, - "count": { - "type": "integer", - "format": "int64", - "title": "The total number of items" + "$ref": "#/definitions/AutoRelease.Group" + } } } }, - "PaymentMethod": { + "AutoRelease.Group": { "type": "object", "properties": { - "id": { + "name": { "type": "string" }, - "created_at": { - "type": "string", - "format": "date-time" + "repository": { + "type": "string" }, - "updated_at": { + "git_ref": { "type": "string", - "format": "date-time" + "title": "A git ref to track (.e.g: refs/tags/ or refs/heads/" }, - "version": { + "latest_sha": { "type": "string", - "format": "uint64" - }, - "organization_id": { - "type": "string" - }, - "type": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "status": { - "$ref": "#/definitions/PaymentMethod.Status" - }, - "messages": { + "title": "The last hash that was resolved (used to avoid triggering releases when things haven't changed)" + } + }, + "title": "Configuration extracted from the latest deployment in this deployment_group" + }, + "AutocompleteReply": { + "type": "object", + "properties": { + "secrets": { "type": "array", "items": { "type": "string" - } - }, - "stripe_payment_method_id": { - "type": "string" - }, - "authorization_verified_at": { - "type": "string", - "format": "date-time" - }, - "authorization_canceled_at": { - "type": "string", - "format": "date-time" - }, - "authorization_stripe_payment_intent_id": { - "type": "string" - }, - "authorization_stripe_payment_intent_client_secret": { - "type": "string" - }, - "card_brand": { - "type": "string" - }, - "card_country": { - "type": "string" - }, - "card_funding": { - "type": "string" - }, - "card_fingerprint": { - "type": "string" - }, - "card_last_digits": { - "type": "string" + }, + "title": "List of available secrets" }, - "card_expiration_month": { - "type": "integer", - "format": "int64" + "user_env": { + "type": "array", + "items": { + "type": "string" + }, + "title": "List of available user's environment variables" }, - "card_expiration_year": { - "type": "integer", - "format": "int64" + "system_env": { + "type": "array", + "items": { + "type": "string" + }, + "title": "List of available system's environment variables" } } }, - "PaymentMethod.Status": { - "type": "string", - "enum": [ - "INVALID", - "CREATED", - "AUTHORIZED", - "DECLINED", - "CANCELED", - "EXPIRED", - "UNCHECKED" - ], - "default": "INVALID" - }, - "DeleteUserReply": { + "AutocompleteRequest": { "type": "object", "properties": { - "user": { - "$ref": "#/definitions/User" + "definition": { + "$ref": "#/definitions/DeploymentDefinition", + "title": "Deployment definition" } } }, - "User": { + "BuildpackBuilder": { "type": "object", - "example": { - "id": "78352123-a06f-4ec2-81ed-27a056725385", - "email": "john@snow.com", - "name": "John Snow", - "avatar_url": "https://www.gravatar.com/avatar/00000000000000000000000000000000", - "is_admin": false, - "is_test": true, - "two_factor_authentication": false, - "last_login": "0001-01-01T00:00:00Z", - "last_login_id": "10.1.1.1", - "updated_at": "0001-01-01T00:00:00Z", - "created_at": "0001-01-01T00:00:00Z", - "newsletter_subscribed": true, - "email_validated": true - }, "properties": { - "id": { - "type": "string" - }, - "email": { - "type": "string" - }, - "avatar_url": { - "type": "string" - }, - "two_factor_authentication": { - "type": "boolean" - }, - "last_login": { - "type": "string", - "format": "date-time" - }, - "last_login_ip": { - "type": "string" + "build_command": { + "type": "string", + "title": "A command used to override the build command, run after all build steps" }, - "updated_at": { + "run_command": { "type": "string", - "format": "date-time" + "title": "A command used to override the default run command" }, - "created_at": { + "privileged": { + "type": "boolean", + "title": "A flag to run the container in privileged mode" + } + } + }, + "ConfigFile": { + "type": "object", + "properties": { + "path": { "type": "string", - "format": "date-time" + "title": "the path where the file is copied" }, - "newsletter_subscribed": { - "type": "boolean" + "permissions": { + "type": "string", + "title": "the permissions of the file in format 0644" }, - "github_id": { + "content": { + "type": "string", + "title": "the content of the file" + } + } + }, + "CreateService": { + "type": "object", + "properties": { + "app_id": { "type": "string" }, - "github_user": { - "type": "string" + "definition": { + "$ref": "#/definitions/DeploymentDefinition" }, - "flags": { - "type": "array", - "items": { - "$ref": "#/definitions/UserFlags" - } + "life_cycle": { + "$ref": "#/definitions/ServiceLifeCycle" }, - "name": { - "type": "string" + "project_id": { + "type": "string", + "title": "(Optional) The project ID to associate with the service" }, - "email_validated": { - "type": "boolean" + "instance_snapshot_id": { + "type": "string", + "title": "Instance Snapshot used to boot the Instances of this deployment\nWith a Full Snapshot, definition must not be provided" }, - "trialed": { - "type": "boolean" + "name": { + "type": "string", + "title": "Service name, set at creation time only. If empty, fallback to definition.name" } - }, - "title": "Represent a User" + } }, - "UserFlags": { - "type": "string", - "enum": [ - "ADMIN", - "TEST", - "RESTRICTED", - "ACTIVE", - "BETA", - "MAX_ORGANIZATIONS_25", - "MAX_ORGANIZATIONS_100", - "MAX_ORGANIZATIONS_1000", - "MAX_ORGANIZATIONS_10000", - "MAX_ORGANIZATIONS_100000", - "MAX_ORGANIZATIONS_1000000", - "PARTNER_CSP", - "IGNORE_ORGANIZATION_NAME_RESERVATION_RULE_NEON_PREFIX" - ], - "default": "ADMIN", - "title": "- ADMIN: A user is an admin user\n - TEST: A user is a test user\n - RESTRICTED: Whether this account as restricted access\n - ACTIVE: Whether this account is active\n - BETA: Account in beta program\n - MAX_ORGANIZATIONS_25: User can create this much organizations, overriding the default amount\n - PARTNER_CSP: User can create sub-organizations\n - IGNORE_ORGANIZATION_NAME_RESERVATION_RULE_NEON_PREFIX: User can bypass organization name reservations rules" + "CreateServiceReply": { + "type": "object", + "properties": { + "service": { + "$ref": "#/definitions/Service", + "title": "The entity created" + } + } }, - "GetIntercomProfileReply": { + "DatabaseDeploymentMetadata": { "type": "object", "properties": { - "hash": { - "type": "string" + "neon_postgres": { + "$ref": "#/definitions/NeonPostgresDatabaseDeploymentMetadata" } } }, - "GetSubscriptionReply": { + "DatabaseSource": { "type": "object", "properties": { - "subscription": { - "$ref": "#/definitions/Subscription" + "neon_postgres": { + "$ref": "#/definitions/NeonPostgresDatabase" } } }, - "Subscription": { + "DeleteServiceReply": { + "type": "object" + }, + "DeleteServiceScalingReply": { + "type": "object", + "title": "Empty reply - success is indicated by no error" + }, + "Deployment": { "type": "object", "properties": { "id": { @@ -14308,1103 +14597,1326 @@ "type": "string", "format": "date-time" }, - "version": { - "type": "string", - "format": "uint64" - }, - "organization_id": { - "type": "string" - }, - "stripe_subscription_id": { - "type": "string" - }, - "status": { - "$ref": "#/definitions/Subscription.Status" - }, - "messages": { - "type": "array", - "items": { - "type": "string" - } - }, - "has_pending_update": { - "type": "boolean" - }, - "stripe_pending_invoice_id": { - "type": "string" - }, - "terminate_at": { - "type": "string", - "format": "date-time" - }, - "canceled_at": { + "allocated_at": { "type": "string", "format": "date-time" }, - "terminated_at": { + "started_at": { "type": "string", "format": "date-time" }, - "current_period_start": { + "succeeded_at": { "type": "string", "format": "date-time" }, - "current_period_end": { + "terminated_at": { "type": "string", "format": "date-time" }, - "currency": { + "organization_id": { "type": "string" }, - "amount_payable": { - "type": "string", - "format": "int64" - }, - "amount_paid": { - "type": "string", - "format": "int64" - }, - "amount_remaining": { - "type": "string", - "format": "int64" - }, - "payment_failure": { - "$ref": "#/definitions/Subscription.PaymentFailure" + "project_id": { + "type": "string" }, - "trialing": { - "type": "boolean" + "app_id": { + "type": "string" }, - "trial_ends_at": { - "type": "string", - "format": "date-time" + "service_id": { + "type": "string" }, - "trial_max_spend": { - "type": "string", - "format": "int64" + "parent_id": { + "type": "string" }, - "current_spend": { - "type": "string", - "format": "int64" - } - } - }, - "Subscription.PaymentFailure": { - "type": "object", - "properties": { - "failed_at": { - "type": "string", - "format": "date-time" + "child_id": { + "type": "string" }, - "next_attempt": { - "type": "string", - "format": "date-time" + "status": { + "$ref": "#/definitions/Deployment.Status" }, - "attempt_count": { - "type": "string", - "format": "int64" + "metadata": { + "$ref": "#/definitions/DeploymentMetadata" }, - "error_code": { - "type": "string" + "definition": { + "$ref": "#/definitions/DeploymentDefinition" }, - "error_reason": { - "type": "string" + "messages": { + "type": "array", + "items": { + "type": "string" + } }, - "error_type": { - "type": "string" + "provisioning_info": { + "$ref": "#/definitions/DeploymentProvisioningInfo" }, - "error_message": { - "type": "string" + "database_info": { + "$ref": "#/definitions/DeploymentDatabaseInfo" }, - "payment_method_required": { + "skip_build": { "type": "boolean" }, - "redirect_url": { - "type": "string" + "role": { + "$ref": "#/definitions/Deployment.Role" }, - "stripe_sdk": { - "$ref": "#/definitions/Subscription.PaymentFailure.StripeSDK" - } - } - }, - "Subscription.PaymentFailure.StripeSDK": { - "type": "object", - "properties": { - "client_secret_key": { - "type": "string" + "version": { + "type": "string", + "format": "uint64" }, - "raw_json": { + "deployment_group": { "type": "string" + }, + "instance_snapshot_id": { + "type": "string", + "title": "Instance Snapshot used to boot the Instances of this deployment" } } }, - "Subscription.Status": { + "Deployment.Role": { "type": "string", - "enum": [ - "INVALID", - "CREATED", - "ACTIVE", - "WARNING", - "URGENT", - "CANCELING", - "CANCELED", - "TERMINATING", - "TERMINATED" + "enum": [ + "INVALID", + "ACTIVE", + "UPCOMING", + "CURRENT" ], "default": "INVALID" }, - "google.protobuf.NullValue": { + "Deployment.Status": { "type": "string", "enum": [ - "NULL_VALUE" + "PENDING", + "PROVISIONING", + "SCHEDULED", + "CANCELING", + "CANCELED", + "ALLOCATING", + "STARTING", + "HEALTHY", + "DEGRADED", + "UNHEALTHY", + "STOPPING", + "STOPPED", + "ERRORING", + "ERROR", + "STASHED", + "SLEEPING" ], - "default": "NULL_VALUE", - "description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\n The JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value." + "default": "PENDING" }, - "AcceptOrganizationInvitationReply": { + "DeploymentDatabaseInfo": { "type": "object", "properties": { - "invitation": { - "$ref": "#/definitions/OrganizationInvitation", - "title": "The organization invitation accepted" + "neon_postgres": { + "$ref": "#/definitions/DeploymentNeonPostgresDatabaseInfo" } } }, - "Action": { - "type": "string", - "enum": [ - "signin", - "signup", - "register" - ], - "default": "signin" - }, - "Budget": { + "DeploymentDefinition": { "type": "object", "properties": { - "amount": { + "name": { "type": "string", - "format": "int64" + "description": "Service name. Deprecated, set it directly in the Service when creating it." }, - "thresholds": { + "type": { + "$ref": "#/definitions/DeploymentDefinition.Type" + }, + "strategy": { + "$ref": "#/definitions/DeploymentStrategy" + }, + "routes": { "type": "array", "items": { - "type": "string", - "format": "int64" + "$ref": "#/definitions/DeploymentRoute" } - } - } - }, - "CannyAuthReply": { - "type": "object", - "properties": { - "token": { - "type": "string" - } - } - }, - "CannyAuthRequest": { - "type": "object" - }, - "ClearIdenfyVerificationResultReply": { - "type": "object" - }, - "ClearIdenfyVerificationResultRequest": { - "type": "object", - "properties": { - "user_id": { - "type": "string" }, - "organization_id": { - "type": "string" + "ports": { + "type": "array", + "items": { + "$ref": "#/definitions/DeploymentPort" + } + }, + "proxy_ports": { + "type": "array", + "items": { + "$ref": "#/definitions/DeploymentProxyPort" + } + }, + "env": { + "type": "array", + "items": { + "$ref": "#/definitions/DeploymentEnv" + } + }, + "regions": { + "type": "array", + "items": { + "type": "string" + } + }, + "scalings": { + "type": "array", + "items": { + "$ref": "#/definitions/DeploymentScaling" + } + }, + "instance_types": { + "type": "array", + "items": { + "$ref": "#/definitions/DeploymentInstanceType" + } + }, + "health_checks": { + "type": "array", + "items": { + "$ref": "#/definitions/DeploymentHealthCheck" + } + }, + "volumes": { + "type": "array", + "items": { + "$ref": "#/definitions/DeploymentVolume" + } + }, + "config_files": { + "type": "array", + "items": { + "$ref": "#/definitions/ConfigFile" + } + }, + "skip_cache": { + "type": "boolean" + }, + "mesh": { + "$ref": "#/definitions/DeploymentMesh" + }, + "network_policy": { + "$ref": "#/definitions/NetworkPolicy" + }, + "docker": { + "$ref": "#/definitions/DockerSource" + }, + "git": { + "$ref": "#/definitions/GitSource" + }, + "database": { + "$ref": "#/definitions/DatabaseSource" + }, + "archive": { + "$ref": "#/definitions/ArchiveSource" } } }, - "CreateAccessTokenReply": { - "type": "object", - "properties": { - "token": { - "type": "string" - } - } + "DeploymentDefinition.Type": { + "type": "string", + "enum": [ + "INVALID", + "WEB", + "WORKER", + "DATABASE", + "SANDBOX" + ], + "default": "INVALID" }, - "CreateAccountRequest": { + "DeploymentEnv": { "type": "object", - "example": { - "email": "john@snow.com", - "password": "..." - }, "properties": { - "email": { - "type": "string" + "scopes": { + "type": "array", + "items": { + "type": "string" + } }, - "password": { + "key": { "type": "string" }, - "name": { + "value": { "type": "string" }, - "captcha": { - "type": "string" - } - }, - "description": "Create new account", - "title": "Create new account", - "required": [ - "email", - "password" - ] - }, - "CreateBudgetReply": { - "type": "object", - "properties": { - "budget": { - "$ref": "#/definitions/Budget" - } - } - }, - "CreateOrganizationReply": { - "type": "object", - "properties": { - "organization": { - "$ref": "#/definitions/Organization" - } - } - }, - "CreateOrganizationRequest": { - "type": "object", - "properties": { - "name": { + "secret": { "type": "string" } } }, - "DeactivateOrganizationReply": { - "type": "object", - "properties": { - "organization": { - "$ref": "#/definitions/Organization" - } - } - }, - "DeclineOrganizationInvitationReply": { - "type": "object", - "properties": { - "invitation": { - "$ref": "#/definitions/OrganizationInvitation", - "title": "The organization invitation declined" - } - } - }, - "DeleteBudgetReply": { - "type": "object" - }, - "DeleteOrganizationReply": { - "type": "object", - "properties": { - "organization": { - "$ref": "#/definitions/Organization" - } - } - }, - "DiscourseAuthReply": { + "DeploymentHealthCheck": { "type": "object", "properties": { - "sso": { - "type": "string" + "grace_period": { + "type": "integer", + "format": "int64", + "title": "An optional initial period in seconds to wait for the instance to become healthy, default is 5s" }, - "sig": { - "type": "string" + "interval": { + "type": "integer", + "format": "int64", + "title": "An optional period in seconds between two health checks, default is 60s" + }, + "restart_limit": { + "type": "integer", + "format": "int64", + "title": "An optional number of consecutive failures before attempting to restart the service, default is 3" + }, + "timeout": { + "type": "integer", + "format": "int64", + "title": "An optional maximum time to wait in seconds before considering the check as a failure, default is 5s" + }, + "tcp": { + "$ref": "#/definitions/TCPHealthCheck" + }, + "http": { + "$ref": "#/definitions/HTTPHealthCheck" } } }, - "DiscourseAuthRequest": { + "DeploymentInstanceType": { "type": "object", "properties": { - "payload": { - "type": "string" + "scopes": { + "type": "array", + "items": { + "type": "string" + } }, - "sig": { + "type": { "type": "string" } } }, - "GetBudgetReply": { + "DeploymentMesh": { + "type": "string", + "enum": [ + "DEPLOYMENT_MESH_AUTO", + "DEPLOYMENT_MESH_ENABLED", + "DEPLOYMENT_MESH_DISABLED" + ], + "default": "DEPLOYMENT_MESH_AUTO" + }, + "DeploymentMetadata": { "type": "object", "properties": { - "budget": { - "$ref": "#/definitions/Budget" + "trigger": { + "$ref": "#/definitions/TriggerDeploymentMetadata" + }, + "database": { + "$ref": "#/definitions/DatabaseDeploymentMetadata" + }, + "git": { + "$ref": "#/definitions/GitDeploymentMetadata" + }, + "archive": { + "$ref": "#/definitions/ArchiveDeploymentMetadata" + }, + "proxy_ports": { + "type": "array", + "items": { + "$ref": "#/definitions/DeploymentProxyPortMetadata" + } + }, + "sandbox": { + "$ref": "#/definitions/SandboxMetadata" } } }, - "GetGithubInstallationReply": { + "DeploymentNeonPostgresDatabaseInfo": { "type": "object", "properties": { - "installation_id": { - "type": "string" + "active_time_seconds": { + "type": "string", + "format": "int64" }, - "installation_url": { - "type": "string" + "compute_time_seconds": { + "type": "string", + "format": "int64" }, - "name": { - "type": "string" + "written_data_bytes": { + "type": "string", + "format": "int64" }, - "avatar_url": { + "data_transfer_bytes": { + "type": "string", + "format": "int64" + }, + "data_storage_bytes_hour": { + "type": "string", + "format": "int64" + }, + "server_host": { "type": "string" }, - "status": { - "$ref": "#/definitions/kgitproxy.GithubInstallation.Status" + "server_port": { + "type": "integer", + "format": "int64" }, - "installed_at": { - "type": "string", - "format": "date-time" + "endpoint_state": { + "type": "string" }, - "suspended_at": { + "endpoint_last_active": { "type": "string", "format": "date-time" }, - "indexing_status": { - "$ref": "#/definitions/kgitproxy.IndexingStatus" + "default_branch_id": { + "type": "string" }, - "indexed_repositories": { - "type": "integer", - "format": "int64" + "default_branch_name": { + "type": "string" }, - "total_repositories": { - "type": "integer", + "default_branch_state": { + "type": "string" + }, + "default_branch_logical_size": { + "type": "string", "format": "int64" + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/DeploymentNeonPostgresDatabaseInfoRole" + } } } }, - "GetIdenfyTokenReply": { + "DeploymentNeonPostgresDatabaseInfoRole": { "type": "object", "properties": { - "auth_token": { + "name": { + "type": "string" + }, + "secret_id": { "type": "string" } } }, - "GetOAuthOptionsReply": { + "DeploymentPort": { "type": "object", "properties": { - "oauth_providers": { - "type": "array", - "items": { - "$ref": "#/definitions/OAuthProvider" - } + "port": { + "type": "integer", + "format": "int64" + }, + "protocol": { + "type": "string", + "title": "One of http, http2, tcp" } - }, - "description": "A list of providers which you can use for single sign-on." + } }, - "GetOrganizationReply": { + "DeploymentProvisioningInfo": { "type": "object", "properties": { - "organization": { - "$ref": "#/definitions/Organization" + "sha": { + "type": "string", + "description": "The git sha for this build (we resolve the reference at the start of the build)." + }, + "image": { + "type": "string", + "description": "The docker image built as a result of this build." + }, + "stages": { + "type": "array", + "items": { + "$ref": "#/definitions/DeploymentProvisioningInfo.Stage" + }, + "description": "Some info about the build." } } }, - "GetUserOrganizationInvitationReply": { + "DeploymentProvisioningInfo.Stage": { "type": "object", "properties": { - "invitation": { - "$ref": "#/definitions/OrganizationInvitation" + "name": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/DeploymentProvisioningInfo.Stage.Status" + }, + "messages": { + "type": "array", + "items": { + "type": "string" + } + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "finished_at": { + "type": "string", + "format": "date-time" + }, + "build_attempts": { + "type": "array", + "items": { + "$ref": "#/definitions/DeploymentProvisioningInfo.Stage.BuildAttempt" + } } } }, - "GetUserSettingsReply": { + "DeploymentProvisioningInfo.Stage.BuildAttempt": { "type": "object", "properties": { - "settings": { - "$ref": "#/definitions/UserSettings" + "id": { + "type": "integer", + "format": "int64" + }, + "status": { + "$ref": "#/definitions/DeploymentProvisioningInfo.Stage.Status" + }, + "messages": { + "type": "array", + "items": { + "type": "string" + } + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "finished_at": { + "type": "string", + "format": "date-time" + }, + "steps": { + "type": "array", + "items": { + "$ref": "#/definitions/DeploymentProvisioningInfo.Stage.BuildAttempt.BuildStep" + } + }, + "image_pushed": { + "type": "boolean" + }, + "internal_failure": { + "type": "boolean" + }, + "retryable_failure": { + "type": "boolean" + }, + "wait_completion": { + "type": "boolean", + "description": "This flag is used to finalize the build, and continue the deployment in case of success, or cancel and potentially retry the build in case of failure." } } }, - "GithubInstallationReply": { + "DeploymentProvisioningInfo.Stage.BuildAttempt.BuildStep": { "type": "object", "properties": { - "app_name": { - "type": "string", - "title": "The github app name" + "name": { + "type": "string" }, - "app_id": { - "type": "string", - "format": "int64", - "title": "The github app id" + "status": { + "$ref": "#/definitions/DeploymentProvisioningInfo.Stage.Status" + }, + "messages": { + "type": "array", + "items": { + "type": "string" + } }, - "url": { + "started_at": { "type": "string", - "title": "The url to start the installation flow" + "format": "date-time" }, - "state": { + "finished_at": { "type": "string", - "title": "The state required by the protocol, it is only valid 10 minutes and encodes\ninformation about the type of flow" + "format": "date-time" } } }, - "GithubInstallationRequest": { + "DeploymentProxyPort": { "type": "object", "properties": { - "metadata": { - "type": "string", - "title": "A small (limited to 400 characters) string of arbitrary metadata which will\nbe encoded in the state" + "port": { + "type": "integer", + "format": "int64" + }, + "protocol": { + "$ref": "#/definitions/ProxyPortProtocol" } } }, - "HasUnpaidInvoicesReply": { + "DeploymentProxyPortMetadata": { "type": "object", "properties": { - "has_unpaid_invoices": { - "type": "boolean" + "host": { + "type": "string" + }, + "public_port": { + "type": "integer", + "format": "int64" + }, + "port": { + "type": "integer", + "format": "int64" + }, + "protocol": { + "$ref": "#/definitions/ProxyPortProtocol" } } }, - "InviteUserRequest": { + "DeploymentRoute": { "type": "object", "properties": { - "email": { - "type": "string" + "port": { + "type": "integer", + "format": "int64" }, - "name": { + "path": { "type": "string" }, - "message": { - "type": "string" + "security_policies": { + "$ref": "#/definitions/SecurityPolicies" } } }, - "ListUserOrganizationInvitationsReply": { + "DeploymentScaling": { "type": "object", "properties": { - "invitations": { + "scopes": { "type": "array", "items": { - "$ref": "#/definitions/OrganizationInvitation" - }, - "title": "The collection of organization invitations" + "type": "string" + } }, - "limit": { + "min": { "type": "integer", - "format": "int64", - "title": "The limit in the request" + "format": "int64" }, - "offset": { + "max": { "type": "integer", - "format": "int64", - "title": "The offset in the request" + "format": "int64" }, - "count": { - "type": "integer", - "format": "int64", - "title": "The total number of items" + "targets": { + "type": "array", + "items": { + "$ref": "#/definitions/DeploymentScalingTarget" + } } } }, - "ListUserOrganizationsReply": { + "DeploymentScalingTarget": { "type": "object", "properties": { - "organizations": { - "type": "array", - "items": { - "$ref": "#/definitions/Organization" - }, - "title": "The collection of organizations" + "average_cpu": { + "$ref": "#/definitions/DeploymentScalingTargetAverageCPU" }, - "limit": { - "type": "integer", - "format": "int64", - "title": "The limit in the request" + "average_mem": { + "$ref": "#/definitions/DeploymentScalingTargetAverageMem" }, - "offset": { - "type": "integer", - "format": "int64", - "title": "The offset in the request" + "requests_per_second": { + "$ref": "#/definitions/DeploymentScalingTargetRequestsPerSecond" }, - "has_next": { - "type": "boolean", - "title": "If there is more items after in the collection" + "concurrent_requests": { + "$ref": "#/definitions/DeploymentScalingTargetConcurrentRequests" + }, + "requests_response_time": { + "$ref": "#/definitions/DeploymentScalingTargetRequestsResponseTime" + }, + "sleep_idle_delay": { + "$ref": "#/definitions/DeploymentScalingTargetSleepIdleDelay" } } }, - "LoginMethodReply": { + "DeploymentScalingTargetAverageCPU": { "type": "object", "properties": { - "method": { - "$ref": "#/definitions/LoginMethodReply.Method" + "value": { + "type": "integer", + "format": "int64" } } }, - "LoginMethodReply.Method": { - "type": "string", - "enum": [ - "KOYEB", - "WORKOS" - ], - "default": "KOYEB" - }, - "LoginReply": { + "DeploymentScalingTargetAverageMem": { "type": "object", "properties": { - "token": { - "$ref": "#/definitions/Token" + "value": { + "type": "integer", + "format": "int64" } } }, - "ManageReply": { + "DeploymentScalingTargetConcurrentRequests": { "type": "object", "properties": { - "url": { - "type": "string" + "value": { + "type": "integer", + "format": "int64" } } }, - "NextInvoiceReply": { + "DeploymentScalingTargetRequestsPerSecond": { "type": "object", "properties": { - "stripe_invoice": { - "type": "object" - }, - "lines": { - "type": "array", - "items": { - "$ref": "#/definitions/NextInvoiceReply.Line" - } - }, - "discounts": { - "type": "array", - "items": { - "$ref": "#/definitions/NextInvoiceReply.Discount" - } + "value": { + "type": "integer", + "format": "int64" } } }, - "NextInvoiceReply.Discount": { + "DeploymentScalingTargetRequestsResponseTime": { "type": "object", "properties": { - "type": { - "$ref": "#/definitions/NextInvoiceReply.Discount.Type" - }, - "name": { - "type": "string" - }, - "amount": { - "type": "string", + "value": { + "type": "integer", "format": "int64" + }, + "quantile": { + "type": "integer", + "format": "int64", + "description": "The quantile to use for autoscaling. For example, set to 95 to use the 95th\npercentile (p95) for autoscaling. Valid values are between 0 and 100." } } }, - "NextInvoiceReply.Discount.Type": { - "type": "string", - "enum": [ - "PERCENT_OFF", - "AMOUNT_OFF" - ], - "default": "PERCENT_OFF" - }, - "NextInvoiceReply.Line": { + "DeploymentScalingTargetSleepIdleDelay": { "type": "object", "properties": { - "amount_excluding_tax": { + "value": { "type": "integer", - "format": "int32" - }, - "period": { - "$ref": "#/definitions/NextInvoiceReply.Line.Period" - }, - "plan_nickname": { - "type": "string" + "format": "int64", + "description": "DEPRECATED: use deep_sleep_value instead.\nDelay in seconds after which a service which received 0 request is put to deep sleep." }, - "price": { - "$ref": "#/definitions/NextInvoiceReply.Line.Price" + "deep_sleep_value": { + "type": "integer", + "format": "int64", + "description": "Delay in seconds after which a service which received 0 request is put to deep sleep." }, - "quantity": { + "light_sleep_value": { "type": "integer", - "format": "int32" + "format": "int64", + "description": "Delay in seconds after which a service which received 0 request is put to light sleep." } } }, - "NextInvoiceReply.Line.Period": { + "DeploymentStrategy": { "type": "object", "properties": { - "start": { + "type": { + "$ref": "#/definitions/DeploymentStrategyType", + "title": "Strategy type" + } + } + }, + "DeploymentStrategyType": { + "type": "string", + "enum": [ + "DEPLOYMENT_STRATEGY_TYPE_INVALID", + "DEPLOYMENT_STRATEGY_TYPE_DEFAULT", + "DEPLOYMENT_STRATEGY_TYPE_CANARY", + "DEPLOYMENT_STRATEGY_TYPE_ROLLING", + "DEPLOYMENT_STRATEGY_TYPE_BLUE_GREEN", + "DEPLOYMENT_STRATEGY_TYPE_IMMEDIATE" + ], + "default": "DEPLOYMENT_STRATEGY_TYPE_INVALID", + "description": " - DEPLOYMENT_STRATEGY_TYPE_INVALID: DEPRECATED: Use DEPLOYMENT_STRATEGY_TYPE_DEFAULT instead.\n - DEPLOYMENT_STRATEGY_TYPE_DEFAULT: Default/unspecified strategy (resolves to platform default, currently ROLLING).\n - DEPLOYMENT_STRATEGY_TYPE_CANARY: Use canary strategy.\n - DEPLOYMENT_STRATEGY_TYPE_ROLLING: Use rolling strategy.\n - DEPLOYMENT_STRATEGY_TYPE_BLUE_GREEN: Use blue green strategy.\n - DEPLOYMENT_STRATEGY_TYPE_IMMEDIATE: Use immediate strategy." + }, + "DeploymentVolume": { + "type": "object", + "properties": { + "id": { "type": "string", - "format": "date-time" + "title": "the id of the volume" }, - "end": { + "path": { "type": "string", - "format": "date-time" + "title": "the path where the volume is mounted to" + }, + "replica_index": { + "type": "integer", + "format": "int64", + "title": "optionally, explicitly choose the replica index to mount the volume to" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + }, + "title": "scope of the associated" } } }, - "NextInvoiceReply.Line.Price": { + "DesiredDeployment": { "type": "object", "properties": { - "unit_amount_decimal": { - "type": "number", - "format": "double" + "groups": { + "type": "array", + "items": { + "$ref": "#/definitions/DesiredDeployment.Group" + } } } }, - "OAuthCallbackReply": { + "DesiredDeployment.Group": { "type": "object", "properties": { - "token": { - "$ref": "#/definitions/Token", - "title": "A jwt token to be used for session" + "name": { + "type": "string" + }, + "deployment_ids": { + "type": "array", + "items": { + "type": "string" + } } } }, - "OAuthCallbackRequest": { + "DockerBuilder": { "type": "object", "properties": { - "state": { + "dockerfile": { "type": "string", - "title": "The state created at the origin of the OAuth flow" + "title": "A path to the Dockerfile" }, - "code": { - "type": "string", - "title": "The code returned by the OAuth provider" + "entrypoint": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The docker ENTRYPOINT" }, - "setup_action": { + "command": { "type": "string", - "description": "setup_action is populated in the context of a GitHub app installation\nrequest. For logins and signups, it is not set." + "title": "The docker CMD" }, - "installation_id": { - "type": "string", - "description": "installation_id is populated in the context of a GitHub app installation\nrequest. For logins and signups, it is not set." - } - } - }, - "OAuthProvider": { - "type": "object", - "properties": { - "id": { - "type": "string", - "title": "The name of the provider (.e.g github, google)" + "args": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The docker CMD args" }, - "url": { + "target": { "type": "string", - "title": "The URL to call to initiate the OAuth flow" + "title": "The target for multi-stage builds" }, - "state": { - "type": "string", - "title": "The OAuth state required by the protocol, it is only valid 10 minutes and\nencodes information about the type of flow" + "privileged": { + "type": "boolean", + "title": "A flag to run the container in privileged mode" } } }, - "Organization": { + "DockerSource": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "external_id": { - "type": "string" - }, - "provisioning": { - "type": "boolean" - }, - "address1": { - "type": "string" - }, - "address2": { - "type": "string" - }, - "city": { - "type": "string" - }, - "postal_code": { - "type": "string" - }, - "state": { - "type": "string" - }, - "country": { - "type": "string" - }, - "company": { - "type": "boolean" - }, - "vat_number": { - "type": "string" - }, - "billing_name": { - "type": "string" - }, - "billing_email": { - "type": "string" - }, - "name": { + "image": { "type": "string" }, - "plan": { - "$ref": "#/definitions/Plan" - }, - "plan_updated_at": { - "type": "string", - "format": "date-time" - }, - "has_payment_method": { - "type": "boolean" - }, - "subscription_id": { + "command": { "type": "string" }, - "current_subscription_id": { - "type": "string" + "args": { + "type": "array", + "items": { + "type": "string" + } }, - "latest_subscription_id": { + "image_registry_secret": { "type": "string" }, - "signup_qualification": { - "type": "object" - }, - "status": { - "$ref": "#/definitions/Organization.Status" - }, - "status_message": { - "$ref": "#/definitions/OrganizationDetailedStatus" - }, - "deactivation_reason": { - "$ref": "#/definitions/Organization.DeactivationReason" - }, - "verified": { - "type": "boolean" - }, - "qualifies_for_hobby23": { - "type": "boolean" - }, - "reprocess_after": { - "type": "string", - "format": "date-time" - }, - "trialing": { - "type": "boolean" - }, - "trial_starts_at": { - "type": "string", - "format": "date-time" - }, - "trial_ends_at": { - "type": "string", - "format": "date-time" - }, - "email_domain_allowlist": { + "entrypoint": { "type": "array", "items": { "type": "string" } }, - "default_project_id": { - "type": "string" + "privileged": { + "type": "boolean", + "title": "A flag to run the container in privileged mode" } - }, - "title": "Represent an Organization" - }, - "Organization.DeactivationReason": { - "type": "string", - "enum": [ - "INVALID", - "REQUESTED_BY_OWNER", - "SUBSCRIPTION_TERMINATION", - "LOCKED_BY_ADMIN", - "VERIFICATION_FAILED", - "TRIAL_DID_NOT_CONVERT" - ], - "default": "INVALID" - }, - "OrganizationDetailedStatus": { - "type": "string", - "enum": [ - "NEW", - "EMAIL_NOT_VALIDATED", - "BILLING_INFO_MISSING", - "LOCKED", - "PAYMENT_FAILURE", - "VALID", - "PENDING_VERIFICATION", - "VERIFICATION_FAILED", - "REVIEWING_ACCOUNT", - "PLAN_UPGRADE_REQUIRED" - ], - "default": "NEW" + } }, - "OrganizationInvitation": { + "EgressPolicy": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "email": { - "type": "string" - }, - "role": { - "$ref": "#/definitions/UserRole.Role" - }, - "status": { - "$ref": "#/definitions/OrganizationInvitation.Status" - }, - "expires_at": { - "type": "string", - "format": "date-time" - }, - "organization_id": { - "type": "string" + "mode": { + "$ref": "#/definitions/EgressPolicyMode" }, - "organization": { - "$ref": "#/definitions/PublicOrganization" - }, - "invitee_id": { - "type": "string" - }, - "invitee": { - "$ref": "#/definitions/PublicUser" - }, - "inviter_id": { - "type": "string" - }, - "inviter": { - "$ref": "#/definitions/PublicUser" + "allow_list": { + "type": "array", + "items": { + "$ref": "#/definitions/NetworkPolicyDestination" + }, + "description": "Allowed destinations (deny-by-default semantics under DENY_ALL).\nIgnored when mode is DEFAULT." } } }, - "OrganizationInvitation.Status": { + "EgressPolicyMode": { "type": "string", "enum": [ - "INVALID", - "PENDING", - "ACCEPTED", - "REFUSED", - "EXPIRED" + "EGRESS_POLICY_MODE_DEFAULT", + "EGRESS_POLICY_MODE_DENY_ALL" ], - "default": "INVALID" + "default": "EGRESS_POLICY_MODE_DEFAULT" + }, + "GetServiceReply": { + "type": "object", + "properties": { + "service": { + "$ref": "#/definitions/Service", + "title": "The Service retrieved" + } + } }, - "ReactivateOrganizationReply": { + "GetServiceScalingReply": { "type": "object", "properties": { - "organization": { - "$ref": "#/definitions/Organization" + "scalings": { + "type": "array", + "items": { + "$ref": "#/definitions/ManualServiceScaling" + }, + "title": "The current manual scaling configuration" } } }, - "ResendEmailValidationReply": { - "type": "object" - }, - "ResendEmailValidationRequest": { - "type": "object" - }, - "ResetPasswordReply": { - "type": "object" - }, - "ResetPasswordRequest": { + "GitDeploymentMetadata": { "type": "object", - "example": { - "email": "john@snow.com" - }, "properties": { - "email": { + "last_provisioned_deployment_id": { "type": "string" + }, + "git_env": { + "$ref": "#/definitions/GitEnvDeploymentMetadata" } } }, - "Token": { + "GitEnvDeploymentMetadata": { "type": "object", - "example": { - "id": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", - "expires": "2022-09-08T14:00:00Z", - "user_id": "996d7822-6b58-11e9-956f-32001b70f000", - "organization_id": "9f33b2c6-6b58-11e9-883c-32001b70f000" - }, "properties": { - "id": { + "sha": { "type": "string" }, - "user_id": { + "commit_author": { "type": "string" }, - "organization_id": { + "commit_message": { "type": "string" + } + } + }, + "GitSource": { + "type": "object", + "properties": { + "repository": { + "type": "string", + "description": "A url to a git repository (contains the provider as well) .e.g: github.com/koyeb/test." }, - "expires_at": { + "branch": { "type": "string", - "format": "date-time" + "title": "A git branch that will be tracked for new commits and deployments will be created" + }, + "tag": { + "type": "string", + "title": "A git tag that should be built" + }, + "sha": { + "type": "string", + "title": "A git commit that should be built (useful for pinning to a commit, this will always be set when a deployment is created by a code push)" + }, + "build_command": { + "type": "string", + "title": "A command used to override the build command, run after all build steps \u2014 deprecated, use buildpack.build_command instead" + }, + "run_command": { + "type": "string", + "title": "A command used to override the default run command - deprecated, use buildpack.run_command instead" + }, + "no_deploy_on_push": { + "type": "boolean", + "title": "A flag to disable a new deployment when a push event is detected" + }, + "workdir": { + "type": "string", + "title": "A subdirectory to use as the build directory" + }, + "buildpack": { + "$ref": "#/definitions/BuildpackBuilder" + }, + "docker": { + "$ref": "#/definitions/DockerBuilder" } } }, - "UnscopeOrganizationTokenRequest": { - "type": "object" - }, - "UpdateBudgetReply": { + "HTTPHeader": { "type": "object", "properties": { - "budget": { - "$ref": "#/definitions/Budget" + "key": { + "type": "string" + }, + "value": { + "type": "string" } } }, - "UpdateOrganizationDefaultProjectReply": { + "HTTPHealthCheck": { "type": "object", "properties": { - "organization": { - "$ref": "#/definitions/Organization" + "port": { + "type": "integer", + "format": "int64", + "title": "The port to use to perform the health check, must be declared in the ports section" + }, + "path": { + "type": "string", + "title": "The path to use to perform the HTTP health check" + }, + "method": { + "type": "string", + "title": "An optional HTTP method to use to perform the health check, default is GET" + }, + "headers": { + "type": "array", + "items": { + "$ref": "#/definitions/HTTPHeader" + }, + "title": "An optional list of HTTP headers to provide when performing the request, default is empty" } } }, - "UpdateOrganizationNameReply": { + "ListServiceEventsReply": { "type": "object", "properties": { - "organization": { - "$ref": "#/definitions/Organization" + "events": { + "type": "array", + "items": { + "$ref": "#/definitions/ServiceEvent" + }, + "title": "The collection of events" + }, + "limit": { + "type": "integer", + "format": "int64", + "title": "The limit in the request" + }, + "offset": { + "type": "integer", + "format": "int64", + "title": "The offset in the request" + }, + "order": { + "type": "string", + "title": "The order in the request" + }, + "has_next": { + "type": "boolean", + "title": "If there is more items after in the collection" } } }, - "UpdateOrganizationPlanReply": { + "ListServicesReply": { "type": "object", "properties": { - "organization": { - "$ref": "#/definitions/Organization" + "services": { + "type": "array", + "items": { + "$ref": "#/definitions/ServiceListItem" + } + }, + "limit": { + "type": "integer", + "format": "int64", + "title": "The limit in the request" + }, + "offset": { + "type": "integer", + "format": "int64", + "title": "The offset in the request" + }, + "count": { + "type": "integer", + "format": "int64", + "title": "The total number of items" + }, + "has_next": { + "type": "boolean", + "title": "If there is more items after in the collection" } } }, - "UpdateOrganizationReply": { + "ManualServiceScaling": { "type": "object", "properties": { - "organization": { - "$ref": "#/definitions/Organization" + "scopes": { + "type": "array", + "items": { + "type": "string" + } + }, + "instances": { + "type": "integer", + "format": "int64" } } }, - "UpdatePasswordRequest": { + "NeonPostgresDatabase": { "type": "object", - "example": { - "id": "...", - "password": "..." - }, "properties": { - "id": { + "pg_version": { + "type": "integer", + "format": "int64" + }, + "region": { "type": "string" }, - "password": { + "instance_type": { "type": "string" + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/NeonPostgresDatabase.NeonRole" + } + }, + "databases": { + "type": "array", + "items": { + "$ref": "#/definitions/NeonPostgresDatabase.NeonDatabase" + } } } }, - "UpdateUserRequest.UserUpdateBody": { + "NeonPostgresDatabase.NeonDatabase": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "email": { + "name": { "type": "string" }, - "current_password": { + "owner": { "type": "string" - }, - "password": { + } + } + }, + "NeonPostgresDatabase.NeonRole": { + "type": "object", + "properties": { + "name": { "type": "string" }, - "newsletter_subscribed": { - "type": "boolean" - }, - "name": { + "secret": { "type": "string" } } }, - "UpdateUserSettingsReply": { + "NeonPostgresDatabaseDeploymentMetadata": { + "type": "object", + "properties": { + "reset_role_passwords": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "NetworkPolicy": { + "type": "object", + "properties": { + "egress": { + "$ref": "#/definitions/EgressPolicy" + } + } + }, + "NetworkPolicyDestination": { "type": "object", "properties": { - "settings": { - "$ref": "#/definitions/UserSettings" + "cidr": { + "type": "string", + "description": "IPv4 or IPv6 CIDR (e.g. \"10.0.0.0/8\", \"2001:db8::/32\").\nBare IPs are accepted at the API boundary and normalized to /32\n(IPv4) or /128 (IPv6) before storage." } } }, - "UpdateUserSettingsRequest": { + "PauseServiceReply": { + "type": "object" + }, + "ProxyPortProtocol": { + "type": "string", + "enum": [ + "tcp" + ], + "default": "tcp" + }, + "RedeployReply": { "type": "object", "properties": { - "failed_deployment_email_notification": { - "type": "boolean", - "description": "(Optional) Toggle failed deployment email notification." + "deployment": { + "$ref": "#/definitions/Deployment", + "title": "The entity updated" } } }, - "UpsertSignupQualificationReply": { + "RedeployRequest.Info": { "type": "object", "properties": { - "organization": { - "$ref": "#/definitions/Organization" + "deployment_group": { + "type": "string" + }, + "sha": { + "type": "string" + }, + "use_cache": { + "type": "boolean" + }, + "skip_build": { + "type": "boolean", + "description": "If set to true, the build stage will be skipped and the image coming from the last successful build step will be used instead.\nThe call fails if no previous successful builds happened." } } }, - "UserReply": { + "ResumeServiceReply": { + "type": "object" + }, + "SandboxMetadata": { "type": "object", "properties": { - "user": { - "$ref": "#/definitions/User" + "public_url": { + "type": "string" + }, + "routing_key": { + "type": "string" } } }, - "UserSettings": { + "Service": { "type": "object", "properties": { "id": { "type": "string" }, - "user_id": { + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "succeeded_at": { + "type": "string", + "format": "date-time" + }, + "paused_at": { + "type": "string", + "format": "date-time" + }, + "resumed_at": { + "type": "string", + "format": "date-time" + }, + "terminated_at": { + "type": "string", + "format": "date-time" + }, + "name": { "type": "string" }, - "failed_deployment_email_notification": { - "type": "boolean" + "type": { + "$ref": "#/definitions/Service.Type" + }, + "organization_id": { + "type": "string" + }, + "app_id": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/Service.Status" + }, + "messages": { + "type": "array", + "items": { + "type": "string" + } + }, + "version": { + "type": "string", + "format": "uint64" + }, + "active_deployment_id": { + "type": "string" + }, + "latest_deployment_id": { + "type": "string" + }, + "last_provisioned_deployment_id": { + "type": "string" + }, + "state": { + "$ref": "#/definitions/ServiceState", + "title": "Legacy stuff" + }, + "life_cycle": { + "$ref": "#/definitions/ServiceLifeCycle" } } }, - "Activity": { + "Service.Status": { + "type": "string", + "enum": [ + "STARTING", + "HEALTHY", + "DEGRADED", + "UNHEALTHY", + "DELETING", + "DELETED", + "PAUSING", + "PAUSED", + "RESUMING" + ], + "default": "STARTING" + }, + "Service.Type": { + "type": "string", + "enum": [ + "INVALID_TYPE", + "WEB", + "WORKER", + "DATABASE", + "SANDBOX" + ], + "default": "INVALID_TYPE" + }, + "ServiceEvent": { "type": "object", "properties": { "id": { "type": "string" }, - "actor": { - "$ref": "#/definitions/Object" + "when": { + "type": "string", + "format": "date-time" }, - "object": { - "$ref": "#/definitions/Object" + "organization_id": { + "type": "string" }, - "verb": { + "service_id": { + "type": "string" + }, + "type": { + "type": "string" + }, + "message": { "type": "string" }, "metadata": { "type": "object" - }, - "created_at": { - "type": "string", - "format": "date-time" } } }, - "ActivityList": { + "ServiceLifeCycle": { "type": "object", "properties": { - "activities": { - "type": "array", - "items": { - "$ref": "#/definitions/Activity" - } - }, - "limit": { + "delete_after_sleep": { "type": "integer", "format": "int64" }, - "offset": { + "delete_after_create": { "type": "integer", "format": "int64" - }, - "has_next": { - "type": "boolean" } } }, - "Object": { + "ServiceListItem": { "type": "object", "properties": { "id": { @@ -15414,791 +15926,947 @@ "type": "string" }, "type": { - "type": "string" + "$ref": "#/definitions/Service.Type" }, - "metadata": { - "type": "object" + "organization_id": { + "type": "string" }, - "deleted": { - "type": "boolean" - } - } - }, - "Empty": { - "type": "object" - }, - "kgitproxy.GithubInstallation.Status": { - "type": "string", - "enum": [ - "INVALID", - "INSTALLED", - "SUSPENDED", - "DELETED" - ], - "default": "INVALID" - }, - "kgitproxy.IndexingStatus": { - "type": "string", - "enum": [ - "INVALID_INDEXING_STATUS", - "NOT_STARTED", - "IN_PROGRESS", - "COMPLETED" - ], - "default": "INVALID_INDEXING_STATUS" - }, - "CheckCouponReply": { - "type": "object", - "properties": { - "name": { + "app_id": { "type": "string" }, - "percent_off": { - "type": "number", - "format": "float" + "updated_at": { + "type": "string", + "format": "date-time" }, - "amount_off": { + "created_at": { "type": "string", - "format": "int64" + "format": "date-time" + }, + "status": { + "$ref": "#/definitions/Service.Status" + }, + "messages": { + "type": "array", + "items": { + "type": "string" + } + }, + "version": { + "type": "string", + "format": "uint64", + "title": "A version updated whenever this state changes (useful for caching)" + }, + "state": { + "$ref": "#/definitions/ServiceState" + }, + "active_deployment_id": { + "type": "string" }, - "currency": { + "latest_deployment_id": { "type": "string" + }, + "life_cycle": { + "$ref": "#/definitions/ServiceLifeCycle" } } }, - "RedeemCouponReply": { - "type": "object" - }, - "RedeemCouponRequest": { + "ServiceState": { "type": "object", "properties": { - "code": { - "type": "string" + "desired_deployment": { + "$ref": "#/definitions/DesiredDeployment" + }, + "auto_release": { + "$ref": "#/definitions/AutoRelease" } } }, - "CreateOrganizationInvitationReply": { + "TCPHealthCheck": { "type": "object", "properties": { - "invitation": { - "$ref": "#/definitions/OrganizationInvitation", - "title": "The organization invitation sent" + "port": { + "type": "integer", + "format": "int64", + "title": "The port to use to perform the health check, must be declared in the ports section" } } }, - "CreateOrganizationInvitationRequest": { + "TriggerDeploymentMetadata": { "type": "object", "properties": { - "email": { - "type": "string", - "title": "The email of the person to invite" + "type": { + "$ref": "#/definitions/TriggerDeploymentMetadata.TriggerType" + }, + "actor": { + "$ref": "#/definitions/TriggerDeploymentMetadata.ActorType" + }, + "git": { + "$ref": "#/definitions/TriggerGitDeploymentMetadata" } } }, - "DeleteOrganizationInvitationReply": { - "type": "object" + "TriggerDeploymentMetadata.ActorType": { + "type": "string", + "enum": [ + "UNKNOWN_ACTOR", + "USER", + "SYSTEM" + ], + "default": "UNKNOWN_ACTOR" }, - "GetOrganizationInvitationReply": { - "type": "object", - "properties": { - "invitation": { - "$ref": "#/definitions/OrganizationInvitation" - } - } + "TriggerDeploymentMetadata.TriggerType": { + "type": "string", + "enum": [ + "UNKNOWN_TYPE", + "GIT", + "RESUME", + "DATABASE_SYNC" + ], + "default": "UNKNOWN_TYPE" }, - "ListOrganizationInvitationsReply": { + "TriggerGitDeploymentMetadata": { "type": "object", "properties": { - "invitations": { - "type": "array", - "items": { - "$ref": "#/definitions/OrganizationInvitation" - }, - "title": "The collection of organization invitations" + "provider": { + "$ref": "#/definitions/TriggerGitDeploymentMetadata.Provider" }, - "limit": { - "type": "integer", - "format": "int64", - "title": "The limit in the request" + "repository": { + "type": "string" }, - "offset": { - "type": "integer", - "format": "int64", - "title": "The offset in the request" + "branch": { + "type": "string" }, - "count": { - "type": "integer", - "format": "int64", - "title": "The total number of items" - } - } - }, - "ResendOrganizationInvitationReply": { - "type": "object", - "properties": { - "invitation": { - "$ref": "#/definitions/OrganizationInvitation", - "title": "The organization invitation resent" + "sha": { + "type": "string" + }, + "message": { + "type": "string" + }, + "sender_username": { + "type": "string" + }, + "sender_avatar_url": { + "type": "string" + }, + "sender_profile_url": { + "type": "string" } } }, - "ConfirmOrganizationActionReply": { - "type": "object" + "TriggerGitDeploymentMetadata.Provider": { + "type": "string", + "enum": [ + "UNKNOWN", + "GITHUB" + ], + "default": "UNKNOWN" }, - "CreateCredential": { + "UpdateService": { "type": "object", "properties": { - "name": { - "type": "string", - "title": "Credential name" + "definition": { + "$ref": "#/definitions/DeploymentDefinition" }, - "description": { - "type": "string", - "title": "Credential description" + "metadata": { + "$ref": "#/definitions/DeploymentMetadata" }, - "type": { - "$ref": "#/definitions/Credential.Type", - "title": "Credential type" + "skip_build": { + "type": "boolean", + "description": "If set to true, the build stage will be skipped and the image coming from the last successful build step will be used instead.\nThe call fails if no previous successful builds happened." }, - "organization_id": { + "save_only": { + "type": "boolean", + "title": "If set, do not trigger a deployment, only store the new settings" + }, + "life_cycle": { + "$ref": "#/definitions/ServiceLifeCycle" + }, + "instance_snapshot_id": { "type": "string", - "title": "Organization id for user credential" + "title": "Instance Snapshot used to boot the Instances of this deployment\nWith a Full Snapshot, definition must not be provided" } } }, - "CreateCredentialReply": { + "UpdateServiceReply": { "type": "object", "properties": { - "credential": { - "$ref": "#/definitions/Credential" + "service": { + "$ref": "#/definitions/Service", + "title": "The entity updated" } } }, - "Credential": { + "UpdateServiceScalingReply": { + "type": "object", + "title": "Empty reply - success is indicated by no error" + }, + "App": { "type": "object", "properties": { "id": { "type": "string" }, - "type": { - "$ref": "#/definitions/Credential.Type" - }, "name": { "type": "string" }, - "token": { + "organization_id": { "type": "string" }, - "description": { - "type": "string" + "created_at": { + "type": "string", + "format": "date-time" }, - "user_id": { - "type": "string" + "updated_at": { + "type": "string", + "format": "date-time" }, - "organization_id": { - "type": "string" + "started_at": { + "type": "string", + "format": "date-time" }, - "updated_at": { + "succeeded_at": { "type": "string", "format": "date-time" }, - "created_at": { + "paused_at": { "type": "string", "format": "date-time" }, - "expires_at": { + "resumed_at": { + "type": "string", + "format": "date-time" + }, + "terminated_at": { "type": "string", "format": "date-time" + }, + "status": { + "$ref": "#/definitions/App.Status" + }, + "messages": { + "type": "array", + "items": { + "type": "string" + } + }, + "version": { + "type": "string", + "format": "uint64" + }, + "domains": { + "type": "array", + "items": { + "$ref": "#/definitions/Domain" + } + }, + "life_cycle": { + "$ref": "#/definitions/AppLifeCycle" } } }, - "Credential.Type": { + "App.Status": { "type": "string", "enum": [ - "INVALID", - "USER", - "ORGANIZATION" + "STARTING", + "HEALTHY", + "DEGRADED", + "UNHEALTHY", + "DELETING", + "DELETED", + "PAUSING", + "PAUSED", + "RESUMING" ], - "default": "INVALID" - }, - "DeleteCredentialReply": { - "type": "object" - }, - "GetCredentialReply": { - "type": "object", - "properties": { - "credential": { - "$ref": "#/definitions/Credential" - } - } + "default": "STARTING" }, - "ListCredentialsReply": { + "AppEvent": { "type": "object", "properties": { - "credentials": { - "type": "array", - "items": { - "$ref": "#/definitions/Credential" - } + "id": { + "type": "string" + }, + "when": { + "type": "string", + "format": "date-time" + }, + "organization_id": { + "type": "string" }, - "limit": { - "type": "integer", - "format": "int64" + "app_id": { + "type": "string" }, - "offset": { - "type": "integer", - "format": "int64" + "type": { + "type": "string" }, - "count": { - "type": "integer", - "format": "int64" + "message": { + "type": "string" + }, + "metadata": { + "type": "object" } } }, - "UpdateCredentialReply": { + "AppLifeCycle": { "type": "object", "properties": { - "credential": { - "$ref": "#/definitions/Credential" + "delete_when_empty": { + "type": "boolean" } } }, - "CreateProject": { + "AppListItem": { "type": "object", "properties": { + "id": { + "type": "string" + }, "name": { + "type": "string" + }, + "organization_id": { + "type": "string" + }, + "updated_at": { "type": "string", - "title": "Project name" + "format": "date-time" }, - "description": { + "created_at": { "type": "string", - "title": "Project description" + "format": "date-time" + }, + "domains": { + "type": "array", + "items": { + "$ref": "#/definitions/Domain" + } + }, + "status": { + "$ref": "#/definitions/App.Status" + }, + "messages": { + "type": "array", + "items": { + "type": "string" + } } } }, - "CreateProjectReply": { + "CreateApp": { "type": "object", "properties": { - "project": { - "$ref": "#/definitions/Project" + "name": { + "type": "string" + }, + "life_cycle": { + "$ref": "#/definitions/AppLifeCycle" + }, + "project_id": { + "type": "string", + "title": "(Optional) The project ID to associate with the app" } } }, - "DeleteProjectReply": { - "type": "object" - }, - "GetProjectReply": { + "CreateAppReply": { "type": "object", "properties": { - "project": { - "$ref": "#/definitions/Project" + "app": { + "$ref": "#/definitions/App", + "title": "The entity created" } } }, - "ListProjectsReply": { - "type": "object", - "properties": { - "projects": { - "type": "array", - "items": { - "$ref": "#/definitions/Project" - } - }, - "limit": { - "type": "integer", - "format": "int64" - }, - "offset": { - "type": "integer", - "format": "int64" - } - } + "DeleteAppReply": { + "type": "object" }, - "Project": { + "Domain": { "type": "object", "properties": { "id": { "type": "string" }, - "name": { + "organization_id": { "type": "string" }, - "description": { + "name": { "type": "string" }, - "organization_id": { - "type": "string" + "created_at": { + "type": "string", + "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, - "created_at": { + "status": { + "$ref": "#/definitions/Domain.Status" + }, + "type": { + "$ref": "#/definitions/Domain.Type" + }, + "app_id": { + "type": "string" + }, + "deployment_group": { + "type": "string" + }, + "verified_at": { "type": "string", "format": "date-time" }, - "service_count": { + "intended_cname": { + "type": "string" + }, + "messages": { + "type": "array", + "items": { + "type": "string" + } + }, + "version": { "type": "string", - "format": "int64", - "title": "Number of services in this project" + "format": "uint64" + }, + "cloudflare": { + "$ref": "#/definitions/Domain.LoadBalancerCloudflare" + }, + "koyeb": { + "$ref": "#/definitions/Domain.LoadBalancerKoyeb" + }, + "project_id": { + "type": "string", + "description": "The project ID this domain belongs to. Empty if the domain is organization-level." } } }, - "UpdateProjectReply": { - "type": "object", - "properties": { - "project": { - "$ref": "#/definitions/Project" - } - } + "Domain.LoadBalancerCloudflare": { + "type": "object" }, - "AppsSummary": { + "Domain.LoadBalancerKoyeb": { "type": "object", "properties": { - "total": { - "type": "string", + "request_timeout_seconds": { + "type": "integer", "format": "int64", - "title": "Total number of apps" - }, - "by_status": { - "type": "object", - "additionalProperties": { - "type": "string", - "format": "int64" - }, - "title": "Number of apps grouped by status" + "title": "Between 100 and 900" } } }, - "DomainsSummary": { + "Domain.Status": { + "type": "string", + "enum": [ + "PENDING", + "ACTIVE", + "ERROR", + "DELETING", + "DELETED" + ], + "default": "PENDING" + }, + "Domain.Type": { + "type": "string", + "enum": [ + "AUTOASSIGNED", + "CUSTOM" + ], + "default": "AUTOASSIGNED", + "title": "- AUTOASSIGNED: Domain like -.koyeb.app" + }, + "GetAppReply": { "type": "object", "properties": { - "total": { - "type": "string", - "format": "int64", - "title": "Total number of domains" - }, - "by_status": { - "type": "object", - "additionalProperties": { - "type": "string", - "format": "int64" - }, - "title": "Number of domains grouped by status" + "app": { + "$ref": "#/definitions/App", + "title": "The App retrieved" } } }, - "GetOrganizationSummaryReply": { + "ListAppEventsReply": { "type": "object", "properties": { - "summary": { - "$ref": "#/definitions/OrganizationSummary", - "title": "Organization usage summary" + "events": { + "type": "array", + "items": { + "$ref": "#/definitions/AppEvent" + }, + "title": "The collection of events" + }, + "limit": { + "type": "integer", + "format": "int64", + "title": "The limit in the request" + }, + "offset": { + "type": "integer", + "format": "int64", + "title": "The offset in the request" + }, + "order": { + "type": "string", + "title": "The order in the request" + }, + "has_next": { + "type": "boolean", + "title": "If there is more items after in the collection" } } }, - "InstancesSummary": { + "ListAppsReply": { "type": "object", "properties": { - "total": { - "type": "string", + "apps": { + "type": "array", + "items": { + "$ref": "#/definitions/AppListItem" + } + }, + "limit": { + "type": "integer", + "format": "int64", + "title": "The limit in the request" + }, + "offset": { + "type": "integer", "format": "int64", - "title": "Total number of instances" + "title": "The offset in the request" }, - "by_type": { - "type": "object", - "additionalProperties": { - "type": "string", - "format": "int64" - }, - "title": "Number of instances grouped by type" + "count": { + "type": "integer", + "format": "int64", + "title": "The total number of items" + }, + "has_next": { + "type": "boolean", + "title": "If there is more items after in the collection" } } }, - "MembersSummary": { + "PauseAppReply": { + "type": "object" + }, + "ResumeAppReply": { + "type": "object" + }, + "UpdateApp": { "type": "object", "properties": { - "total": { - "type": "string", - "format": "int64", - "title": "Number of members" + "name": { + "type": "string" }, - "invitations_by_status": { - "type": "object", - "additionalProperties": { - "type": "string", - "format": "int64" - }, - "title": "Number of invitations grouped by status" + "life_cycle": { + "$ref": "#/definitions/AppLifeCycle" } } }, - "NeonPostgresSummary": { + "UpdateAppReply": { "type": "object", "properties": { - "total": { - "type": "string", - "format": "int64", - "title": "Total number of databases" - }, - "by_instance_type": { - "type": "object", - "additionalProperties": { - "type": "string", - "format": "int64" - }, - "title": "Number of databases grouped by instance type" + "app": { + "$ref": "#/definitions/App", + "title": "The entity updated" } } }, - "OrganizationSummary": { + "CancelDeploymentReply": { + "type": "object" + }, + "DeploymentEvent": { "type": "object", "properties": { - "organization_id": { + "id": { "type": "string" }, - "instances": { - "$ref": "#/definitions/InstancesSummary" - }, - "apps": { - "$ref": "#/definitions/AppsSummary" + "when": { + "type": "string", + "format": "date-time" }, - "services": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ServiceSummary" - }, - "title": "Number of services grouped by type" + "organization_id": { + "type": "string" }, - "domains": { - "$ref": "#/definitions/DomainsSummary" + "deployment_id": { + "type": "string" }, - "secrets": { - "$ref": "#/definitions/SecretsSummary" + "type": { + "type": "string" }, - "neon_postgres": { - "$ref": "#/definitions/NeonPostgresSummary" + "message": { + "type": "string" }, - "members": { - "$ref": "#/definitions/MembersSummary" + "metadata": { + "type": "object" } } }, - "SecretsSummary": { + "DeploymentListItem": { "type": "object", "properties": { - "total": { + "id": { + "type": "string" + }, + "created_at": { "type": "string", - "format": "int64", - "title": "Total number of secrets" + "format": "date-time" }, - "by_type": { - "type": "object", - "additionalProperties": { - "type": "string", - "format": "int64" - }, - "title": "Number of secrets grouped by type" - } - } - }, - "ServiceSummary": { - "type": "object", - "properties": { - "total": { + "updated_at": { "type": "string", - "format": "int64", - "title": "Total number of services" + "format": "date-time" }, - "by_status": { - "type": "object", - "additionalProperties": { - "type": "string", - "format": "int64" - }, - "title": "Number of services grouped by status" - } - } - }, - "LoginRequest": { - "type": "object", - "example": { - "email": "john@snow.com", - "password": "..." - }, - "properties": { - "email": { + "allocated_at": { "type": "string", - "title": "User email" + "format": "date-time" }, - "password": { + "started_at": { "type": "string", - "title": "User password" + "format": "date-time" + }, + "succeeded_at": { + "type": "string", + "format": "date-time" + }, + "terminated_at": { + "type": "string", + "format": "date-time" }, "organization_id": { + "type": "string" + }, + "project_id": { + "type": "string" + }, + "app_id": { + "type": "string" + }, + "service_id": { + "type": "string" + }, + "parent_id": { + "type": "string" + }, + "child_id": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/Deployment.Status" + }, + "metadata": { + "$ref": "#/definitions/DeploymentMetadata" + }, + "definition": { + "$ref": "#/definitions/DeploymentDefinition" + }, + "messages": { + "type": "array", + "items": { + "type": "string" + } + }, + "provisioning_info": { + "$ref": "#/definitions/DeploymentProvisioningInfo" + }, + "database_info": { + "$ref": "#/definitions/DeploymentDatabaseInfo" + }, + "instance_snapshot_id": { "type": "string", - "title": "(Optional) Login into this organization" - } - } - }, - "LogoutReply": { - "type": "object" - }, - "DomainLoadBalancerQuotas": { - "type": "object", - "properties": { - "max_koyeb": { - "type": "integer", - "format": "int64" + "title": "Instance Snapshot used to boot the Instances of this deployment" + }, + "version": { + "type": "string", + "format": "uint64" + }, + "deployment_group": { + "type": "string" } } }, - "GetQuotasReply": { + "GetDeploymentReply": { "type": "object", "properties": { - "quotas": { - "$ref": "#/definitions/Quotas" + "deployment": { + "$ref": "#/definitions/Deployment" } } }, - "LifecycleQuotas": { + "GetDeploymentScalingReply": { "type": "object", "properties": { - "delete_after_sleep_min": { - "type": "integer", - "format": "int64", - "title": "delete after sleep limits" - }, - "delete_after_sleep_max": { - "type": "integer", - "format": "int64" - }, - "delete_after_create_min": { - "type": "integer", - "format": "int64", - "title": "delete after create limits" - }, - "delete_after_create_max": { - "type": "integer", - "format": "int64" + "replicas": { + "type": "array", + "items": { + "$ref": "#/definitions/GetDeploymentScalingReplyItem" + }, + "title": "The replicas" } } }, - "PersistentVolumeQuotas": { + "GetDeploymentScalingReplyItem": { "type": "object", "properties": { - "max_total_size": { - "type": "integer", - "format": "int64", - "description": "MaxTotalSize for all volumes on a region (in Gigabyte / GB)." + "region": { + "type": "string", + "title": "The replica region" }, - "max_volume_size": { + "replica_index": { "type": "integer", - "format": "int64", - "description": "MaxVolumeSize for one volume (in Gigabyte / GB)." + "format": "int64" }, - "max_per_instance_size": { - "type": "integer", - "format": "int64", - "description": "MaxPerInstanceSize for all volumes on an instance (in Gigabyte / GB)." + "instances": { + "type": "array", + "items": { + "$ref": "#/definitions/Instance" + }, + "description": "An array of `active` and `starting` instances.\n\nStatus of the active instance (and if none the most recent instance)\n string status = 4;\n Status message of the active instance (and if none the most recent instance)\n string message = 5;" } } }, - "Quotas": { + "Instance": { "type": "object", "properties": { - "apps": { - "type": "string", - "format": "int64" + "id": { + "type": "string" }, - "services": { + "created_at": { "type": "string", - "format": "int64" + "format": "date-time" }, - "domains": { + "updated_at": { "type": "string", - "format": "int64", - "title": "Deprecated, use custom_domains instead" + "format": "date-time" }, - "services_by_app": { - "type": "string", - "format": "int64" + "organization_id": { + "type": "string" }, - "service_provisioning_concurrency": { - "type": "string", - "format": "int64" + "app_id": { + "type": "string" }, - "memory_mb": { - "type": "string", + "service_id": { + "type": "string" + }, + "regional_deployment_id": { + "type": "string" + }, + "allocation_id": { + "type": "string" + }, + "type": { + "type": "string" + }, + "replica_index": { + "type": "integer", "format": "int64" }, - "instance_types": { - "type": "array", - "items": { - "type": "string" - } + "region": { + "type": "string" }, - "regions": { + "datacenter": { + "type": "string" + }, + "hypervisor": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/Instance.Status" + }, + "messages": { "type": "array", "items": { "type": "string" } }, - "max_organization_members": { + "started_at": { "type": "string", - "format": "int64" - }, - "max_instances_by_type": { - "type": "object", - "additionalProperties": { - "type": "string", - "format": "int64" - } + "format": "date-time" }, - "persistent_volumes_by_region": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/PersistentVolumeQuotas" - } + "succeeded_at": { + "type": "string", + "format": "date-time" }, - "custom_domains": { + "terminated_at": { "type": "string", - "format": "int64" + "format": "date-time" }, - "domains_load_balancer": { - "$ref": "#/definitions/DomainLoadBalancerQuotas" + "xyz_deployment_id": { + "type": "string", + "description": "WARNING: Please don't use the following attribute.\nKoyeb doesn't guarantee backwards compatible breaking change and reserve the right to completely drop it without notice.\nUSE AT YOUR OWN RISK." + } + } + }, + "Instance.Status": { + "type": "string", + "enum": [ + "ALLOCATING", + "STARTING", + "HEALTHY", + "UNHEALTHY", + "STOPPING", + "STOPPED", + "ERROR", + "SLEEPING" + ], + "default": "ALLOCATING" + }, + "ListDeploymentEventsReply": { + "type": "object", + "properties": { + "events": { + "type": "array", + "items": { + "$ref": "#/definitions/DeploymentEvent" + }, + "title": "The collection of events" }, - "metrics_retention": { + "limit": { "type": "integer", - "format": "int32", - "title": "Time in days" + "format": "int64", + "title": "The limit in the request" }, - "logs_retention": { + "offset": { "type": "integer", - "format": "int32", - "title": "Time in days" + "format": "int64", + "title": "The offset in the request" }, - "access_reserved_subdomains": { + "order": { + "type": "string", + "title": "The order in the request" + }, + "has_next": { + "type": "boolean", + "title": "If there is more items after in the collection" + } + } + }, + "ListDeploymentsReply": { + "type": "object", + "properties": { + "deployments": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/DeploymentListItem" }, - "title": "The mapping between reserved_subdomain names and their value is in the code" + "title": "The collection of deployments" }, - "proxy_ports": { + "limit": { "type": "integer", - "format": "int64" + "format": "int64", + "title": "The limit in the request" }, - "scale_to_zero": { - "$ref": "#/definitions/ScaleToZeroQuotas" + "offset": { + "type": "integer", + "format": "int64", + "title": "The offset in the request" }, - "archives": { - "type": "string", - "format": "int64" + "count": { + "type": "integer", + "format": "int64", + "title": "The total number of items" }, - "archive_max_size_mb": { - "type": "string", - "format": "int64" + "has_next": { + "type": "boolean", + "title": "If there is more items after in the collection" + } + } + }, + "Env": { + "type": "object", + "properties": { + "key": { + "type": "string" }, - "lifecycle": { - "$ref": "#/definitions/LifecycleQuotas" + "value": { + "type": "string" }, - "max_projects": { - "type": "string", - "format": "int64" + "secret": { + "type": "string" } } }, - "ScaleToZeroQuotas": { + "GetRegionalDeploymentReply": { "type": "object", "properties": { - "is_deep_sleep_enabled": { - "type": "boolean", - "title": "deep sleep limits" + "regional_deployment": { + "$ref": "#/definitions/RegionalDeployment" + } + } + }, + "ListRegionalDeploymentEventsReply": { + "type": "object", + "properties": { + "events": { + "type": "array", + "items": { + "$ref": "#/definitions/RegionalDeploymentEvent" + }, + "title": "The collection of events" }, - "deep_sleep_idle_delay_min": { + "limit": { "type": "integer", - "format": "int64" + "format": "int64", + "title": "The limit in the request" }, - "deep_sleep_idle_delay_max": { + "offset": { "type": "integer", - "format": "int64" + "format": "int64", + "title": "The offset in the request" }, - "is_light_sleep_enabled": { + "order": { + "type": "string", + "title": "The order in the request" + }, + "has_next": { "type": "boolean", - "title": "light sleep limits" + "title": "If there is more items after in the collection" + } + } + }, + "ListRegionalDeploymentsReply": { + "type": "object", + "properties": { + "regional_deployments": { + "type": "array", + "items": { + "$ref": "#/definitions/RegionalDeploymentListItem" + }, + "title": "The collection of regional deployments" + }, + "limit": { + "type": "integer", + "format": "int64", + "title": "The limit in the request" }, - "light_sleep_idle_delay_min": { + "offset": { "type": "integer", - "format": "int64" + "format": "int64", + "title": "The offset in the request" }, - "light_sleep_idle_delay_max": { + "count": { "type": "integer", - "format": "int64" - } - } - }, - "CreateStageAttemptReply": { - "type": "object" - }, - "DeclareStageProgressReply": { - "type": "object" - }, - "DeclareStepProgressReply": { - "type": "object" - }, - "DeploymentProvisioningInfo.Stage.Status": { - "type": "string", - "enum": [ - "UNKNOWN", - "PENDING", - "RUNNING", - "FAILED", - "COMPLETED", - "ABORTED" - ], - "default": "UNKNOWN" - }, - "BasicAuthPolicy": { - "type": "object", - "properties": { - "username": { - "type": "string" + "format": "int64", + "title": "The total number of items" }, - "password": { - "type": "string" + "has_next": { + "type": "boolean", + "title": "If there is more items after in the collection" } } }, - "SecurityPolicies": { + "Port": { "type": "object", "properties": { - "basic_auths": { - "type": "array", - "items": { - "$ref": "#/definitions/BasicAuthPolicy" - } + "port": { + "type": "integer", + "format": "int64" }, - "api_keys": { - "type": "array", - "items": { - "type": "string" - } + "protocol": { + "type": "string" } } }, - "App": { + "RegionalDeployment": { "type": "object", "properties": { "id": { "type": "string" }, - "name": { - "type": "string" - }, - "organization_id": { - "type": "string" - }, "created_at": { "type": "string", "format": "date-time" @@ -16207,19 +16875,19 @@ "type": "string", "format": "date-time" }, - "started_at": { + "scheduled_at": { "type": "string", "format": "date-time" }, - "succeeded_at": { + "allocated_at": { "type": "string", "format": "date-time" }, - "paused_at": { + "started_at": { "type": "string", "format": "date-time" }, - "resumed_at": { + "succeeded_at": { "type": "string", "format": "date-time" }, @@ -16227,210 +16895,107 @@ "type": "string", "format": "date-time" }, - "status": { - "$ref": "#/definitions/App.Status" - }, - "messages": { - "type": "array", - "items": { - "type": "string" - } - }, - "version": { - "type": "string", - "format": "uint64" - }, - "domains": { - "type": "array", - "items": { - "$ref": "#/definitions/Domain" - } - }, - "life_cycle": { - "$ref": "#/definitions/AppLifeCycle" - } - } - }, - "App.Status": { - "type": "string", - "enum": [ - "STARTING", - "HEALTHY", - "DEGRADED", - "UNHEALTHY", - "DELETING", - "DELETED", - "PAUSING", - "PAUSED", - "RESUMING" - ], - "default": "STARTING" - }, - "AppLifeCycle": { - "type": "object", - "properties": { - "delete_when_empty": { - "type": "boolean" - } - } - }, - "ArchiveSource": { - "type": "object", - "properties": { - "id": { - "type": "string", - "title": "The ID of the archive to deploy" - }, - "buildpack": { - "$ref": "#/definitions/BuildpackBuilder" + "organization_id": { + "type": "string" }, - "docker": { - "$ref": "#/definitions/DockerBuilder" - } - } - }, - "AutoRelease": { - "type": "object", - "properties": { - "groups": { - "type": "array", - "items": { - "$ref": "#/definitions/AutoRelease.Group" - } - } - } - }, - "AutoRelease.Group": { - "type": "object", - "properties": { - "name": { + "app_id": { "type": "string" }, - "repository": { + "service_id": { "type": "string" }, - "git_ref": { - "type": "string", - "title": "A git ref to track (.e.g: refs/tags/ or refs/heads/" + "region": { + "type": "string" }, - "latest_sha": { - "type": "string", - "title": "The last hash that was resolved (used to avoid triggering releases when things haven't changed)" - } - }, - "title": "Configuration extracted from the latest deployment in this deployment_group" - }, - "BuildpackBuilder": { - "type": "object", - "properties": { - "build_command": { - "type": "string", - "title": "A command used to override the build command, run after all build steps" + "parent_id": { + "type": "string" }, - "run_command": { - "type": "string", - "title": "A command used to override the default run command" + "child_id": { + "type": "string" }, - "privileged": { - "type": "boolean", - "title": "A flag to run the container in privileged mode" - } - } - }, - "ComposeReply": { - "type": "object", - "properties": { - "app": { - "$ref": "#/definitions/App" + "status": { + "$ref": "#/definitions/RegionalDeployment.Status" }, - "services": { + "messages": { "type": "array", "items": { - "$ref": "#/definitions/Service" + "type": "string" } - } - } - }, - "ConfigFile": { - "type": "object", - "properties": { - "path": { - "type": "string", - "title": "the path where the file is copied" - }, - "permissions": { - "type": "string", - "title": "the permissions of the file in format 0644" - }, - "content": { - "type": "string", - "title": "the content of the file" - } - } - }, - "CreateApp": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "life_cycle": { - "$ref": "#/definitions/AppLifeCycle" }, - "project_id": { - "type": "string", - "title": "(Optional) The project ID to associate with the app" - } - } - }, - "CreateCompose": { - "type": "object", - "properties": { - "app": { - "$ref": "#/definitions/CreateApp" + "definition": { + "$ref": "#/definitions/RegionalDeploymentDefinition" }, - "services": { + "datacenters": { "type": "array", "items": { - "$ref": "#/definitions/CreateService" + "type": "string" } - } - } - }, - "CreateService": { - "type": "object", - "properties": { - "app_id": { - "type": "string" }, - "definition": { - "$ref": "#/definitions/DeploymentDefinition" + "metadata": { + "$ref": "#/definitions/RegionalDeploymentMetadata" + }, + "provisioning_info": { + "$ref": "#/definitions/DeploymentProvisioningInfo" }, - "life_cycle": { - "$ref": "#/definitions/ServiceLifeCycle" + "role": { + "$ref": "#/definitions/RegionalDeployment.Role" }, - "project_id": { + "instance_snapshot_id": { "type": "string", - "title": "(Optional) The project ID to associate with the service" + "title": "Instance Snapshot used to boot the Instances of this deployment" + }, + "version": { + "type": "string", + "format": "uint64" + }, + "deployment_group": { + "type": "string", + "title": "Legacy stuff" + }, + "deployment_id": { + "type": "string" } } }, - "DatabaseSource": { - "type": "object", - "properties": { - "neon_postgres": { - "$ref": "#/definitions/NeonPostgresDatabase" - } - } + "RegionalDeployment.Role": { + "type": "string", + "enum": [ + "INVALID", + "ACTIVE", + "UPCOMING", + "CURRENT" + ], + "default": "INVALID" }, - "DeploymentDefinition": { + "RegionalDeployment.Status": { + "type": "string", + "enum": [ + "PENDING", + "PROVISIONING", + "SCHEDULED", + "CANCELING", + "CANCELED", + "ALLOCATING", + "STARTING", + "HEALTHY", + "DEGRADED", + "UNHEALTHY", + "STOPPING", + "STOPPED", + "ERRORING", + "ERROR", + "SLEEPING" + ], + "default": "PENDING" + }, + "RegionalDeploymentDefinition": { "type": "object", "properties": { "name": { "type": "string" }, "type": { - "$ref": "#/definitions/DeploymentDefinition.Type" + "$ref": "#/definitions/RegionalDeploymentDefinition.Type" }, "strategy": { "$ref": "#/definitions/DeploymentStrategy" @@ -16438,44 +17003,32 @@ "routes": { "type": "array", "items": { - "$ref": "#/definitions/DeploymentRoute" + "$ref": "#/definitions/Route" } }, "ports": { "type": "array", "items": { - "$ref": "#/definitions/DeploymentPort" - } - }, - "proxy_ports": { - "type": "array", - "items": { - "$ref": "#/definitions/DeploymentProxyPort" + "$ref": "#/definitions/Port" } }, "env": { "type": "array", "items": { - "$ref": "#/definitions/DeploymentEnv" + "$ref": "#/definitions/Env" } }, - "regions": { - "type": "array", - "items": { - "type": "string" - } + "region": { + "type": "string" }, - "scalings": { - "type": "array", - "items": { - "$ref": "#/definitions/DeploymentScaling" - } + "scaling": { + "$ref": "#/definitions/Scaling" }, - "instance_types": { - "type": "array", - "items": { - "$ref": "#/definitions/DeploymentInstanceType" - } + "instance_type": { + "type": "string" + }, + "deployment_group": { + "type": "string" }, "health_checks": { "type": "array", @@ -16486,7 +17039,7 @@ "volumes": { "type": "array", "items": { - "$ref": "#/definitions/DeploymentVolume" + "$ref": "#/definitions/RegionalDeploymentVolume" } }, "config_files": { @@ -16499,7 +17052,10 @@ "type": "boolean" }, "mesh": { - "$ref": "#/definitions/DeploymentMesh" + "$ref": "#/definitions/RegionalDeploymentMesh" + }, + "network_policy": { + "$ref": "#/definitions/NetworkPolicy" }, "docker": { "$ref": "#/definitions/DockerSource" @@ -16507,757 +17063,1035 @@ "git": { "$ref": "#/definitions/GitSource" }, - "database": { - "$ref": "#/definitions/DatabaseSource" - }, "archive": { "$ref": "#/definitions/ArchiveSource" } } }, - "DeploymentDefinition.Type": { + "RegionalDeploymentDefinition.Type": { + "type": "string", + "enum": [ + "INVALID", + "WEB", + "WORKER", + "_", + "SANDBOX" + ], + "default": "INVALID", + "title": "- _: We match with DeploymentDefinition.Type, so we skip 3 which is DATABASE" + }, + "RegionalDeploymentEvent": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "when": { + "type": "string", + "format": "date-time" + }, + "organization_id": { + "type": "string" + }, + "regional_deployment_id": { + "type": "string" + }, + "type": { + "type": "string" + }, + "message": { + "type": "string" + }, + "metadata": { + "type": "object" + } + } + }, + "RegionalDeploymentListItem": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "region": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/RegionalDeployment.Status" + }, + "messages": { + "type": "array", + "items": { + "type": "string" + } + }, + "definition": { + "$ref": "#/definitions/RegionalDeploymentDefinition" + }, + "instance_snapshot_id": { + "type": "string", + "title": "Instance Snapshot used to boot the Instances of this deployment" + } + } + }, + "RegionalDeploymentMesh": { + "type": "string", + "enum": [ + "REGIONAL_DEPLOYMENT_MESH_AUTO", + "REGIONAL_DEPLOYMENT_MESH_ENABLED", + "REGIONAL_DEPLOYMENT_MESH_DISABLED" + ], + "default": "REGIONAL_DEPLOYMENT_MESH_AUTO" + }, + "RegionalDeploymentMetadata": { + "type": "object" + }, + "RegionalDeploymentVolume": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "the id of the volume" + }, + "path": { + "type": "string", + "title": "the path where the volume is mounted to" + }, + "replica_index": { + "type": "integer", + "format": "int64", + "title": "the replica index to mount the volume to" + } + } + }, + "Route": { + "type": "object", + "properties": { + "port": { + "type": "integer", + "format": "int64" + }, + "path": { + "type": "string" + }, + "security_policies": { + "$ref": "#/definitions/SecurityPolicies" + } + } + }, + "Scaling": { + "type": "object", + "properties": { + "min": { + "type": "integer", + "format": "int64" + }, + "max": { + "type": "integer", + "format": "int64" + }, + "targets": { + "type": "array", + "items": { + "$ref": "#/definitions/DeploymentScalingTarget" + } + } + } + }, + "VerifyDockerImageReply": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "title": "Whether the image is accessible or not" + }, + "reason": { + "type": "string", + "title": "(Optional) If the image is not accessible, the reason" + }, + "code": { + "$ref": "#/definitions/VerifyDockerImageReply.ErrCode", + "title": "(Optional) If the image is not accessible, return an error code" + } + } + }, + "VerifyDockerImageReply.ErrCode": { "type": "string", "enum": [ - "INVALID", - "WEB", - "WORKER", - "DATABASE", - "SANDBOX" + "UNKNOWN", + "AUTH_ACCESS_DENIED", + "ANON_ACCESS_DENIED", + "AUTH_NOT_FOUND", + "ANON_NOT_FOUND", + "REGISTRY_ERROR", + "TIMEOUT", + "DNS", + "MALFORMED", + "INVALID_OS", + "INVALID_ARCH", + "INVALID_SCHEME", + "GENERIC" ], - "default": "INVALID" + "default": "UNKNOWN", + "description": "- UNKNOWN: Default value\n - AUTH_ACCESS_DENIED: The registry denied access to an authenticated request\n - ANON_ACCESS_DENIED: The registry denied access to an anonymous request\n - AUTH_NOT_FOUND: The image has not been found after an authenticated request\n - ANON_NOT_FOUND: The image has not been found after an anonymous request\n - REGISTRY_ERROR: The registry returned an error\n - TIMEOUT: The request to the registry timed out\n - DNS: There was an error trying to resolve the name of the registry\n - MALFORMED: The provided image name is malformed\n - INVALID_OS: The operating system is not supported\n - INVALID_ARCH: The architecture is not supported\n - INVALID_SCHEME: The scheme is not https\n - GENERIC: Generic catch-all error code", + "title": "The error code associated to each specific failure mode" }, - "DeploymentEnv": { + "CreatePersistentVolumeReply": { "type": "object", "properties": { - "scopes": { - "type": "array", - "items": { - "type": "string" - } - }, - "key": { - "type": "string" - }, - "value": { - "type": "string" - }, - "secret": { - "type": "string" + "volume": { + "$ref": "#/definitions/PersistentVolume" } } }, - "DeploymentHealthCheck": { + "CreatePersistentVolumeRequest": { "type": "object", "properties": { - "grace_period": { - "type": "integer", - "format": "int64", - "title": "An optional initial period in seconds to wait for the instance to become healthy, default is 5s" + "volume_type": { + "$ref": "#/definitions/PersistentVolumeBackingStore", + "title": "the volume backing store type" }, - "interval": { - "type": "integer", - "format": "int64", - "title": "An optional period in seconds between two health checks, default is 60s" + "name": { + "type": "string", + "title": "the volume name" }, - "restart_limit": { - "type": "integer", - "format": "int64", - "title": "An optional number of consecutive failures before attempting to restart the service, default is 3" + "region": { + "type": "string", + "title": "the volume region" }, - "timeout": { + "read_only": { + "type": "boolean", + "title": "whether the volume must be set as read only" + }, + "max_size": { "type": "integer", "format": "int64", - "title": "An optional maximum time to wait in seconds before considering the check as a failure, default is 5s" + "title": "the size of the volume (in Gigabyte / GB)" }, - "tcp": { - "$ref": "#/definitions/TCPHealthCheck" + "snapshot_id": { + "type": "string", + "title": "(optional) the id of the snapshot whence the volume comes from" }, - "http": { - "$ref": "#/definitions/HTTPHealthCheck" + "project_id": { + "type": "string", + "title": "(Optional) The project ID to associate with the volume" } } }, - "DeploymentInstanceType": { + "DeletePersistentVolumeReply": { "type": "object", "properties": { - "scopes": { - "type": "array", - "items": { - "type": "string" - } - }, - "type": { - "type": "string" + "volume": { + "$ref": "#/definitions/PersistentVolume" } } }, - "DeploymentMesh": { - "type": "string", - "enum": [ - "DEPLOYMENT_MESH_AUTO", - "DEPLOYMENT_MESH_ENABLED", - "DEPLOYMENT_MESH_DISABLED" - ], - "default": "DEPLOYMENT_MESH_AUTO" + "GetPersistentVolumeReply": { + "type": "object", + "properties": { + "volume": { + "$ref": "#/definitions/PersistentVolume" + } + } }, - "DeploymentPort": { + "ListPersistentVolumeEventsReply": { "type": "object", "properties": { - "port": { + "events": { + "type": "array", + "items": { + "$ref": "#/definitions/PersistentVolumeEvent" + }, + "title": "The collection of events" + }, + "limit": { "type": "integer", - "format": "int64" + "format": "int64", + "title": "The limit in the request" }, - "protocol": { + "offset": { + "type": "integer", + "format": "int64", + "title": "The offset in the request" + }, + "order": { "type": "string", - "title": "One of http, http2, tcp" + "title": "The order in the request" + }, + "has_next": { + "type": "boolean", + "title": "If there is more items after in the collection" } } }, - "DeploymentProxyPort": { + "ListPersistentVolumesReply": { "type": "object", "properties": { - "port": { + "volumes": { + "type": "array", + "items": { + "$ref": "#/definitions/PersistentVolume" + }, + "title": "The collection of persistent volumes" + }, + "limit": { "type": "integer", - "format": "int64" + "format": "int64", + "title": "The limit in the request" }, - "protocol": { - "$ref": "#/definitions/ProxyPortProtocol" + "offset": { + "type": "integer", + "format": "int64", + "title": "The offset in the request" + }, + "has_next": { + "type": "boolean", + "title": "If there is more items after in the collection" } } }, - "DeploymentRoute": { + "PersistentVolume": { "type": "object", "properties": { - "port": { + "id": { + "type": "string", + "title": "the identifier for the volume object" + }, + "name": { + "type": "string", + "title": "the volume name" + }, + "snapshot_id": { + "type": "string", + "title": "(optional) the id of the snapshot whence the volume comes from" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "creation timestamp" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "title": "last change timestamp" + }, + "deleted_at": { + "type": "string", + "format": "date-time", + "title": "deletion timestamp" + }, + "organization_id": { + "type": "string", + "title": "the organization to which the volume belongs to" + }, + "service_id": { + "type": "string", + "title": "the service_id to which the volume is eventually bound to" + }, + "region": { + "type": "string", + "title": "the region where the volume exists" + }, + "read_only": { + "type": "boolean", + "title": "whether to mount the volume in read-only mode" + }, + "max_size": { "type": "integer", - "format": "int64" + "format": "int64", + "title": "the maximum size of the volume (in Gigabyte / GB)" + }, + "cur_size": { + "type": "integer", + "format": "int64", + "title": "the used amount of space as measured the last time (in Gigabyte / GB)" + }, + "status": { + "$ref": "#/definitions/PersistentVolumeStatus", + "title": "the status of the volume" + }, + "backing_store": { + "$ref": "#/definitions/PersistentVolumeBackingStore", + "title": "the backing store type" + } + }, + "title": "The object that represent a volume to handle persistency for deployments" + }, + "PersistentVolumeBackingStore": { + "type": "string", + "enum": [ + "PERSISTENT_VOLUME_BACKING_STORE_INVALID", + "PERSISTENT_VOLUME_BACKING_STORE_LOCAL_BLK" + ], + "default": "PERSISTENT_VOLUME_BACKING_STORE_INVALID", + "title": "- PERSISTENT_VOLUME_BACKING_STORE_INVALID: zero value, invalid\n - PERSISTENT_VOLUME_BACKING_STORE_LOCAL_BLK: the backing store is a locally reachable block device" + }, + "PersistentVolumeEvent": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "when": { + "type": "string", + "format": "date-time" + }, + "organization_id": { + "type": "string" + }, + "persistent_volume_id": { + "type": "string" + }, + "type": { + "type": "string" }, - "path": { + "message": { "type": "string" }, - "security_policies": { - "$ref": "#/definitions/SecurityPolicies" + "metadata": { + "type": "object" } } }, - "DeploymentScaling": { + "PersistentVolumeStatus": { + "type": "string", + "enum": [ + "PERSISTENT_VOLUME_STATUS_INVALID", + "PERSISTENT_VOLUME_STATUS_ATTACHED", + "PERSISTENT_VOLUME_STATUS_DETACHED", + "PERSISTENT_VOLUME_STATUS_DELETING", + "PERSISTENT_VOLUME_STATUS_DELETED", + "PERSISTENT_VOLUME_STATUS_ARCHIVING" + ], + "default": "PERSISTENT_VOLUME_STATUS_INVALID", + "title": "- PERSISTENT_VOLUME_STATUS_INVALID: zero value, invalid\n - PERSISTENT_VOLUME_STATUS_ATTACHED: the volume is attached to an instance\n - PERSISTENT_VOLUME_STATUS_DETACHED: the volume is free to use\n - PERSISTENT_VOLUME_STATUS_DELETING: the volume will be deleted\n - PERSISTENT_VOLUME_STATUS_DELETED: the volume was deleted\n - PERSISTENT_VOLUME_STATUS_ARCHIVING: the volume is being archived (snapshot being created and migrated to remote storage)" + }, + "UpdatePersistentVolumeReply": { "type": "object", "properties": { - "scopes": { - "type": "array", - "items": { - "type": "string" - } - }, - "min": { - "type": "integer", - "format": "int64" - }, - "max": { - "type": "integer", - "format": "int64" - }, - "targets": { - "type": "array", - "items": { - "$ref": "#/definitions/DeploymentScalingTarget" - } + "volume": { + "$ref": "#/definitions/PersistentVolume" } } }, - "DeploymentScalingTarget": { + "Archive": { "type": "object", "properties": { - "average_cpu": { - "$ref": "#/definitions/DeploymentScalingTargetAverageCPU" + "id": { + "type": "string", + "description": "The archive id, that can be referenced when creating or updating a service." }, - "average_mem": { - "$ref": "#/definitions/DeploymentScalingTargetAverageMem" + "organization_id": { + "type": "string", + "description": "Organization owning the archive." }, - "requests_per_second": { - "$ref": "#/definitions/DeploymentScalingTargetRequestsPerSecond" + "upload_url": { + "type": "string", + "description": "The URL where to upload the archive. This URL is signed and can only be\nused to upload the archive until `valid_until`." }, - "concurrent_requests": { - "$ref": "#/definitions/DeploymentScalingTargetConcurrentRequests" + "size": { + "type": "string", + "format": "uint64", + "description": "The provisioned space for the archive." }, - "requests_response_time": { - "$ref": "#/definitions/DeploymentScalingTargetRequestsResponseTime" + "created_at": { + "type": "string", + "format": "date-time", + "description": "Date of creation of the archive." }, - "sleep_idle_delay": { - "$ref": "#/definitions/DeploymentScalingTargetSleepIdleDelay" + "deleted_at": { + "type": "string", + "format": "date-time", + "description": "This field is automatically set by Koyeb when the\narchive is garbage collected." } } }, - "DeploymentScalingTargetAverageCPU": { + "CreateArchive": { "type": "object", "properties": { - "value": { - "type": "integer", - "format": "int64" + "size": { + "type": "string", + "format": "uint64", + "description": "How much space to provision for the archive, in bytes." + }, + "project_id": { + "type": "string", + "title": "(Optional) The project ID to associate with the archive" } } }, - "DeploymentScalingTargetAverageMem": { + "CreateArchiveReply": { "type": "object", "properties": { - "value": { - "type": "integer", - "format": "int64" + "archive": { + "$ref": "#/definitions/Archive" } } }, - "DeploymentScalingTargetConcurrentRequests": { + "GetInstanceReply": { "type": "object", "properties": { - "value": { - "type": "integer", - "format": "int64" + "instance": { + "$ref": "#/definitions/Instance" } } }, - "DeploymentScalingTargetRequestsPerSecond": { + "InstanceEvent": { "type": "object", "properties": { - "value": { - "type": "integer", - "format": "int64" + "id": { + "type": "string" + }, + "when": { + "type": "string", + "format": "date-time" + }, + "organization_id": { + "type": "string" + }, + "instance_id": { + "type": "string" + }, + "type": { + "type": "string" + }, + "message": { + "type": "string" + }, + "metadata": { + "type": "object" } } }, - "DeploymentScalingTargetRequestsResponseTime": { + "InstanceListItem": { "type": "object", "properties": { - "value": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "organization_id": { + "type": "string" + }, + "app_id": { + "type": "string" + }, + "service_id": { + "type": "string" + }, + "regional_deployment_id": { + "type": "string" + }, + "allocation_id": { + "type": "string" + }, + "type": { + "type": "string" + }, + "replica_index": { "type": "integer", "format": "int64" }, - "quantile": { - "type": "integer", - "format": "int64", - "description": "The quantile to use for autoscaling. For example, set to 95 to use the 95th\npercentile (p95) for autoscaling. Valid values are between 0 and 100." + "region": { + "type": "string" + }, + "datacenter": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/Instance.Status" + }, + "messages": { + "type": "array", + "items": { + "type": "string" + } + }, + "xyz_deployment_id": { + "type": "string", + "description": "WARNING: Please don't use the following attribute.\nKoyeb doesn't guarantee backwards compatible breaking change and reserve the right to completely drop it without notice.\nUSE AT YOUR OWN RISK." } } }, - "DeploymentScalingTargetSleepIdleDelay": { + "ListInstanceEventsReply": { "type": "object", "properties": { - "value": { - "type": "integer", - "format": "int64", - "description": "DEPRECATED: use deep_sleep_value instead.\nDelay in seconds after which a service which received 0 request is put to deep sleep." + "events": { + "type": "array", + "items": { + "$ref": "#/definitions/InstanceEvent" + }, + "title": "The collection of events" }, - "deep_sleep_value": { + "limit": { "type": "integer", "format": "int64", - "description": "Delay in seconds after which a service which received 0 request is put to deep sleep." + "title": "The limit in the request" }, - "light_sleep_value": { + "offset": { "type": "integer", "format": "int64", - "description": "Delay in seconds after which a service which received 0 request is put to light sleep." - } - } - }, - "DeploymentStrategy": { - "type": "object", - "properties": { - "type": { - "$ref": "#/definitions/DeploymentStrategyType", - "title": "Strategy type" - } - } - }, - "DeploymentStrategyType": { - "type": "string", - "enum": [ - "DEPLOYMENT_STRATEGY_TYPE_INVALID", - "DEPLOYMENT_STRATEGY_TYPE_DEFAULT", - "DEPLOYMENT_STRATEGY_TYPE_CANARY", - "DEPLOYMENT_STRATEGY_TYPE_ROLLING", - "DEPLOYMENT_STRATEGY_TYPE_BLUE_GREEN", - "DEPLOYMENT_STRATEGY_TYPE_IMMEDIATE" - ], - "default": "DEPLOYMENT_STRATEGY_TYPE_INVALID", - "description": " - DEPLOYMENT_STRATEGY_TYPE_INVALID: DEPRECATED: Use DEPLOYMENT_STRATEGY_TYPE_DEFAULT instead.\n - DEPLOYMENT_STRATEGY_TYPE_DEFAULT: Default/unspecified strategy (resolves to platform default, currently ROLLING).\n - DEPLOYMENT_STRATEGY_TYPE_CANARY: Use canary strategy.\n - DEPLOYMENT_STRATEGY_TYPE_ROLLING: Use rolling strategy.\n - DEPLOYMENT_STRATEGY_TYPE_BLUE_GREEN: Use blue green strategy.\n - DEPLOYMENT_STRATEGY_TYPE_IMMEDIATE: Use immediate strategy." - }, - "DeploymentVolume": { - "type": "object", - "properties": { - "id": { - "type": "string", - "title": "the id of the volume" + "title": "The offset in the request" }, - "path": { + "order": { "type": "string", - "title": "the path where the volume is mounted to" - }, - "replica_index": { - "type": "integer", - "format": "int64", - "title": "optionally, explicitly choose the replica index to mount the volume to" + "title": "The order in the request" }, - "scopes": { - "type": "array", - "items": { - "type": "string" - }, - "title": "scope of the associated" + "has_next": { + "type": "boolean", + "title": "If there is more items after in the collection" } } }, - "DesiredDeployment": { + "ListInstancesReply": { "type": "object", "properties": { - "groups": { + "instances": { "type": "array", "items": { - "$ref": "#/definitions/DesiredDeployment.Group" - } + "$ref": "#/definitions/InstanceListItem" + }, + "title": "The collection of instances" + }, + "limit": { + "type": "integer", + "format": "int64", + "title": "The limit in the request" + }, + "offset": { + "type": "integer", + "format": "int64", + "title": "The offset in the request" + }, + "count": { + "type": "integer", + "format": "int64", + "title": "The total number of items" + }, + "order": { + "type": "string", + "title": "The order in the request" } } }, - "DesiredDeployment.Group": { + "CreateSnapshotReply": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "deployment_ids": { - "type": "array", - "items": { - "type": "string" - } + "snapshot": { + "$ref": "#/definitions/Snapshot" } } }, - "DockerBuilder": { + "CreateSnapshotRequest": { "type": "object", "properties": { - "dockerfile": { + "parent_volume_id": { "type": "string", - "title": "A path to the Dockerfile" - }, - "entrypoint": { - "type": "array", - "items": { - "type": "string" - }, - "title": "The docker ENTRYPOINT" + "title": "The id of the volume to snapshot" }, - "command": { + "name": { "type": "string", - "title": "The docker CMD" - }, - "args": { - "type": "array", - "items": { - "type": "string" - }, - "title": "The docker CMD args" + "title": "The name of the snapshot" }, - "target": { + "project_id": { "type": "string", - "title": "The target for multi-stage builds" - }, - "privileged": { - "type": "boolean", - "title": "A flag to run the container in privileged mode" + "title": "(Optional) The project ID to associate with the snapshot" } } }, - "DockerSource": { + "DeleteSnapshotReply": { "type": "object", "properties": { - "image": { - "type": "string" - }, - "command": { - "type": "string" - }, - "args": { + "snapshot": { + "$ref": "#/definitions/Snapshot" + } + } + }, + "GetSnapshotReply": { + "type": "object", + "properties": { + "snapshot": { + "$ref": "#/definitions/Snapshot" + } + } + }, + "ListSnapshotsReply": { + "type": "object", + "properties": { + "snapshots": { "type": "array", "items": { - "type": "string" - } + "$ref": "#/definitions/Snapshot" + }, + "title": "The collection of snapshots" }, - "image_registry_secret": { - "type": "string" + "limit": { + "type": "integer", + "format": "int64", + "title": "The limit in the request" }, - "entrypoint": { - "type": "array", - "items": { - "type": "string" - } + "offset": { + "type": "integer", + "format": "int64", + "title": "The offset in the request" }, - "privileged": { + "has_next": { "type": "boolean", - "title": "A flag to run the container in privileged mode" + "title": "If there is more items after in the collection" } } }, - "Domain": { + "Snapshot": { "type": "object", "properties": { "id": { - "type": "string" - }, - "organization_id": { - "type": "string" + "type": "string", + "title": "the identifier of the snapshot object" }, "name": { - "type": "string" + "type": "string", + "title": "the snapshot name" + }, + "size": { + "type": "integer", + "format": "int64", + "title": "the original volume size" }, "created_at": { "type": "string", - "format": "date-time" + "format": "date-time", + "title": "creation timestamp" }, "updated_at": { "type": "string", - "format": "date-time" - }, - "status": { - "$ref": "#/definitions/Domain.Status" - }, - "type": { - "$ref": "#/definitions/Domain.Type" - }, - "app_id": { - "type": "string" - }, - "deployment_group": { - "type": "string" + "format": "date-time", + "title": "last change timestamp" }, - "verified_at": { + "deleted_at": { "type": "string", - "format": "date-time" - }, - "intended_cname": { - "type": "string" + "format": "date-time", + "title": "deletion timestamp" }, - "messages": { - "type": "array", - "items": { - "type": "string" - } + "organization_id": { + "type": "string", + "title": "the organization to which the snapshot belongs to" }, - "version": { + "parent_volume_id": { "type": "string", - "format": "uint64" + "title": "the volume from which the snapshot has been created" }, - "cloudflare": { - "$ref": "#/definitions/Domain.LoadBalancerCloudflare" + "region": { + "type": "string", + "title": "the region where the snapshot resides, if any" }, - "koyeb": { - "$ref": "#/definitions/Domain.LoadBalancerKoyeb" + "status": { + "$ref": "#/definitions/SnapshotStatus", + "title": "the status of the snapshot" }, - "project_id": { - "type": "string", - "description": "The project ID this domain belongs to. Empty if the domain is organization-level." - } - } - }, - "Domain.LoadBalancerCloudflare": { - "type": "object" - }, - "Domain.LoadBalancerKoyeb": { - "type": "object", - "properties": { - "request_timeout_seconds": { - "type": "integer", - "format": "int64", - "title": "Between 100 and 900" + "type": { + "$ref": "#/definitions/SnapshotType", + "title": "the type of snapshot (can be local or remote)" } - } + }, + "description": "The object that represents a snapshot. It can either be local, on a node, or remote, in a cold storage." }, - "Domain.Status": { + "SnapshotStatus": { "type": "string", "enum": [ - "PENDING", - "ACTIVE", - "ERROR", - "DELETING", - "DELETED" + "SNAPSHOT_STATUS_INVALID", + "SNAPSHOT_STATUS_CREATING", + "SNAPSHOT_STATUS_AVAILABLE", + "SNAPSHOT_STATUS_MIGRATING", + "SNAPSHOT_STATUS_DELETING", + "SNAPSHOT_STATUS_DELETED" ], - "default": "PENDING" + "default": "SNAPSHOT_STATUS_INVALID", + "title": "- SNAPSHOT_STATUS_INVALID: zero value, invalid\n - SNAPSHOT_STATUS_CREATING: the snapshot is being created\n - SNAPSHOT_STATUS_AVAILABLE: the snapshot is complete and available\n - SNAPSHOT_STATUS_MIGRATING: the snapshot is being migrated\n - SNAPSHOT_STATUS_DELETING: the snapshot is being deleted\n - SNAPSHOT_STATUS_DELETED: the snapshot is deleted" }, - "Domain.Type": { + "SnapshotType": { "type": "string", "enum": [ - "AUTOASSIGNED", - "CUSTOM" + "SNAPSHOT_TYPE_INVALID", + "SNAPSHOT_TYPE_LOCAL", + "SNAPSHOT_TYPE_REMOTE" ], - "default": "AUTOASSIGNED", - "title": "- AUTOASSIGNED: Domain like -.koyeb.app" + "default": "SNAPSHOT_TYPE_INVALID", + "title": "- SNAPSHOT_TYPE_INVALID: zero value, invalid\n - SNAPSHOT_TYPE_LOCAL: the snapshot is local to the machine\n - SNAPSHOT_TYPE_REMOTE: the snapshot is remote in a cold storage" + }, + "UpdateSnapshotReply": { + "type": "object", + "properties": { + "snapshot": { + "$ref": "#/definitions/Snapshot" + } + } + }, + "AzureContainerRegistryConfiguration": { + "type": "object", + "properties": { + "registry_name": { + "type": "string" + }, + "username": { + "type": "string" + }, + "password": { + "type": "string" + } + } }, - "GitSource": { + "CreateSecret": { "type": "object", "properties": { - "repository": { - "type": "string", - "description": "A url to a git repository (contains the provider as well) .e.g: github.com/koyeb/test." + "name": { + "type": "string" }, - "branch": { - "type": "string", - "title": "A git branch that will be tracked for new commits and deployments will be created" + "type": { + "$ref": "#/definitions/SecretType" }, - "tag": { - "type": "string", - "title": "A git tag that should be built" + "value": { + "type": "string" }, - "sha": { - "type": "string", - "title": "A git commit that should be built (useful for pinning to a commit, this will always be set when a deployment is created by a code push)" + "docker_hub_registry": { + "$ref": "#/definitions/DockerHubRegistryConfiguration" }, - "build_command": { - "type": "string", - "title": "A command used to override the build command, run after all build steps \u2014 deprecated, use buildpack.build_command instead" + "private_registry": { + "$ref": "#/definitions/PrivateRegistryConfiguration" }, - "run_command": { - "type": "string", - "title": "A command used to override the default run command - deprecated, use buildpack.run_command instead" + "digital_ocean_registry": { + "$ref": "#/definitions/DigitalOceanRegistryConfiguration" }, - "no_deploy_on_push": { - "type": "boolean", - "title": "A flag to disable a new deployment when a push event is detected" + "github_registry": { + "$ref": "#/definitions/GitHubRegistryConfiguration" }, - "workdir": { - "type": "string", - "title": "A subdirectory to use as the build directory" + "gitlab_registry": { + "$ref": "#/definitions/GitLabRegistryConfiguration" }, - "buildpack": { - "$ref": "#/definitions/BuildpackBuilder" + "gcp_container_registry": { + "$ref": "#/definitions/GCPContainerRegistryConfiguration" }, - "docker": { - "$ref": "#/definitions/DockerBuilder" + "azure_container_registry": { + "$ref": "#/definitions/AzureContainerRegistryConfiguration" + }, + "project_id": { + "type": "string", + "title": "(Optional) The project ID to associate with the secret" } } }, - "HTTPHeader": { + "CreateSecretReply": { "type": "object", "properties": { - "key": { + "secret": { + "$ref": "#/definitions/Secret" + } + } + }, + "DatabaseRolePassword": { + "type": "object", + "properties": { + "username": { "type": "string" }, - "value": { + "password": { "type": "string" } } }, - "HTTPHealthCheck": { + "DeleteSecretReply": { + "type": "object" + }, + "DigitalOceanRegistryConfiguration": { "type": "object", "properties": { - "port": { - "type": "integer", - "format": "int64", - "title": "The port to use to perform the health check, must be declared in the ports section" - }, - "path": { - "type": "string", - "title": "The path to use to perform the HTTP health check" - }, - "method": { - "type": "string", - "title": "An optional HTTP method to use to perform the health check, default is GET" + "username": { + "type": "string" }, - "headers": { - "type": "array", - "items": { - "$ref": "#/definitions/HTTPHeader" - }, - "title": "An optional list of HTTP headers to provide when performing the request, default is empty" + "password": { + "type": "string" } } }, - "NeonPostgresDatabase": { + "DockerHubRegistryConfiguration": { "type": "object", "properties": { - "pg_version": { - "type": "integer", - "format": "int64" - }, - "region": { + "username": { "type": "string" }, - "instance_type": { + "password": { + "type": "string" + } + } + }, + "GCPContainerRegistryConfiguration": { + "type": "object", + "properties": { + "keyfile_content": { "type": "string" }, - "roles": { - "type": "array", - "items": { - "$ref": "#/definitions/NeonPostgresDatabase.NeonRole" - } + "url": { + "type": "string" + } + } + }, + "GetSecretReply": { + "type": "object", + "properties": { + "secret": { + "$ref": "#/definitions/Secret" + } + } + }, + "GitHubRegistryConfiguration": { + "type": "object", + "properties": { + "username": { + "type": "string" }, - "databases": { - "type": "array", - "items": { - "$ref": "#/definitions/NeonPostgresDatabase.NeonDatabase" - } + "password": { + "type": "string" } } }, - "NeonPostgresDatabase.NeonDatabase": { + "GitLabRegistryConfiguration": { "type": "object", "properties": { - "name": { + "username": { "type": "string" }, - "owner": { + "password": { "type": "string" } } }, - "NeonPostgresDatabase.NeonRole": { + "ListSecretsReply": { "type": "object", "properties": { - "name": { + "secrets": { + "type": "array", + "items": { + "$ref": "#/definitions/Secret" + } + }, + "limit": { + "type": "integer", + "format": "int64" + }, + "offset": { + "type": "integer", + "format": "int64" + }, + "count": { + "type": "integer", + "format": "int64" + } + } + }, + "PrivateRegistryConfiguration": { + "type": "object", + "properties": { + "username": { "type": "string" }, - "secret": { + "password": { + "type": "string" + }, + "url": { "type": "string" } } }, - "ProxyPortProtocol": { - "type": "string", - "enum": [ - "tcp" - ], - "default": "tcp" + "RevealSecretReply": { + "type": "object", + "properties": { + "value": {} + } }, - "Service": { + "Secret": { "type": "object", "properties": { "id": { "type": "string" }, - "created_at": { - "type": "string", - "format": "date-time" - }, - "updated_at": { - "type": "string", - "format": "date-time" + "name": { + "type": "string" }, - "started_at": { - "type": "string", - "format": "date-time" + "organization_id": { + "type": "string" }, - "succeeded_at": { - "type": "string", - "format": "date-time" + "type": { + "$ref": "#/definitions/SecretType" }, - "paused_at": { + "updated_at": { "type": "string", "format": "date-time" }, - "resumed_at": { + "created_at": { "type": "string", "format": "date-time" }, - "terminated_at": { + "project_id": { "type": "string", - "format": "date-time" - }, - "name": { - "type": "string" - }, - "type": { - "$ref": "#/definitions/Service.Type" - }, - "organization_id": { - "type": "string" + "description": "The project ID this secret belongs to. Empty if the secret is organization-level." }, - "app_id": { + "value": { "type": "string" }, - "status": { - "$ref": "#/definitions/Service.Status" - }, - "messages": { - "type": "array", - "items": { - "type": "string" - } + "docker_hub_registry": { + "$ref": "#/definitions/DockerHubRegistryConfiguration" }, - "version": { - "type": "string", - "format": "uint64" + "private_registry": { + "$ref": "#/definitions/PrivateRegistryConfiguration" }, - "active_deployment_id": { - "type": "string" + "digital_ocean_registry": { + "$ref": "#/definitions/DigitalOceanRegistryConfiguration" }, - "latest_deployment_id": { - "type": "string" + "github_registry": { + "$ref": "#/definitions/GitHubRegistryConfiguration" }, - "last_provisioned_deployment_id": { - "type": "string" + "gitlab_registry": { + "$ref": "#/definitions/GitLabRegistryConfiguration" }, - "state": { - "$ref": "#/definitions/ServiceState", - "title": "Legacy stuff" + "gcp_container_registry": { + "$ref": "#/definitions/GCPContainerRegistryConfiguration" }, - "life_cycle": { - "$ref": "#/definitions/ServiceLifeCycle" + "azure_container_registry": { + "$ref": "#/definitions/AzureContainerRegistryConfiguration" + }, + "database_role_password": { + "$ref": "#/definitions/DatabaseRolePassword" } } }, - "Service.Status": { - "type": "string", - "enum": [ - "STARTING", - "HEALTHY", - "DEGRADED", - "UNHEALTHY", - "DELETING", - "DELETED", - "PAUSING", - "PAUSED", - "RESUMING" - ], - "default": "STARTING" - }, - "Service.Type": { + "SecretType": { "type": "string", "enum": [ - "INVALID_TYPE", - "WEB", - "WORKER", - "DATABASE", - "SANDBOX" + "SIMPLE", + "REGISTRY", + "MANAGED" ], - "default": "INVALID_TYPE" - }, - "ServiceLifeCycle": { - "type": "object", - "properties": { - "delete_after_sleep": { - "type": "integer", - "format": "int64" - }, - "delete_after_create": { - "type": "integer", - "format": "int64" - } - } - }, - "ServiceState": { - "type": "object", - "properties": { - "desired_deployment": { - "$ref": "#/definitions/DesiredDeployment" - }, - "auto_release": { - "$ref": "#/definitions/AutoRelease" - } - } + "default": "SIMPLE" }, - "TCPHealthCheck": { + "UpdateSecretReply": { "type": "object", "properties": { - "port": { - "type": "integer", - "format": "int64", - "title": "The port to use to perform the health check, must be declared in the ports section" + "secret": { + "$ref": "#/definitions/Secret" } } }, @@ -17356,34 +18190,92 @@ } } }, - "AppEvent": { + "ReviewOrganizationCapacityReply": { "type": "object", "properties": { - "id": { + "has_capacity": { + "type": "boolean" + } + } + }, + "ReviewOrganizationCapacityRequest": { + "type": "object", + "properties": { + "plan": { "type": "string" }, - "when": { - "type": "string", - "format": "date-time" - }, - "organization_id": { - "type": "string" + "trialing": { + "type": "boolean" + } + } + }, + "ComposeReply": { + "type": "object", + "properties": { + "app": { + "$ref": "#/definitions/App" }, - "app_id": { - "type": "string" + "services": { + "type": "array", + "items": { + "$ref": "#/definitions/Service" + } + } + } + }, + "CreateCompose": { + "type": "object", + "properties": { + "app": { + "$ref": "#/definitions/CreateApp" }, - "type": { + "services": { + "type": "array", + "items": { + "$ref": "#/definitions/CreateService" + } + } + } + }, + "CreateInstanceSnapshotReply": { + "type": "object", + "properties": { + "instance_snapshot": { + "$ref": "#/definitions/InstanceSnapshot" + } + } + }, + "CreateInstanceSnapshotRequest": { + "type": "object", + "properties": { + "instance_id": { "type": "string" }, - "message": { + "name": { "type": "string" }, - "metadata": { - "type": "object" + "type": { + "$ref": "#/definitions/InstanceSnapshotType" } } }, - "AppListItem": { + "DeleteInstanceSnapshotReply": { + "type": "object", + "properties": { + "instance_snapshot": { + "$ref": "#/definitions/InstanceSnapshot" + } + } + }, + "GetInstanceSnapshotReply": { + "type": "object", + "properties": { + "instance_snapshot": { + "$ref": "#/definitions/InstanceSnapshot" + } + } + }, + "InstanceSnapshot": { "type": "object", "properties": { "id": { @@ -17392,25 +18284,49 @@ "name": { "type": "string" }, - "organization_id": { - "type": "string" + "created_at": { + "type": "string", + "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, - "created_at": { + "available_at": { "type": "string", "format": "date-time" }, - "domains": { - "type": "array", - "items": { - "$ref": "#/definitions/Domain" - } + "deleted_at": { + "type": "string", + "format": "date-time" + }, + "organization_id": { + "type": "string" + }, + "project_id": { + "type": "string" + }, + "service_id": { + "type": "string" + }, + "deployment_id": { + "type": "string" + }, + "regional_deployment_id": { + "type": "string" + }, + "instance_id": { + "type": "string" }, "status": { - "$ref": "#/definitions/App.Status" + "$ref": "#/definitions/InstanceSnapshotStatus" + }, + "type": { + "$ref": "#/definitions/InstanceSnapshotType" + }, + "version": { + "type": "string", + "format": "uint64" }, "messages": { "type": "array", @@ -17420,34 +18336,61 @@ } } }, - "CreateAppReply": { + "InstanceSnapshotEvent": { "type": "object", "properties": { - "app": { - "$ref": "#/definitions/App", - "title": "The entity created" + "id": { + "type": "string" + }, + "when": { + "type": "string", + "format": "date-time" + }, + "organization_id": { + "type": "string" + }, + "instance_snapshot_id": { + "type": "string" + }, + "type": { + "type": "string" + }, + "message": { + "type": "string" + }, + "metadata": { + "type": "object" } } }, - "DeleteAppReply": { - "type": "object" + "InstanceSnapshotStatus": { + "type": "string", + "enum": [ + "INSTANCE_SNAPSHOT_STATUS_INVALID", + "INSTANCE_SNAPSHOT_STATUS_CREATING", + "INSTANCE_SNAPSHOT_STATUS_AVAILABLE", + "INSTANCE_SNAPSHOT_STATUS_ERROR", + "INSTANCE_SNAPSHOT_STATUS_DELETING", + "INSTANCE_SNAPSHOT_STATUS_DELETED" + ], + "default": "INSTANCE_SNAPSHOT_STATUS_INVALID" }, - "GetAppReply": { - "type": "object", - "properties": { - "app": { - "$ref": "#/definitions/App", - "title": "The App retrieved" - } - } + "InstanceSnapshotType": { + "type": "string", + "enum": [ + "INSTANCE_SNAPSHOT_TYPE_INVALID", + "INSTANCE_SNAPSHOT_TYPE_FILESYSTEM", + "INSTANCE_SNAPSHOT_TYPE_FULL" + ], + "default": "INSTANCE_SNAPSHOT_TYPE_INVALID" }, - "ListAppEventsReply": { + "ListInstanceSnapshotEventsReply": { "type": "object", "properties": { "events": { "type": "array", "items": { - "$ref": "#/definitions/AppEvent" + "$ref": "#/definitions/InstanceSnapshotEvent" }, "title": "The collection of events" }, @@ -17471,540 +18414,585 @@ } } }, - "ListAppsReply": { + "ListInstanceSnapshotsReply": { "type": "object", "properties": { - "apps": { + "instance_snapshots": { "type": "array", "items": { - "$ref": "#/definitions/AppListItem" + "$ref": "#/definitions/InstanceSnapshot" } }, "limit": { "type": "integer", - "format": "int64", - "title": "The limit in the request" + "format": "int64" }, "offset": { "type": "integer", - "format": "int64", - "title": "The offset in the request" + "format": "int64" }, "count": { "type": "integer", - "format": "int64", - "title": "The total number of items" + "format": "int64" }, "has_next": { - "type": "boolean", - "title": "If there is more items after in the collection" + "type": "boolean" } } }, - "PauseAppReply": { - "type": "object" - }, - "ResumeAppReply": { + "ktest.TestAnonReply": { "type": "object" }, - "UpdateApp": { + "ktest.TestAuthReply": { "type": "object", "properties": { - "name": { + "payload": { "type": "string" }, - "life_cycle": { - "$ref": "#/definitions/AppLifeCycle" + "user_id": { + "type": "string" + }, + "organization_id": { + "type": "string" + }, + "workspace_id": { + "type": "string" } } }, - "UpdateAppReply": { + "ktest.TestAuthRequest": { "type": "object", "properties": { - "app": { - "$ref": "#/definitions/App", - "title": "The entity updated" + "payload": { + "type": "string" } } }, - "ArchiveDeploymentMetadata": { + "LogEntry": { "type": "object", "properties": { - "last_provisioned_deployment_id": { + "msg": { "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "labels": { + "type": "object" } } }, - "AutocompleteReply": { + "QueryLogsReply": { "type": "object", "properties": { - "secrets": { - "type": "array", - "items": { - "type": "string" - }, - "title": "List of available secrets" - }, - "user_env": { + "data": { "type": "array", "items": { - "type": "string" - }, - "title": "List of available user's environment variables" + "$ref": "#/definitions/LogEntry" + } }, - "system_env": { - "type": "array", - "items": { - "type": "string" - }, - "title": "List of available system's environment variables" + "pagination": { + "$ref": "#/definitions/QueryLogsReplyPagination" } } }, - "AutocompleteRequest": { + "QueryLogsReplyPagination": { "type": "object", "properties": { - "definition": { - "$ref": "#/definitions/DeploymentDefinition", - "title": "Deployment definition" + "has_more": { + "type": "boolean" + }, + "next_start": { + "type": "string", + "format": "date-time" + }, + "next_end": { + "type": "string", + "format": "date-time" } } }, - "CreateServiceReply": { + "GetMetricsReply": { "type": "object", "properties": { - "service": { - "$ref": "#/definitions/Service", - "title": "The entity created" + "metrics": { + "type": "array", + "items": { + "$ref": "#/definitions/GetMetricsReply.Metric" + } } } }, - "DatabaseDeploymentMetadata": { + "GetMetricsReply.Metric": { "type": "object", "properties": { - "neon_postgres": { - "$ref": "#/definitions/NeonPostgresDatabaseDeploymentMetadata" + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "samples": { + "type": "array", + "items": { + "$ref": "#/definitions/Sample" + } } } }, - "DeleteServiceReply": { - "type": "object" - }, - "DeleteServiceScalingReply": { - "type": "object", - "title": "Empty reply - success is indicated by no error" + "MetricName": { + "type": "string", + "enum": [ + "UNKNOWN", + "CPU_TOTAL_PERCENT", + "MEM_RSS", + "HTTP_THROUGHPUT", + "HTTP_RESPONSE_TIME_50P", + "HTTP_RESPONSE_TIME_90P", + "HTTP_RESPONSE_TIME_99P", + "HTTP_RESPONSE_TIME_MAX", + "PUBLIC_DATA_TRANSFER_IN", + "PUBLIC_DATA_TRANSFER_OUT" + ], + "default": "UNKNOWN" }, - "Deployment": { + "Sample": { "type": "object", "properties": { - "id": { + "timestamp": { "type": "string" }, - "created_at": { - "type": "string", - "format": "date-time" - }, - "updated_at": { - "type": "string", - "format": "date-time" - }, - "allocated_at": { - "type": "string", - "format": "date-time" - }, - "started_at": { - "type": "string", - "format": "date-time" - }, - "succeeded_at": { - "type": "string", - "format": "date-time" - }, - "terminated_at": { + "value": { + "type": "number", + "format": "double" + } + } + }, + "ExecCommandIO": { + "type": "object", + "properties": { + "data": { "type": "string", - "format": "date-time" - }, - "organization_id": { - "type": "string" - }, - "app_id": { - "type": "string" - }, - "service_id": { - "type": "string" - }, - "parent_id": { - "type": "string" - }, - "child_id": { - "type": "string" + "format": "byte", + "description": "Data is base64 encoded" }, - "status": { - "$ref": "#/definitions/Deployment.Status" + "close": { + "type": "boolean", + "description": "Indicate last data frame" + } + } + }, + "ExecCommandReply": { + "type": "object", + "properties": { + "stdout": { + "$ref": "#/definitions/ExecCommandIO" }, - "metadata": { - "$ref": "#/definitions/DeploymentMetadata" + "stderr": { + "$ref": "#/definitions/ExecCommandIO" }, - "definition": { - "$ref": "#/definitions/DeploymentDefinition" + "exited": { + "type": "boolean" }, - "messages": { + "exit_code": { + "type": "integer", + "format": "int32" + } + } + }, + "ExecCommandRequest.Body": { + "type": "object", + "properties": { + "command": { "type": "array", "items": { "type": "string" - } - }, - "provisioning_info": { - "$ref": "#/definitions/DeploymentProvisioningInfo" - }, - "database_info": { - "$ref": "#/definitions/DeploymentDatabaseInfo" - }, - "skip_build": { - "type": "boolean" + }, + "description": "Command to exec. Mandatory in the first frame sent" }, - "role": { - "$ref": "#/definitions/Deployment.Role" + "tty_size": { + "$ref": "#/definitions/ExecCommandRequest.TerminalSize" }, - "version": { - "type": "string", - "format": "uint64" + "stdin": { + "$ref": "#/definitions/ExecCommandIO" }, - "deployment_group": { - "type": "string" + "disableTty": { + "type": "boolean", + "description": "Disable TTY. It's enough to specify it in the first frame" } } }, - "Deployment.Role": { + "ExecCommandRequest.IdType": { "type": "string", "enum": [ "INVALID", - "ACTIVE", - "UPCOMING", - "CURRENT" + "INSTANCE_ID", + "SERVICE_ID" ], "default": "INVALID" }, - "Deployment.Status": { - "type": "string", - "enum": [ - "PENDING", - "PROVISIONING", - "SCHEDULED", - "CANCELING", - "CANCELED", - "ALLOCATING", - "STARTING", - "HEALTHY", - "DEGRADED", - "UNHEALTHY", - "STOPPING", - "STOPPED", - "ERRORING", - "ERROR", - "STASHED", - "SLEEPING" - ], - "default": "PENDING" + "ExecCommandRequest.TerminalSize": { + "type": "object", + "properties": { + "height": { + "type": "integer", + "format": "int32" + }, + "width": { + "type": "integer", + "format": "int32" + } + } }, - "DeploymentDatabaseInfo": { + "AcceptOrganizationInvitationReply": { "type": "object", "properties": { - "neon_postgres": { - "$ref": "#/definitions/DeploymentNeonPostgresDatabaseInfo" + "invitation": { + "$ref": "#/definitions/OrganizationInvitation", + "title": "The organization invitation accepted" } } }, - "DeploymentMetadata": { + "Action": { + "type": "string", + "enum": [ + "signin", + "signup", + "register" + ], + "default": "signin" + }, + "Budget": { "type": "object", "properties": { - "trigger": { - "$ref": "#/definitions/TriggerDeploymentMetadata" - }, - "database": { - "$ref": "#/definitions/DatabaseDeploymentMetadata" - }, - "git": { - "$ref": "#/definitions/GitDeploymentMetadata" - }, - "archive": { - "$ref": "#/definitions/ArchiveDeploymentMetadata" + "amount": { + "type": "string", + "format": "int64" }, - "proxy_ports": { + "thresholds": { "type": "array", "items": { - "$ref": "#/definitions/DeploymentProxyPortMetadata" + "type": "string", + "format": "int64" } - }, - "sandbox": { - "$ref": "#/definitions/SandboxMetadata" } } }, - "DeploymentNeonPostgresDatabaseInfo": { + "CannyAuthReply": { "type": "object", "properties": { - "active_time_seconds": { - "type": "string", - "format": "int64" - }, - "compute_time_seconds": { - "type": "string", - "format": "int64" - }, - "written_data_bytes": { - "type": "string", - "format": "int64" - }, - "data_transfer_bytes": { - "type": "string", - "format": "int64" - }, - "data_storage_bytes_hour": { - "type": "string", - "format": "int64" - }, - "server_host": { + "token": { "type": "string" - }, - "server_port": { - "type": "integer", - "format": "int64" - }, - "endpoint_state": { + } + } + }, + "CannyAuthRequest": { + "type": "object" + }, + "ClearIdenfyVerificationResultReply": { + "type": "object" + }, + "ClearIdenfyVerificationResultRequest": { + "type": "object", + "properties": { + "user_id": { "type": "string" }, - "endpoint_last_active": { - "type": "string", - "format": "date-time" - }, - "default_branch_id": { + "organization_id": { "type": "string" - }, - "default_branch_name": { + } + } + }, + "CreateAccessTokenReply": { + "type": "object", + "properties": { + "token": { + "type": "string" + } + } + }, + "CreateAccountRequest": { + "type": "object", + "example": { + "email": "john@snow.com", + "password": "..." + }, + "properties": { + "email": { "type": "string" }, - "default_branch_state": { + "password": { "type": "string" }, - "default_branch_logical_size": { - "type": "string", - "format": "int64" + "name": { + "type": "string" }, - "roles": { - "type": "array", - "items": { - "$ref": "#/definitions/DeploymentNeonPostgresDatabaseInfoRole" - } + "captcha": { + "type": "string" + } + }, + "description": "Create new account", + "title": "Create new account", + "required": [ + "email", + "password" + ] + }, + "CreateBudgetReply": { + "type": "object", + "properties": { + "budget": { + "$ref": "#/definitions/Budget" } } }, - "DeploymentNeonPostgresDatabaseInfoRole": { + "CreateOrganizationReply": { + "type": "object", + "properties": { + "organization": { + "$ref": "#/definitions/Organization" + } + } + }, + "CreateOrganizationRequest": { "type": "object", "properties": { "name": { "type": "string" - }, - "secret_id": { - "type": "string" } } }, - "DeploymentProvisioningInfo": { + "DeactivateOrganizationReply": { "type": "object", "properties": { - "sha": { - "type": "string", - "description": "The git sha for this build (we resolve the reference at the start of the build)." - }, - "image": { - "type": "string", - "description": "The docker image built as a result of this build." - }, - "stages": { - "type": "array", - "items": { - "$ref": "#/definitions/DeploymentProvisioningInfo.Stage" - }, - "description": "Some info about the build." + "organization": { + "$ref": "#/definitions/Organization" } } }, - "DeploymentProvisioningInfo.Stage": { + "DeclineOrganizationInvitationReply": { "type": "object", "properties": { - "name": { + "invitation": { + "$ref": "#/definitions/OrganizationInvitation", + "title": "The organization invitation declined" + } + } + }, + "DeleteBudgetReply": { + "type": "object" + }, + "DeleteOrganizationReply": { + "type": "object", + "properties": { + "organization": { + "$ref": "#/definitions/Organization" + } + } + }, + "DiscourseAuthReply": { + "type": "object", + "properties": { + "sso": { "type": "string" }, - "status": { - "$ref": "#/definitions/DeploymentProvisioningInfo.Stage.Status" - }, - "messages": { - "type": "array", - "items": { - "type": "string" - } - }, - "started_at": { - "type": "string", - "format": "date-time" - }, - "finished_at": { - "type": "string", - "format": "date-time" + "sig": { + "type": "string" + } + } + }, + "DiscourseAuthRequest": { + "type": "object", + "properties": { + "payload": { + "type": "string" }, - "build_attempts": { - "type": "array", - "items": { - "$ref": "#/definitions/DeploymentProvisioningInfo.Stage.BuildAttempt" - } + "sig": { + "type": "string" } } }, - "DeploymentProvisioningInfo.Stage.BuildAttempt": { + "GetBudgetReply": { "type": "object", "properties": { - "id": { - "type": "integer", - "format": "int64" + "budget": { + "$ref": "#/definitions/Budget" + } + } + }, + "GetGithubInstallationReply": { + "type": "object", + "properties": { + "installation_id": { + "type": "string" + }, + "installation_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "avatar_url": { + "type": "string" }, "status": { - "$ref": "#/definitions/DeploymentProvisioningInfo.Stage.Status" - }, - "messages": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/definitions/kgitproxy.GithubInstallation.Status" }, - "started_at": { + "installed_at": { "type": "string", "format": "date-time" }, - "finished_at": { + "suspended_at": { "type": "string", "format": "date-time" }, - "steps": { - "type": "array", - "items": { - "$ref": "#/definitions/DeploymentProvisioningInfo.Stage.BuildAttempt.BuildStep" - } - }, - "image_pushed": { - "type": "boolean" - }, - "internal_failure": { - "type": "boolean" + "indexing_status": { + "$ref": "#/definitions/kgitproxy.IndexingStatus" }, - "retryable_failure": { - "type": "boolean" + "indexed_repositories": { + "type": "integer", + "format": "int64" }, - "wait_completion": { - "type": "boolean", - "description": "This flag is used to finalize the build, and continue the deployment in case of success, or cancel and potentially retry the build in case of failure." + "total_repositories": { + "type": "integer", + "format": "int64" } } }, - "DeploymentProvisioningInfo.Stage.BuildAttempt.BuildStep": { + "GetIdenfyTokenReply": { "type": "object", "properties": { - "name": { + "auth_token": { "type": "string" - }, - "status": { - "$ref": "#/definitions/DeploymentProvisioningInfo.Stage.Status" - }, - "messages": { + } + } + }, + "GetOAuthOptionsReply": { + "type": "object", + "properties": { + "oauth_providers": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/OAuthProvider" } - }, - "started_at": { - "type": "string", - "format": "date-time" - }, - "finished_at": { - "type": "string", - "format": "date-time" + } + }, + "description": "A list of providers which you can use for single sign-on." + }, + "GetOrganizationReply": { + "type": "object", + "properties": { + "organization": { + "$ref": "#/definitions/Organization" } } }, - "DeploymentProxyPortMetadata": { + "GetUserOrganizationInvitationReply": { "type": "object", "properties": { - "host": { - "type": "string" + "invitation": { + "$ref": "#/definitions/OrganizationInvitation" + } + } + }, + "GetUserSettingsReply": { + "type": "object", + "properties": { + "settings": { + "$ref": "#/definitions/UserSettings" + } + } + }, + "GithubInstallationReply": { + "type": "object", + "properties": { + "app_name": { + "type": "string", + "title": "The github app name" }, - "public_port": { - "type": "integer", - "format": "int64" + "app_id": { + "type": "string", + "format": "int64", + "title": "The github app id" }, - "port": { - "type": "integer", - "format": "int64" + "url": { + "type": "string", + "title": "The url to start the installation flow" }, - "protocol": { - "$ref": "#/definitions/ProxyPortProtocol" + "state": { + "type": "string", + "title": "The state required by the protocol, it is only valid 10 minutes and encodes\ninformation about the type of flow" } } }, - "GetServiceReply": { + "GithubInstallationRequest": { "type": "object", "properties": { - "service": { - "$ref": "#/definitions/Service", - "title": "The Service retrieved" + "metadata": { + "type": "string", + "title": "A small (limited to 400 characters) string of arbitrary metadata which will\nbe encoded in the state" } } }, - "GetServiceScalingReply": { + "HasUnpaidInvoicesReply": { "type": "object", "properties": { - "scalings": { - "type": "array", - "items": { - "$ref": "#/definitions/ManualServiceScaling" - }, - "title": "The current manual scaling configuration" + "has_unpaid_invoices": { + "type": "boolean" } } }, - "GitDeploymentMetadata": { + "InviteUserRequest": { "type": "object", "properties": { - "last_provisioned_deployment_id": { + "email": { "type": "string" }, - "git_env": { - "$ref": "#/definitions/GitEnvDeploymentMetadata" + "name": { + "type": "string" + }, + "message": { + "type": "string" } } }, - "GitEnvDeploymentMetadata": { + "ListUserOrganizationInvitationsReply": { "type": "object", "properties": { - "sha": { - "type": "string" + "invitations": { + "type": "array", + "items": { + "$ref": "#/definitions/OrganizationInvitation" + }, + "title": "The collection of organization invitations" }, - "commit_author": { - "type": "string" + "limit": { + "type": "integer", + "format": "int64", + "title": "The limit in the request" }, - "commit_message": { - "type": "string" + "offset": { + "type": "integer", + "format": "int64", + "title": "The offset in the request" + }, + "count": { + "type": "integer", + "format": "int64", + "title": "The total number of items" } } }, - "ListServiceEventsReply": { + "ListUserOrganizationsReply": { "type": "object", "properties": { - "events": { + "organizations": { "type": "array", "items": { - "$ref": "#/definitions/ServiceEvent" + "$ref": "#/definitions/Organization" }, - "title": "The collection of events" + "title": "The collection of organizations" }, "limit": { "type": "integer", @@ -18016,1069 +19004,1050 @@ "format": "int64", "title": "The offset in the request" }, - "order": { - "type": "string", - "title": "The order in the request" - }, "has_next": { "type": "boolean", "title": "If there is more items after in the collection" } } }, - "ListServicesReply": { + "LoginMethodReply": { "type": "object", "properties": { - "services": { + "method": { + "$ref": "#/definitions/LoginMethodReply.Method" + } + } + }, + "LoginMethodReply.Method": { + "type": "string", + "enum": [ + "KOYEB", + "WORKOS" + ], + "default": "KOYEB" + }, + "LoginReply": { + "type": "object", + "properties": { + "token": { + "$ref": "#/definitions/Token" + } + } + }, + "ManageReply": { + "type": "object", + "properties": { + "url": { + "type": "string" + } + } + }, + "NextInvoiceReply": { + "type": "object", + "properties": { + "stripe_invoice": { + "type": "object" + }, + "lines": { "type": "array", "items": { - "$ref": "#/definitions/ServiceListItem" + "$ref": "#/definitions/NextInvoiceReply.Line" } }, - "limit": { + "discounts": { + "type": "array", + "items": { + "$ref": "#/definitions/NextInvoiceReply.Discount" + } + } + } + }, + "NextInvoiceReply.Discount": { + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/NextInvoiceReply.Discount.Type" + }, + "name": { + "type": "string" + }, + "amount": { + "type": "string", + "format": "int64" + } + } + }, + "NextInvoiceReply.Discount.Type": { + "type": "string", + "enum": [ + "PERCENT_OFF", + "AMOUNT_OFF" + ], + "default": "PERCENT_OFF" + }, + "NextInvoiceReply.Line": { + "type": "object", + "properties": { + "amount_excluding_tax": { "type": "integer", - "format": "int64", - "title": "The limit in the request" + "format": "int32" }, - "offset": { - "type": "integer", - "format": "int64", - "title": "The offset in the request" + "period": { + "$ref": "#/definitions/NextInvoiceReply.Line.Period" }, - "count": { - "type": "integer", - "format": "int64", - "title": "The total number of items" + "plan_nickname": { + "type": "string" }, - "has_next": { - "type": "boolean", - "title": "If there is more items after in the collection" + "price": { + "$ref": "#/definitions/NextInvoiceReply.Line.Price" + }, + "quantity": { + "type": "integer", + "format": "int32" } } }, - "ManualServiceScaling": { + "NextInvoiceReply.Line.Period": { "type": "object", "properties": { - "scopes": { - "type": "array", - "items": { - "type": "string" - } + "start": { + "type": "string", + "format": "date-time" }, - "instances": { - "type": "integer", - "format": "int64" + "end": { + "type": "string", + "format": "date-time" } } }, - "NeonPostgresDatabaseDeploymentMetadata": { + "NextInvoiceReply.Line.Price": { "type": "object", "properties": { - "reset_role_passwords": { - "type": "array", - "items": { - "type": "string" - } + "unit_amount_decimal": { + "type": "number", + "format": "double" } } }, - "PauseServiceReply": { - "type": "object" - }, - "RedeployReply": { + "OAuthCallbackReply": { "type": "object", "properties": { - "deployment": { - "$ref": "#/definitions/Deployment", - "title": "The entity updated" + "token": { + "$ref": "#/definitions/Token", + "title": "A jwt token to be used for session" } } }, - "RedeployRequest.Info": { + "OAuthCallbackRequest": { "type": "object", "properties": { - "deployment_group": { - "type": "string" + "state": { + "type": "string", + "title": "The state created at the origin of the OAuth flow" }, - "sha": { - "type": "string" + "code": { + "type": "string", + "title": "The code returned by the OAuth provider" }, - "use_cache": { - "type": "boolean" + "setup_action": { + "type": "string", + "description": "setup_action is populated in the context of a GitHub app installation\nrequest. For logins and signups, it is not set." }, - "skip_build": { - "type": "boolean", - "description": "If set to true, the build stage will be skipped and the image coming from the last successful build step will be used instead.\nThe call fails if no previous successful builds happened." + "installation_id": { + "type": "string", + "description": "installation_id is populated in the context of a GitHub app installation\nrequest. For logins and signups, it is not set." } } }, - "ResumeServiceReply": { - "type": "object" - }, - "SandboxMetadata": { + "OAuthProvider": { "type": "object", "properties": { - "public_url": { - "type": "string" + "id": { + "type": "string", + "title": "The name of the provider (.e.g github, google)" }, - "routing_key": { - "type": "string" + "url": { + "type": "string", + "title": "The URL to call to initiate the OAuth flow" + }, + "state": { + "type": "string", + "title": "The OAuth state required by the protocol, it is only valid 10 minutes and\nencodes information about the type of flow" } } }, - "ServiceEvent": { + "Organization": { "type": "object", "properties": { "id": { "type": "string" }, - "when": { - "type": "string", - "format": "date-time" + "external_id": { + "type": "string" }, - "organization_id": { + "provisioning": { + "type": "boolean" + }, + "address1": { "type": "string" }, - "service_id": { + "address2": { "type": "string" }, - "type": { + "city": { "type": "string" }, - "message": { + "postal_code": { "type": "string" }, - "metadata": { - "type": "object" - } - } - }, - "ServiceListItem": { - "type": "object", - "properties": { - "id": { + "state": { + "type": "string" + }, + "country": { + "type": "string" + }, + "company": { + "type": "boolean" + }, + "vat_number": { + "type": "string" + }, + "billing_name": { + "type": "string" + }, + "billing_email": { "type": "string" }, "name": { "type": "string" }, - "type": { - "$ref": "#/definitions/Service.Type" + "plan": { + "$ref": "#/definitions/Plan" }, - "organization_id": { + "plan_updated_at": { + "type": "string", + "format": "date-time" + }, + "has_payment_method": { + "type": "boolean" + }, + "subscription_id": { "type": "string" }, - "app_id": { + "current_subscription_id": { "type": "string" }, - "updated_at": { + "latest_subscription_id": { + "type": "string" + }, + "signup_qualification": { + "type": "object" + }, + "status": { + "$ref": "#/definitions/Organization.Status" + }, + "status_message": { + "$ref": "#/definitions/OrganizationDetailedStatus" + }, + "deactivation_reason": { + "$ref": "#/definitions/Organization.DeactivationReason" + }, + "verified": { + "type": "boolean" + }, + "qualifies_for_hobby23": { + "type": "boolean" + }, + "reprocess_after": { "type": "string", "format": "date-time" }, - "created_at": { + "trialing": { + "type": "boolean" + }, + "trial_starts_at": { "type": "string", "format": "date-time" }, - "status": { - "$ref": "#/definitions/Service.Status" + "trial_ends_at": { + "type": "string", + "format": "date-time" }, - "messages": { + "email_domain_allowlist": { "type": "array", "items": { "type": "string" } }, - "version": { - "type": "string", - "format": "uint64", - "title": "A version updated whenever this state changes (useful for caching)" + "default_project_id": { + "type": "string" + } + }, + "title": "Represent an Organization" + }, + "Organization.DeactivationReason": { + "type": "string", + "enum": [ + "INVALID", + "REQUESTED_BY_OWNER", + "SUBSCRIPTION_TERMINATION", + "LOCKED_BY_ADMIN", + "VERIFICATION_FAILED", + "TRIAL_DID_NOT_CONVERT" + ], + "default": "INVALID" + }, + "Organization.Status": { + "type": "string", + "enum": [ + "WARNING", + "LOCKED", + "ACTIVE", + "DEACTIVATING", + "DEACTIVATED", + "DELETING", + "DELETED" + ], + "default": "WARNING" + }, + "OrganizationDetailedStatus": { + "type": "string", + "enum": [ + "NEW", + "EMAIL_NOT_VALIDATED", + "BILLING_INFO_MISSING", + "LOCKED", + "PAYMENT_FAILURE", + "VALID", + "PENDING_VERIFICATION", + "VERIFICATION_FAILED", + "REVIEWING_ACCOUNT", + "PLAN_UPGRADE_REQUIRED" + ], + "default": "NEW" + }, + "OrganizationInvitation": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "email": { + "type": "string" + }, + "role": { + "$ref": "#/definitions/UserRole.Role" + }, + "status": { + "$ref": "#/definitions/OrganizationInvitation.Status" }, - "state": { - "$ref": "#/definitions/ServiceState" + "expires_at": { + "type": "string", + "format": "date-time" }, - "active_deployment_id": { + "organization_id": { "type": "string" }, - "latest_deployment_id": { + "organization": { + "$ref": "#/definitions/PublicOrganization" + }, + "invitee_id": { "type": "string" }, - "life_cycle": { - "$ref": "#/definitions/ServiceLifeCycle" - } - } - }, - "TriggerDeploymentMetadata": { - "type": "object", - "properties": { - "type": { - "$ref": "#/definitions/TriggerDeploymentMetadata.TriggerType" + "invitee": { + "$ref": "#/definitions/PublicUser" }, - "actor": { - "$ref": "#/definitions/TriggerDeploymentMetadata.ActorType" + "inviter_id": { + "type": "string" }, - "git": { - "$ref": "#/definitions/TriggerGitDeploymentMetadata" + "inviter": { + "$ref": "#/definitions/PublicUser" } } }, - "TriggerDeploymentMetadata.ActorType": { + "OrganizationInvitation.Status": { "type": "string", "enum": [ - "UNKNOWN_ACTOR", - "USER", - "SYSTEM" + "INVALID", + "PENDING", + "ACCEPTED", + "REFUSED", + "EXPIRED" ], - "default": "UNKNOWN_ACTOR" + "default": "INVALID" }, - "TriggerDeploymentMetadata.TriggerType": { + "Plan": { "type": "string", "enum": [ - "UNKNOWN_TYPE", - "GIT", - "RESUME", - "DATABASE_SYNC" + "hobby", + "starter", + "startup", + "business", + "enterprise", + "internal", + "hobby23", + "no_plan", + "pro", + "scale", + "partner_csp", + "partner_csp_unit" ], - "default": "UNKNOWN_TYPE" + "default": "hobby" }, - "TriggerGitDeploymentMetadata": { + "PublicOrganization": { "type": "object", "properties": { - "provider": { - "$ref": "#/definitions/TriggerGitDeploymentMetadata.Provider" - }, - "repository": { - "type": "string" - }, - "branch": { - "type": "string" - }, - "sha": { + "id": { "type": "string" }, - "message": { + "name": { "type": "string" }, - "sender_username": { - "type": "string" + "plan": { + "$ref": "#/definitions/Plan" }, - "sender_avatar_url": { - "type": "string" + "status": { + "$ref": "#/definitions/Organization.Status" }, - "sender_profile_url": { + "external_id": { "type": "string" } } }, - "TriggerGitDeploymentMetadata.Provider": { - "type": "string", - "enum": [ - "UNKNOWN", - "GITHUB" - ], - "default": "UNKNOWN" - }, - "UpdateService": { + "PublicUser": { "type": "object", "properties": { - "definition": { - "$ref": "#/definitions/DeploymentDefinition" + "id": { + "type": "string" }, - "metadata": { - "$ref": "#/definitions/DeploymentMetadata" + "email": { + "type": "string" }, - "skip_build": { - "type": "boolean", - "description": "If set to true, the build stage will be skipped and the image coming from the last successful build step will be used instead.\nThe call fails if no previous successful builds happened." + "name": { + "type": "string" }, - "save_only": { - "type": "boolean", - "title": "If set, do not trigger a deployment, only store the new settings" + "avatar_url": { + "type": "string" }, - "life_cycle": { - "$ref": "#/definitions/ServiceLifeCycle" + "github_id": { + "type": "string" + }, + "github_user": { + "type": "string" } } }, - "UpdateServiceReply": { + "ReactivateOrganizationReply": { "type": "object", "properties": { - "service": { - "$ref": "#/definitions/Service", - "title": "The entity updated" + "organization": { + "$ref": "#/definitions/Organization" } } }, - "UpdateServiceScalingReply": { - "type": "object", - "title": "Empty reply - success is indicated by no error" + "ResendEmailValidationReply": { + "type": "object" }, - "CancelDeploymentReply": { + "ResendEmailValidationRequest": { "type": "object" }, - "DeploymentEvent": { + "ResetPasswordReply": { + "type": "object" + }, + "ResetPasswordRequest": { "type": "object", + "example": { + "email": "john@snow.com" + }, "properties": { - "id": { - "type": "string" - }, - "when": { - "type": "string", - "format": "date-time" - }, - "organization_id": { - "type": "string" - }, - "deployment_id": { - "type": "string" - }, - "type": { - "type": "string" - }, - "message": { + "email": { "type": "string" - }, - "metadata": { - "type": "object" } } }, - "DeploymentListItem": { + "Token": { "type": "object", + "example": { + "id": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", + "expires": "2022-09-08T14:00:00Z", + "user_id": "996d7822-6b58-11e9-956f-32001b70f000", + "organization_id": "9f33b2c6-6b58-11e9-883c-32001b70f000" + }, "properties": { "id": { "type": "string" }, - "created_at": { - "type": "string", - "format": "date-time" - }, - "updated_at": { - "type": "string", - "format": "date-time" - }, - "allocated_at": { - "type": "string", - "format": "date-time" - }, - "started_at": { - "type": "string", - "format": "date-time" - }, - "succeeded_at": { - "type": "string", - "format": "date-time" - }, - "terminated_at": { - "type": "string", - "format": "date-time" - }, - "organization_id": { - "type": "string" - }, - "app_id": { - "type": "string" - }, - "service_id": { - "type": "string" - }, - "parent_id": { + "user_id": { "type": "string" }, - "child_id": { + "organization_id": { "type": "string" }, - "status": { - "$ref": "#/definitions/Deployment.Status" - }, - "metadata": { - "$ref": "#/definitions/DeploymentMetadata" - }, - "definition": { - "$ref": "#/definitions/DeploymentDefinition" - }, - "messages": { - "type": "array", - "items": { - "type": "string" - } - }, - "provisioning_info": { - "$ref": "#/definitions/DeploymentProvisioningInfo" - }, - "database_info": { - "$ref": "#/definitions/DeploymentDatabaseInfo" - }, - "version": { + "expires_at": { "type": "string", - "format": "uint64" - }, - "deployment_group": { - "type": "string" + "format": "date-time" } } }, - "GetDeploymentReply": { + "UnscopeOrganizationTokenRequest": { + "type": "object" + }, + "UpdateBudgetReply": { "type": "object", "properties": { - "deployment": { - "$ref": "#/definitions/Deployment" + "budget": { + "$ref": "#/definitions/Budget" } } }, - "GetDeploymentScalingReply": { + "UpdateOrganizationDefaultProjectReply": { "type": "object", "properties": { - "replicas": { - "type": "array", - "items": { - "$ref": "#/definitions/GetDeploymentScalingReplyItem" - }, - "title": "The replicas" + "organization": { + "$ref": "#/definitions/Organization" } } }, - "GetDeploymentScalingReplyItem": { + "UpdateOrganizationNameReply": { "type": "object", "properties": { - "region": { - "type": "string", - "title": "The replica region" - }, - "replica_index": { - "type": "integer", - "format": "int64" - }, - "instances": { - "type": "array", - "items": { - "$ref": "#/definitions/Instance" - }, - "description": "An array of `active` and `starting` instances.\n\nStatus of the active instance (and if none the most recent instance)\n string status = 4;\n Status message of the active instance (and if none the most recent instance)\n string message = 5;" + "organization": { + "$ref": "#/definitions/Organization" } } }, - "Instance": { + "UpdateOrganizationPlanReply": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "created_at": { - "type": "string", - "format": "date-time" - }, - "updated_at": { - "type": "string", - "format": "date-time" - }, - "organization_id": { - "type": "string" - }, - "app_id": { - "type": "string" - }, - "service_id": { - "type": "string" - }, - "regional_deployment_id": { - "type": "string" - }, - "allocation_id": { - "type": "string" - }, - "type": { - "type": "string" - }, - "replica_index": { - "type": "integer", - "format": "int64" - }, - "region": { - "type": "string" - }, - "datacenter": { - "type": "string" - }, - "hypervisor": { - "type": "string" - }, - "status": { - "$ref": "#/definitions/Instance.Status" - }, - "messages": { - "type": "array", - "items": { - "type": "string" - } - }, - "started_at": { - "type": "string", - "format": "date-time" - }, - "succeeded_at": { - "type": "string", - "format": "date-time" - }, - "terminated_at": { - "type": "string", - "format": "date-time" - }, - "xyz_deployment_id": { - "type": "string", - "description": "WARNING: Please don't use the following attribute.\nKoyeb doesn't guarantee backwards compatible breaking change and reserve the right to completely drop it without notice.\nUSE AT YOUR OWN RISK." + "organization": { + "$ref": "#/definitions/Organization" } } }, - "Instance.Status": { - "type": "string", - "enum": [ - "ALLOCATING", - "STARTING", - "HEALTHY", - "UNHEALTHY", - "STOPPING", - "STOPPED", - "ERROR", - "SLEEPING" - ], - "default": "ALLOCATING" - }, - "ListDeploymentEventsReply": { + "UpdateOrganizationReply": { "type": "object", "properties": { - "events": { - "type": "array", - "items": { - "$ref": "#/definitions/DeploymentEvent" - }, - "title": "The collection of events" - }, - "limit": { - "type": "integer", - "format": "int64", - "title": "The limit in the request" - }, - "offset": { - "type": "integer", - "format": "int64", - "title": "The offset in the request" - }, - "order": { - "type": "string", - "title": "The order in the request" - }, - "has_next": { - "type": "boolean", - "title": "If there is more items after in the collection" + "organization": { + "$ref": "#/definitions/Organization" } } }, - "ListDeploymentsReply": { + "UpdatePasswordRequest": { "type": "object", + "example": { + "id": "...", + "password": "..." + }, "properties": { - "deployments": { - "type": "array", - "items": { - "$ref": "#/definitions/DeploymentListItem" - }, - "title": "The collection of deployments" - }, - "limit": { - "type": "integer", - "format": "int64", - "title": "The limit in the request" - }, - "offset": { - "type": "integer", - "format": "int64", - "title": "The offset in the request" - }, - "count": { - "type": "integer", - "format": "int64", - "title": "The total number of items" + "id": { + "type": "string" }, - "has_next": { - "type": "boolean", - "title": "If there is more items after in the collection" + "password": { + "type": "string" } } }, - "Archive": { + "UpdateUserRequest.UserUpdateBody": { "type": "object", "properties": { "id": { - "type": "string", - "description": "The archive id, that can be referenced when creating or updating a service." + "type": "string" }, - "organization_id": { - "type": "string", - "description": "Organization owning the archive." + "email": { + "type": "string" }, - "upload_url": { - "type": "string", - "description": "The URL where to upload the archive. This URL is signed and can only be\nused to upload the archive until `valid_until`." + "current_password": { + "type": "string" }, - "size": { - "type": "string", - "format": "uint64", - "description": "The provisioned space for the archive." + "password": { + "type": "string" }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Date of creation of the archive." + "newsletter_subscribed": { + "type": "boolean" }, - "deleted_at": { - "type": "string", - "format": "date-time", - "description": "This field is automatically set by Koyeb when the\narchive is garbage collected." + "name": { + "type": "string" } } }, - "CreateArchive": { + "UpdateUserSettingsReply": { "type": "object", "properties": { - "size": { - "type": "string", - "format": "uint64", - "description": "How much space to provision for the archive, in bytes." - }, - "project_id": { - "type": "string", - "title": "(Optional) The project ID to associate with the archive" + "settings": { + "$ref": "#/definitions/UserSettings" } } }, - "CreateArchiveReply": { + "UpdateUserSettingsRequest": { "type": "object", "properties": { - "archive": { - "$ref": "#/definitions/Archive" + "failed_deployment_email_notification": { + "type": "boolean", + "description": "(Optional) Toggle failed deployment email notification." } } }, - "CreatePersistentVolumeReply": { + "UpsertSignupQualificationReply": { "type": "object", "properties": { - "volume": { - "$ref": "#/definitions/PersistentVolume" + "organization": { + "$ref": "#/definitions/Organization" } } }, - "CreatePersistentVolumeRequest": { + "User": { "type": "object", + "example": { + "id": "78352123-a06f-4ec2-81ed-27a056725385", + "email": "john@snow.com", + "name": "John Snow", + "avatar_url": "https://www.gravatar.com/avatar/00000000000000000000000000000000", + "is_admin": false, + "is_test": true, + "two_factor_authentication": false, + "last_login": "0001-01-01T00:00:00Z", + "last_login_id": "10.1.1.1", + "updated_at": "0001-01-01T00:00:00Z", + "created_at": "0001-01-01T00:00:00Z", + "newsletter_subscribed": true, + "email_validated": true + }, "properties": { - "volume_type": { - "$ref": "#/definitions/PersistentVolumeBackingStore", - "title": "the volume backing store type" + "id": { + "type": "string" + }, + "email": { + "type": "string" }, - "name": { - "type": "string", - "title": "the volume name" + "avatar_url": { + "type": "string" }, - "region": { - "type": "string", - "title": "the volume region" + "two_factor_authentication": { + "type": "boolean" }, - "read_only": { - "type": "boolean", - "title": "whether the volume must be set as read only" + "last_login": { + "type": "string", + "format": "date-time" }, - "max_size": { - "type": "integer", - "format": "int64", - "title": "the size of the volume (in Gigabyte / GB)" + "last_login_ip": { + "type": "string" }, - "snapshot_id": { + "updated_at": { "type": "string", - "title": "(optional) the id of the snapshot whence the volume comes from" + "format": "date-time" }, - "project_id": { + "created_at": { "type": "string", - "title": "(Optional) The project ID to associate with the volume" + "format": "date-time" + }, + "newsletter_subscribed": { + "type": "boolean" + }, + "github_id": { + "type": "string" + }, + "github_user": { + "type": "string" + }, + "flags": { + "type": "array", + "items": { + "$ref": "#/definitions/UserFlags" + } + }, + "name": { + "type": "string" + }, + "email_validated": { + "type": "boolean" + }, + "trialed": { + "type": "boolean" } - } + }, + "title": "Represent a User" }, - "DeletePersistentVolumeReply": { + "UserFlags": { + "type": "string", + "enum": [ + "ADMIN", + "TEST", + "RESTRICTED", + "ACTIVE", + "BETA", + "MAX_ORGANIZATIONS_25", + "MAX_ORGANIZATIONS_100", + "MAX_ORGANIZATIONS_1000", + "MAX_ORGANIZATIONS_10000", + "MAX_ORGANIZATIONS_100000", + "MAX_ORGANIZATIONS_1000000", + "PARTNER_CSP", + "IGNORE_ORGANIZATION_NAME_RESERVATION_RULE_NEON_PREFIX" + ], + "default": "ADMIN", + "title": "- ADMIN: A user is an admin user\n - TEST: A user is a test user\n - RESTRICTED: Whether this account as restricted access\n - ACTIVE: Whether this account is active\n - BETA: Account in beta program\n - MAX_ORGANIZATIONS_25: User can create this much organizations, overriding the default amount\n - PARTNER_CSP: User can create sub-organizations\n - IGNORE_ORGANIZATION_NAME_RESERVATION_RULE_NEON_PREFIX: User can bypass organization name reservations rules" + }, + "UserReply": { "type": "object", "properties": { - "volume": { - "$ref": "#/definitions/PersistentVolume" + "user": { + "$ref": "#/definitions/User" } } }, - "GetPersistentVolumeReply": { + "UserRole.Role": { + "type": "string", + "enum": [ + "INVALID", + "OWNER" + ], + "default": "INVALID" + }, + "UserSettings": { "type": "object", "properties": { - "volume": { - "$ref": "#/definitions/PersistentVolume" + "id": { + "type": "string" + }, + "user_id": { + "type": "string" + }, + "failed_deployment_email_notification": { + "type": "boolean" } } }, - "ListPersistentVolumeEventsReply": { + "Activity": { "type": "object", "properties": { - "events": { - "type": "array", - "items": { - "$ref": "#/definitions/PersistentVolumeEvent" - }, - "title": "The collection of events" + "id": { + "type": "string" }, - "limit": { - "type": "integer", - "format": "int64", - "title": "The limit in the request" + "actor": { + "$ref": "#/definitions/Object" }, - "offset": { - "type": "integer", - "format": "int64", - "title": "The offset in the request" + "object": { + "$ref": "#/definitions/Object" }, - "order": { - "type": "string", - "title": "The order in the request" + "verb": { + "type": "string" }, - "has_next": { - "type": "boolean", - "title": "If there is more items after in the collection" + "metadata": { + "type": "object" + }, + "created_at": { + "type": "string", + "format": "date-time" } } }, - "ListPersistentVolumesReply": { + "ActivityList": { "type": "object", "properties": { - "volumes": { + "activities": { "type": "array", "items": { - "$ref": "#/definitions/PersistentVolume" - }, - "title": "The collection of persistent volumes" + "$ref": "#/definitions/Activity" + } }, "limit": { "type": "integer", - "format": "int64", - "title": "The limit in the request" + "format": "int64" }, "offset": { "type": "integer", - "format": "int64", - "title": "The offset in the request" + "format": "int64" }, "has_next": { - "type": "boolean", - "title": "If there is more items after in the collection" + "type": "boolean" } } }, - "PersistentVolume": { + "Object": { "type": "object", "properties": { "id": { - "type": "string", - "title": "the identifier for the volume object" + "type": "string" }, "name": { - "type": "string", - "title": "the volume name" - }, - "snapshot_id": { - "type": "string", - "title": "(optional) the id of the snapshot whence the volume comes from" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "creation timestamp" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "title": "last change timestamp" - }, - "deleted_at": { - "type": "string", - "format": "date-time", - "title": "deletion timestamp" - }, - "organization_id": { - "type": "string", - "title": "the organization to which the volume belongs to" + "type": "string" }, - "service_id": { - "type": "string", - "title": "the service_id to which the volume is eventually bound to" + "type": { + "type": "string" }, - "region": { - "type": "string", - "title": "the region where the volume exists" + "metadata": { + "type": "object" }, - "read_only": { - "type": "boolean", - "title": "whether to mount the volume in read-only mode" + "deleted": { + "type": "boolean" + } + } + }, + "Empty": { + "type": "object" + }, + "kgitproxy.GithubInstallation.Status": { + "type": "string", + "enum": [ + "INVALID", + "INSTALLED", + "SUSPENDED", + "DELETED" + ], + "default": "INVALID" + }, + "kgitproxy.IndexingStatus": { + "type": "string", + "enum": [ + "INVALID_INDEXING_STATUS", + "NOT_STARTED", + "IN_PROGRESS", + "COMPLETED" + ], + "default": "INVALID_INDEXING_STATUS" + }, + "ListOrganizationMembersReply": { + "type": "object", + "properties": { + "members": { + "type": "array", + "items": { + "$ref": "#/definitions/OrganizationMember" + }, + "title": "The collection of organization members" }, - "max_size": { + "limit": { "type": "integer", "format": "int64", - "title": "the maximum size of the volume (in Gigabyte / GB)" + "title": "The limit in the request" }, - "cur_size": { + "offset": { "type": "integer", "format": "int64", - "title": "the used amount of space as measured the last time (in Gigabyte / GB)" - }, - "status": { - "$ref": "#/definitions/PersistentVolumeStatus", - "title": "the status of the volume" - }, - "backing_store": { - "$ref": "#/definitions/PersistentVolumeBackingStore", - "title": "the backing store type" + "title": "The offset in the request" + }, + "count": { + "type": "integer", + "format": "int64", + "title": "The total number of items" } - }, - "title": "The object that represent a volume to handle persistency for deployments" - }, - "PersistentVolumeBackingStore": { - "type": "string", - "enum": [ - "PERSISTENT_VOLUME_BACKING_STORE_INVALID", - "PERSISTENT_VOLUME_BACKING_STORE_LOCAL_BLK" - ], - "default": "PERSISTENT_VOLUME_BACKING_STORE_INVALID", - "title": "- PERSISTENT_VOLUME_BACKING_STORE_INVALID: zero value, invalid\n - PERSISTENT_VOLUME_BACKING_STORE_LOCAL_BLK: the backing store is a locally reachable block device" + } }, - "PersistentVolumeEvent": { + "OrganizationMember": { "type": "object", "properties": { "id": { "type": "string" }, - "when": { - "type": "string", - "format": "date-time" - }, "organization_id": { "type": "string" }, - "persistent_volume_id": { + "user_id": { "type": "string" }, - "type": { + "external_id": { "type": "string" }, - "message": { - "type": "string" + "joined_at": { + "type": "string", + "format": "date-time" }, - "metadata": { - "type": "object" + "role": { + "$ref": "#/definitions/UserRole.Role" + }, + "status": { + "$ref": "#/definitions/OrganizationMember.Status" + }, + "user": { + "$ref": "#/definitions/PublicUser" + }, + "organization": { + "$ref": "#/definitions/PublicOrganization" } } }, - "PersistentVolumeStatus": { + "OrganizationMember.Status": { "type": "string", "enum": [ - "PERSISTENT_VOLUME_STATUS_INVALID", - "PERSISTENT_VOLUME_STATUS_ATTACHED", - "PERSISTENT_VOLUME_STATUS_DETACHED", - "PERSISTENT_VOLUME_STATUS_DELETING", - "PERSISTENT_VOLUME_STATUS_DELETED", - "PERSISTENT_VOLUME_STATUS_ARCHIVING" + "INVALID", + "ACTIVE", + "DELETED" ], - "default": "PERSISTENT_VOLUME_STATUS_INVALID", - "title": "- PERSISTENT_VOLUME_STATUS_INVALID: zero value, invalid\n - PERSISTENT_VOLUME_STATUS_ATTACHED: the volume is attached to an instance\n - PERSISTENT_VOLUME_STATUS_DETACHED: the volume is free to use\n - PERSISTENT_VOLUME_STATUS_DELETING: the volume will be deleted\n - PERSISTENT_VOLUME_STATUS_DELETED: the volume was deleted\n - PERSISTENT_VOLUME_STATUS_ARCHIVING: the volume is being archived (snapshot being created and migrated to remote storage)" + "default": "INVALID" }, - "UpdatePersistentVolumeReply": { + "RemoveOrganizationMemberReply": { "type": "object", "properties": { - "volume": { - "$ref": "#/definitions/PersistentVolume" + "member": { + "$ref": "#/definitions/OrganizationMember" } } }, - "VerifyDockerImageReply": { + "DeleteUserReply": { "type": "object", "properties": { - "success": { - "type": "boolean", - "title": "Whether the image is accessible or not" + "user": { + "$ref": "#/definitions/User" + } + } + }, + "CreateCredential": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "Credential name" }, - "reason": { + "description": { "type": "string", - "title": "(Optional) If the image is not accessible, the reason" + "title": "Credential description" }, - "code": { - "$ref": "#/definitions/VerifyDockerImageReply.ErrCode", - "title": "(Optional) If the image is not accessible, return an error code" + "type": { + "$ref": "#/definitions/Credential.Type", + "title": "Credential type" + }, + "organization_id": { + "type": "string", + "title": "Organization id for user credential" } } }, - "VerifyDockerImageReply.ErrCode": { - "type": "string", - "enum": [ - "UNKNOWN", - "AUTH_ACCESS_DENIED", - "ANON_ACCESS_DENIED", - "AUTH_NOT_FOUND", - "ANON_NOT_FOUND", - "REGISTRY_ERROR", - "TIMEOUT", - "DNS", - "MALFORMED", - "INVALID_OS", - "INVALID_ARCH", - "INVALID_SCHEME", - "GENERIC" - ], - "default": "UNKNOWN", - "description": "- UNKNOWN: Default value\n - AUTH_ACCESS_DENIED: The registry denied access to an authenticated request\n - ANON_ACCESS_DENIED: The registry denied access to an anonymous request\n - AUTH_NOT_FOUND: The image has not been found after an authenticated request\n - ANON_NOT_FOUND: The image has not been found after an anonymous request\n - REGISTRY_ERROR: The registry returned an error\n - TIMEOUT: The request to the registry timed out\n - DNS: There was an error trying to resolve the name of the registry\n - MALFORMED: The provided image name is malformed\n - INVALID_OS: The operating system is not supported\n - INVALID_ARCH: The architecture is not supported\n - INVALID_SCHEME: The scheme is not https\n - GENERIC: Generic catch-all error code", - "title": "The error code associated to each specific failure mode" - }, - "AzureContainerRegistryConfiguration": { + "CreateCredentialReply": { "type": "object", "properties": { - "registry_name": { - "type": "string" - }, - "username": { - "type": "string" - }, - "password": { - "type": "string" + "credential": { + "$ref": "#/definitions/Credential" } } }, - "CreateSecret": { + "Credential": { "type": "object", "properties": { - "name": { + "id": { "type": "string" }, "type": { - "$ref": "#/definitions/SecretType" + "$ref": "#/definitions/Credential.Type" }, - "value": { + "name": { "type": "string" }, - "docker_hub_registry": { - "$ref": "#/definitions/DockerHubRegistryConfiguration" - }, - "private_registry": { - "$ref": "#/definitions/PrivateRegistryConfiguration" + "token": { + "type": "string" }, - "digital_ocean_registry": { - "$ref": "#/definitions/DigitalOceanRegistryConfiguration" + "description": { + "type": "string" }, - "github_registry": { - "$ref": "#/definitions/GitHubRegistryConfiguration" + "user_id": { + "type": "string" }, - "gitlab_registry": { - "$ref": "#/definitions/GitLabRegistryConfiguration" + "organization_id": { + "type": "string" }, - "gcp_container_registry": { - "$ref": "#/definitions/GCPContainerRegistryConfiguration" + "updated_at": { + "type": "string", + "format": "date-time" }, - "azure_container_registry": { - "$ref": "#/definitions/AzureContainerRegistryConfiguration" + "created_at": { + "type": "string", + "format": "date-time" }, - "project_id": { + "expires_at": { "type": "string", - "title": "(Optional) The project ID to associate with the secret" - } - } - }, - "CreateSecretReply": { - "type": "object", - "properties": { - "secret": { - "$ref": "#/definitions/Secret" + "format": "date-time" } } }, - "DatabaseRolePassword": { - "type": "object", - "properties": { - "username": { - "type": "string" - }, - "password": { - "type": "string" - } - } + "Credential.Type": { + "type": "string", + "enum": [ + "INVALID", + "USER", + "ORGANIZATION" + ], + "default": "INVALID" }, - "DeleteSecretReply": { + "DeleteCredentialReply": { "type": "object" }, - "DigitalOceanRegistryConfiguration": { + "GetCredentialReply": { "type": "object", "properties": { - "username": { - "type": "string" - }, - "password": { - "type": "string" + "credential": { + "$ref": "#/definitions/Credential" } } }, - "DockerHubRegistryConfiguration": { + "ListCredentialsReply": { "type": "object", "properties": { - "username": { - "type": "string" + "credentials": { + "type": "array", + "items": { + "$ref": "#/definitions/Credential" + } }, - "password": { - "type": "string" + "limit": { + "type": "integer", + "format": "int64" + }, + "offset": { + "type": "integer", + "format": "int64" + }, + "count": { + "type": "integer", + "format": "int64" } } }, - "GCPContainerRegistryConfiguration": { + "UpdateCredentialReply": { "type": "object", "properties": { - "keyfile_content": { - "type": "string" - }, - "url": { - "type": "string" + "credential": { + "$ref": "#/definitions/Credential" } } }, - "GetSecretReply": { + "CreateProject": { "type": "object", "properties": { - "secret": { - "$ref": "#/definitions/Secret" + "name": { + "type": "string", + "title": "Project name" + }, + "description": { + "type": "string", + "title": "Project description" } } }, - "GitHubRegistryConfiguration": { - "type": "object", - "properties": { - "username": { - "type": "string" - }, - "password": { - "type": "string" + "CreateProjectReply": { + "type": "object", + "properties": { + "project": { + "$ref": "#/definitions/Project" } } }, - "GitLabRegistryConfiguration": { + "DeleteProjectReply": { + "type": "object" + }, + "GetProjectReply": { "type": "object", "properties": { - "username": { - "type": "string" - }, - "password": { - "type": "string" + "project": { + "$ref": "#/definitions/Project" } } }, - "ListSecretsReply": { + "ListProjectsReply": { "type": "object", "properties": { - "secrets": { + "projects": { "type": "array", "items": { - "$ref": "#/definitions/Secret" + "$ref": "#/definitions/Project" } }, "limit": { @@ -19088,34 +20057,10 @@ "offset": { "type": "integer", "format": "int64" - }, - "count": { - "type": "integer", - "format": "int64" - } - } - }, - "PrivateRegistryConfiguration": { - "type": "object", - "properties": { - "username": { - "type": "string" - }, - "password": { - "type": "string" - }, - "url": { - "type": "string" } } }, - "RevealSecretReply": { - "type": "object", - "properties": { - "value": {} - } - }, - "Secret": { + "Project": { "type": "object", "properties": { "id": { @@ -19124,11 +20069,11 @@ "name": { "type": "string" }, - "organization_id": { + "description": { "type": "string" }, - "type": { - "$ref": "#/definitions/SecretType" + "organization_id": { + "type": "string" }, "updated_at": { "type": "string", @@ -19138,270 +20083,282 @@ "type": "string", "format": "date-time" }, - "project_id": { + "service_count": { "type": "string", - "description": "The project ID this secret belongs to. Empty if the secret is organization-level." - }, - "value": { - "type": "string" - }, - "docker_hub_registry": { - "$ref": "#/definitions/DockerHubRegistryConfiguration" - }, - "private_registry": { - "$ref": "#/definitions/PrivateRegistryConfiguration" - }, - "digital_ocean_registry": { - "$ref": "#/definitions/DigitalOceanRegistryConfiguration" - }, - "github_registry": { - "$ref": "#/definitions/GitHubRegistryConfiguration" - }, - "gitlab_registry": { - "$ref": "#/definitions/GitLabRegistryConfiguration" - }, - "gcp_container_registry": { - "$ref": "#/definitions/GCPContainerRegistryConfiguration" - }, - "azure_container_registry": { - "$ref": "#/definitions/AzureContainerRegistryConfiguration" - }, - "database_role_password": { - "$ref": "#/definitions/DatabaseRolePassword" + "format": "int64", + "title": "Number of services in this project" } } }, - "SecretType": { - "type": "string", - "enum": [ - "SIMPLE", - "REGISTRY", - "MANAGED" - ], - "default": "SIMPLE" - }, - "UpdateSecretReply": { + "UpdateProjectReply": { "type": "object", "properties": { - "secret": { - "$ref": "#/definitions/Secret" + "project": { + "$ref": "#/definitions/Project" } } }, - "GetInstanceReply": { + "GetSubscriptionReply": { "type": "object", "properties": { - "instance": { - "$ref": "#/definitions/Instance" + "subscription": { + "$ref": "#/definitions/Subscription" } } }, - "InstanceEvent": { + "Subscription": { "type": "object", "properties": { "id": { "type": "string" }, - "when": { + "created_at": { "type": "string", "format": "date-time" }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "version": { + "type": "string", + "format": "uint64" + }, "organization_id": { "type": "string" }, - "instance_id": { + "stripe_subscription_id": { "type": "string" }, - "type": { + "status": { + "$ref": "#/definitions/Subscription.Status" + }, + "messages": { + "type": "array", + "items": { + "type": "string" + } + }, + "has_pending_update": { + "type": "boolean" + }, + "stripe_pending_invoice_id": { "type": "string" }, - "message": { + "terminate_at": { + "type": "string", + "format": "date-time" + }, + "canceled_at": { + "type": "string", + "format": "date-time" + }, + "terminated_at": { + "type": "string", + "format": "date-time" + }, + "current_period_start": { + "type": "string", + "format": "date-time" + }, + "current_period_end": { + "type": "string", + "format": "date-time" + }, + "currency": { "type": "string" }, - "metadata": { - "type": "object" + "amount_payable": { + "type": "string", + "format": "int64" + }, + "amount_paid": { + "type": "string", + "format": "int64" + }, + "amount_remaining": { + "type": "string", + "format": "int64" + }, + "payment_failure": { + "$ref": "#/definitions/Subscription.PaymentFailure" + }, + "trialing": { + "type": "boolean" + }, + "trial_ends_at": { + "type": "string", + "format": "date-time" + }, + "trial_max_spend": { + "type": "string", + "format": "int64" + }, + "current_spend": { + "type": "string", + "format": "int64" } } }, - "InstanceListItem": { + "Subscription.PaymentFailure": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "created_at": { + "failed_at": { "type": "string", "format": "date-time" }, - "updated_at": { + "next_attempt": { "type": "string", "format": "date-time" }, - "organization_id": { - "type": "string" - }, - "app_id": { - "type": "string" + "attempt_count": { + "type": "string", + "format": "int64" }, - "service_id": { + "error_code": { "type": "string" }, - "regional_deployment_id": { + "error_reason": { "type": "string" }, - "allocation_id": { + "error_type": { "type": "string" }, - "type": { + "error_message": { "type": "string" }, - "replica_index": { - "type": "integer", - "format": "int64" + "payment_method_required": { + "type": "boolean" }, - "region": { + "redirect_url": { "type": "string" }, - "datacenter": { + "stripe_sdk": { + "$ref": "#/definitions/Subscription.PaymentFailure.StripeSDK" + } + } + }, + "Subscription.PaymentFailure.StripeSDK": { + "type": "object", + "properties": { + "client_secret_key": { "type": "string" }, - "status": { - "$ref": "#/definitions/Instance.Status" + "raw_json": { + "type": "string" + } + } + }, + "Subscription.Status": { + "type": "string", + "enum": [ + "INVALID", + "CREATED", + "ACTIVE", + "WARNING", + "URGENT", + "CANCELING", + "CANCELED", + "TERMINATING", + "TERMINATED" + ], + "default": "INVALID" + }, + "CheckCouponReply": { + "type": "object", + "properties": { + "name": { + "type": "string" }, - "messages": { - "type": "array", - "items": { - "type": "string" - } + "percent_off": { + "type": "number", + "format": "float" }, - "xyz_deployment_id": { + "amount_off": { "type": "string", - "description": "WARNING: Please don't use the following attribute.\nKoyeb doesn't guarantee backwards compatible breaking change and reserve the right to completely drop it without notice.\nUSE AT YOUR OWN RISK." + "format": "int64" + }, + "currency": { + "type": "string" } } }, - "ListInstanceEventsReply": { + "RedeemCouponReply": { + "type": "object" + }, + "RedeemCouponRequest": { "type": "object", "properties": { - "events": { - "type": "array", - "items": { - "$ref": "#/definitions/InstanceEvent" - }, - "title": "The collection of events" - }, - "limit": { - "type": "integer", - "format": "int64", - "title": "The limit in the request" - }, - "offset": { - "type": "integer", - "format": "int64", - "title": "The offset in the request" - }, - "order": { - "type": "string", - "title": "The order in the request" - }, - "has_next": { - "type": "boolean", - "title": "If there is more items after in the collection" + "code": { + "type": "string" } } }, - "ListInstancesReply": { + "ConfirmOrganizationActionReply": { + "type": "object" + }, + "LoginRequest": { "type": "object", + "example": { + "email": "john@snow.com", + "password": "..." + }, "properties": { - "instances": { - "type": "array", - "items": { - "$ref": "#/definitions/InstanceListItem" - }, - "title": "The collection of instances" - }, - "limit": { - "type": "integer", - "format": "int64", - "title": "The limit in the request" - }, - "offset": { - "type": "integer", - "format": "int64", - "title": "The offset in the request" + "email": { + "type": "string", + "title": "User email" }, - "count": { - "type": "integer", - "format": "int64", - "title": "The total number of items" + "password": { + "type": "string", + "title": "User password" }, - "order": { + "organization_id": { "type": "string", - "title": "The order in the request" + "title": "(Optional) Login into this organization" } } }, - "Env": { + "LogoutReply": { + "type": "object" + }, + "CreateOrganizationInvitationReply": { "type": "object", "properties": { - "key": { - "type": "string" - }, - "value": { - "type": "string" - }, - "secret": { - "type": "string" + "invitation": { + "$ref": "#/definitions/OrganizationInvitation", + "title": "The organization invitation sent" } } }, - "GetRegionalDeploymentReply": { + "CreateOrganizationInvitationRequest": { "type": "object", "properties": { - "regional_deployment": { - "$ref": "#/definitions/RegionalDeployment" + "email": { + "type": "string", + "title": "The email of the person to invite" } } }, - "ListRegionalDeploymentEventsReply": { + "DeleteOrganizationInvitationReply": { + "type": "object" + }, + "GetOrganizationInvitationReply": { "type": "object", "properties": { - "events": { - "type": "array", - "items": { - "$ref": "#/definitions/RegionalDeploymentEvent" - }, - "title": "The collection of events" - }, - "limit": { - "type": "integer", - "format": "int64", - "title": "The limit in the request" - }, - "offset": { - "type": "integer", - "format": "int64", - "title": "The offset in the request" - }, - "order": { - "type": "string", - "title": "The order in the request" - }, - "has_next": { - "type": "boolean", - "title": "If there is more items after in the collection" + "invitation": { + "$ref": "#/definitions/OrganizationInvitation" } } }, - "ListRegionalDeploymentsReply": { + "ListOrganizationInvitationsReply": { "type": "object", "properties": { - "regional_deployments": { + "invitations": { "type": "array", "items": { - "$ref": "#/definitions/RegionalDeploymentListItem" + "$ref": "#/definitions/OrganizationInvitation" }, - "title": "The collection of regional deployments" + "title": "The collection of organization invitations" }, "limit": { "type": "integer", @@ -19417,1333 +20374,1079 @@ "type": "integer", "format": "int64", "title": "The total number of items" - }, - "has_next": { - "type": "boolean", - "title": "If there is more items after in the collection" } } }, - "Port": { + "ResendOrganizationInvitationReply": { "type": "object", "properties": { - "port": { - "type": "integer", - "format": "int64" - }, - "protocol": { - "type": "string" + "invitation": { + "$ref": "#/definitions/OrganizationInvitation", + "title": "The organization invitation resent" } } }, - "RegionalDeployment": { + "ConfirmPaymentAuthorizationReply": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "created_at": { - "type": "string", - "format": "date-time" - }, - "updated_at": { - "type": "string", - "format": "date-time" - }, - "scheduled_at": { - "type": "string", - "format": "date-time" - }, - "allocated_at": { - "type": "string", - "format": "date-time" - }, - "started_at": { - "type": "string", - "format": "date-time" - }, - "succeeded_at": { - "type": "string", - "format": "date-time" - }, - "terminated_at": { - "type": "string", - "format": "date-time" - }, - "organization_id": { - "type": "string" - }, - "app_id": { - "type": "string" - }, - "service_id": { - "type": "string" - }, - "region": { - "type": "string" - }, - "parent_id": { - "type": "string" - }, - "child_id": { - "type": "string" - }, - "status": { - "$ref": "#/definitions/RegionalDeployment.Status" - }, - "messages": { - "type": "array", - "items": { - "type": "string" - } - }, - "definition": { - "$ref": "#/definitions/RegionalDeploymentDefinition" - }, - "datacenters": { + "payment_method": { + "$ref": "#/definitions/PaymentMethod" + } + } + }, + "CreatePaymentAuthorizationReply": { + "type": "object", + "properties": { + "payment_method": { + "$ref": "#/definitions/PaymentMethod" + } + } + }, + "CreatePaymentAuthorizationRequest": { + "type": "object" + }, + "DeletePaymentMethodReply": { + "type": "object" + }, + "GetPaymentMethodReply": { + "type": "object", + "properties": { + "payment_method": { + "$ref": "#/definitions/PaymentMethod" + } + } + }, + "ListPaymentMethodsReply": { + "type": "object", + "properties": { + "payment_methods": { "type": "array", "items": { - "type": "string" - } - }, - "metadata": { - "$ref": "#/definitions/RegionalDeploymentMetadata" - }, - "provisioning_info": { - "$ref": "#/definitions/DeploymentProvisioningInfo" - }, - "role": { - "$ref": "#/definitions/RegionalDeployment.Role" + "$ref": "#/definitions/PaymentMethod" + }, + "title": "The collection of payment methods" }, - "version": { - "type": "string", - "format": "uint64" + "limit": { + "type": "integer", + "format": "int64", + "title": "The limit in the request" }, - "deployment_group": { - "type": "string", - "title": "Legacy stuff" + "offset": { + "type": "integer", + "format": "int64", + "title": "The offset in the request" }, - "deployment_id": { - "type": "string" + "count": { + "type": "integer", + "format": "int64", + "title": "The total number of items" } } }, - "RegionalDeployment.Role": { - "type": "string", - "enum": [ - "INVALID", - "ACTIVE", - "UPCOMING", - "CURRENT" - ], - "default": "INVALID" - }, - "RegionalDeployment.Status": { - "type": "string", - "enum": [ - "PENDING", - "PROVISIONING", - "SCHEDULED", - "CANCELING", - "CANCELED", - "ALLOCATING", - "STARTING", - "HEALTHY", - "DEGRADED", - "UNHEALTHY", - "STOPPING", - "STOPPED", - "ERRORING", - "ERROR", - "SLEEPING" - ], - "default": "PENDING" - }, - "RegionalDeploymentDefinition": { + "PaymentMethod": { "type": "object", "properties": { - "name": { + "id": { "type": "string" }, - "type": { - "$ref": "#/definitions/RegionalDeploymentDefinition.Type" - }, - "strategy": { - "$ref": "#/definitions/DeploymentStrategy" - }, - "routes": { - "type": "array", - "items": { - "$ref": "#/definitions/Route" - } + "created_at": { + "type": "string", + "format": "date-time" }, - "ports": { - "type": "array", - "items": { - "$ref": "#/definitions/Port" - } + "updated_at": { + "type": "string", + "format": "date-time" }, - "env": { - "type": "array", - "items": { - "$ref": "#/definitions/Env" - } + "version": { + "type": "string", + "format": "uint64" }, - "region": { + "organization_id": { "type": "string" }, - "scaling": { - "$ref": "#/definitions/Scaling" - }, - "instance_type": { + "type": { "type": "string" }, - "deployment_group": { + "provider": { "type": "string" }, - "health_checks": { - "type": "array", - "items": { - "$ref": "#/definitions/DeploymentHealthCheck" - } - }, - "volumes": { - "type": "array", - "items": { - "$ref": "#/definitions/RegionalDeploymentVolume" - } + "status": { + "$ref": "#/definitions/PaymentMethod.Status" }, - "config_files": { + "messages": { "type": "array", "items": { - "$ref": "#/definitions/ConfigFile" + "type": "string" } }, - "skip_cache": { - "type": "boolean" - }, - "mesh": { - "$ref": "#/definitions/RegionalDeploymentMesh" - }, - "docker": { - "$ref": "#/definitions/DockerSource" - }, - "git": { - "$ref": "#/definitions/GitSource" - }, - "archive": { - "$ref": "#/definitions/ArchiveSource" - } - } - }, - "RegionalDeploymentDefinition.Type": { - "type": "string", - "enum": [ - "INVALID", - "WEB", - "WORKER", - "_", - "SANDBOX" - ], - "default": "INVALID", - "title": "- _: We match with DeploymentDefinition.Type, so we skip 3 which is DATABASE" - }, - "RegionalDeploymentEvent": { - "type": "object", - "properties": { - "id": { + "stripe_payment_method_id": { "type": "string" }, - "when": { + "authorization_verified_at": { "type": "string", "format": "date-time" }, - "organization_id": { - "type": "string" + "authorization_canceled_at": { + "type": "string", + "format": "date-time" }, - "regional_deployment_id": { + "authorization_stripe_payment_intent_id": { "type": "string" }, - "type": { + "authorization_stripe_payment_intent_client_secret": { "type": "string" }, - "message": { + "card_brand": { "type": "string" }, - "metadata": { - "type": "object" - } - } - }, - "RegionalDeploymentListItem": { - "type": "object", - "properties": { - "id": { + "card_country": { "type": "string" }, - "created_at": { - "type": "string", - "format": "date-time" - }, - "updated_at": { - "type": "string", - "format": "date-time" + "card_funding": { + "type": "string" }, - "region": { + "card_fingerprint": { "type": "string" }, - "status": { - "$ref": "#/definitions/RegionalDeployment.Status" + "card_last_digits": { + "type": "string" }, - "messages": { - "type": "array", - "items": { - "type": "string" - } + "card_expiration_month": { + "type": "integer", + "format": "int64" }, - "definition": { - "$ref": "#/definitions/RegionalDeploymentDefinition" + "card_expiration_year": { + "type": "integer", + "format": "int64" } } }, - "RegionalDeploymentMesh": { + "PaymentMethod.Status": { "type": "string", "enum": [ - "REGIONAL_DEPLOYMENT_MESH_AUTO", - "REGIONAL_DEPLOYMENT_MESH_ENABLED", - "REGIONAL_DEPLOYMENT_MESH_DISABLED" + "INVALID", + "CREATED", + "AUTHORIZED", + "DECLINED", + "CANCELED", + "EXPIRED", + "UNCHECKED" ], - "default": "REGIONAL_DEPLOYMENT_MESH_AUTO" - }, - "RegionalDeploymentMetadata": { - "type": "object" - }, - "RegionalDeploymentVolume": { - "type": "object", - "properties": { - "id": { - "type": "string", - "title": "the id of the volume" - }, - "path": { - "type": "string", - "title": "the path where the volume is mounted to" - }, - "replica_index": { - "type": "integer", - "format": "int64", - "title": "the replica index to mount the volume to" - } - } + "default": "INVALID" }, - "Route": { + "GetIntercomProfileReply": { "type": "object", "properties": { - "port": { - "type": "integer", - "format": "int64" - }, - "path": { + "hash": { "type": "string" - }, - "security_policies": { - "$ref": "#/definitions/SecurityPolicies" } } }, - "Scaling": { + "DomainLoadBalancerQuotas": { "type": "object", "properties": { - "min": { - "type": "integer", - "format": "int64" - }, - "max": { + "max_koyeb": { "type": "integer", "format": "int64" - }, - "targets": { - "type": "array", - "items": { - "$ref": "#/definitions/DeploymentScalingTarget" - } } } }, - "AppUsage": { + "GetQuotasReply": { "type": "object", "properties": { - "app_id": { - "type": "string" - }, - "app_name": { - "type": "string" - }, - "services": { - "type": "array", - "items": { - "$ref": "#/definitions/ServiceUsage" - } - }, - "databases": { - "type": "array", - "items": { - "$ref": "#/definitions/DatabaseUsage" - } + "quotas": { + "$ref": "#/definitions/Quotas" } } }, - "DatabaseUsage": { + "InstanceSnapshotQuotas": { "type": "object", "properties": { - "service_id": { - "type": "string" - }, - "service_name": { - "type": "string" - }, - "compute_time_seconds": { + "filesystem": { "type": "integer", "format": "int64" }, - "data_storage_megabytes_hours": { + "full": { "type": "integer", "format": "int64" } } }, - "DatabaseUsageDetails": { + "LifecycleQuotas": { "type": "object", "properties": { - "organization_id": { - "type": "string" - }, - "app_id": { - "type": "string" - }, - "app_name": { - "type": "string" - }, - "service_id": { - "type": "string" - }, - "service_name": { - "type": "string" - }, - "compute_time_seconds": { + "delete_after_sleep_min": { "type": "integer", - "format": "int64" + "format": "int64", + "title": "delete after sleep limits" }, - "data_storage_megabytes_hour": { + "delete_after_sleep_max": { "type": "integer", "format": "int64" }, - "started_at": { - "type": "string", - "format": "date-time" + "delete_after_create_min": { + "type": "integer", + "format": "int64", + "title": "delete after create limits" }, - "terminated_at": { - "type": "string", - "format": "date-time" + "delete_after_create_max": { + "type": "integer", + "format": "int64" } } }, - "GetOrganizationUsageDetailsReply": { + "PersistentVolumeQuotas": { "type": "object", "properties": { - "usage_details": { - "type": "array", - "items": { - "$ref": "#/definitions/UsageDetails" - }, - "title": "The collection of usage instances" - }, - "database_details": { - "type": "array", - "items": { - "$ref": "#/definitions/DatabaseUsageDetails" - }, - "title": "The collection of database deployments used during the month" - }, - "limit": { + "max_total_size": { "type": "integer", "format": "int64", - "title": "The limit in the request" + "description": "MaxTotalSize for all volumes on a region (in Gigabyte / GB)." }, - "offset": { + "max_volume_size": { "type": "integer", "format": "int64", - "title": "The offset in the request" + "description": "MaxVolumeSize for one volume (in Gigabyte / GB)." }, - "count": { + "max_per_instance_size": { "type": "integer", "format": "int64", - "title": "The total number of items" - }, - "order": { - "type": "string", - "title": "The order in the request" - } - } - }, - "GetOrganizationUsageReply": { - "type": "object", - "properties": { - "usage": { - "$ref": "#/definitions/Usage", - "title": "The computed usage of instances per month" + "description": "MaxPerInstanceSize for all volumes on an instance (in Gigabyte / GB)." } } }, - "InstanceUsage": { + "Quotas": { "type": "object", "properties": { - "duration_seconds": { - "type": "integer", + "apps": { + "type": "string", "format": "int64" - } - } - }, - "PeriodUsage": { - "type": "object", - "properties": { - "starting_time": { + }, + "services": { "type": "string", - "format": "date-time" + "format": "int64" }, - "ending_time": { + "domains": { "type": "string", - "format": "date-time" + "format": "int64", + "title": "Deprecated, use custom_domains instead" }, - "apps": { + "services_by_app": { + "type": "string", + "format": "int64" + }, + "service_provisioning_concurrency": { + "type": "string", + "format": "int64" + }, + "memory_mb": { + "type": "string", + "format": "int64" + }, + "instance_types": { "type": "array", "items": { - "$ref": "#/definitions/AppUsage" + "type": "string" } - } - } - }, - "RegionUsage": { - "type": "object", - "properties": { - "instances": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/InstanceUsage" + }, + "regions": { + "type": "array", + "items": { + "type": "string" } - } - } - }, - "ServiceUsage": { - "type": "object", - "properties": { - "service_id": { - "type": "string" }, - "service_name": { - "type": "string" + "max_organization_members": { + "type": "string", + "format": "int64" }, - "regions": { + "max_instances_by_type": { "type": "object", "additionalProperties": { - "$ref": "#/definitions/RegionUsage" + "type": "string", + "format": "int64" } - } - } - }, - "Usage": { - "type": "object", - "properties": { - "organization_id": { - "type": "string" }, - "periods": { + "persistent_volumes_by_region": { "type": "object", "additionalProperties": { - "$ref": "#/definitions/PeriodUsage" + "$ref": "#/definitions/PersistentVolumeQuotas" } - } - } - }, - "UsageDetails": { - "type": "object", - "properties": { - "organization_id": { - "type": "string" - }, - "instance_id": { - "type": "string" - }, - "app_id": { - "type": "string" - }, - "app_name": { - "type": "string" - }, - "service_id": { - "type": "string" }, - "service_name": { - "type": "string" + "custom_domains": { + "type": "string", + "format": "int64" }, - "regional_deployment_id": { - "type": "string" + "domains_load_balancer": { + "$ref": "#/definitions/DomainLoadBalancerQuotas" }, - "region": { - "type": "string" + "metrics_retention": { + "type": "integer", + "format": "int32", + "title": "Time in days" }, - "deployment_id": { - "type": "string" + "logs_retention": { + "type": "integer", + "format": "int32", + "title": "Time in days" }, - "instance_type": { - "type": "string" + "access_reserved_subdomains": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The mapping between reserved_subdomain names and their value is in the code" }, - "duration_seconds": { + "proxy_ports": { "type": "integer", "format": "int64" }, - "started_at": { + "scale_to_zero": { + "$ref": "#/definitions/ScaleToZeroQuotas" + }, + "archives": { "type": "string", - "format": "date-time" + "format": "int64" }, - "terminated_at": { + "archive_max_size_mb": { "type": "string", - "format": "date-time" + "format": "int64" + }, + "lifecycle": { + "$ref": "#/definitions/LifecycleQuotas" + }, + "max_projects": { + "type": "string", + "format": "int64" + }, + "instance_snapshots": { + "$ref": "#/definitions/InstanceSnapshotQuotas" } } }, - "CreateSnapshotReply": { + "ScaleToZeroQuotas": { "type": "object", "properties": { - "snapshot": { - "$ref": "#/definitions/Snapshot" + "is_deep_sleep_enabled": { + "type": "boolean", + "title": "deep sleep limits" + }, + "deep_sleep_idle_delay_min": { + "type": "integer", + "format": "int64" + }, + "deep_sleep_idle_delay_max": { + "type": "integer", + "format": "int64" + }, + "is_light_sleep_enabled": { + "type": "boolean", + "title": "light sleep limits" + }, + "light_sleep_idle_delay_min": { + "type": "integer", + "format": "int64" + }, + "light_sleep_idle_delay_max": { + "type": "integer", + "format": "int64" } } }, - "CreateSnapshotRequest": { + "AppsSummary": { "type": "object", "properties": { - "parent_volume_id": { - "type": "string", - "title": "The id of the volume to snapshot" - }, - "name": { + "total": { "type": "string", - "title": "The name of the snapshot" + "format": "int64", + "title": "Total number of apps" }, - "project_id": { - "type": "string", - "title": "(Optional) The project ID to associate with the snapshot" + "by_status": { + "type": "object", + "additionalProperties": { + "type": "string", + "format": "int64" + }, + "title": "Number of apps grouped by status" } } }, - "DeleteSnapshotReply": { + "DomainsSummary": { "type": "object", "properties": { - "snapshot": { - "$ref": "#/definitions/Snapshot" + "total": { + "type": "string", + "format": "int64", + "title": "Total number of domains" + }, + "by_status": { + "type": "object", + "additionalProperties": { + "type": "string", + "format": "int64" + }, + "title": "Number of domains grouped by status" } } }, - "GetSnapshotReply": { + "GetOrganizationSummaryReply": { "type": "object", "properties": { - "snapshot": { - "$ref": "#/definitions/Snapshot" + "summary": { + "$ref": "#/definitions/OrganizationSummary", + "title": "Organization usage summary" } } }, - "ListSnapshotsReply": { + "InstancesSummary": { "type": "object", "properties": { - "snapshots": { - "type": "array", - "items": { - "$ref": "#/definitions/Snapshot" - }, - "title": "The collection of snapshots" - }, - "limit": { - "type": "integer", - "format": "int64", - "title": "The limit in the request" - }, - "offset": { - "type": "integer", + "total": { + "type": "string", "format": "int64", - "title": "The offset in the request" + "title": "Total number of instances" }, - "has_next": { - "type": "boolean", - "title": "If there is more items after in the collection" + "by_type": { + "type": "object", + "additionalProperties": { + "type": "string", + "format": "int64" + }, + "title": "Number of instances grouped by type" } } }, - "Snapshot": { + "MembersSummary": { "type": "object", "properties": { - "id": { - "type": "string", - "title": "the identifier of the snapshot object" - }, - "name": { + "total": { "type": "string", - "title": "the snapshot name" - }, - "size": { - "type": "integer", "format": "int64", - "title": "the original volume size" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "creation timestamp" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "title": "last change timestamp" - }, - "deleted_at": { - "type": "string", - "format": "date-time", - "title": "deletion timestamp" - }, - "organization_id": { - "type": "string", - "title": "the organization to which the snapshot belongs to" - }, - "parent_volume_id": { - "type": "string", - "title": "the volume from which the snapshot has been created" - }, - "region": { - "type": "string", - "title": "the region where the snapshot resides, if any" - }, - "status": { - "$ref": "#/definitions/SnapshotStatus", - "title": "the status of the snapshot" + "title": "Number of members" }, - "type": { - "$ref": "#/definitions/SnapshotType", - "title": "the type of snapshot (can be local or remote)" - } - }, - "description": "The object that represents a snapshot. It can either be local, on a node, or remote, in a cold storage." - }, - "SnapshotStatus": { - "type": "string", - "enum": [ - "SNAPSHOT_STATUS_INVALID", - "SNAPSHOT_STATUS_CREATING", - "SNAPSHOT_STATUS_AVAILABLE", - "SNAPSHOT_STATUS_MIGRATING", - "SNAPSHOT_STATUS_DELETING", - "SNAPSHOT_STATUS_DELETED" - ], - "default": "SNAPSHOT_STATUS_INVALID", - "title": "- SNAPSHOT_STATUS_INVALID: zero value, invalid\n - SNAPSHOT_STATUS_CREATING: the snapshot is being created\n - SNAPSHOT_STATUS_AVAILABLE: the snapshot is complete and available\n - SNAPSHOT_STATUS_MIGRATING: the snapshot is being migrated\n - SNAPSHOT_STATUS_DELETING: the snapshot is being deleted\n - SNAPSHOT_STATUS_DELETED: the snapshot is deleted" - }, - "SnapshotType": { - "type": "string", - "enum": [ - "SNAPSHOT_TYPE_INVALID", - "SNAPSHOT_TYPE_LOCAL", - "SNAPSHOT_TYPE_REMOTE" - ], - "default": "SNAPSHOT_TYPE_INVALID", - "title": "- SNAPSHOT_TYPE_INVALID: zero value, invalid\n - SNAPSHOT_TYPE_LOCAL: the snapshot is local to the machine\n - SNAPSHOT_TYPE_REMOTE: the snapshot is remote in a cold storage" - }, - "UpdateSnapshotReply": { - "type": "object", - "properties": { - "snapshot": { - "$ref": "#/definitions/Snapshot" + "invitations_by_status": { + "type": "object", + "additionalProperties": { + "type": "string", + "format": "int64" + }, + "title": "Number of invitations grouped by status" } } }, - "ReviewOrganizationCapacityReply": { + "NeonPostgresSummary": { "type": "object", "properties": { - "has_capacity": { - "type": "boolean" + "total": { + "type": "string", + "format": "int64", + "title": "Total number of databases" + }, + "by_instance_type": { + "type": "object", + "additionalProperties": { + "type": "string", + "format": "int64" + }, + "title": "Number of databases grouped by instance type" } } }, - "ReviewOrganizationCapacityRequest": { + "OrganizationSummary": { "type": "object", "properties": { - "plan": { + "organization_id": { "type": "string" }, - "trialing": { - "type": "boolean" + "instances": { + "$ref": "#/definitions/InstancesSummary" + }, + "apps": { + "$ref": "#/definitions/AppsSummary" + }, + "services": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ServiceSummary" + }, + "title": "Number of services grouped by type" + }, + "domains": { + "$ref": "#/definitions/DomainsSummary" + }, + "secrets": { + "$ref": "#/definitions/SecretsSummary" + }, + "neon_postgres": { + "$ref": "#/definitions/NeonPostgresSummary" + }, + "members": { + "$ref": "#/definitions/MembersSummary" } } }, - "LogEntry": { + "SecretsSummary": { "type": "object", "properties": { - "msg": { - "type": "string" - }, - "created_at": { + "total": { "type": "string", - "format": "date-time" + "format": "int64", + "title": "Total number of secrets" }, - "labels": { - "type": "object" + "by_type": { + "type": "object", + "additionalProperties": { + "type": "string", + "format": "int64" + }, + "title": "Number of secrets grouped by type" } } }, - "QueryLogsReply": { + "ServiceSummary": { "type": "object", "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/LogEntry" - } + "total": { + "type": "string", + "format": "int64", + "title": "Total number of services" }, - "pagination": { - "$ref": "#/definitions/QueryLogsReplyPagination" + "by_status": { + "type": "object", + "additionalProperties": { + "type": "string", + "format": "int64" + }, + "title": "Number of services grouped by status" } } }, - "QueryLogsReplyPagination": { + "Notification": { "type": "object", "properties": { - "has_more": { + "id": { + "type": "string" + }, + "activity": { + "$ref": "#/definitions/Activity" + }, + "is_read": { "type": "boolean" }, - "next_start": { - "type": "string", - "format": "date-time" + "is_seen": { + "type": "boolean" }, - "next_end": { + "created_at": { "type": "string", "format": "date-time" } } }, - "GetMetricsReply": { + "NotificationList": { "type": "object", "properties": { - "metrics": { + "notifications": { "type": "array", "items": { - "$ref": "#/definitions/GetMetricsReply.Metric" - } - } - } - }, - "GetMetricsReply.Metric": { - "type": "object", - "properties": { - "labels": { - "type": "object", - "additionalProperties": { - "type": "string" + "$ref": "#/definitions/Notification" } }, - "samples": { - "type": "array", - "items": { - "$ref": "#/definitions/Sample" - } - } - } - }, - "MetricName": { - "type": "string", - "enum": [ - "UNKNOWN", - "CPU_TOTAL_PERCENT", - "MEM_RSS", - "HTTP_THROUGHPUT", - "HTTP_RESPONSE_TIME_50P", - "HTTP_RESPONSE_TIME_90P", - "HTTP_RESPONSE_TIME_99P", - "HTTP_RESPONSE_TIME_MAX", - "PUBLIC_DATA_TRANSFER_IN", - "PUBLIC_DATA_TRANSFER_OUT" - ], - "default": "UNKNOWN" - }, - "Sample": { - "type": "object", - "properties": { - "timestamp": { - "type": "string" + "limit": { + "type": "integer", + "format": "int64" }, - "value": { - "type": "number", - "format": "double" + "offset": { + "type": "integer", + "format": "int64" + }, + "count": { + "type": "integer", + "format": "int64" + }, + "is_read": { + "type": "boolean" + }, + "is_seen": { + "type": "boolean" + }, + "unread": { + "type": "integer", + "format": "int64" + }, + "unseen": { + "type": "integer", + "format": "int64" } } }, - "ExecCommandIO": { + "GetRegionReply": { "type": "object", "properties": { - "data": { - "type": "string", - "format": "byte", - "description": "Data is base64 encoded" - }, - "close": { - "type": "boolean", - "description": "Indicate last data frame" + "region": { + "$ref": "#/definitions/Region", + "title": "The Region retrieved" } } }, - "ExecCommandReply": { + "ListRegionsReply": { "type": "object", "properties": { - "stdout": { - "$ref": "#/definitions/ExecCommandIO" + "regions": { + "type": "array", + "items": { + "$ref": "#/definitions/RegionListItem" + } }, - "stderr": { - "$ref": "#/definitions/ExecCommandIO" + "limit": { + "type": "integer", + "format": "int64", + "title": "The limit in the request" }, - "exited": { - "type": "boolean" + "offset": { + "type": "integer", + "format": "int64", + "title": "The offset in the request" }, - "exit_code": { + "count": { "type": "integer", - "format": "int32" + "format": "int64", + "title": "The total number of items" } } }, - "ExecCommandRequest.Body": { + "Region": { "type": "object", "properties": { - "command": { + "id": { + "type": "string", + "title": "The id of the region" + }, + "name": { + "type": "string", + "title": "The name of the region" + }, + "coordinates": { "type": "array", "items": { "type": "string" }, - "description": "Command to exec. Mandatory in the first frame sent" + "title": "The coordinates of the region (lat/long)" }, - "tty_size": { - "$ref": "#/definitions/ExecCommandRequest.TerminalSize" + "status": { + "type": "string", + "title": "The status of the region" }, - "stdin": { - "$ref": "#/definitions/ExecCommandIO" + "instances": { + "type": "array", + "items": { + "type": "string" + }, + "title": "A list of instances available in this region" }, - "disableTty": { + "datacenters": { + "type": "array", + "items": { + "type": "string" + }, + "title": "A list of datacenters available in this region" + }, + "volumes_enabled": { "type": "boolean", - "description": "Disable TTY. It's enough to specify it in the first frame" + "title": "Are the volumes enabled for this instance type" + }, + "scope": { + "type": "string", + "description": "The scope of the region, continent, metropolitan area, etc." } } }, - "ExecCommandRequest.IdType": { - "type": "string", - "enum": [ - "INVALID", - "INSTANCE_ID", - "SERVICE_ID" - ], - "default": "INVALID" - }, - "ExecCommandRequest.TerminalSize": { + "RegionListItem": { "type": "object", "properties": { - "height": { - "type": "integer", - "format": "int32" + "id": { + "type": "string", + "title": "The id of the region" + }, + "name": { + "type": "string", + "title": "The name of the region" + }, + "coordinates": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The coordinates of the region (lat/long)" + }, + "status": { + "type": "string", + "title": "The status of the region" + }, + "instances": { + "type": "array", + "items": { + "type": "string" + }, + "title": "A list of instances available in this region" + }, + "datacenters": { + "type": "array", + "items": { + "type": "string" + }, + "title": "A list of datacenters available in this region" }, - "width": { - "type": "integer", - "format": "int32" + "volumes_enabled": { + "type": "boolean", + "title": "Are the volumes enabled for this instance type" + }, + "scope": { + "type": "string", + "description": "The scope of the region, continent, metropolitan area, etc." } } }, - "Notification": { + "DatacenterListItem": { "type": "object", "properties": { "id": { - "type": "string" + "type": "string", + "title": "e.g. \"par1\"" }, - "activity": { - "$ref": "#/definitions/Activity" + "region_id": { + "type": "string", + "title": "e.g. \"par\"" }, - "is_read": { - "type": "boolean" + "domain": { + "type": "string", + "title": "e.g. \"all-par1.infra.prod.koyeb.com\"" }, - "is_seen": { - "type": "boolean" + "coordinates": { + "type": "array", + "items": { + "type": "string" + }, + "title": "e.g. \"8.856614\" ,\"2.352221\"?" }, - "created_at": { - "type": "string", - "format": "date-time" + "use_gpu": { + "type": "boolean", + "title": "e.g. true" + }, + "regions": { + "type": "array", + "items": { + "type": "string" + }, + "title": "e.g. \"par\", \"fra\"" } } }, - "NotificationList": { + "ListDatacentersReply": { "type": "object", "properties": { - "notifications": { + "datacenters": { "type": "array", "items": { - "$ref": "#/definitions/Notification" + "$ref": "#/definitions/DatacenterListItem" } - }, - "limit": { - "type": "integer", - "format": "int64" - }, - "offset": { - "type": "integer", - "format": "int64" - }, - "count": { - "type": "integer", - "format": "int64" - }, - "is_read": { - "type": "boolean" - }, - "is_seen": { - "type": "boolean" - }, - "unread": { - "type": "integer", - "format": "int64" - }, - "unseen": { - "type": "integer", - "format": "int64" } } }, - "ktest.TestAnonReply": { - "type": "object" + "AvailabilityLevel": { + "type": "string", + "enum": [ + "UNKNOWN", + "LOW", + "MEDIUM", + "HIGH" + ], + "default": "UNKNOWN" }, - "ktest.TestAuthReply": { + "CatalogUsage": { "type": "object", "properties": { - "payload": { - "type": "string" - }, - "user_id": { - "type": "string" - }, - "organization_id": { - "type": "string" - }, - "workspace_id": { - "type": "string" + "instances": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/InstanceAvailability" + } } } }, - "ktest.TestAuthRequest": { + "InstanceAvailability": { "type": "object", "properties": { - "payload": { - "type": "string" + "regions": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/RegionAvailability" + } + }, + "availability": { + "$ref": "#/definitions/AvailabilityLevel" } } }, - "kgitproxy.Branch": { + "ListUsageReply": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "organization_id": { - "type": "string" - }, - "repository_id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "is_default": { - "type": "boolean" - }, - "is_protected": { - "type": "boolean" - }, - "provider": { - "$ref": "#/definitions/kgitproxy.RepositoryProvider" + "usage": { + "$ref": "#/definitions/CatalogUsage", + "title": "The Usage retrieved" } } }, - "kgitproxy.GitHubRepository": { + "RegionAvailability": { "type": "object", "properties": { - "github_id": { - "type": "string" + "availability": { + "$ref": "#/definitions/AvailabilityLevel" } } }, - "kgitproxy.ListBranchesReply": { + "CatalogGPUDetails": { "type": "object", "properties": { - "branches": { - "type": "array", - "items": { - "$ref": "#/definitions/kgitproxy.Branch" - }, - "description": "The collection of branches." - }, - "limit": { + "count": { "type": "integer", "format": "int64", - "description": "The limit in the request." + "title": "The number of GPUs" }, - "offset": { - "type": "integer", - "format": "int64", - "description": "The offset in the request." + "brand": { + "type": "string", + "title": "The brand of GPU" }, - "count": { - "type": "integer", - "format": "int64", - "description": "The total number of items." + "memory": { + "type": "string", + "title": "GPU memory" + }, + "name": { + "type": "string", + "title": "Name of GPU" } } }, - "kgitproxy.ListRepositoriesReply": { + "CatalogInstance": { "type": "object", "properties": { - "repositories": { - "type": "array", - "items": { - "$ref": "#/definitions/kgitproxy.Repository" - }, - "description": "The collection of repositories." + "id": { + "type": "string", + "title": "The name of the instance" }, - "limit": { - "type": "integer", - "format": "int64", - "description": "The limit in the request." + "description": { + "type": "string", + "title": "A short description of the instance" }, - "offset": { + "vcpu": { "type": "integer", "format": "int64", - "description": "The offset in the request." + "description": "The number of cpus. Deprecated. Use vcpu_shares instead." }, - "count": { - "type": "integer", - "format": "int64", - "description": "The total number of items." - } - } - }, - "kgitproxy.Repository": { - "type": "object", - "properties": { - "id": { - "type": "string" + "memory": { + "type": "string", + "title": "The memory in bytes in a format like 5MB" }, - "organization_id": { - "type": "string" + "disk": { + "type": "string", + "title": "The size of the disk in bytes in a format like 5MB" }, - "name": { - "type": "string" + "price_per_second": { + "type": "string", + "title": "The price to pay per second" }, - "url": { - "type": "string" + "price_hourly": { + "type": "string", + "title": "The price to pay per hour" }, - "description": { - "type": "string" + "price_monthly": { + "type": "string", + "title": "The price to pay per month" }, - "is_private": { - "type": "boolean" + "regions": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The regions where this instance type is available" }, - "is_disabled": { - "type": "boolean" + "status": { + "type": "string", + "title": "The status of the instance" }, - "default_branch": { - "type": "string" + "require_plan": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The plan required to use instance" }, - "provider": { - "$ref": "#/definitions/kgitproxy.RepositoryProvider" + "vcpu_shares": { + "type": "number", + "format": "float", + "description": "The number of vcpu shares reserved for the instance." }, - "last_push_date": { + "display_name": { "type": "string", - "format": "date-time" + "title": "The display name of the instance" }, - "github": { - "$ref": "#/definitions/kgitproxy.GitHubRepository" - } - } - }, - "kgitproxy.RepositoryProvider": { - "type": "string", - "enum": [ - "INVALID_PROVIDER", - "GITHUB" - ], - "default": "INVALID_PROVIDER" - }, - "kgitproxy.ResyncOrganizationReply": { - "type": "object" - }, - "ksearch.App": { - "type": "object", - "properties": { - "id": { - "type": "string" + "aliases": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Aliases" }, - "organization_id": { - "type": "string" + "type": { + "type": "string", + "title": "The type of the instance (e.g. \"gpu\")" }, - "name": { - "type": "string" - } - } - }, - "ksearch.GlobalDeployment": { - "type": "object", - "properties": { - "id": { - "type": "string" + "gpu": { + "$ref": "#/definitions/CatalogGPUDetails", + "title": "GPU details" }, - "organization_id": { - "type": "string" + "service_types": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Allowed service types for this instance (e.g. [\"web\", \"worker\"])" }, - "app_id": { - "type": "string" + "volumes_enabled": { + "type": "boolean", + "title": "Are the volumes enabled for this instance type" }, - "service_id": { - "type": "string" + "light_sleep_enabled": { + "type": "boolean", + "title": "Is light sleep enabled for this instance type" } } }, - "ksearch.Instance": { + "CatalogInstanceListItem": { "type": "object", "properties": { "id": { - "type": "string" - }, - "organization_id": { - "type": "string" + "type": "string", + "title": "The name of the instance" }, - "app_id": { - "type": "string" + "description": { + "type": "string", + "title": "A short description of the instance" }, - "service_id": { - "type": "string" + "vcpu": { + "type": "integer", + "format": "int64", + "description": "The number of cpus. Deprecated. Use vcpu_shares instead." }, - "allocation_id": { - "type": "string" - } - } - }, - "ksearch.Organization": { - "type": "object", - "properties": { - "id": { - "type": "string" + "memory": { + "type": "string", + "title": "The memory in bytes in a format like 5MB" }, - "name": { - "type": "string" - } - } - }, - "ksearch.RegionalDeployment": { - "type": "object", - "properties": { - "id": { - "type": "string" + "disk": { + "type": "string", + "title": "The size of the disk in bytes in a format like 5MB" }, - "organization_id": { - "type": "string" + "price_per_second": { + "type": "string", + "title": "The price to pay per second" }, - "app_id": { - "type": "string" + "price_hourly": { + "type": "string", + "title": "The price to pay per hour" }, - "service_id": { - "type": "string" + "price_monthly": { + "type": "string", + "title": "The price to pay per month" }, - "region": { - "type": "string" - } - } - }, - "ksearch.SearchReply": { - "type": "object", - "properties": { - "organizations": { + "regions": { "type": "array", "items": { - "$ref": "#/definitions/ksearch.Organization" - } + "type": "string" + }, + "title": "The regions where this instance type is available" }, - "users": { - "type": "array", - "items": { - "$ref": "#/definitions/ksearch.User" - } + "status": { + "type": "string", + "title": "The status of the instance" }, - "apps": { + "require_plan": { "type": "array", "items": { - "$ref": "#/definitions/ksearch.App" - } + "type": "string" + }, + "title": "The plan required to use instance" }, - "services": { - "type": "array", - "items": { - "$ref": "#/definitions/ksearch.Service" - } + "vcpu_shares": { + "type": "number", + "format": "float", + "description": "The number of vcpu shares reserved for the instance." }, - "global_deployments": { - "type": "array", - "items": { - "$ref": "#/definitions/ksearch.GlobalDeployment" - } + "display_name": { + "type": "string", + "title": "The display name of the instance" }, - "regional_deployments": { + "aliases": { "type": "array", "items": { - "$ref": "#/definitions/ksearch.RegionalDeployment" - } + "type": "string" + }, + "title": "Aliases" }, - "instances": { + "type": { + "type": "string", + "title": "The type of the instance (e.g. \"gpu\")" + }, + "gpu": { + "$ref": "#/definitions/CatalogGPUDetails", + "title": "GPU details" + }, + "service_types": { "type": "array", "items": { - "$ref": "#/definitions/ksearch.Instance" - } + "type": "string" + }, + "title": "Allowed service types for this instance (e.g. [\"web\", \"worker\"])" + }, + "volumes_enabled": { + "type": "boolean", + "title": "Are the volumes enabled for this instance type" + }, + "light_sleep_enabled": { + "type": "boolean", + "title": "Is light sleep enabled for this instance type" } } }, - "ksearch.Service": { + "GetCatalogInstanceReply": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "organization_id": { - "type": "string" - }, - "app_id": { - "type": "string" - }, - "name": { - "type": "string" + "instance": { + "$ref": "#/definitions/CatalogInstance", + "title": "The instance retrieved" } } }, - "ksearch.User": { + "ListCatalogInstancesReply": { "type": "object", "properties": { - "id": { - "type": "string" + "instances": { + "type": "array", + "items": { + "$ref": "#/definitions/CatalogInstanceListItem" + } }, - "email": { - "type": "string" + "limit": { + "type": "integer", + "format": "int64", + "title": "The limit in the request" }, - "name": { - "type": "string" + "offset": { + "type": "integer", + "format": "int64", + "title": "The offset in the request" }, - "github_user": { - "type": "string" + "count": { + "type": "integer", + "format": "int64", + "title": "The total number of items" } } } From cacdd7794e67084fcf45ac8b1848e406b7e25e6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Ole=C5=9B?= Date: Mon, 6 Jul 2026 11:16:43 +0200 Subject: [PATCH 2/2] Fix patch system with correct patches from clean base (no version changes) Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe --- Makefile | 2 + koyeb/api/.openapi-generator/FILES | 16 ----- koyeb/api/api_client.py | 8 ++- koyeb/api/configuration.py | 17 ++++- koyeb/api_async/.openapi-generator/FILES | 16 ----- koyeb/api_async/configuration.py | 17 ++++- patches/001-proxy-support.patch | 84 ++++++++++++++++++++++++ patches/002-api-client-fixes.patch | 19 ++++++ scripts/apply_patches.sh | 23 +++++++ 9 files changed, 167 insertions(+), 35 deletions(-) create mode 100644 patches/001-proxy-support.patch create mode 100644 patches/002-api-client-fixes.patch create mode 100755 scripts/apply_patches.sh diff --git a/Makefile b/Makefile index 22e7173e..a3ef404b 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,8 @@ DOCKER ?= docker .PHONY: gen-api-client gen-api-client: fetch-spec gen-api-client-sync gen-api-client-async + # Apply manual patches after code generation + ./scripts/apply_patches.sh .PHONY: gen-api-client-sync gen-api-client-sync: diff --git a/koyeb/api/.openapi-generator/FILES b/koyeb/api/.openapi-generator/FILES index a07b13ce..434823fb 100644 --- a/koyeb/api/.openapi-generator/FILES +++ b/koyeb/api/.openapi-generator/FILES @@ -896,20 +896,4 @@ koyeb/api/models/verify_docker_image_reply.py koyeb/api/models/verify_docker_image_reply_err_code.py koyeb/api/rest.py koyeb/api/test/__init__.py -koyeb/api/test/test_create_instance_snapshot_reply.py -koyeb/api/test/test_create_instance_snapshot_request.py -koyeb/api/test/test_delete_instance_snapshot_reply.py -koyeb/api/test/test_egress_policy.py -koyeb/api/test/test_egress_policy_mode.py -koyeb/api/test/test_get_instance_snapshot_reply.py -koyeb/api/test/test_instance_snapshot.py -koyeb/api/test/test_instance_snapshot_event.py -koyeb/api/test/test_instance_snapshot_quotas.py -koyeb/api/test/test_instance_snapshot_status.py -koyeb/api/test/test_instance_snapshot_type.py -koyeb/api/test/test_instance_snapshots_api.py -koyeb/api/test/test_list_instance_snapshot_events_reply.py -koyeb/api/test/test_list_instance_snapshots_reply.py -koyeb/api/test/test_network_policy.py -koyeb/api/test/test_network_policy_destination.py koyeb/api_README.md diff --git a/koyeb/api/api_client.py b/koyeb/api/api_client.py index c6880fc5..b53392f4 100644 --- a/koyeb/api/api_client.py +++ b/koyeb/api/api_client.py @@ -98,7 +98,13 @@ def __enter__(self): return self def __exit__(self, exc_type, exc_value, traceback): - pass + if self.rest_client is not None and hasattr(self.rest_client, 'pool_manager'): + self.rest_client.pool_manager.clear() + + async def close(self): + """Close the underlying HTTP connection pool.""" + if self.rest_client is not None and hasattr(self.rest_client, 'pool_manager'): + self.rest_client.pool_manager.clear() @property def user_agent(self): diff --git a/koyeb/api/configuration.py b/koyeb/api/configuration.py index 2e5c58bf..ff94daa9 100644 --- a/koyeb/api/configuration.py +++ b/koyeb/api/configuration.py @@ -17,6 +17,8 @@ import multiprocessing import sys from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union +from urllib.parse import urlparse +from urllib.request import getproxies_environment, proxy_bypass_environment from typing_extensions import NotRequired, Self import urllib3 @@ -329,7 +331,7 @@ def __init__( per pool. None in the constructor is coerced to cpu_count * 5. """ - self.proxy = proxy + self.proxy = proxy if proxy is not None else self._get_proxy_from_env() """Proxy URL """ self.proxy_headers = proxy_headers @@ -356,6 +358,19 @@ def __init__( """date format """ + def _get_proxy_from_env(self) -> Optional[str]: + proxies = getproxies_environment() + if not proxies: + return None + + parsed = urlparse(self._base_path) + host = parsed.hostname or '' + + if proxy_bypass_environment(host): + return None + + return proxies.get(parsed.scheme) or proxies.get('all') or None + def __deepcopy__(self, memo: Dict[int, Any]) -> Self: cls = self.__class__ result = cls.__new__(cls) diff --git a/koyeb/api_async/.openapi-generator/FILES b/koyeb/api_async/.openapi-generator/FILES index 2749fda4..3707a1a9 100644 --- a/koyeb/api_async/.openapi-generator/FILES +++ b/koyeb/api_async/.openapi-generator/FILES @@ -896,20 +896,4 @@ koyeb/api_async/models/verify_docker_image_reply.py koyeb/api_async/models/verify_docker_image_reply_err_code.py koyeb/api_async/rest.py koyeb/api_async/test/__init__.py -koyeb/api_async/test/test_create_instance_snapshot_reply.py -koyeb/api_async/test/test_create_instance_snapshot_request.py -koyeb/api_async/test/test_delete_instance_snapshot_reply.py -koyeb/api_async/test/test_egress_policy.py -koyeb/api_async/test/test_egress_policy_mode.py -koyeb/api_async/test/test_get_instance_snapshot_reply.py -koyeb/api_async/test/test_instance_snapshot.py -koyeb/api_async/test/test_instance_snapshot_event.py -koyeb/api_async/test/test_instance_snapshot_quotas.py -koyeb/api_async/test/test_instance_snapshot_status.py -koyeb/api_async/test/test_instance_snapshot_type.py -koyeb/api_async/test/test_instance_snapshots_api.py -koyeb/api_async/test/test_list_instance_snapshot_events_reply.py -koyeb/api_async/test/test_list_instance_snapshots_reply.py -koyeb/api_async/test/test_network_policy.py -koyeb/api_async/test/test_network_policy_destination.py koyeb/api_async_README.md diff --git a/koyeb/api_async/configuration.py b/koyeb/api_async/configuration.py index 8cd0513e..e3f22ad9 100644 --- a/koyeb/api_async/configuration.py +++ b/koyeb/api_async/configuration.py @@ -17,6 +17,8 @@ from logging import FileHandler import sys from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union +from urllib.parse import urlparse +from urllib.request import getproxies_environment, proxy_bypass_environment from typing_extensions import NotRequired, Self @@ -327,7 +329,7 @@ def __init__( None in the constructor is coerced to default 100. """ - self.proxy = proxy + self.proxy = proxy if proxy is not None else self._get_proxy_from_env() """Proxy URL """ self.proxy_headers = proxy_headers @@ -354,6 +356,19 @@ def __init__( """date format """ + def _get_proxy_from_env(self) -> Optional[str]: + proxies = getproxies_environment() + if not proxies: + return None + + parsed = urlparse(self._base_path) + host = parsed.hostname or '' + + if proxy_bypass_environment(host): + return None + + return proxies.get(parsed.scheme) or proxies.get('all') or None + def __deepcopy__(self, memo: Dict[int, Any]) -> Self: cls = self.__class__ result = cls.__new__(cls) diff --git a/patches/001-proxy-support.patch b/patches/001-proxy-support.patch new file mode 100644 index 00000000..c441486e --- /dev/null +++ b/patches/001-proxy-support.patch @@ -0,0 +1,84 @@ +diff --git a/koyeb/api/configuration.py b/koyeb/api/configuration.py +index 2e5c58b..ff94daa 100644 +--- a/koyeb/api/configuration.py ++++ b/koyeb/api/configuration.py +@@ -17,6 +17,8 @@ from logging import FileHandler + import multiprocessing + import sys + from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union ++from urllib.parse import urlparse ++from urllib.request import getproxies_environment, proxy_bypass_environment + from typing_extensions import NotRequired, Self + + import urllib3 +@@ -329,7 +331,7 @@ conf = koyeb.api.Configuration( + per pool. None in the constructor is coerced to cpu_count * 5. + """ + +- self.proxy = proxy ++ self.proxy = proxy if proxy is not None else self._get_proxy_from_env() + """Proxy URL + """ + self.proxy_headers = proxy_headers +@@ -356,6 +358,19 @@ conf = koyeb.api.Configuration( + """date format + """ + ++ def _get_proxy_from_env(self) -> Optional[str]: ++ proxies = getproxies_environment() ++ if not proxies: ++ return None ++ ++ parsed = urlparse(self._base_path) ++ host = parsed.hostname or '' ++ ++ if proxy_bypass_environment(host): ++ return None ++ ++ return proxies.get(parsed.scheme) or proxies.get('all') or None ++ + def __deepcopy__(self, memo: Dict[int, Any]) -> Self: + cls = self.__class__ + result = cls.__new__(cls) +diff --git a/koyeb/api_async/configuration.py b/koyeb/api_async/configuration.py +index 8cd0513..e3f22ad 100644 +--- a/koyeb/api_async/configuration.py ++++ b/koyeb/api_async/configuration.py +@@ -17,6 +17,8 @@ import logging + from logging import FileHandler + import sys + from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union ++from urllib.parse import urlparse ++from urllib.request import getproxies_environment, proxy_bypass_environment + from typing_extensions import NotRequired, Self + + +@@ -327,7 +329,7 @@ conf = koyeb.api_async.Configuration( + None in the constructor is coerced to default 100. + """ + +- self.proxy = proxy ++ self.proxy = proxy if proxy is not None else self._get_proxy_from_env() + """Proxy URL + """ + self.proxy_headers = proxy_headers +@@ -354,6 +356,19 @@ conf = koyeb.api_async.Configuration( + """date format + """ + ++ def _get_proxy_from_env(self) -> Optional[str]: ++ proxies = getproxies_environment() ++ if not proxies: ++ return None ++ ++ parsed = urlparse(self._base_path) ++ host = parsed.hostname or '' ++ ++ if proxy_bypass_environment(host): ++ return None ++ ++ return proxies.get(parsed.scheme) or proxies.get('all') or None ++ + def __deepcopy__(self, memo: Dict[int, Any]) -> Self: + cls = self.__class__ + result = cls.__new__(cls) diff --git a/patches/002-api-client-fixes.patch b/patches/002-api-client-fixes.patch new file mode 100644 index 00000000..3cc5c2b9 --- /dev/null +++ b/patches/002-api-client-fixes.patch @@ -0,0 +1,19 @@ +diff --git a/koyeb/api/api_client.py b/koyeb/api/api_client.py +index c6880fc5..c6880fc5 100644 +--- a/koyeb/api/api_client.py ++++ b/koyeb/api/api_client.py +@@ -98,7 +98,13 @@ class ApiClient: + return self + + def __exit__(self, exc_type, exc_value, traceback): +- pass ++ if self.rest_client is not None and hasattr(self.rest_client, 'pool_manager'): ++ self.rest_client.pool_manager.clear() ++ ++ async def close(self): ++ """Close the underlying HTTP connection pool.""" ++ if self.rest_client is not None and hasattr(self.rest_client, 'pool_manager'): ++ self.rest_client.pool_manager.clear() + + @property + def user_agent(self): diff --git a/scripts/apply_patches.sh b/scripts/apply_patches.sh new file mode 100755 index 00000000..f403050d --- /dev/null +++ b/scripts/apply_patches.sh @@ -0,0 +1,23 @@ +#!/bin/bash +set -e + +echo "Applying manual patches after code generation..." + +PATCHES=( + "patches/001-proxy-support.patch" + "patches/002-api-client-fixes.patch" +) + +for patch in "${PATCHES[@]}"; do + if [ -f "$patch" ]; then + echo " Applying $patch..." + if ! git apply "$patch"; then + echo " ERROR: Failed to apply $patch" + exit 1 + fi + else + echo " WARNING: $patch not found, skipping..." + fi +done + +echo "All patches applied successfully."