list_services

vessl.list_services(
   organization: str
)

Get a list of all services in an organization

Args

  • organization (str) : The name of the organization.

Example

vessl.list_services(organization="my-org")

read_service

vessl.read_service(
   service_name: str
)

Get a service from a service name.

Args

  • service_name (str) : The name of the service.

Example

vessl.read_service(service_name="my-service")

create_revision_from_yaml

vessl.create_revision_from_yaml(
   organization: str, yaml_body: str
)

Create a new revision of service from a YAML file.

Args

  • organization (str) : The name of the organization.
  • yaml_body (str) : The YAML body of the service. It is not deserialized YAML, but a whole yaml string.

Example

vessl.create_revision_from_yaml(
    organization="my-org",
    yaml_body=yaml_body)

launch_revision

vessl.launch_revision(
   organization: str, service_name: str, revision_number: int
)

Launch a service revision from a service name and revision number.

Args

  • organization (str) : The name of the organization.
  • service_name (str) : The name of the service.
  • revision_number (int) : The revision number of the service.

Example

vessl.launch_revision(
    organization="my-org",
    service_name="my-service",
    revision_number=1)

read_revision

vessl.read_revision(
   organization: str, service_name: str, revision_number: int
)

Get a service revision from a service name and revision number.

Args

  • organization (str) : The name of the organization.
  • service_name (str) : The name of the service.
  • revision_number (int) : The revision number of the service.

Example

vessl.read_revision(
    organization="my-org",
    service_name="my-service",
    revision_number=1)

terminate_revision

vessl.terminate_revision(
   organization: str, service_name: str, revision_number: int
)

Terminate a service revision from a service name and revision number.

Args

  • organization (str) : The name of the organization.
  • service_name (str) : The name of the service.
  • revision_number (int) : The revision number of the service.

Example

vessl.terminate_revision(
    organization="my-org",
    service_name="my-service",
    revision_number=1)

update_revision_autoscaler_config

vessl.update_revision_autoscaler_config(
   organization: str, service_name: str, revision_number: int,
   autoscaling: V1Autoscaling
)

Update the autoscaler config of a service revision from a service name and revision number.

Args

  • organization (str) : The name of the organization.
  • service_name (str) : The name of the service.
  • revision_number (int) : The revision number of the service.
  • autoscaling (V1Autoscaling) : The autoscaler config of the service.

Example

vessl.update_revision_autoscaler_config(
    organization="my-org",
    service_name="my-service",
    revision_number=1,
    autoscaling=V1Autoscaling(
        min=1,
        max=2,
        metric="cpu",
        target=80,
    ))

update_revision_autoscaling_v2

vessl.update_revision_autoscaling_v2(
   organization: str, service_name: str, revision_number: int,
   autoscaling: V1Autoscaling
)

Update the autoscaler config of a service revision from a service name and revision number.

Args

  • organization (str) : The name of the organization.
  • service_name (str) : The name of the service.
  • revision_number (int) : The revision number of the service.
  • autoscaling (V1Autoscaling) : The autoscaler config of the service.

Example

vessl.update_revision_autoscaling_v2(
    organization="my-org",
    service_name="my-service",
    revision_number=1,
    autoscaling=V1Autoscaling(
        min=1,
        max=2,
        metric="cpu",
        target=80,
    ))

list_revisions

vessl.list_revisions(
   organization: str, service_name: str
)

Get a list of all revisions of a service.

Args

  • organization (str) : The name of the organization.
  • service_name (str) : The name of the service.

Examples

vessl.list_revisions(
    organization="my-org",
    service_name="my-service")

read_gateway

vessl.read_gateway(
   organization: str, service_name: str
)

Get the gateway of a service.

Args

  • organization (str) : The name of the organization.
  • service_name (str) : The name of the service.

Examples

vessl.read_gateway(
    organization="my-org",
    service_name="my-service")

update_gateway

vessl.update_gateway(
   organization: str, service_name: str,
   gateway: ModelServiceGatewayUpdateAPIInput
)

Update the gateway of a service.

Args

  • organization (str) : The name of the organization.
  • service_name (str) : The name of the service.
  • gateway (ModelServiceGatewayUpdateAPIInput) : The gateway of the service.

Examples

from openapi_client import ModelServiceGatewayUpdateAPIInput
from openapi_client import OrmModelServiceGatewayTrafficSplitEntry

gateway = ModelServiceGatewayUpdateAPIInput(
    enabled=True,
    ingress_host="my-endpoint",
    traffic_split=[
        OrmModelServiceGatewayTrafficSplitEntry(
            revision_number=1,
            port=2222,
            traffic_weight=100,
        )
    ],
)

vessl.update_gateway(
    organization="my-org",
    service_name="my-service",
    gateway=gateway)

update_gateway_for_revision

vessl.update_gateway_for_revision(
   organization: str, service_name: str, revision_number: int, port: int,
   weight: int
)

Update the current gateway of a service for a specific revision.

Args

  • organization (str) : The name of the organization.
  • service_name (str) : The name of the service.
  • revision_number (int) : The revision number of the service.
  • port (int) : The port of the revision will use for gateway.
  • weight (int) : The weight of the traffic will be distributed to revision_number.

Examples

vessl.update_gateway_for_revision(
    organization="my-org",
    service_name="my-service",
    revision_number=1,
    port=2222,
    weight=100)

(deprecated) update_revision_autoscaler_config

vessl.update_revision_autoscaler_config(
   organization: str, serving_name: str, revision_number: int,
   auto_scaler_config: AutoScalerConfig
)

(THIS API IS DEPRECATED.)

Update the autoscaler config of a serving revision from a serving name and revision number.

Args

  • organization (str) : The name of the organization.
  • serving_name (str) : The name of the serving.
  • revision_number (int) : The revision number of the serving.
  • auto_scaler_config (AutoScalerConfig) : The autoscaler config of the serving.

Example

vessl.update_revision_autoscaler_config(
    organization="my-org",
    serving_name="my-serving",
    revision_number=1,
    auto_scaler_config=AutoScalerConfig(
        min_replicas=1,
        max_replicas=2,
        target_cpu_utilization_percentage=80,
    ))

(deprecated) update_gateway_from_yaml

vessl.update_gateway_from_yaml(
   organization: str, serving_name: str, yaml_body: str
)

(THIS API IS DEPRECATED.)

Update the gateway of a serving from a YAML file.

Args

  • organization (str) : The name of the organization.
  • serving_name (str) : The name of the serving.
  • yaml_body (str) : The YAML body of the serving. It is not deserialized YAML, but a whole yaml string

Examples

vessl.update_gateway_from_yaml(
    organization="my-org",
    serving_name="my-serving",
    yaml_body=yaml_body)