scaleway.container.v1beta1 package

Submodules

scaleway.container.v1beta1.api module

class scaleway.container.v1beta1.api.ContainerV1Beta1API(client: Client, *, bypass_validation: bool = False)

Bases: API

This API allows you to manage your Serverless Containers.

create_container(*, namespace_id: str, name: str, region: str | None = None, environment_variables: Dict[str, str] | None = None, min_scale: int | None = None, max_scale: int | None = None, memory_limit: int | None = None, cpu_limit: int | None = None, timeout: str | None = None, privacy: ContainerPrivacy | None = None, description: str | None = None, registry_image: str | None = None, max_concurrency: int | None = None, protocol: ContainerProtocol | None = None, port: int | None = None, secret_environment_variables: List[Secret] | None = None, http_option: ContainerHttpOption | None = None, sandbox: ContainerSandbox | None = None, local_storage_limit: int | None = None, scaling_option: ContainerScalingOption | None = None, health_check: ContainerHealthCheckSpec | None = None, tags: List[str] | None = None, private_network_id: str | None = None, command: List[str] | None = None, args: List[str] | None = None) Container

Create a new container. Create a new container in the specified region. :param namespace_id: UUID of the namespace the container belongs to. :param name: Name of the container. :param region: Region to target. If none is passed will use default region from the config. :param environment_variables: Environment variables of the container. :param min_scale: Minimum number of instances to scale the container to. :param max_scale: Maximum number of instances to scale the container to. :param memory_limit: Memory limit of the container in MB. :param cpu_limit: CPU limit of the container in mvCPU. :param timeout: Processing time limit for the container. :param privacy: Privacy setting of the container. :param description: Description of the container. :param registry_image: Name of the registry image (e.g. “rg.fr-par.scw.cloud/something/image:tag”). :param max_concurrency: Number of maximum concurrent executions of the container. :param protocol: Protocol the container uses. :param port: Port the container listens on. :param secret_environment_variables: Secret environment variables of the container. :param http_option: Possible values:

  • redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.

  • enabled: Serve both HTTP and HTTPS traffic.

Parameters:
  • sandbox – Execution environment of the container.

  • local_storage_limit – Local storage limit of the container (in MB).

  • scaling_option – Possible values:

  • concurrent_requests_threshold: Scale depending on the number of concurrent requests being processed per container instance.

  • cpu_usage_threshold: Scale depending on the CPU usage of a container instance.

  • memory_usage_threshold: Scale depending on the memory usage of a container instance.

Parameters:
  • health_check – Health check configuration of the container.

  • tags – Tags of the Serverless Container.

  • private_network_id – When connected to a Private Network, the container can access other Scaleway resources in this Private Network.

  • command – Command executed when the container starts. This overrides the default command defined in the container image. This is usually the main executable, or entry point script to run.

  • args – Arguments passed to the command specified in the “command” field. These override the default arguments from the container image, and behave like command-line parameters.

Returns:

Container

Usage:

result = api.create_container(
    namespace_id="example",
    name="example",
)
create_cron(*, container_id: str, schedule: str, region: str | None = None, args: Dict[str, Any] | None = None, name: str | None = None) Cron

Create a new cron. :param container_id: UUID of the container to invoke by the cron. :param schedule: UNIX cron shedule. :param region: Region to target. If none is passed will use default region from the config. :param args: Arguments to pass with the cron. :param name: Name of the cron to create. :return: Cron

Usage:

result = api.create_cron(
    container_id="example",
    schedule="example",
)
create_domain(*, hostname: str, container_id: str, region: str | None = None) Domain

Create a custom domain. Create a custom domain for the container with the specified ID. :param hostname: Domain to assign. :param container_id: UUID of the container to assign the domain to. :param region: Region to target. If none is passed will use default region from the config. :return: Domain

Usage:

result = api.create_domain(
    hostname="example",
    container_id="example",
)
create_namespace(*, region: str | None = None, name: str | None = None, environment_variables: Dict[str, str] | None = None, project_id: str | None = None, description: str | None = None, secret_environment_variables: List[Secret] | None = None, tags: List[str] | None = None, activate_vpc_integration: bool | None = None) Namespace

Create a new namespace. Create a new namespace in a specified region. :param region: Region to target. If none is passed will use default region from the config. :param name: Name of the namespace to create. :param environment_variables: Environment variables of the namespace to create. :param project_id: UUID of the Project in which the namespace will be created. :param description: Description of the namespace to create. :param secret_environment_variables: Secret environment variables of the namespace to create. :param tags: Tags of the Serverless Container Namespace. :param activate_vpc_integration: Setting this field to true doesn’t matter anymore. It will be removed in a near future. :return: Namespace

Usage:

result = api.create_namespace()
create_token(*, region: str | None = None, container_id: str | None = None, namespace_id: str | None = None, description: str | None = None, expires_at: datetime | None = None) Token

Create a new revocable token. :param region: Region to target. If none is passed will use default region from the config. :param container_id: UUID of the container to create the token for. One-Of (‘scope’): at most one of ‘container_id’, ‘namespace_id’ could be set. :param namespace_id: UUID of the namespace to create the token for. One-Of (‘scope’): at most one of ‘container_id’, ‘namespace_id’ could be set. :param description: Description of the token. :param expires_at: Expiry date of the token. :return: Token

Usage:

result = api.create_token()
create_trigger(*, name: str, container_id: str, region: str | None = None, description: str | None = None, scw_sqs_config: CreateTriggerRequestMnqSqsClientConfig | None = None, scw_nats_config: CreateTriggerRequestMnqNatsClientConfig | None = None, sqs_config: CreateTriggerRequestSqsClientConfig | None = None) Trigger

Create a trigger. Create a new trigger for a specified container. :param name: Name of the trigger. :param container_id: ID of the container to trigger. :param region: Region to target. If none is passed will use default region from the config. :param description: Description of the trigger. :param scw_sqs_config: Configuration for a Scaleway Messaging and Queuing SQS queue. One-Of (‘config’): at most one of ‘scw_sqs_config’, ‘scw_nats_config’, ‘sqs_config’ could be set. :param scw_nats_config: Configuration for a Scaleway Messaging and Queuing NATS subject. One-Of (‘config’): at most one of ‘scw_sqs_config’, ‘scw_nats_config’, ‘sqs_config’ could be set. :param sqs_config: Configuration for an AWS SQS queue. One-Of (‘config’): at most one of ‘scw_sqs_config’, ‘scw_nats_config’, ‘sqs_config’ could be set. :return: Trigger

Usage:

result = api.create_trigger(
    name="example",
    container_id="example",
)
delete_container(*, container_id: str, region: str | None = None) Container

Delete a container. Delete the container associated with the specified ID. :param container_id: UUID of the container to delete. :param region: Region to target. If none is passed will use default region from the config. :return: Container

Usage:

result = api.delete_container(
    container_id="example",
)
delete_cron(*, cron_id: str, region: str | None = None) Cron

Delete an existing cron. Delete the cron associated with the specified ID. :param cron_id: UUID of the cron to delete. :param region: Region to target. If none is passed will use default region from the config. :return: Cron

Usage:

result = api.delete_cron(
    cron_id="example",
)
delete_domain(*, domain_id: str, region: str | None = None) Domain

Delete a custom domain. Delete the custom domain with the specific ID. :param domain_id: UUID of the domain to delete. :param region: Region to target. If none is passed will use default region from the config. :return: Domain

Usage:

result = api.delete_domain(
    domain_id="example",
)
delete_namespace(*, namespace_id: str, region: str | None = None) Namespace

Delete an existing namespace. Delete the namespace associated with the specified ID. :param namespace_id: UUID of the namespace to delete. :param region: Region to target. If none is passed will use default region from the config. :return: Namespace

Usage:

result = api.delete_namespace(
    namespace_id="example",
)
delete_token(*, token_id: str, region: str | None = None) Token

Delete a token. Delete a token with a specified ID. :param token_id: UUID of the token to delete. :param region: Region to target. If none is passed will use default region from the config. :return: Token

Usage:

result = api.delete_token(
    token_id="example",
)
delete_trigger(*, trigger_id: str, region: str | None = None) Trigger

Delete a trigger. Delete a trigger with a specified ID. :param trigger_id: ID of the trigger to delete. :param region: Region to target. If none is passed will use default region from the config. :return: Trigger

Usage:

result = api.delete_trigger(
    trigger_id="example",
)
deploy_container(*, container_id: str, region: str | None = None) Container

Deploy a container. Deploy a container associated with the specified ID. :param container_id: UUID of the container to deploy. :param region: Region to target. If none is passed will use default region from the config. :return: Container

Usage:

result = api.deploy_container(
    container_id="example",
)
get_container(*, container_id: str, region: str | None = None) Container

Get a container. Get the container associated with the specified ID. :param container_id: UUID of the container to get. :param region: Region to target. If none is passed will use default region from the config. :return: Container

Usage:

result = api.get_container(
    container_id="example",
)
get_cron(*, cron_id: str, region: str | None = None) Cron

Get a cron. Get the cron associated with the specified ID. :param cron_id: UUID of the cron to get. :param region: Region to target. If none is passed will use default region from the config. :return: Cron

Usage:

result = api.get_cron(
    cron_id="example",
)
get_domain(*, domain_id: str, region: str | None = None) Domain

Get a custom domain. Get a custom domain for the container with the specified ID. :param domain_id: UUID of the domain to get. :param region: Region to target. If none is passed will use default region from the config. :return: Domain

Usage:

result = api.get_domain(
    domain_id="example",
)
get_namespace(*, namespace_id: str, region: str | None = None) Namespace

Get a namespace. Get the namespace associated with the specified ID. :param namespace_id: UUID of the namespace to get. :param region: Region to target. If none is passed will use default region from the config. :return: Namespace

Usage:

result = api.get_namespace(
    namespace_id="example",
)
get_token(*, token_id: str, region: str | None = None) Token

Get a token. Get a token with a specified ID. :param token_id: UUID of the token to get. :param region: Region to target. If none is passed will use default region from the config. :return: Token

Usage:

result = api.get_token(
    token_id="example",
)
get_trigger(*, trigger_id: str, region: str | None = None) Trigger

Get a trigger. Get a trigger with a specified ID. :param trigger_id: ID of the trigger to get. :param region: Region to target. If none is passed will use default region from the config. :return: Trigger

Usage:

result = api.get_trigger(
    trigger_id="example",
)
list_containers(*, namespace_id: str, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListContainersRequestOrderBy | None = None, name: str | None = None, organization_id: str | None = None, project_id: str | None = None) ListContainersResponse

List all your containers. List all containers for a specified region. :param namespace_id: UUID of the namespace the container belongs to. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number. :param page_size: Number of containers per page. :param order_by: Order of the containers. :param name: Name of the container. :param organization_id: UUID of the Organization the container belongs to. :param project_id: UUID of the Project the container belongs to. :return: ListContainersResponse

Usage:

result = api.list_containers(
    namespace_id="example",
)
list_containers_all(*, namespace_id: str, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListContainersRequestOrderBy | None = None, name: str | None = None, organization_id: str | None = None, project_id: str | None = None) List[Container]

List all your containers. List all containers for a specified region. :param namespace_id: UUID of the namespace the container belongs to. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number. :param page_size: Number of containers per page. :param order_by: Order of the containers. :param name: Name of the container. :param organization_id: UUID of the Organization the container belongs to. :param project_id: UUID of the Project the container belongs to. :return: List[Container]

Usage:

result = api.list_containers_all(
    namespace_id="example",
)
list_crons(*, container_id: str, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListCronsRequestOrderBy | None = None) ListCronsResponse

List all your crons. :param container_id: UUID of the container invoked by the cron. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number. :param page_size: Number of crons per page. :param order_by: Order of the crons. :return: ListCronsResponse

Usage:

result = api.list_crons(
    container_id="example",
)
list_crons_all(*, container_id: str, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListCronsRequestOrderBy | None = None) List[Cron]

List all your crons. :param container_id: UUID of the container invoked by the cron. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number. :param page_size: Number of crons per page. :param order_by: Order of the crons. :return: List[Cron]

Usage:

result = api.list_crons_all(
    container_id="example",
)
list_domains(*, container_id: str, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListDomainsRequestOrderBy | None = None) ListDomainsResponse

List all custom domains. List all custom domains in a specified region. :param container_id: UUID of the container the domain belongs to. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number. :param page_size: Number of domains per page. :param order_by: Order of the domains. :return: ListDomainsResponse

Usage:

result = api.list_domains(
    container_id="example",
)
list_domains_all(*, container_id: str, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListDomainsRequestOrderBy | None = None) List[Domain]

List all custom domains. List all custom domains in a specified region. :param container_id: UUID of the container the domain belongs to. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number. :param page_size: Number of domains per page. :param order_by: Order of the domains. :return: List[Domain]

Usage:

result = api.list_domains_all(
    container_id="example",
)
list_namespaces(*, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListNamespacesRequestOrderBy | None = None, name: str | None = None, organization_id: str | None = None, project_id: str | None = None) ListNamespacesResponse

List all your namespaces. List all namespaces in a specified region. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number. :param page_size: Number of namespaces per page. :param order_by: Order of the namespaces. :param name: Name of the namespaces. :param organization_id: UUID of the Organization the namespace belongs to. :param project_id: UUID of the Project the namespace belongs to. :return: ListNamespacesResponse

Usage:

result = api.list_namespaces()
list_namespaces_all(*, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListNamespacesRequestOrderBy | None = None, name: str | None = None, organization_id: str | None = None, project_id: str | None = None) List[Namespace]

List all your namespaces. List all namespaces in a specified region. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number. :param page_size: Number of namespaces per page. :param order_by: Order of the namespaces. :param name: Name of the namespaces. :param organization_id: UUID of the Organization the namespace belongs to. :param project_id: UUID of the Project the namespace belongs to. :return: List[Namespace]

Usage:

result = api.list_namespaces_all()
list_tokens(*, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListTokensRequestOrderBy | None = None, container_id: str | None = None, namespace_id: str | None = None) ListTokensResponse

List all tokens. List all tokens belonging to a specified Organization or Project. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number. :param page_size: Number of tokens per page. :param order_by: Order of the tokens. :param container_id: UUID of the container the token belongs to. :param namespace_id: UUID of the namespace the token belongs to. :return: ListTokensResponse

Usage:

result = api.list_tokens()
list_tokens_all(*, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListTokensRequestOrderBy | None = None, container_id: str | None = None, namespace_id: str | None = None) List[Token]

List all tokens. List all tokens belonging to a specified Organization or Project. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number. :param page_size: Number of tokens per page. :param order_by: Order of the tokens. :param container_id: UUID of the container the token belongs to. :param namespace_id: UUID of the namespace the token belongs to. :return: List[Token]

Usage:

result = api.list_tokens_all()
list_triggers(*, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListTriggersRequestOrderBy | None = None, container_id: str | None = None, namespace_id: str | None = None, project_id: str | None = None) ListTriggersResponse

List all triggers. List all triggers belonging to a specified Organization or Project. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number to return. :param page_size: Maximum number of triggers to return per page. :param order_by: Order in which to return results. :param container_id: ID of the container the triggers belongs to. One-Of (‘scope’): at most one of ‘container_id’, ‘namespace_id’, ‘project_id’ could be set. :param namespace_id: ID of the namespace the triggers belongs to. One-Of (‘scope’): at most one of ‘container_id’, ‘namespace_id’, ‘project_id’ could be set. :param project_id: ID of the project the triggers belongs to. One-Of (‘scope’): at most one of ‘container_id’, ‘namespace_id’, ‘project_id’ could be set. :return: ListTriggersResponse

Usage:

result = api.list_triggers()
list_triggers_all(*, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListTriggersRequestOrderBy | None = None, container_id: str | None = None, namespace_id: str | None = None, project_id: str | None = None) List[Trigger]

List all triggers. List all triggers belonging to a specified Organization or Project. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number to return. :param page_size: Maximum number of triggers to return per page. :param order_by: Order in which to return results. :param container_id: ID of the container the triggers belongs to. One-Of (‘scope’): at most one of ‘container_id’, ‘namespace_id’, ‘project_id’ could be set. :param namespace_id: ID of the namespace the triggers belongs to. One-Of (‘scope’): at most one of ‘container_id’, ‘namespace_id’, ‘project_id’ could be set. :param project_id: ID of the project the triggers belongs to. One-Of (‘scope’): at most one of ‘container_id’, ‘namespace_id’, ‘project_id’ could be set. :return: List[Trigger]

Usage:

result = api.list_triggers_all()
update_container(*, container_id: str, region: str | None = None, environment_variables: Dict[str, str] | None = None, min_scale: int | None = None, max_scale: int | None = None, memory_limit: int | None = None, cpu_limit: int | None = None, timeout: str | None = None, redeploy: bool | None = None, privacy: ContainerPrivacy | None = None, description: str | None = None, registry_image: str | None = None, max_concurrency: int | None = None, protocol: ContainerProtocol | None = None, port: int | None = None, secret_environment_variables: List[Secret] | None = None, http_option: ContainerHttpOption | None = None, sandbox: ContainerSandbox | None = None, local_storage_limit: int | None = None, scaling_option: ContainerScalingOption | None = None, health_check: ContainerHealthCheckSpec | None = None, tags: List[str] | None = None, private_network_id: str | None = None, command: List[str] | None = None, args: List[str] | None = None) Container

Update an existing container. Update the container associated with the specified ID.

When updating a container, the container is automatically redeployed to apply the changes. This behavior can be changed by setting the redeploy field to false in the request. :param container_id: UUID of the container to update. :param region: Region to target. If none is passed will use default region from the config. :param environment_variables: Environment variables of the container. :param min_scale: Minimum number of instances to scale the container to. :param max_scale: Maximum number of instances to scale the container to. :param memory_limit: Memory limit of the container in MB. :param cpu_limit: CPU limit of the container in mvCPU. :param timeout: Processing time limit for the container. :param redeploy: Defines whether to redeploy failed containers. :param privacy: Privacy settings of the container. :param description: Description of the container. :param registry_image: Name of the registry image (e.g. “rg.fr-par.scw.cloud/something/image:tag”). :param max_concurrency: Number of maximum concurrent executions of the container. :param protocol: Protocol the container uses. :param port: Port the container listens on. :param secret_environment_variables: During an update, secret environment variables that are not specified in this field will be kept unchanged.

In order to delete a specific secret environment variable, you must reference its key, but not provide any value for it. For example, the following payload will delete the TO_DELETE secret environment variable:

```json {

“secret_environment_variables”:[

{“key”:”TO_DELETE”}

]

} ```. :param http_option: Possible values:

  • redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.

  • enabled: Serve both HTTP and HTTPS traffic.

Parameters:
  • sandbox – Execution environment of the container.

  • local_storage_limit – Local storage limit of the container (in MB).

  • scaling_option – Possible values:

  • concurrent_requests_threshold: Scale depending on the number of concurrent requests being processed per container instance.

  • cpu_usage_threshold: Scale depending on the CPU usage of a container instance.

  • memory_usage_threshold: Scale depending on the memory usage of a container instance.

Parameters:
  • health_check – Health check configuration of the container.

  • tags – Tags of the Serverless Container.

  • private_network_id – When connected to a Private Network, the container can access other Scaleway resources in this Private Network.

  • command – Command executed when the container starts. This overrides the default command defined in the container image. This is usually the main executable, or entry point script to run.

  • args – Arguments passed to the command specified in the “command” field. These override the default arguments from the container image, and behave like command-line parameters.

Returns:

Container

Usage:

result = api.update_container(
    container_id="example",
)
update_cron(*, cron_id: str, region: str | None = None, container_id: str | None = None, schedule: str | None = None, args: Dict[str, Any] | None = None, name: str | None = None) Cron

Update an existing cron. Update the cron associated with the specified ID. :param cron_id: UUID of the cron to update. :param region: Region to target. If none is passed will use default region from the config. :param container_id: UUID of the container invoked by the cron. :param schedule: UNIX cron schedule. :param args: Arguments to pass with the cron. :param name: Name of the cron. :return: Cron

Usage:

result = api.update_cron(
    cron_id="example",
)
update_namespace(*, namespace_id: str, region: str | None = None, environment_variables: Dict[str, str] | None = None, description: str | None = None, secret_environment_variables: List[Secret] | None = None, tags: List[str] | None = None) Namespace

Update an existing namespace. Update the space associated with the specified ID. :param namespace_id: UUID of the namespace to update. :param region: Region to target. If none is passed will use default region from the config. :param environment_variables: Environment variables of the namespace to update. :param description: Description of the namespace to update. :param secret_environment_variables: Secret environment variables of the namespace to update. :param tags: Tags of the Serverless Container Namespace. :return: Namespace

Usage:

result = api.update_namespace(
    namespace_id="example",
)
update_trigger(*, trigger_id: str, region: str | None = None, name: str | None = None, description: str | None = None, sqs_config: UpdateTriggerRequestSqsClientConfig | None = None) Trigger

Update a trigger. Update a trigger with a specified ID. :param trigger_id: ID of the trigger to update. :param region: Region to target. If none is passed will use default region from the config. :param name: Name of the trigger. :param description: Description of the trigger. :param sqs_config: Configuration for an AWS SQS queue. One-Of (‘config’): at most one of ‘sqs_config’ could be set. :return: Trigger

Usage:

result = api.update_trigger(
    trigger_id="example",
)
wait_for_container(*, container_id: str, region: str | None = None, options: WaitForOptions[Container, bool] | None = None) Container

Get a container. Get the container associated with the specified ID. :param container_id: UUID of the container to get. :param region: Region to target. If none is passed will use default region from the config. :return: Container

Usage:

result = api.get_container(
    container_id="example",
)
wait_for_cron(*, cron_id: str, region: str | None = None, options: WaitForOptions[Cron, bool] | None = None) Cron

Get a cron. Get the cron associated with the specified ID. :param cron_id: UUID of the cron to get. :param region: Region to target. If none is passed will use default region from the config. :return: Cron

Usage:

result = api.get_cron(
    cron_id="example",
)
wait_for_domain(*, domain_id: str, region: str | None = None, options: WaitForOptions[Domain, bool] | None = None) Domain

Get a custom domain. Get a custom domain for the container with the specified ID. :param domain_id: UUID of the domain to get. :param region: Region to target. If none is passed will use default region from the config. :return: Domain

Usage:

result = api.get_domain(
    domain_id="example",
)
wait_for_namespace(*, namespace_id: str, region: str | None = None, options: WaitForOptions[Namespace, bool] | None = None) Namespace

Get a namespace. Get the namespace associated with the specified ID. :param namespace_id: UUID of the namespace to get. :param region: Region to target. If none is passed will use default region from the config. :return: Namespace

Usage:

result = api.get_namespace(
    namespace_id="example",
)
wait_for_token(*, token_id: str, region: str | None = None, options: WaitForOptions[Token, bool] | None = None) Token

Get a token. Get a token with a specified ID. :param token_id: UUID of the token to get. :param region: Region to target. If none is passed will use default region from the config. :return: Token

Usage:

result = api.get_token(
    token_id="example",
)
wait_for_trigger(*, trigger_id: str, region: str | None = None, options: WaitForOptions[Trigger, bool] | None = None) Trigger

Get a trigger. Get a trigger with a specified ID. :param trigger_id: ID of the trigger to get. :param region: Region to target. If none is passed will use default region from the config. :return: Trigger

Usage:

result = api.get_trigger(
    trigger_id="example",
)

scaleway.container.v1beta1.content module

scaleway.container.v1beta1.content.CONTAINER_TRANSIENT_STATUSES: List[ContainerStatus] = [<ContainerStatus.DELETING: 'deleting'>, <ContainerStatus.CREATING: 'creating'>, <ContainerStatus.PENDING: 'pending'>]

Lists transient statutes of the enum ContainerStatus.

scaleway.container.v1beta1.content.CRON_TRANSIENT_STATUSES: List[CronStatus] = [<CronStatus.DELETING: 'deleting'>, <CronStatus.CREATING: 'creating'>, <CronStatus.PENDING: 'pending'>]

Lists transient statutes of the enum CronStatus.

scaleway.container.v1beta1.content.DOMAIN_TRANSIENT_STATUSES: List[DomainStatus] = [<DomainStatus.DELETING: 'deleting'>, <DomainStatus.CREATING: 'creating'>, <DomainStatus.PENDING: 'pending'>]

Lists transient statutes of the enum DomainStatus.

scaleway.container.v1beta1.content.NAMESPACE_TRANSIENT_STATUSES: List[NamespaceStatus] = [<NamespaceStatus.DELETING: 'deleting'>, <NamespaceStatus.CREATING: 'creating'>, <NamespaceStatus.PENDING: 'pending'>]

Lists transient statutes of the enum NamespaceStatus.

scaleway.container.v1beta1.content.TOKEN_TRANSIENT_STATUSES: List[TokenStatus] = [<TokenStatus.DELETING: 'deleting'>, <TokenStatus.CREATING: 'creating'>]

Lists transient statutes of the enum TokenStatus.

scaleway.container.v1beta1.content.TRIGGER_TRANSIENT_STATUSES: List[TriggerStatus] = [<TriggerStatus.DELETING: 'deleting'>, <TriggerStatus.CREATING: 'creating'>, <TriggerStatus.PENDING: 'pending'>]

Lists transient statutes of the enum TriggerStatus.

scaleway.container.v1beta1.marshalling module

scaleway.container.v1beta1.marshalling.marshal_ContainerHealthCheckSpec(request: ContainerHealthCheckSpec, defaults: ProfileDefaults) Dict[str, Any]
scaleway.container.v1beta1.marshalling.marshal_ContainerHealthCheckSpecHTTPProbe(request: ContainerHealthCheckSpecHTTPProbe, defaults: ProfileDefaults) Dict[str, Any]
scaleway.container.v1beta1.marshalling.marshal_ContainerHealthCheckSpecTCPProbe(request: ContainerHealthCheckSpecTCPProbe, defaults: ProfileDefaults) Dict[str, Any]
scaleway.container.v1beta1.marshalling.marshal_ContainerScalingOption(request: ContainerScalingOption, defaults: ProfileDefaults) Dict[str, Any]
scaleway.container.v1beta1.marshalling.marshal_CreateContainerRequest(request: CreateContainerRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.container.v1beta1.marshalling.marshal_CreateCronRequest(request: CreateCronRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.container.v1beta1.marshalling.marshal_CreateDomainRequest(request: CreateDomainRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.container.v1beta1.marshalling.marshal_CreateNamespaceRequest(request: CreateNamespaceRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.container.v1beta1.marshalling.marshal_CreateTokenRequest(request: CreateTokenRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.container.v1beta1.marshalling.marshal_CreateTriggerRequest(request: CreateTriggerRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.container.v1beta1.marshalling.marshal_CreateTriggerRequestMnqNatsClientConfig(request: CreateTriggerRequestMnqNatsClientConfig, defaults: ProfileDefaults) Dict[str, Any]
scaleway.container.v1beta1.marshalling.marshal_CreateTriggerRequestMnqSqsClientConfig(request: CreateTriggerRequestMnqSqsClientConfig, defaults: ProfileDefaults) Dict[str, Any]
scaleway.container.v1beta1.marshalling.marshal_CreateTriggerRequestSqsClientConfig(request: CreateTriggerRequestSqsClientConfig, defaults: ProfileDefaults) Dict[str, Any]
scaleway.container.v1beta1.marshalling.marshal_Secret(request: Secret, defaults: ProfileDefaults) Dict[str, Any]
scaleway.container.v1beta1.marshalling.marshal_UpdateContainerRequest(request: UpdateContainerRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.container.v1beta1.marshalling.marshal_UpdateCronRequest(request: UpdateCronRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.container.v1beta1.marshalling.marshal_UpdateNamespaceRequest(request: UpdateNamespaceRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.container.v1beta1.marshalling.marshal_UpdateTriggerRequest(request: UpdateTriggerRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.container.v1beta1.marshalling.marshal_UpdateTriggerRequestSqsClientConfig(request: UpdateTriggerRequestSqsClientConfig, defaults: ProfileDefaults) Dict[str, Any]
scaleway.container.v1beta1.marshalling.unmarshal_Container(data: Any) Container
scaleway.container.v1beta1.marshalling.unmarshal_ContainerHealthCheckSpec(data: Any) ContainerHealthCheckSpec
scaleway.container.v1beta1.marshalling.unmarshal_ContainerHealthCheckSpecHTTPProbe(data: Any) ContainerHealthCheckSpecHTTPProbe
scaleway.container.v1beta1.marshalling.unmarshal_ContainerHealthCheckSpecTCPProbe(data: Any) ContainerHealthCheckSpecTCPProbe
scaleway.container.v1beta1.marshalling.unmarshal_ContainerScalingOption(data: Any) ContainerScalingOption
scaleway.container.v1beta1.marshalling.unmarshal_Cron(data: Any) Cron
scaleway.container.v1beta1.marshalling.unmarshal_Domain(data: Any) Domain
scaleway.container.v1beta1.marshalling.unmarshal_ListContainersResponse(data: Any) ListContainersResponse
scaleway.container.v1beta1.marshalling.unmarshal_ListCronsResponse(data: Any) ListCronsResponse
scaleway.container.v1beta1.marshalling.unmarshal_ListDomainsResponse(data: Any) ListDomainsResponse
scaleway.container.v1beta1.marshalling.unmarshal_ListNamespacesResponse(data: Any) ListNamespacesResponse
scaleway.container.v1beta1.marshalling.unmarshal_ListTokensResponse(data: Any) ListTokensResponse
scaleway.container.v1beta1.marshalling.unmarshal_ListTriggersResponse(data: Any) ListTriggersResponse
scaleway.container.v1beta1.marshalling.unmarshal_Namespace(data: Any) Namespace
scaleway.container.v1beta1.marshalling.unmarshal_SecretHashedValue(data: Any) SecretHashedValue
scaleway.container.v1beta1.marshalling.unmarshal_Token(data: Any) Token
scaleway.container.v1beta1.marshalling.unmarshal_Trigger(data: Any) Trigger
scaleway.container.v1beta1.marshalling.unmarshal_TriggerMnqNatsClientConfig(data: Any) TriggerMnqNatsClientConfig
scaleway.container.v1beta1.marshalling.unmarshal_TriggerMnqSqsClientConfig(data: Any) TriggerMnqSqsClientConfig
scaleway.container.v1beta1.marshalling.unmarshal_TriggerSqsClientConfig(data: Any) TriggerSqsClientConfig

scaleway.container.v1beta1.types module

class scaleway.container.v1beta1.types.Container(id: 'str', name: 'str', namespace_id: 'str', status: 'ContainerStatus', environment_variables: 'Dict[str, str]', min_scale: 'int', max_scale: 'int', memory_limit: 'int', cpu_limit: 'int', privacy: 'ContainerPrivacy', registry_image: 'str', max_concurrency: 'int', domain_name: 'str', protocol: 'ContainerProtocol', port: 'int', secret_environment_variables: 'List[SecretHashedValue]', http_option: 'ContainerHttpOption', sandbox: 'ContainerSandbox', local_storage_limit: 'int', region: 'ScwRegion', tags: 'List[str]', command: 'List[str]', args: 'List[str]', timeout: 'Optional[str]' = None, error_message: 'Optional[str]' = None, description: 'Optional[str]' = None, scaling_option: 'Optional[ContainerScalingOption]' = None, health_check: 'Optional[ContainerHealthCheckSpec]' = None, created_at: 'Optional[datetime]' = None, updated_at: 'Optional[datetime]' = None, ready_at: 'Optional[datetime]' = None, private_network_id: 'Optional[str]' = None)

Bases: object

args: List[str]

Arguments passed to the command specified in the “command” field. These override the default arguments from the container image, and behave like command-line parameters.

command: List[str]

Command executed when the container starts. This overrides the default command defined in the container image. This is usually the main executable, or entry point script to run.

cpu_limit: int

CPU limit of the container in mvCPU.

created_at: datetime | None = None

Creation date of the container.

description: str | None = None

Description of the container.

domain_name: str

Domain name attributed to the contaioner.

environment_variables: Dict[str, str]

Environment variables of the container.

error_message: str | None = None

Last error message of the container.

health_check: ContainerHealthCheckSpec | None = None

Health check configuration of the container.

http_option: ContainerHttpOption

Possible values:

  • redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.

  • enabled: Serve both HTTP and HTTPS traffic.

id: str

UUID of the container.

local_storage_limit: int

Local storage limit of the container (in MB).

max_concurrency: int

Number of maximum concurrent executions of the container.

max_scale: int

Maximum number of instances to scale the container to.

memory_limit: int

Memory limit of the container in MB.

min_scale: int

Minimum number of instances to scale the container to.

name: str

Name of the container.

namespace_id: str

UUID of the namespace the container belongs to.

port: int

Port the container listens on.

privacy: ContainerPrivacy

Privacy setting of the container.

private_network_id: str | None = None

When connected to a Private Network, the container can access other Scaleway resources in this Private Network.

protocol: ContainerProtocol

Protocol the container uses.

ready_at: datetime | None = None

Last date when the container was successfully deployed and set to ready.

region: str

Region in which the container will be deployed.

registry_image: str

Name of the registry image (e.g. “rg.fr-par.scw.cloud/something/image:tag”).

sandbox: ContainerSandbox

Execution environment of the container.

scaling_option: ContainerScalingOption | None = None

Possible values:

  • concurrent_requests_threshold: Scale depending on the number of concurrent requests being processed per container instance.

  • cpu_usage_threshold: Scale depending on the CPU usage of a container instance.

  • memory_usage_threshold: Scale depending on the memory usage of a container instance.

secret_environment_variables: List[SecretHashedValue]

Secret environment variables of the container.

status: ContainerStatus

Status of the container.

tags: List[str]

List of tags applied to the Serverless Container.

timeout: str | None = None

Processing time limit for the container.

updated_at: datetime | None = None

Last update date of the container.

class scaleway.container.v1beta1.types.ContainerHealthCheckSpec(failure_threshold: 'int', interval: 'Optional[str]' = None, http: 'Optional[ContainerHealthCheckSpecHTTPProbe]' = None, tcp: 'Optional[ContainerHealthCheckSpecTCPProbe]' = None)

Bases: object

failure_threshold: int

During a deployment, if a newly created container fails to pass the health check, the deployment is aborted.

As a result, lowering this value can help to reduce the time it takes to detect a failed deployment.

http: ContainerHealthCheckSpecHTTPProbe | None = None
interval: str | None = None

Period between health checks.

tcp: ContainerHealthCheckSpecTCPProbe | None = None
class scaleway.container.v1beta1.types.ContainerHealthCheckSpecHTTPProbe(path: 'str')

Bases: object

path: str

Path to use for the HTTP health check.

class scaleway.container.v1beta1.types.ContainerHealthCheckSpecTCPProbe

Bases: object

class scaleway.container.v1beta1.types.ContainerHttpOption(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

ENABLED = 'enabled'
REDIRECTED = 'redirected'
UNKNOWN_HTTP_OPTION = 'unknown_http_option'
class scaleway.container.v1beta1.types.ContainerPrivacy(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

PRIVATE = 'private'
PUBLIC = 'public'
UNKNOWN_PRIVACY = 'unknown_privacy'
class scaleway.container.v1beta1.types.ContainerProtocol(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

H2C = 'h2c'
HTTP1 = 'http1'
UNKNOWN_PROTOCOL = 'unknown_protocol'
class scaleway.container.v1beta1.types.ContainerSandbox(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

UNKNOWN_SANDBOX = 'unknown_sandbox'
V1 = 'v1'
V2 = 'v2'
class scaleway.container.v1beta1.types.ContainerScalingOption(concurrent_requests_threshold: 'Optional[int]' = None, cpu_usage_threshold: 'Optional[int]' = None, memory_usage_threshold: 'Optional[int]' = None)

Bases: object

concurrent_requests_threshold: int | None = None
cpu_usage_threshold: int | None = None
memory_usage_threshold: int | None = None
class scaleway.container.v1beta1.types.ContainerStatus(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

CREATED = 'created'
CREATING = 'creating'
DELETING = 'deleting'
ERROR = 'error'
LOCKED = 'locked'
PENDING = 'pending'
READY = 'ready'
UNKNOWN = 'unknown'
class scaleway.container.v1beta1.types.CreateContainerRequest(namespace_id: 'str', name: 'str', region: 'Optional[ScwRegion]' = None, environment_variables: 'Optional[Dict[str, str]]' = <factory>, min_scale: 'Optional[int]' = 0, max_scale: 'Optional[int]' = 0, memory_limit: 'Optional[int]' = 0, cpu_limit: 'Optional[int]' = 0, timeout: 'Optional[str]' = None, privacy: 'Optional[ContainerPrivacy]' = <ContainerPrivacy.UNKNOWN_PRIVACY: 'unknown_privacy'>, description: 'Optional[str]' = None, registry_image: 'Optional[str]' = None, max_concurrency: 'Optional[int]' = 0, protocol: 'Optional[ContainerProtocol]' = <ContainerProtocol.UNKNOWN_PROTOCOL: 'unknown_protocol'>, port: 'Optional[int]' = 0, secret_environment_variables: 'Optional[List[Secret]]' = <factory>, http_option: 'Optional[ContainerHttpOption]' = <ContainerHttpOption.UNKNOWN_HTTP_OPTION: 'unknown_http_option'>, sandbox: 'Optional[ContainerSandbox]' = <ContainerSandbox.UNKNOWN_SANDBOX: 'unknown_sandbox'>, local_storage_limit: 'Optional[int]' = 0, scaling_option: 'Optional[ContainerScalingOption]' = None, health_check: 'Optional[ContainerHealthCheckSpec]' = None, tags: 'Optional[List[str]]' = <factory>, private_network_id: 'Optional[str]' = None, command: 'Optional[List[str]]' = <factory>, args: 'Optional[List[str]]' = <factory>)

Bases: object

args: List[str] | None

Arguments passed to the command specified in the “command” field. These override the default arguments from the container image, and behave like command-line parameters.

command: List[str] | None

Command executed when the container starts. This overrides the default command defined in the container image. This is usually the main executable, or entry point script to run.

cpu_limit: int | None = 0

CPU limit of the container in mvCPU.

description: str | None = None

Description of the container.

environment_variables: Dict[str, str] | None

Environment variables of the container.

health_check: ContainerHealthCheckSpec | None = None

Health check configuration of the container.

http_option: ContainerHttpOption | None = 'unknown_http_option'

Possible values:

  • redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.

  • enabled: Serve both HTTP and HTTPS traffic.

local_storage_limit: int | None = 0

Local storage limit of the container (in MB).

max_concurrency: int | None = 0

Number of maximum concurrent executions of the container.

max_scale: int | None = 0

Maximum number of instances to scale the container to.

memory_limit: int | None = 0

Memory limit of the container in MB.

min_scale: int | None = 0

Minimum number of instances to scale the container to.

name: str

Name of the container.

namespace_id: str

UUID of the namespace the container belongs to.

port: int | None = 0

Port the container listens on.

privacy: ContainerPrivacy | None = 'unknown_privacy'

Privacy setting of the container.

private_network_id: str | None = None

When connected to a Private Network, the container can access other Scaleway resources in this Private Network.

protocol: ContainerProtocol | None = 'unknown_protocol'

Protocol the container uses.

region: str | None = None

Region to target. If none is passed will use default region from the config.

registry_image: str | None = None

Name of the registry image (e.g. “rg.fr-par.scw.cloud/something/image:tag”).

sandbox: ContainerSandbox | None = 'unknown_sandbox'

Execution environment of the container.

scaling_option: ContainerScalingOption | None = None

Possible values:

  • concurrent_requests_threshold: Scale depending on the number of concurrent requests being processed per container instance.

  • cpu_usage_threshold: Scale depending on the CPU usage of a container instance.

  • memory_usage_threshold: Scale depending on the memory usage of a container instance.

secret_environment_variables: List[Secret] | None

Secret environment variables of the container.

tags: List[str] | None

Tags of the Serverless Container.

timeout: str | None = None

Processing time limit for the container.

class scaleway.container.v1beta1.types.CreateCronRequest(container_id: 'str', schedule: 'str', region: 'Optional[ScwRegion]' = None, args: 'Optional[Dict[str, Any]]' = <factory>, name: 'Optional[str]' = None)

Bases: object

args: Dict[str, Any] | None

Arguments to pass with the cron.

container_id: str

UUID of the container to invoke by the cron.

name: str | None = None

Name of the cron to create.

region: str | None = None

Region to target. If none is passed will use default region from the config.

schedule: str

UNIX cron shedule.

class scaleway.container.v1beta1.types.CreateDomainRequest(hostname: 'str', container_id: 'str', region: 'Optional[ScwRegion]' = None)

Bases: object

container_id: str

UUID of the container to assign the domain to.

hostname: str

Domain to assign.

region: str | None = None

Region to target. If none is passed will use default region from the config.

class scaleway.container.v1beta1.types.CreateNamespaceRequest(region: 'Optional[ScwRegion]' = None, name: 'Optional[str]' = None, environment_variables: 'Optional[Dict[str, str]]' = <factory>, project_id: 'Optional[str]' = None, description: 'Optional[str]' = None, secret_environment_variables: 'Optional[List[Secret]]' = <factory>, tags: 'Optional[List[str]]' = <factory>, activate_vpc_integration: 'Optional[bool]' = False)

Bases: object

activate_vpc_integration: bool | None = False

Setting this field to true doesn’t matter anymore. It will be removed in a near future.

description: str | None = None

Description of the namespace to create.

environment_variables: Dict[str, str] | None

Environment variables of the namespace to create.

name: str | None = None

Name of the namespace to create.

project_id: str | None = None

UUID of the Project in which the namespace will be created.

region: str | None = None

Region to target. If none is passed will use default region from the config.

secret_environment_variables: List[Secret] | None

Secret environment variables of the namespace to create.

tags: List[str] | None

Tags of the Serverless Container Namespace.

class scaleway.container.v1beta1.types.CreateTokenRequest(region: 'Optional[ScwRegion]' = None, description: 'Optional[str]' = None, expires_at: 'Optional[datetime]' = None, container_id: 'Optional[str]' = None, namespace_id: 'Optional[str]' = None)

Bases: object

container_id: str | None = None
description: str | None = None

Description of the token.

expires_at: datetime | None = None

Expiry date of the token.

namespace_id: str | None = None
region: str | None = None

Region to target. If none is passed will use default region from the config.

class scaleway.container.v1beta1.types.CreateTriggerRequest(name: 'str', container_id: 'str', region: 'Optional[ScwRegion]' = None, description: 'Optional[str]' = None, scw_sqs_config: 'Optional[CreateTriggerRequestMnqSqsClientConfig]' = None, scw_nats_config: 'Optional[CreateTriggerRequestMnqNatsClientConfig]' = None, sqs_config: 'Optional[CreateTriggerRequestSqsClientConfig]' = None)

Bases: object

container_id: str

ID of the container to trigger.

description: str | None = None

Description of the trigger.

name: str

Name of the trigger.

region: str | None = None

Region to target. If none is passed will use default region from the config.

scw_nats_config: CreateTriggerRequestMnqNatsClientConfig | None = None
scw_sqs_config: CreateTriggerRequestMnqSqsClientConfig | None = None
sqs_config: CreateTriggerRequestSqsClientConfig | None = None
class scaleway.container.v1beta1.types.CreateTriggerRequestMnqNatsClientConfig(subject: 'str', mnq_nats_account_id: 'str', mnq_project_id: 'str', mnq_region: 'str')

Bases: object

mnq_nats_account_id: str

ID of the Messaging and Queuing NATS account.

mnq_project_id: str

ID of the Messaging and Queuing project.

mnq_region: str

Currently, only the fr-par and nl-ams regions are available.

subject: str

Name of the NATS subject the trigger should listen to.

class scaleway.container.v1beta1.types.CreateTriggerRequestMnqSqsClientConfig(queue: 'str', mnq_project_id: 'str', mnq_region: 'str')

Bases: object

mnq_project_id: str

You must have activated SQS on this project.

mnq_region: str

Currently, only the fr-par and nl-ams regions are available.

queue: str

Name of the SQS queue the trigger should listen to.

class scaleway.container.v1beta1.types.CreateTriggerRequestSqsClientConfig(endpoint: 'str', queue_url: 'str', access_key: 'str', secret_key: 'str')

Bases: object

access_key: str
endpoint: str
queue_url: str
secret_key: str
class scaleway.container.v1beta1.types.Cron(id: 'str', container_id: 'str', schedule: 'str', status: 'CronStatus', name: 'str', args: 'Optional[Dict[str, Any]]' = <factory>)

Bases: object

args: Dict[str, Any] | None

Arguments to pass with the cron.

container_id: str

UUID of the container invoked by this cron.

id: str

UUID of the cron.

name: str

Name of the cron.

schedule: str

UNIX cron shedule.

status: CronStatus

Status of the cron.

class scaleway.container.v1beta1.types.CronStatus(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

CREATING = 'creating'
DELETING = 'deleting'
ERROR = 'error'
LOCKED = 'locked'
PENDING = 'pending'
READY = 'ready'
UNKNOWN = 'unknown'
class scaleway.container.v1beta1.types.DeleteContainerRequest(container_id: 'str', region: 'Optional[ScwRegion]' = None)

Bases: object

container_id: str

UUID of the container to delete.

region: str | None = None

Region to target. If none is passed will use default region from the config.

class scaleway.container.v1beta1.types.DeleteCronRequest(cron_id: 'str', region: 'Optional[ScwRegion]' = None)

Bases: object

cron_id: str

UUID of the cron to delete.

region: str | None = None

Region to target. If none is passed will use default region from the config.

class scaleway.container.v1beta1.types.DeleteDomainRequest(domain_id: 'str', region: 'Optional[ScwRegion]' = None)

Bases: object

domain_id: str

UUID of the domain to delete.

region: str | None = None

Region to target. If none is passed will use default region from the config.

class scaleway.container.v1beta1.types.DeleteNamespaceRequest(namespace_id: 'str', region: 'Optional[ScwRegion]' = None)

Bases: object

namespace_id: str

UUID of the namespace to delete.

region: str | None = None

Region to target. If none is passed will use default region from the config.

class scaleway.container.v1beta1.types.DeleteTokenRequest(token_id: 'str', region: 'Optional[ScwRegion]' = None)

Bases: object

region: str | None = None

Region to target. If none is passed will use default region from the config.

token_id: str

UUID of the token to delete.

class scaleway.container.v1beta1.types.DeleteTriggerRequest(trigger_id: 'str', region: 'Optional[ScwRegion]' = None)

Bases: object

region: str | None = None

Region to target. If none is passed will use default region from the config.

trigger_id: str

ID of the trigger to delete.

class scaleway.container.v1beta1.types.DeployContainerRequest(container_id: 'str', region: 'Optional[ScwRegion]' = None)

Bases: object

container_id: str

UUID of the container to deploy.

region: str | None = None

Region to target. If none is passed will use default region from the config.

class scaleway.container.v1beta1.types.Domain(id: 'str', hostname: 'str', container_id: 'str', url: 'str', status: 'DomainStatus', error_message: 'Optional[str]' = None)

Bases: object

container_id: str

UUID of the container.

error_message: str | None = None

Last error message of the domain.

hostname: str

Domain assigned to the container.

id: str

UUID of the domain.

status: DomainStatus

Status of the domain.

url: str

URL (TBD).

class scaleway.container.v1beta1.types.DomainStatus(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

CREATING = 'creating'
DELETING = 'deleting'
ERROR = 'error'
PENDING = 'pending'
READY = 'ready'
UNKNOWN = 'unknown'
class scaleway.container.v1beta1.types.GetContainerRequest(container_id: 'str', region: 'Optional[ScwRegion]' = None)

Bases: object

container_id: str

UUID of the container to get.

region: str | None = None

Region to target. If none is passed will use default region from the config.

class scaleway.container.v1beta1.types.GetCronRequest(cron_id: 'str', region: 'Optional[ScwRegion]' = None)

Bases: object

cron_id: str

UUID of the cron to get.

region: str | None = None

Region to target. If none is passed will use default region from the config.

class scaleway.container.v1beta1.types.GetDomainRequest(domain_id: 'str', region: 'Optional[ScwRegion]' = None)

Bases: object

domain_id: str

UUID of the domain to get.

region: str | None = None

Region to target. If none is passed will use default region from the config.

class scaleway.container.v1beta1.types.GetNamespaceRequest(namespace_id: 'str', region: 'Optional[ScwRegion]' = None)

Bases: object

namespace_id: str

UUID of the namespace to get.

region: str | None = None

Region to target. If none is passed will use default region from the config.

class scaleway.container.v1beta1.types.GetTokenRequest(token_id: 'str', region: 'Optional[ScwRegion]' = None)

Bases: object

region: str | None = None

Region to target. If none is passed will use default region from the config.

token_id: str

UUID of the token to get.

class scaleway.container.v1beta1.types.GetTriggerRequest(trigger_id: 'str', region: 'Optional[ScwRegion]' = None)

Bases: object

region: str | None = None

Region to target. If none is passed will use default region from the config.

trigger_id: str

ID of the trigger to get.

class scaleway.container.v1beta1.types.ListContainersRequest(namespace_id: 'str', region: 'Optional[ScwRegion]' = None, page: 'Optional[int]' = 0, page_size: 'Optional[int]' = 0, order_by: 'Optional[ListContainersRequestOrderBy]' = <ListContainersRequestOrderBy.CREATED_AT_ASC: 'created_at_asc'>, name: 'Optional[str]' = None, organization_id: 'Optional[str]' = None, project_id: 'Optional[str]' = None)

Bases: object

name: str | None = None

Name of the container.

namespace_id: str

UUID of the namespace the container belongs to.

order_by: ListContainersRequestOrderBy | None = 'created_at_asc'

Order of the containers.

organization_id: str | None = None

UUID of the Organization the container belongs to.

page: int | None = 0

Page number.

page_size: int | None = 0

Number of containers per page.

project_id: str | None = None

UUID of the Project the container belongs to.

region: str | None = None

Region to target. If none is passed will use default region from the config.

class scaleway.container.v1beta1.types.ListContainersRequestOrderBy(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

CREATED_AT_ASC = 'created_at_asc'
CREATED_AT_DESC = 'created_at_desc'
NAME_ASC = 'name_asc'
NAME_DESC = 'name_desc'
class scaleway.container.v1beta1.types.ListContainersResponse(containers: 'List[Container]', total_count: 'int')

Bases: object

containers: List[Container]

Array of containers.

total_count: int

Total number of containers.

class scaleway.container.v1beta1.types.ListCronsRequest(container_id: 'str', region: 'Optional[ScwRegion]' = None, page: 'Optional[int]' = 0, page_size: 'Optional[int]' = 0, order_by: 'Optional[ListCronsRequestOrderBy]' = <ListCronsRequestOrderBy.CREATED_AT_ASC: 'created_at_asc'>)

Bases: object

container_id: str

UUID of the container invoked by the cron.

order_by: ListCronsRequestOrderBy | None = 'created_at_asc'

Order of the crons.

page: int | None = 0

Page number.

page_size: int | None = 0

Number of crons per page.

region: str | None = None

Region to target. If none is passed will use default region from the config.

class scaleway.container.v1beta1.types.ListCronsRequestOrderBy(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

CREATED_AT_ASC = 'created_at_asc'
CREATED_AT_DESC = 'created_at_desc'
class scaleway.container.v1beta1.types.ListCronsResponse(crons: 'List[Cron]', total_count: 'int')

Bases: object

crons: List[Cron]

Array of crons.

total_count: int

Total number of crons.

class scaleway.container.v1beta1.types.ListDomainsRequest(container_id: 'str', region: 'Optional[ScwRegion]' = None, page: 'Optional[int]' = 0, page_size: 'Optional[int]' = 0, order_by: 'Optional[ListDomainsRequestOrderBy]' = <ListDomainsRequestOrderBy.CREATED_AT_ASC: 'created_at_asc'>)

Bases: object

container_id: str

UUID of the container the domain belongs to.

order_by: ListDomainsRequestOrderBy | None = 'created_at_asc'

Order of the domains.

page: int | None = 0

Page number.

page_size: int | None = 0

Number of domains per page.

region: str | None = None

Region to target. If none is passed will use default region from the config.

class scaleway.container.v1beta1.types.ListDomainsRequestOrderBy(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

CREATED_AT_ASC = 'created_at_asc'
CREATED_AT_DESC = 'created_at_desc'
HOSTNAME_ASC = 'hostname_asc'
HOSTNAME_DESC = 'hostname_desc'
class scaleway.container.v1beta1.types.ListDomainsResponse(domains: 'List[Domain]', total_count: 'int')

Bases: object

domains: List[Domain]

Array of domains.

total_count: int

Total number of domains.

class scaleway.container.v1beta1.types.ListNamespacesRequest(region: 'Optional[ScwRegion]' = None, page: 'Optional[int]' = 0, page_size: 'Optional[int]' = 0, order_by: 'Optional[ListNamespacesRequestOrderBy]' = <ListNamespacesRequestOrderBy.CREATED_AT_ASC: 'created_at_asc'>, name: 'Optional[str]' = None, organization_id: 'Optional[str]' = None, project_id: 'Optional[str]' = None)

Bases: object

name: str | None = None

Name of the namespaces.

order_by: ListNamespacesRequestOrderBy | None = 'created_at_asc'

Order of the namespaces.

organization_id: str | None = None

UUID of the Organization the namespace belongs to.

page: int | None = 0

Page number.

page_size: int | None = 0

Number of namespaces per page.

project_id: str | None = None

UUID of the Project the namespace belongs to.

region: str | None = None

Region to target. If none is passed will use default region from the config.

class scaleway.container.v1beta1.types.ListNamespacesRequestOrderBy(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

CREATED_AT_ASC = 'created_at_asc'
CREATED_AT_DESC = 'created_at_desc'
NAME_ASC = 'name_asc'
NAME_DESC = 'name_desc'
class scaleway.container.v1beta1.types.ListNamespacesResponse(namespaces: 'List[Namespace]', total_count: 'int')

Bases: object

namespaces: List[Namespace]

Array of the namespaces.

total_count: int

Total number of namespaces.

class scaleway.container.v1beta1.types.ListTokensRequest(region: 'Optional[ScwRegion]' = None, page: 'Optional[int]' = 0, page_size: 'Optional[int]' = 0, order_by: 'Optional[ListTokensRequestOrderBy]' = <ListTokensRequestOrderBy.CREATED_AT_ASC: 'created_at_asc'>, container_id: 'Optional[str]' = None, namespace_id: 'Optional[str]' = None)

Bases: object

container_id: str | None = None

UUID of the container the token belongs to.

namespace_id: str | None = None

UUID of the namespace the token belongs to.

order_by: ListTokensRequestOrderBy | None = 'created_at_asc'

Order of the tokens.

page: int | None = 0

Page number.

page_size: int | None = 0

Number of tokens per page.

region: str | None = None

Region to target. If none is passed will use default region from the config.

class scaleway.container.v1beta1.types.ListTokensRequestOrderBy(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

CREATED_AT_ASC = 'created_at_asc'
CREATED_AT_DESC = 'created_at_desc'
class scaleway.container.v1beta1.types.ListTokensResponse(tokens: 'List[Token]', total_count: 'int')

Bases: object

tokens: List[Token]
total_count: int
class scaleway.container.v1beta1.types.ListTriggersRequest(region: 'Optional[ScwRegion]' = None, page: 'Optional[int]' = 0, page_size: 'Optional[int]' = 0, order_by: 'Optional[ListTriggersRequestOrderBy]' = <ListTriggersRequestOrderBy.CREATED_AT_ASC: 'created_at_asc'>, container_id: 'Optional[str]' = None, namespace_id: 'Optional[str]' = None, project_id: 'Optional[str]' = None)

Bases: object

container_id: str | None = None
namespace_id: str | None = None
order_by: ListTriggersRequestOrderBy | None = 'created_at_asc'

Order in which to return results.

page: int | None = 0

Page number to return.

page_size: int | None = 0

Maximum number of triggers to return per page.

project_id: str | None = None
region: str | None = None

Region to target. If none is passed will use default region from the config.

class scaleway.container.v1beta1.types.ListTriggersRequestOrderBy(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

CREATED_AT_ASC = 'created_at_asc'
CREATED_AT_DESC = 'created_at_desc'
class scaleway.container.v1beta1.types.ListTriggersResponse(total_count: 'int', triggers: 'List[Trigger]')

Bases: object

total_count: int

Total count of existing triggers (matching any filters specified).

triggers: List[Trigger]

Triggers on this page.

class scaleway.container.v1beta1.types.Namespace(id: 'str', name: 'str', environment_variables: 'Dict[str, str]', organization_id: 'str', project_id: 'str', status: 'NamespaceStatus', registry_namespace_id: 'str', registry_endpoint: 'str', secret_environment_variables: 'List[SecretHashedValue]', region: 'ScwRegion', tags: 'List[str]', error_message: 'Optional[str]' = None, description: 'Optional[str]' = None, created_at: 'Optional[datetime]' = None, updated_at: 'Optional[datetime]' = None, vpc_integration_activated: 'Optional[bool]' = False)

Bases: object

created_at: datetime | None = None

Creation date of the namespace.

description: str | None = None

Description of the endpoint.

environment_variables: Dict[str, str]

Environment variables of the namespace.

error_message: str | None = None

Last error message of the namesace.

id: str

UUID of the namespace.

name: str

Name of the namespace.

organization_id: str

UUID of the Organization the namespace belongs to.

project_id: str

UUID of the Project the namespace belongs to.

region: str

Region in which the namespace will be created.

registry_endpoint: str

Registry endpoint of the namespace.

registry_namespace_id: str

UUID of the registry namespace.

secret_environment_variables: List[SecretHashedValue]

Secret environment variables of the namespace.

status: NamespaceStatus

Status of the namespace.

tags: List[str]

List of tags applied to the Serverless Container Namespace.

updated_at: datetime | None = None

Last update date of the namespace.

vpc_integration_activated: bool | None = False

The value of this field doesn’t matter anymore, and will be removed in a near future.

class scaleway.container.v1beta1.types.NamespaceStatus(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

CREATING = 'creating'
DELETING = 'deleting'
ERROR = 'error'
LOCKED = 'locked'
PENDING = 'pending'
READY = 'ready'
UNKNOWN = 'unknown'
class scaleway.container.v1beta1.types.Secret(key: 'str', value: 'Optional[str]' = None)

Bases: object

key: str
value: str | None = None
class scaleway.container.v1beta1.types.SecretHashedValue(key: 'str', hashed_value: 'str')

Bases: object

hashed_value: str
key: str
class scaleway.container.v1beta1.types.Token(id: 'str', token: 'str', status: 'TokenStatus', public_key: 'Optional[str]' = None, description: 'Optional[str]' = None, expires_at: 'Optional[datetime]' = None, container_id: 'Optional[str]' = None, namespace_id: 'Optional[str]' = None)

Bases: object

container_id: str | None = None
description: str | None = None

Description of the token.

expires_at: datetime | None = None

Expiry date of the token.

id: str

UUID of the token.

namespace_id: str | None = None
public_key: str | None = None

Public key of the token.

status: TokenStatus

Status of the token.

token: str

Identifier of the token.

class scaleway.container.v1beta1.types.TokenStatus(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

CREATING = 'creating'
DELETING = 'deleting'
ERROR = 'error'
READY = 'ready'
UNKNOWN = 'unknown'
class scaleway.container.v1beta1.types.Trigger(id: 'str', name: 'str', description: 'str', container_id: 'str', input_type: 'TriggerInputType', status: 'TriggerStatus', error_message: 'Optional[str]' = None, scw_sqs_config: 'Optional[TriggerMnqSqsClientConfig]' = None, scw_nats_config: 'Optional[TriggerMnqNatsClientConfig]' = None, sqs_config: 'Optional[TriggerSqsClientConfig]' = None)

Bases: object

container_id: str

ID of the container to trigger.

description: str

Description of the trigger.

error_message: str | None = None

Error message of the trigger.

id: str

ID of the trigger.

input_type: TriggerInputType

Type of the input.

name: str

Name of the trigger.

scw_nats_config: TriggerMnqNatsClientConfig | None = None
scw_sqs_config: TriggerMnqSqsClientConfig | None = None
sqs_config: TriggerSqsClientConfig | None = None
status: TriggerStatus

Status of the trigger.

class scaleway.container.v1beta1.types.TriggerInputType(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

NATS = 'nats'
SCW_NATS = 'scw_nats'
SCW_SQS = 'scw_sqs'
SQS = 'sqs'
UNKNOWN_INPUT_TYPE = 'unknown_input_type'
class scaleway.container.v1beta1.types.TriggerMnqNatsClientConfig(subject: 'str', mnq_nats_account_id: 'str', mnq_project_id: 'str', mnq_region: 'str', mnq_credential_id: 'Optional[str]' = None)

Bases: object

mnq_credential_id: str | None = None

ID of the Messaging and Queuing credentials used to subscribe to the NATS subject.

mnq_nats_account_id: str

ID of the Messaging and Queuing NATS account.

mnq_project_id: str

ID of the Messaging and Queuing project.

mnq_region: str

Currently, only the fr-par and nl-ams regions are available.

subject: str

Name of the NATS subject the trigger listens to.

class scaleway.container.v1beta1.types.TriggerMnqSqsClientConfig(queue: 'str', mnq_project_id: 'str', mnq_region: 'str', mnq_credential_id: 'Optional[str]' = None)

Bases: object

mnq_credential_id: str | None = None

ID of the Messaging and Queuing credentials used to read from the SQS queue.

mnq_project_id: str

ID of the Messaging and Queuing project.

mnq_region: str

Currently, only the fr-par and nl-ams regions are available.

queue: str

Name of the SQS queue the trigger listens to.

class scaleway.container.v1beta1.types.TriggerSqsClientConfig(endpoint: 'str', queue_url: 'str', access_key: 'str', secret_key: 'str')

Bases: object

access_key: str
endpoint: str
queue_url: str
secret_key: str
class scaleway.container.v1beta1.types.TriggerStatus(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

CREATING = 'creating'
DELETING = 'deleting'
ERROR = 'error'
PENDING = 'pending'
READY = 'ready'
UNKNOWN_STATUS = 'unknown_status'
class scaleway.container.v1beta1.types.UpdateContainerRequest(container_id: 'str', region: 'Optional[ScwRegion]' = None, environment_variables: 'Optional[Dict[str, str]]' = <factory>, min_scale: 'Optional[int]' = 0, max_scale: 'Optional[int]' = 0, memory_limit: 'Optional[int]' = 0, cpu_limit: 'Optional[int]' = 0, timeout: 'Optional[str]' = None, redeploy: 'Optional[bool]' = False, privacy: 'Optional[ContainerPrivacy]' = <ContainerPrivacy.UNKNOWN_PRIVACY: 'unknown_privacy'>, description: 'Optional[str]' = None, registry_image: 'Optional[str]' = None, max_concurrency: 'Optional[int]' = 0, protocol: 'Optional[ContainerProtocol]' = <ContainerProtocol.UNKNOWN_PROTOCOL: 'unknown_protocol'>, port: 'Optional[int]' = 0, secret_environment_variables: 'Optional[List[Secret]]' = <factory>, http_option: 'Optional[ContainerHttpOption]' = <ContainerHttpOption.UNKNOWN_HTTP_OPTION: 'unknown_http_option'>, sandbox: 'Optional[ContainerSandbox]' = <ContainerSandbox.UNKNOWN_SANDBOX: 'unknown_sandbox'>, local_storage_limit: 'Optional[int]' = 0, scaling_option: 'Optional[ContainerScalingOption]' = None, health_check: 'Optional[ContainerHealthCheckSpec]' = None, tags: 'Optional[List[str]]' = <factory>, private_network_id: 'Optional[str]' = None, command: 'Optional[List[str]]' = <factory>, args: 'Optional[List[str]]' = <factory>)

Bases: object

args: List[str] | None

Arguments passed to the command specified in the “command” field. These override the default arguments from the container image, and behave like command-line parameters.

command: List[str] | None

Command executed when the container starts. This overrides the default command defined in the container image. This is usually the main executable, or entry point script to run.

container_id: str

UUID of the container to update.

cpu_limit: int | None = 0

CPU limit of the container in mvCPU.

description: str | None = None

Description of the container.

environment_variables: Dict[str, str] | None

Environment variables of the container.

health_check: ContainerHealthCheckSpec | None = None

Health check configuration of the container.

http_option: ContainerHttpOption | None = 'unknown_http_option'

Possible values:

  • redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.

  • enabled: Serve both HTTP and HTTPS traffic.

local_storage_limit: int | None = 0

Local storage limit of the container (in MB).

max_concurrency: int | None = 0

Number of maximum concurrent executions of the container.

max_scale: int | None = 0

Maximum number of instances to scale the container to.

memory_limit: int | None = 0

Memory limit of the container in MB.

min_scale: int | None = 0

Minimum number of instances to scale the container to.

port: int | None = 0

Port the container listens on.

privacy: ContainerPrivacy | None = 'unknown_privacy'

Privacy settings of the container.

private_network_id: str | None = None

When connected to a Private Network, the container can access other Scaleway resources in this Private Network.

protocol: ContainerProtocol | None = 'unknown_protocol'

Protocol the container uses.

redeploy: bool | None = False

Defines whether to redeploy failed containers.

region: str | None = None

Region to target. If none is passed will use default region from the config.

registry_image: str | None = None

Name of the registry image (e.g. “rg.fr-par.scw.cloud/something/image:tag”).

sandbox: ContainerSandbox | None = 'unknown_sandbox'

Execution environment of the container.

scaling_option: ContainerScalingOption | None = None

Possible values:

  • concurrent_requests_threshold: Scale depending on the number of concurrent requests being processed per container instance.

  • cpu_usage_threshold: Scale depending on the CPU usage of a container instance.

  • memory_usage_threshold: Scale depending on the memory usage of a container instance.

secret_environment_variables: List[Secret] | None

During an update, secret environment variables that are not specified in this field will be kept unchanged.

In order to delete a specific secret environment variable, you must reference its key, but not provide any value for it. For example, the following payload will delete the TO_DELETE secret environment variable:

```json {

“secret_environment_variables”:[

{“key”:”TO_DELETE”}

]

} ```.

tags: List[str] | None

Tags of the Serverless Container.

timeout: str | None = None

Processing time limit for the container.

class scaleway.container.v1beta1.types.UpdateCronRequest(cron_id: 'str', region: 'Optional[ScwRegion]' = None, container_id: 'Optional[str]' = None, schedule: 'Optional[str]' = None, args: 'Optional[Dict[str, Any]]' = <factory>, name: 'Optional[str]' = None)

Bases: object

args: Dict[str, Any] | None

Arguments to pass with the cron.

container_id: str | None = None

UUID of the container invoked by the cron.

cron_id: str

UUID of the cron to update.

name: str | None = None

Name of the cron.

region: str | None = None

Region to target. If none is passed will use default region from the config.

schedule: str | None = None

UNIX cron schedule.

class scaleway.container.v1beta1.types.UpdateNamespaceRequest(namespace_id: 'str', region: 'Optional[ScwRegion]' = None, environment_variables: 'Optional[Dict[str, str]]' = <factory>, description: 'Optional[str]' = None, secret_environment_variables: 'Optional[List[Secret]]' = <factory>, tags: 'Optional[List[str]]' = <factory>)

Bases: object

description: str | None = None

Description of the namespace to update.

environment_variables: Dict[str, str] | None

Environment variables of the namespace to update.

namespace_id: str

UUID of the namespace to update.

region: str | None = None

Region to target. If none is passed will use default region from the config.

secret_environment_variables: List[Secret] | None

Secret environment variables of the namespace to update.

tags: List[str] | None

Tags of the Serverless Container Namespace.

class scaleway.container.v1beta1.types.UpdateTriggerRequest(trigger_id: 'str', region: 'Optional[ScwRegion]' = None, name: 'Optional[str]' = None, description: 'Optional[str]' = None, sqs_config: 'Optional[UpdateTriggerRequestSqsClientConfig]' = None)

Bases: object

description: str | None = None

Description of the trigger.

name: str | None = None

Name of the trigger.

region: str | None = None

Region to target. If none is passed will use default region from the config.

sqs_config: UpdateTriggerRequestSqsClientConfig | None = None
trigger_id: str

ID of the trigger to update.

class scaleway.container.v1beta1.types.UpdateTriggerRequestSqsClientConfig(access_key: 'Optional[str]' = None, secret_key: 'Optional[str]' = None)

Bases: object

access_key: str | None = None
secret_key: str | None = None

Module contents

class scaleway.container.v1beta1.Container(id: 'str', name: 'str', namespace_id: 'str', status: 'ContainerStatus', environment_variables: 'Dict[str, str]', min_scale: 'int', max_scale: 'int', memory_limit: 'int', cpu_limit: 'int', privacy: 'ContainerPrivacy', registry_image: 'str', max_concurrency: 'int', domain_name: 'str', protocol: 'ContainerProtocol', port: 'int', secret_environment_variables: 'List[SecretHashedValue]', http_option: 'ContainerHttpOption', sandbox: 'ContainerSandbox', local_storage_limit: 'int', region: 'ScwRegion', tags: 'List[str]', command: 'List[str]', args: 'List[str]', timeout: 'Optional[str]' = None, error_message: 'Optional[str]' = None, description: 'Optional[str]' = None, scaling_option: 'Optional[ContainerScalingOption]' = None, health_check: 'Optional[ContainerHealthCheckSpec]' = None, created_at: 'Optional[datetime]' = None, updated_at: 'Optional[datetime]' = None, ready_at: 'Optional[datetime]' = None, private_network_id: 'Optional[str]' = None)

Bases: object

args: List[str]

Arguments passed to the command specified in the “command” field. These override the default arguments from the container image, and behave like command-line parameters.

command: List[str]

Command executed when the container starts. This overrides the default command defined in the container image. This is usually the main executable, or entry point script to run.

cpu_limit: int

CPU limit of the container in mvCPU.

created_at: datetime | None = None

Creation date of the container.

description: str | None = None

Description of the container.

domain_name: str

Domain name attributed to the contaioner.

environment_variables: Dict[str, str]

Environment variables of the container.

error_message: str | None = None

Last error message of the container.

health_check: ContainerHealthCheckSpec | None = None

Health check configuration of the container.

http_option: ContainerHttpOption

Possible values:

  • redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.

  • enabled: Serve both HTTP and HTTPS traffic.

id: str

UUID of the container.

local_storage_limit: int

Local storage limit of the container (in MB).

max_concurrency: int

Number of maximum concurrent executions of the container.

max_scale: int

Maximum number of instances to scale the container to.

memory_limit: int

Memory limit of the container in MB.

min_scale: int

Minimum number of instances to scale the container to.

name: str

Name of the container.

namespace_id: str

UUID of the namespace the container belongs to.

port: int

Port the container listens on.

privacy: ContainerPrivacy

Privacy setting of the container.

private_network_id: str | None = None

When connected to a Private Network, the container can access other Scaleway resources in this Private Network.

protocol: ContainerProtocol

Protocol the container uses.

ready_at: datetime | None = None

Last date when the container was successfully deployed and set to ready.

region: str

Region in which the container will be deployed.

registry_image: str

Name of the registry image (e.g. “rg.fr-par.scw.cloud/something/image:tag”).

sandbox: ContainerSandbox

Execution environment of the container.

scaling_option: ContainerScalingOption | None = None

Possible values:

  • concurrent_requests_threshold: Scale depending on the number of concurrent requests being processed per container instance.

  • cpu_usage_threshold: Scale depending on the CPU usage of a container instance.

  • memory_usage_threshold: Scale depending on the memory usage of a container instance.

secret_environment_variables: List[SecretHashedValue]

Secret environment variables of the container.

status: ContainerStatus

Status of the container.

tags: List[str]

List of tags applied to the Serverless Container.

timeout: str | None = None

Processing time limit for the container.

updated_at: datetime | None = None

Last update date of the container.

class scaleway.container.v1beta1.ContainerHealthCheckSpec(failure_threshold: 'int', interval: 'Optional[str]' = None, http: 'Optional[ContainerHealthCheckSpecHTTPProbe]' = None, tcp: 'Optional[ContainerHealthCheckSpecTCPProbe]' = None)

Bases: object

failure_threshold: int

During a deployment, if a newly created container fails to pass the health check, the deployment is aborted.

As a result, lowering this value can help to reduce the time it takes to detect a failed deployment.

http: ContainerHealthCheckSpecHTTPProbe | None = None
interval: str | None = None

Period between health checks.

tcp: ContainerHealthCheckSpecTCPProbe | None = None
class scaleway.container.v1beta1.ContainerHealthCheckSpecHTTPProbe(path: 'str')

Bases: object

path: str

Path to use for the HTTP health check.

class scaleway.container.v1beta1.ContainerHealthCheckSpecTCPProbe

Bases: object

class scaleway.container.v1beta1.ContainerHttpOption(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

ENABLED = 'enabled'
REDIRECTED = 'redirected'
UNKNOWN_HTTP_OPTION = 'unknown_http_option'
class scaleway.container.v1beta1.ContainerPrivacy(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

PRIVATE = 'private'
PUBLIC = 'public'
UNKNOWN_PRIVACY = 'unknown_privacy'
class scaleway.container.v1beta1.ContainerProtocol(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

H2C = 'h2c'
HTTP1 = 'http1'
UNKNOWN_PROTOCOL = 'unknown_protocol'
class scaleway.container.v1beta1.ContainerSandbox(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

UNKNOWN_SANDBOX = 'unknown_sandbox'
V1 = 'v1'
V2 = 'v2'
class scaleway.container.v1beta1.ContainerScalingOption(concurrent_requests_threshold: 'Optional[int]' = None, cpu_usage_threshold: 'Optional[int]' = None, memory_usage_threshold: 'Optional[int]' = None)

Bases: object

concurrent_requests_threshold: int | None = None
cpu_usage_threshold: int | None = None
memory_usage_threshold: int | None = None
class scaleway.container.v1beta1.ContainerStatus(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

CREATED = 'created'
CREATING = 'creating'
DELETING = 'deleting'
ERROR = 'error'
LOCKED = 'locked'
PENDING = 'pending'
READY = 'ready'
UNKNOWN = 'unknown'
class scaleway.container.v1beta1.ContainerV1Beta1API(client: Client, *, bypass_validation: bool = False)

Bases: API

This API allows you to manage your Serverless Containers.

create_container(*, namespace_id: str, name: str, region: str | None = None, environment_variables: Dict[str, str] | None = None, min_scale: int | None = None, max_scale: int | None = None, memory_limit: int | None = None, cpu_limit: int | None = None, timeout: str | None = None, privacy: ContainerPrivacy | None = None, description: str | None = None, registry_image: str | None = None, max_concurrency: int | None = None, protocol: ContainerProtocol | None = None, port: int | None = None, secret_environment_variables: List[Secret] | None = None, http_option: ContainerHttpOption | None = None, sandbox: ContainerSandbox | None = None, local_storage_limit: int | None = None, scaling_option: ContainerScalingOption | None = None, health_check: ContainerHealthCheckSpec | None = None, tags: List[str] | None = None, private_network_id: str | None = None, command: List[str] | None = None, args: List[str] | None = None) Container

Create a new container. Create a new container in the specified region. :param namespace_id: UUID of the namespace the container belongs to. :param name: Name of the container. :param region: Region to target. If none is passed will use default region from the config. :param environment_variables: Environment variables of the container. :param min_scale: Minimum number of instances to scale the container to. :param max_scale: Maximum number of instances to scale the container to. :param memory_limit: Memory limit of the container in MB. :param cpu_limit: CPU limit of the container in mvCPU. :param timeout: Processing time limit for the container. :param privacy: Privacy setting of the container. :param description: Description of the container. :param registry_image: Name of the registry image (e.g. “rg.fr-par.scw.cloud/something/image:tag”). :param max_concurrency: Number of maximum concurrent executions of the container. :param protocol: Protocol the container uses. :param port: Port the container listens on. :param secret_environment_variables: Secret environment variables of the container. :param http_option: Possible values:

  • redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.

  • enabled: Serve both HTTP and HTTPS traffic.

Parameters:
  • sandbox – Execution environment of the container.

  • local_storage_limit – Local storage limit of the container (in MB).

  • scaling_option – Possible values:

  • concurrent_requests_threshold: Scale depending on the number of concurrent requests being processed per container instance.

  • cpu_usage_threshold: Scale depending on the CPU usage of a container instance.

  • memory_usage_threshold: Scale depending on the memory usage of a container instance.

Parameters:
  • health_check – Health check configuration of the container.

  • tags – Tags of the Serverless Container.

  • private_network_id – When connected to a Private Network, the container can access other Scaleway resources in this Private Network.

  • command – Command executed when the container starts. This overrides the default command defined in the container image. This is usually the main executable, or entry point script to run.

  • args – Arguments passed to the command specified in the “command” field. These override the default arguments from the container image, and behave like command-line parameters.

Returns:

Container

Usage:

result = api.create_container(
    namespace_id="example",
    name="example",
)
create_cron(*, container_id: str, schedule: str, region: str | None = None, args: Dict[str, Any] | None = None, name: str | None = None) Cron

Create a new cron. :param container_id: UUID of the container to invoke by the cron. :param schedule: UNIX cron shedule. :param region: Region to target. If none is passed will use default region from the config. :param args: Arguments to pass with the cron. :param name: Name of the cron to create. :return: Cron

Usage:

result = api.create_cron(
    container_id="example",
    schedule="example",
)
create_domain(*, hostname: str, container_id: str, region: str | None = None) Domain

Create a custom domain. Create a custom domain for the container with the specified ID. :param hostname: Domain to assign. :param container_id: UUID of the container to assign the domain to. :param region: Region to target. If none is passed will use default region from the config. :return: Domain

Usage:

result = api.create_domain(
    hostname="example",
    container_id="example",
)
create_namespace(*, region: str | None = None, name: str | None = None, environment_variables: Dict[str, str] | None = None, project_id: str | None = None, description: str | None = None, secret_environment_variables: List[Secret] | None = None, tags: List[str] | None = None, activate_vpc_integration: bool | None = None) Namespace

Create a new namespace. Create a new namespace in a specified region. :param region: Region to target. If none is passed will use default region from the config. :param name: Name of the namespace to create. :param environment_variables: Environment variables of the namespace to create. :param project_id: UUID of the Project in which the namespace will be created. :param description: Description of the namespace to create. :param secret_environment_variables: Secret environment variables of the namespace to create. :param tags: Tags of the Serverless Container Namespace. :param activate_vpc_integration: Setting this field to true doesn’t matter anymore. It will be removed in a near future. :return: Namespace

Usage:

result = api.create_namespace()
create_token(*, region: str | None = None, container_id: str | None = None, namespace_id: str | None = None, description: str | None = None, expires_at: datetime | None = None) Token

Create a new revocable token. :param region: Region to target. If none is passed will use default region from the config. :param container_id: UUID of the container to create the token for. One-Of (‘scope’): at most one of ‘container_id’, ‘namespace_id’ could be set. :param namespace_id: UUID of the namespace to create the token for. One-Of (‘scope’): at most one of ‘container_id’, ‘namespace_id’ could be set. :param description: Description of the token. :param expires_at: Expiry date of the token. :return: Token

Usage:

result = api.create_token()
create_trigger(*, name: str, container_id: str, region: str | None = None, description: str | None = None, scw_sqs_config: CreateTriggerRequestMnqSqsClientConfig | None = None, scw_nats_config: CreateTriggerRequestMnqNatsClientConfig | None = None, sqs_config: CreateTriggerRequestSqsClientConfig | None = None) Trigger

Create a trigger. Create a new trigger for a specified container. :param name: Name of the trigger. :param container_id: ID of the container to trigger. :param region: Region to target. If none is passed will use default region from the config. :param description: Description of the trigger. :param scw_sqs_config: Configuration for a Scaleway Messaging and Queuing SQS queue. One-Of (‘config’): at most one of ‘scw_sqs_config’, ‘scw_nats_config’, ‘sqs_config’ could be set. :param scw_nats_config: Configuration for a Scaleway Messaging and Queuing NATS subject. One-Of (‘config’): at most one of ‘scw_sqs_config’, ‘scw_nats_config’, ‘sqs_config’ could be set. :param sqs_config: Configuration for an AWS SQS queue. One-Of (‘config’): at most one of ‘scw_sqs_config’, ‘scw_nats_config’, ‘sqs_config’ could be set. :return: Trigger

Usage:

result = api.create_trigger(
    name="example",
    container_id="example",
)
delete_container(*, container_id: str, region: str | None = None) Container

Delete a container. Delete the container associated with the specified ID. :param container_id: UUID of the container to delete. :param region: Region to target. If none is passed will use default region from the config. :return: Container

Usage:

result = api.delete_container(
    container_id="example",
)
delete_cron(*, cron_id: str, region: str | None = None) Cron

Delete an existing cron. Delete the cron associated with the specified ID. :param cron_id: UUID of the cron to delete. :param region: Region to target. If none is passed will use default region from the config. :return: Cron

Usage:

result = api.delete_cron(
    cron_id="example",
)
delete_domain(*, domain_id: str, region: str | None = None) Domain

Delete a custom domain. Delete the custom domain with the specific ID. :param domain_id: UUID of the domain to delete. :param region: Region to target. If none is passed will use default region from the config. :return: Domain

Usage:

result = api.delete_domain(
    domain_id="example",
)
delete_namespace(*, namespace_id: str, region: str | None = None) Namespace

Delete an existing namespace. Delete the namespace associated with the specified ID. :param namespace_id: UUID of the namespace to delete. :param region: Region to target. If none is passed will use default region from the config. :return: Namespace

Usage:

result = api.delete_namespace(
    namespace_id="example",
)
delete_token(*, token_id: str, region: str | None = None) Token

Delete a token. Delete a token with a specified ID. :param token_id: UUID of the token to delete. :param region: Region to target. If none is passed will use default region from the config. :return: Token

Usage:

result = api.delete_token(
    token_id="example",
)
delete_trigger(*, trigger_id: str, region: str | None = None) Trigger

Delete a trigger. Delete a trigger with a specified ID. :param trigger_id: ID of the trigger to delete. :param region: Region to target. If none is passed will use default region from the config. :return: Trigger

Usage:

result = api.delete_trigger(
    trigger_id="example",
)
deploy_container(*, container_id: str, region: str | None = None) Container

Deploy a container. Deploy a container associated with the specified ID. :param container_id: UUID of the container to deploy. :param region: Region to target. If none is passed will use default region from the config. :return: Container

Usage:

result = api.deploy_container(
    container_id="example",
)
get_container(*, container_id: str, region: str | None = None) Container

Get a container. Get the container associated with the specified ID. :param container_id: UUID of the container to get. :param region: Region to target. If none is passed will use default region from the config. :return: Container

Usage:

result = api.get_container(
    container_id="example",
)
get_cron(*, cron_id: str, region: str | None = None) Cron

Get a cron. Get the cron associated with the specified ID. :param cron_id: UUID of the cron to get. :param region: Region to target. If none is passed will use default region from the config. :return: Cron

Usage:

result = api.get_cron(
    cron_id="example",
)
get_domain(*, domain_id: str, region: str | None = None) Domain

Get a custom domain. Get a custom domain for the container with the specified ID. :param domain_id: UUID of the domain to get. :param region: Region to target. If none is passed will use default region from the config. :return: Domain

Usage:

result = api.get_domain(
    domain_id="example",
)
get_namespace(*, namespace_id: str, region: str | None = None) Namespace

Get a namespace. Get the namespace associated with the specified ID. :param namespace_id: UUID of the namespace to get. :param region: Region to target. If none is passed will use default region from the config. :return: Namespace

Usage:

result = api.get_namespace(
    namespace_id="example",
)
get_token(*, token_id: str, region: str | None = None) Token

Get a token. Get a token with a specified ID. :param token_id: UUID of the token to get. :param region: Region to target. If none is passed will use default region from the config. :return: Token

Usage:

result = api.get_token(
    token_id="example",
)
get_trigger(*, trigger_id: str, region: str | None = None) Trigger

Get a trigger. Get a trigger with a specified ID. :param trigger_id: ID of the trigger to get. :param region: Region to target. If none is passed will use default region from the config. :return: Trigger

Usage:

result = api.get_trigger(
    trigger_id="example",
)
list_containers(*, namespace_id: str, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListContainersRequestOrderBy | None = None, name: str | None = None, organization_id: str | None = None, project_id: str | None = None) ListContainersResponse

List all your containers. List all containers for a specified region. :param namespace_id: UUID of the namespace the container belongs to. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number. :param page_size: Number of containers per page. :param order_by: Order of the containers. :param name: Name of the container. :param organization_id: UUID of the Organization the container belongs to. :param project_id: UUID of the Project the container belongs to. :return: ListContainersResponse

Usage:

result = api.list_containers(
    namespace_id="example",
)
list_containers_all(*, namespace_id: str, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListContainersRequestOrderBy | None = None, name: str | None = None, organization_id: str | None = None, project_id: str | None = None) List[Container]

List all your containers. List all containers for a specified region. :param namespace_id: UUID of the namespace the container belongs to. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number. :param page_size: Number of containers per page. :param order_by: Order of the containers. :param name: Name of the container. :param organization_id: UUID of the Organization the container belongs to. :param project_id: UUID of the Project the container belongs to. :return: List[Container]

Usage:

result = api.list_containers_all(
    namespace_id="example",
)
list_crons(*, container_id: str, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListCronsRequestOrderBy | None = None) ListCronsResponse

List all your crons. :param container_id: UUID of the container invoked by the cron. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number. :param page_size: Number of crons per page. :param order_by: Order of the crons. :return: ListCronsResponse

Usage:

result = api.list_crons(
    container_id="example",
)
list_crons_all(*, container_id: str, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListCronsRequestOrderBy | None = None) List[Cron]

List all your crons. :param container_id: UUID of the container invoked by the cron. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number. :param page_size: Number of crons per page. :param order_by: Order of the crons. :return: List[Cron]

Usage:

result = api.list_crons_all(
    container_id="example",
)
list_domains(*, container_id: str, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListDomainsRequestOrderBy | None = None) ListDomainsResponse

List all custom domains. List all custom domains in a specified region. :param container_id: UUID of the container the domain belongs to. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number. :param page_size: Number of domains per page. :param order_by: Order of the domains. :return: ListDomainsResponse

Usage:

result = api.list_domains(
    container_id="example",
)
list_domains_all(*, container_id: str, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListDomainsRequestOrderBy | None = None) List[Domain]

List all custom domains. List all custom domains in a specified region. :param container_id: UUID of the container the domain belongs to. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number. :param page_size: Number of domains per page. :param order_by: Order of the domains. :return: List[Domain]

Usage:

result = api.list_domains_all(
    container_id="example",
)
list_namespaces(*, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListNamespacesRequestOrderBy | None = None, name: str | None = None, organization_id: str | None = None, project_id: str | None = None) ListNamespacesResponse

List all your namespaces. List all namespaces in a specified region. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number. :param page_size: Number of namespaces per page. :param order_by: Order of the namespaces. :param name: Name of the namespaces. :param organization_id: UUID of the Organization the namespace belongs to. :param project_id: UUID of the Project the namespace belongs to. :return: ListNamespacesResponse

Usage:

result = api.list_namespaces()
list_namespaces_all(*, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListNamespacesRequestOrderBy | None = None, name: str | None = None, organization_id: str | None = None, project_id: str | None = None) List[Namespace]

List all your namespaces. List all namespaces in a specified region. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number. :param page_size: Number of namespaces per page. :param order_by: Order of the namespaces. :param name: Name of the namespaces. :param organization_id: UUID of the Organization the namespace belongs to. :param project_id: UUID of the Project the namespace belongs to. :return: List[Namespace]

Usage:

result = api.list_namespaces_all()
list_tokens(*, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListTokensRequestOrderBy | None = None, container_id: str | None = None, namespace_id: str | None = None) ListTokensResponse

List all tokens. List all tokens belonging to a specified Organization or Project. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number. :param page_size: Number of tokens per page. :param order_by: Order of the tokens. :param container_id: UUID of the container the token belongs to. :param namespace_id: UUID of the namespace the token belongs to. :return: ListTokensResponse

Usage:

result = api.list_tokens()
list_tokens_all(*, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListTokensRequestOrderBy | None = None, container_id: str | None = None, namespace_id: str | None = None) List[Token]

List all tokens. List all tokens belonging to a specified Organization or Project. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number. :param page_size: Number of tokens per page. :param order_by: Order of the tokens. :param container_id: UUID of the container the token belongs to. :param namespace_id: UUID of the namespace the token belongs to. :return: List[Token]

Usage:

result = api.list_tokens_all()
list_triggers(*, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListTriggersRequestOrderBy | None = None, container_id: str | None = None, namespace_id: str | None = None, project_id: str | None = None) ListTriggersResponse

List all triggers. List all triggers belonging to a specified Organization or Project. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number to return. :param page_size: Maximum number of triggers to return per page. :param order_by: Order in which to return results. :param container_id: ID of the container the triggers belongs to. One-Of (‘scope’): at most one of ‘container_id’, ‘namespace_id’, ‘project_id’ could be set. :param namespace_id: ID of the namespace the triggers belongs to. One-Of (‘scope’): at most one of ‘container_id’, ‘namespace_id’, ‘project_id’ could be set. :param project_id: ID of the project the triggers belongs to. One-Of (‘scope’): at most one of ‘container_id’, ‘namespace_id’, ‘project_id’ could be set. :return: ListTriggersResponse

Usage:

result = api.list_triggers()
list_triggers_all(*, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListTriggersRequestOrderBy | None = None, container_id: str | None = None, namespace_id: str | None = None, project_id: str | None = None) List[Trigger]

List all triggers. List all triggers belonging to a specified Organization or Project. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number to return. :param page_size: Maximum number of triggers to return per page. :param order_by: Order in which to return results. :param container_id: ID of the container the triggers belongs to. One-Of (‘scope’): at most one of ‘container_id’, ‘namespace_id’, ‘project_id’ could be set. :param namespace_id: ID of the namespace the triggers belongs to. One-Of (‘scope’): at most one of ‘container_id’, ‘namespace_id’, ‘project_id’ could be set. :param project_id: ID of the project the triggers belongs to. One-Of (‘scope’): at most one of ‘container_id’, ‘namespace_id’, ‘project_id’ could be set. :return: List[Trigger]

Usage:

result = api.list_triggers_all()
update_container(*, container_id: str, region: str | None = None, environment_variables: Dict[str, str] | None = None, min_scale: int | None = None, max_scale: int | None = None, memory_limit: int | None = None, cpu_limit: int | None = None, timeout: str | None = None, redeploy: bool | None = None, privacy: ContainerPrivacy | None = None, description: str | None = None, registry_image: str | None = None, max_concurrency: int | None = None, protocol: ContainerProtocol | None = None, port: int | None = None, secret_environment_variables: List[Secret] | None = None, http_option: ContainerHttpOption | None = None, sandbox: ContainerSandbox | None = None, local_storage_limit: int | None = None, scaling_option: ContainerScalingOption | None = None, health_check: ContainerHealthCheckSpec | None = None, tags: List[str] | None = None, private_network_id: str | None = None, command: List[str] | None = None, args: List[str] | None = None) Container

Update an existing container. Update the container associated with the specified ID.

When updating a container, the container is automatically redeployed to apply the changes. This behavior can be changed by setting the redeploy field to false in the request. :param container_id: UUID of the container to update. :param region: Region to target. If none is passed will use default region from the config. :param environment_variables: Environment variables of the container. :param min_scale: Minimum number of instances to scale the container to. :param max_scale: Maximum number of instances to scale the container to. :param memory_limit: Memory limit of the container in MB. :param cpu_limit: CPU limit of the container in mvCPU. :param timeout: Processing time limit for the container. :param redeploy: Defines whether to redeploy failed containers. :param privacy: Privacy settings of the container. :param description: Description of the container. :param registry_image: Name of the registry image (e.g. “rg.fr-par.scw.cloud/something/image:tag”). :param max_concurrency: Number of maximum concurrent executions of the container. :param protocol: Protocol the container uses. :param port: Port the container listens on. :param secret_environment_variables: During an update, secret environment variables that are not specified in this field will be kept unchanged.

In order to delete a specific secret environment variable, you must reference its key, but not provide any value for it. For example, the following payload will delete the TO_DELETE secret environment variable:

```json {

“secret_environment_variables”:[

{“key”:”TO_DELETE”}

]

} ```. :param http_option: Possible values:

  • redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.

  • enabled: Serve both HTTP and HTTPS traffic.

Parameters:
  • sandbox – Execution environment of the container.

  • local_storage_limit – Local storage limit of the container (in MB).

  • scaling_option – Possible values:

  • concurrent_requests_threshold: Scale depending on the number of concurrent requests being processed per container instance.

  • cpu_usage_threshold: Scale depending on the CPU usage of a container instance.

  • memory_usage_threshold: Scale depending on the memory usage of a container instance.

Parameters:
  • health_check – Health check configuration of the container.

  • tags – Tags of the Serverless Container.

  • private_network_id – When connected to a Private Network, the container can access other Scaleway resources in this Private Network.

  • command – Command executed when the container starts. This overrides the default command defined in the container image. This is usually the main executable, or entry point script to run.

  • args – Arguments passed to the command specified in the “command” field. These override the default arguments from the container image, and behave like command-line parameters.

Returns:

Container

Usage:

result = api.update_container(
    container_id="example",
)
update_cron(*, cron_id: str, region: str | None = None, container_id: str | None = None, schedule: str | None = None, args: Dict[str, Any] | None = None, name: str | None = None) Cron

Update an existing cron. Update the cron associated with the specified ID. :param cron_id: UUID of the cron to update. :param region: Region to target. If none is passed will use default region from the config. :param container_id: UUID of the container invoked by the cron. :param schedule: UNIX cron schedule. :param args: Arguments to pass with the cron. :param name: Name of the cron. :return: Cron

Usage:

result = api.update_cron(
    cron_id="example",
)
update_namespace(*, namespace_id: str, region: str | None = None, environment_variables: Dict[str, str] | None = None, description: str | None = None, secret_environment_variables: List[Secret] | None = None, tags: List[str] | None = None) Namespace

Update an existing namespace. Update the space associated with the specified ID. :param namespace_id: UUID of the namespace to update. :param region: Region to target. If none is passed will use default region from the config. :param environment_variables: Environment variables of the namespace to update. :param description: Description of the namespace to update. :param secret_environment_variables: Secret environment variables of the namespace to update. :param tags: Tags of the Serverless Container Namespace. :return: Namespace

Usage:

result = api.update_namespace(
    namespace_id="example",
)
update_trigger(*, trigger_id: str, region: str | None = None, name: str | None = None, description: str | None = None, sqs_config: UpdateTriggerRequestSqsClientConfig | None = None) Trigger

Update a trigger. Update a trigger with a specified ID. :param trigger_id: ID of the trigger to update. :param region: Region to target. If none is passed will use default region from the config. :param name: Name of the trigger. :param description: Description of the trigger. :param sqs_config: Configuration for an AWS SQS queue. One-Of (‘config’): at most one of ‘sqs_config’ could be set. :return: Trigger

Usage:

result = api.update_trigger(
    trigger_id="example",
)
wait_for_container(*, container_id: str, region: str | None = None, options: WaitForOptions[Container, bool] | None = None) Container

Get a container. Get the container associated with the specified ID. :param container_id: UUID of the container to get. :param region: Region to target. If none is passed will use default region from the config. :return: Container

Usage:

result = api.get_container(
    container_id="example",
)
wait_for_cron(*, cron_id: str, region: str | None = None, options: WaitForOptions[Cron, bool] | None = None) Cron

Get a cron. Get the cron associated with the specified ID. :param cron_id: UUID of the cron to get. :param region: Region to target. If none is passed will use default region from the config. :return: Cron

Usage:

result = api.get_cron(
    cron_id="example",
)
wait_for_domain(*, domain_id: str, region: str | None = None, options: WaitForOptions[Domain, bool] | None = None) Domain

Get a custom domain. Get a custom domain for the container with the specified ID. :param domain_id: UUID of the domain to get. :param region: Region to target. If none is passed will use default region from the config. :return: Domain

Usage:

result = api.get_domain(
    domain_id="example",
)
wait_for_namespace(*, namespace_id: str, region: str | None = None, options: WaitForOptions[Namespace, bool] | None = None) Namespace

Get a namespace. Get the namespace associated with the specified ID. :param namespace_id: UUID of the namespace to get. :param region: Region to target. If none is passed will use default region from the config. :return: Namespace

Usage:

result = api.get_namespace(
    namespace_id="example",
)
wait_for_token(*, token_id: str, region: str | None = None, options: WaitForOptions[Token, bool] | None = None) Token

Get a token. Get a token with a specified ID. :param token_id: UUID of the token to get. :param region: Region to target. If none is passed will use default region from the config. :return: Token

Usage:

result = api.get_token(
    token_id="example",
)
wait_for_trigger(*, trigger_id: str, region: str | None = None, options: WaitForOptions[Trigger, bool] | None = None) Trigger

Get a trigger. Get a trigger with a specified ID. :param trigger_id: ID of the trigger to get. :param region: Region to target. If none is passed will use default region from the config. :return: Trigger

Usage:

result = api.get_trigger(
    trigger_id="example",
)
class scaleway.container.v1beta1.CreateContainerRequest(namespace_id: 'str', name: 'str', region: 'Optional[ScwRegion]' = None, environment_variables: 'Optional[Dict[str, str]]' = <factory>, min_scale: 'Optional[int]' = 0, max_scale: 'Optional[int]' = 0, memory_limit: 'Optional[int]' = 0, cpu_limit: 'Optional[int]' = 0, timeout: 'Optional[str]' = None, privacy: 'Optional[ContainerPrivacy]' = <ContainerPrivacy.UNKNOWN_PRIVACY: 'unknown_privacy'>, description: 'Optional[str]' = None, registry_image: 'Optional[str]' = None, max_concurrency: 'Optional[int]' = 0, protocol: 'Optional[ContainerProtocol]' = <ContainerProtocol.UNKNOWN_PROTOCOL: 'unknown_protocol'>, port: 'Optional[int]' = 0, secret_environment_variables: 'Optional[List[Secret]]' = <factory>, http_option: 'Optional[ContainerHttpOption]' = <ContainerHttpOption.UNKNOWN_HTTP_OPTION: 'unknown_http_option'>, sandbox: 'Optional[ContainerSandbox]' = <ContainerSandbox.UNKNOWN_SANDBOX: 'unknown_sandbox'>, local_storage_limit: 'Optional[int]' = 0, scaling_option: 'Optional[ContainerScalingOption]' = None, health_check: 'Optional[ContainerHealthCheckSpec]' = None, tags: 'Optional[List[str]]' = <factory>, private_network_id: 'Optional[str]' = None, command: 'Optional[List[str]]' = <factory>, args: 'Optional[List[str]]' = <factory>)

Bases: object

args: List[str] | None

Arguments passed to the command specified in the “command” field. These override the default arguments from the container image, and behave like command-line parameters.

command: List[str] | None

Command executed when the container starts. This overrides the default command defined in the container image. This is usually the main executable, or entry point script to run.

cpu_limit: int | None = 0

CPU limit of the container in mvCPU.

description: str | None = None

Description of the container.

environment_variables: Dict[str, str] | None

Environment variables of the container.

health_check: ContainerHealthCheckSpec | None = None

Health check configuration of the container.

http_option: ContainerHttpOption | None = 'unknown_http_option'

Possible values:

  • redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.

  • enabled: Serve both HTTP and HTTPS traffic.

local_storage_limit: int | None = 0

Local storage limit of the container (in MB).

max_concurrency: int | None = 0

Number of maximum concurrent executions of the container.

max_scale: int | None = 0

Maximum number of instances to scale the container to.

memory_limit: int | None = 0

Memory limit of the container in MB.

min_scale: int | None = 0

Minimum number of instances to scale the container to.

name: str

Name of the container.

namespace_id: str

UUID of the namespace the container belongs to.

port: int | None = 0

Port the container listens on.

privacy: ContainerPrivacy | None = 'unknown_privacy'

Privacy setting of the container.

private_network_id: str | None = None

When connected to a Private Network, the container can access other Scaleway resources in this Private Network.

protocol: ContainerProtocol | None = 'unknown_protocol'

Protocol the container uses.

region: str | None = None

Region to target. If none is passed will use default region from the config.

registry_image: str | None = None

Name of the registry image (e.g. “rg.fr-par.scw.cloud/something/image:tag”).

sandbox: ContainerSandbox | None = 'unknown_sandbox'

Execution environment of the container.

scaling_option: ContainerScalingOption | None = None

Possible values:

  • concurrent_requests_threshold: Scale depending on the number of concurrent requests being processed per container instance.

  • cpu_usage_threshold: Scale depending on the CPU usage of a container instance.

  • memory_usage_threshold: Scale depending on the memory usage of a container instance.

secret_environment_variables: List[Secret] | None

Secret environment variables of the container.

tags: List[str] | None

Tags of the Serverless Container.

timeout: str | None = None

Processing time limit for the container.

class scaleway.container.v1beta1.CreateCronRequest(container_id: 'str', schedule: 'str', region: 'Optional[ScwRegion]' = None, args: 'Optional[Dict[str, Any]]' = <factory>, name: 'Optional[str]' = None)

Bases: object

args: Dict[str, Any] | None

Arguments to pass with the cron.

container_id: str

UUID of the container to invoke by the cron.

name: str | None = None

Name of the cron to create.

region: str | None = None

Region to target. If none is passed will use default region from the config.

schedule: str

UNIX cron shedule.

class scaleway.container.v1beta1.CreateDomainRequest(hostname: 'str', container_id: 'str', region: 'Optional[ScwRegion]' = None)

Bases: object

container_id: str

UUID of the container to assign the domain to.

hostname: str

Domain to assign.

region: str | None = None

Region to target. If none is passed will use default region from the config.

class scaleway.container.v1beta1.CreateNamespaceRequest(region: 'Optional[ScwRegion]' = None, name: 'Optional[str]' = None, environment_variables: 'Optional[Dict[str, str]]' = <factory>, project_id: 'Optional[str]' = None, description: 'Optional[str]' = None, secret_environment_variables: 'Optional[List[Secret]]' = <factory>, tags: 'Optional[List[str]]' = <factory>, activate_vpc_integration: 'Optional[bool]' = False)

Bases: object

activate_vpc_integration: bool | None = False

Setting this field to true doesn’t matter anymore. It will be removed in a near future.

description: str | None = None

Description of the namespace to create.

environment_variables: Dict[str, str] | None

Environment variables of the namespace to create.

name: str | None = None

Name of the namespace to create.

project_id: str | None = None

UUID of the Project in which the namespace will be created.

region: str | None = None

Region to target. If none is passed will use default region from the config.

secret_environment_variables: List[Secret] | None

Secret environment variables of the namespace to create.

tags: List[str] | None

Tags of the Serverless Container Namespace.

class scaleway.container.v1beta1.CreateTokenRequest(region: 'Optional[ScwRegion]' = None, description: 'Optional[str]' = None, expires_at: 'Optional[datetime]' = None, container_id: 'Optional[str]' = None, namespace_id: 'Optional[str]' = None)

Bases: object

container_id: str | None = None
description: str | None = None

Description of the token.

expires_at: datetime | None = None

Expiry date of the token.

namespace_id: str | None = None
region: str | None = None

Region to target. If none is passed will use default region from the config.

class scaleway.container.v1beta1.CreateTriggerRequest(name: 'str', container_id: 'str', region: 'Optional[ScwRegion]' = None, description: 'Optional[str]' = None, scw_sqs_config: 'Optional[CreateTriggerRequestMnqSqsClientConfig]' = None, scw_nats_config: 'Optional[CreateTriggerRequestMnqNatsClientConfig]' = None, sqs_config: 'Optional[CreateTriggerRequestSqsClientConfig]' = None)

Bases: object

container_id: str

ID of the container to trigger.

description: str | None = None

Description of the trigger.

name: str

Name of the trigger.

region: str | None = None

Region to target. If none is passed will use default region from the config.

scw_nats_config: CreateTriggerRequestMnqNatsClientConfig | None = None
scw_sqs_config: CreateTriggerRequestMnqSqsClientConfig | None = None
sqs_config: CreateTriggerRequestSqsClientConfig | None = None
class scaleway.container.v1beta1.CreateTriggerRequestMnqNatsClientConfig(subject: 'str', mnq_nats_account_id: 'str', mnq_project_id: 'str', mnq_region: 'str')

Bases: object

mnq_nats_account_id: str

ID of the Messaging and Queuing NATS account.

mnq_project_id: str

ID of the Messaging and Queuing project.

mnq_region: str

Currently, only the fr-par and nl-ams regions are available.

subject: str

Name of the NATS subject the trigger should listen to.

class scaleway.container.v1beta1.CreateTriggerRequestMnqSqsClientConfig(queue: 'str', mnq_project_id: 'str', mnq_region: 'str')

Bases: object

mnq_project_id: str

You must have activated SQS on this project.

mnq_region: str

Currently, only the fr-par and nl-ams regions are available.

queue: str

Name of the SQS queue the trigger should listen to.

class scaleway.container.v1beta1.CreateTriggerRequestSqsClientConfig(endpoint: 'str', queue_url: 'str', access_key: 'str', secret_key: 'str')

Bases: object

access_key: str
endpoint: str
queue_url: str
secret_key: str
class scaleway.container.v1beta1.Cron(id: 'str', container_id: 'str', schedule: 'str', status: 'CronStatus', name: 'str', args: 'Optional[Dict[str, Any]]' = <factory>)

Bases: object

args: Dict[str, Any] | None

Arguments to pass with the cron.

container_id: str

UUID of the container invoked by this cron.

id: str

UUID of the cron.

name: str

Name of the cron.

schedule: str

UNIX cron shedule.

status: CronStatus

Status of the cron.

class scaleway.container.v1beta1.CronStatus(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

CREATING = 'creating'
DELETING = 'deleting'
ERROR = 'error'
LOCKED = 'locked'
PENDING = 'pending'
READY = 'ready'
UNKNOWN = 'unknown'
class scaleway.container.v1beta1.DeleteContainerRequest(container_id: 'str', region: 'Optional[ScwRegion]' = None)

Bases: object

container_id: str

UUID of the container to delete.

region: str | None = None

Region to target. If none is passed will use default region from the config.

class scaleway.container.v1beta1.DeleteCronRequest(cron_id: 'str', region: 'Optional[ScwRegion]' = None)

Bases: object

cron_id: str

UUID of the cron to delete.

region: str | None = None

Region to target. If none is passed will use default region from the config.

class scaleway.container.v1beta1.DeleteDomainRequest(domain_id: 'str', region: 'Optional[ScwRegion]' = None)

Bases: object

domain_id: str

UUID of the domain to delete.

region: str | None = None

Region to target. If none is passed will use default region from the config.

class scaleway.container.v1beta1.DeleteNamespaceRequest(namespace_id: 'str', region: 'Optional[ScwRegion]' = None)

Bases: object

namespace_id: str

UUID of the namespace to delete.

region: str | None = None

Region to target. If none is passed will use default region from the config.

class scaleway.container.v1beta1.DeleteTokenRequest(token_id: 'str', region: 'Optional[ScwRegion]' = None)

Bases: object

region: str | None = None

Region to target. If none is passed will use default region from the config.

token_id: str

UUID of the token to delete.

class scaleway.container.v1beta1.DeleteTriggerRequest(trigger_id: 'str', region: 'Optional[ScwRegion]' = None)

Bases: object

region: str | None = None

Region to target. If none is passed will use default region from the config.

trigger_id: str

ID of the trigger to delete.

class scaleway.container.v1beta1.DeployContainerRequest(container_id: 'str', region: 'Optional[ScwRegion]' = None)

Bases: object

container_id: str

UUID of the container to deploy.

region: str | None = None

Region to target. If none is passed will use default region from the config.

class scaleway.container.v1beta1.Domain(id: 'str', hostname: 'str', container_id: 'str', url: 'str', status: 'DomainStatus', error_message: 'Optional[str]' = None)

Bases: object

container_id: str

UUID of the container.

error_message: str | None = None

Last error message of the domain.

hostname: str

Domain assigned to the container.

id: str

UUID of the domain.

status: DomainStatus

Status of the domain.

url: str

URL (TBD).

class scaleway.container.v1beta1.DomainStatus(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

CREATING = 'creating'
DELETING = 'deleting'
ERROR = 'error'
PENDING = 'pending'
READY = 'ready'
UNKNOWN = 'unknown'
class scaleway.container.v1beta1.GetContainerRequest(container_id: 'str', region: 'Optional[ScwRegion]' = None)

Bases: object

container_id: str

UUID of the container to get.

region: str | None = None

Region to target. If none is passed will use default region from the config.

class scaleway.container.v1beta1.GetCronRequest(cron_id: 'str', region: 'Optional[ScwRegion]' = None)

Bases: object

cron_id: str

UUID of the cron to get.

region: str | None = None

Region to target. If none is passed will use default region from the config.

class scaleway.container.v1beta1.GetDomainRequest(domain_id: 'str', region: 'Optional[ScwRegion]' = None)

Bases: object

domain_id: str

UUID of the domain to get.

region: str | None = None

Region to target. If none is passed will use default region from the config.

class scaleway.container.v1beta1.GetNamespaceRequest(namespace_id: 'str', region: 'Optional[ScwRegion]' = None)

Bases: object

namespace_id: str

UUID of the namespace to get.

region: str | None = None

Region to target. If none is passed will use default region from the config.

class scaleway.container.v1beta1.GetTokenRequest(token_id: 'str', region: 'Optional[ScwRegion]' = None)

Bases: object

region: str | None = None

Region to target. If none is passed will use default region from the config.

token_id: str

UUID of the token to get.

class scaleway.container.v1beta1.GetTriggerRequest(trigger_id: 'str', region: 'Optional[ScwRegion]' = None)

Bases: object

region: str | None = None

Region to target. If none is passed will use default region from the config.

trigger_id: str

ID of the trigger to get.

class scaleway.container.v1beta1.ListContainersRequest(namespace_id: 'str', region: 'Optional[ScwRegion]' = None, page: 'Optional[int]' = 0, page_size: 'Optional[int]' = 0, order_by: 'Optional[ListContainersRequestOrderBy]' = <ListContainersRequestOrderBy.CREATED_AT_ASC: 'created_at_asc'>, name: 'Optional[str]' = None, organization_id: 'Optional[str]' = None, project_id: 'Optional[str]' = None)

Bases: object

name: str | None = None

Name of the container.

namespace_id: str

UUID of the namespace the container belongs to.

order_by: ListContainersRequestOrderBy | None = 'created_at_asc'

Order of the containers.

organization_id: str | None = None

UUID of the Organization the container belongs to.

page: int | None = 0

Page number.

page_size: int | None = 0

Number of containers per page.

project_id: str | None = None

UUID of the Project the container belongs to.

region: str | None = None

Region to target. If none is passed will use default region from the config.

class scaleway.container.v1beta1.ListContainersRequestOrderBy(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

CREATED_AT_ASC = 'created_at_asc'
CREATED_AT_DESC = 'created_at_desc'
NAME_ASC = 'name_asc'
NAME_DESC = 'name_desc'
class scaleway.container.v1beta1.ListContainersResponse(containers: 'List[Container]', total_count: 'int')

Bases: object

containers: List[Container]

Array of containers.

total_count: int

Total number of containers.

class scaleway.container.v1beta1.ListCronsRequest(container_id: 'str', region: 'Optional[ScwRegion]' = None, page: 'Optional[int]' = 0, page_size: 'Optional[int]' = 0, order_by: 'Optional[ListCronsRequestOrderBy]' = <ListCronsRequestOrderBy.CREATED_AT_ASC: 'created_at_asc'>)

Bases: object

container_id: str

UUID of the container invoked by the cron.

order_by: ListCronsRequestOrderBy | None = 'created_at_asc'

Order of the crons.

page: int | None = 0

Page number.

page_size: int | None = 0

Number of crons per page.

region: str | None = None

Region to target. If none is passed will use default region from the config.

class scaleway.container.v1beta1.ListCronsRequestOrderBy(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

CREATED_AT_ASC = 'created_at_asc'
CREATED_AT_DESC = 'created_at_desc'
class scaleway.container.v1beta1.ListCronsResponse(crons: 'List[Cron]', total_count: 'int')

Bases: object

crons: List[Cron]

Array of crons.

total_count: int

Total number of crons.

class scaleway.container.v1beta1.ListDomainsRequest(container_id: 'str', region: 'Optional[ScwRegion]' = None, page: 'Optional[int]' = 0, page_size: 'Optional[int]' = 0, order_by: 'Optional[ListDomainsRequestOrderBy]' = <ListDomainsRequestOrderBy.CREATED_AT_ASC: 'created_at_asc'>)

Bases: object

container_id: str

UUID of the container the domain belongs to.

order_by: ListDomainsRequestOrderBy | None = 'created_at_asc'

Order of the domains.

page: int | None = 0

Page number.

page_size: int | None = 0

Number of domains per page.

region: str | None = None

Region to target. If none is passed will use default region from the config.

class scaleway.container.v1beta1.ListDomainsRequestOrderBy(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

CREATED_AT_ASC = 'created_at_asc'
CREATED_AT_DESC = 'created_at_desc'
HOSTNAME_ASC = 'hostname_asc'
HOSTNAME_DESC = 'hostname_desc'
class scaleway.container.v1beta1.ListDomainsResponse(domains: 'List[Domain]', total_count: 'int')

Bases: object

domains: List[Domain]

Array of domains.

total_count: int

Total number of domains.

class scaleway.container.v1beta1.ListNamespacesRequest(region: 'Optional[ScwRegion]' = None, page: 'Optional[int]' = 0, page_size: 'Optional[int]' = 0, order_by: 'Optional[ListNamespacesRequestOrderBy]' = <ListNamespacesRequestOrderBy.CREATED_AT_ASC: 'created_at_asc'>, name: 'Optional[str]' = None, organization_id: 'Optional[str]' = None, project_id: 'Optional[str]' = None)

Bases: object

name: str | None = None

Name of the namespaces.

order_by: ListNamespacesRequestOrderBy | None = 'created_at_asc'

Order of the namespaces.

organization_id: str | None = None

UUID of the Organization the namespace belongs to.

page: int | None = 0

Page number.

page_size: int | None = 0

Number of namespaces per page.

project_id: str | None = None

UUID of the Project the namespace belongs to.

region: str | None = None

Region to target. If none is passed will use default region from the config.

class scaleway.container.v1beta1.ListNamespacesRequestOrderBy(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

CREATED_AT_ASC = 'created_at_asc'
CREATED_AT_DESC = 'created_at_desc'
NAME_ASC = 'name_asc'
NAME_DESC = 'name_desc'
class scaleway.container.v1beta1.ListNamespacesResponse(namespaces: 'List[Namespace]', total_count: 'int')

Bases: object

namespaces: List[Namespace]

Array of the namespaces.

total_count: int

Total number of namespaces.

class scaleway.container.v1beta1.ListTokensRequest(region: 'Optional[ScwRegion]' = None, page: 'Optional[int]' = 0, page_size: 'Optional[int]' = 0, order_by: 'Optional[ListTokensRequestOrderBy]' = <ListTokensRequestOrderBy.CREATED_AT_ASC: 'created_at_asc'>, container_id: 'Optional[str]' = None, namespace_id: 'Optional[str]' = None)

Bases: object

container_id: str | None = None

UUID of the container the token belongs to.

namespace_id: str | None = None

UUID of the namespace the token belongs to.

order_by: ListTokensRequestOrderBy | None = 'created_at_asc'

Order of the tokens.

page: int | None = 0

Page number.

page_size: int | None = 0

Number of tokens per page.

region: str | None = None

Region to target. If none is passed will use default region from the config.

class scaleway.container.v1beta1.ListTokensRequestOrderBy(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

CREATED_AT_ASC = 'created_at_asc'
CREATED_AT_DESC = 'created_at_desc'
class scaleway.container.v1beta1.ListTokensResponse(tokens: 'List[Token]', total_count: 'int')

Bases: object

tokens: List[Token]
total_count: int
class scaleway.container.v1beta1.ListTriggersRequest(region: 'Optional[ScwRegion]' = None, page: 'Optional[int]' = 0, page_size: 'Optional[int]' = 0, order_by: 'Optional[ListTriggersRequestOrderBy]' = <ListTriggersRequestOrderBy.CREATED_AT_ASC: 'created_at_asc'>, container_id: 'Optional[str]' = None, namespace_id: 'Optional[str]' = None, project_id: 'Optional[str]' = None)

Bases: object

container_id: str | None = None
namespace_id: str | None = None
order_by: ListTriggersRequestOrderBy | None = 'created_at_asc'

Order in which to return results.

page: int | None = 0

Page number to return.

page_size: int | None = 0

Maximum number of triggers to return per page.

project_id: str | None = None
region: str | None = None

Region to target. If none is passed will use default region from the config.

class scaleway.container.v1beta1.ListTriggersRequestOrderBy(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

CREATED_AT_ASC = 'created_at_asc'
CREATED_AT_DESC = 'created_at_desc'
class scaleway.container.v1beta1.ListTriggersResponse(total_count: 'int', triggers: 'List[Trigger]')

Bases: object

total_count: int

Total count of existing triggers (matching any filters specified).

triggers: List[Trigger]

Triggers on this page.

class scaleway.container.v1beta1.Namespace(id: 'str', name: 'str', environment_variables: 'Dict[str, str]', organization_id: 'str', project_id: 'str', status: 'NamespaceStatus', registry_namespace_id: 'str', registry_endpoint: 'str', secret_environment_variables: 'List[SecretHashedValue]', region: 'ScwRegion', tags: 'List[str]', error_message: 'Optional[str]' = None, description: 'Optional[str]' = None, created_at: 'Optional[datetime]' = None, updated_at: 'Optional[datetime]' = None, vpc_integration_activated: 'Optional[bool]' = False)

Bases: object

created_at: datetime | None = None

Creation date of the namespace.

description: str | None = None

Description of the endpoint.

environment_variables: Dict[str, str]

Environment variables of the namespace.

error_message: str | None = None

Last error message of the namesace.

id: str

UUID of the namespace.

name: str

Name of the namespace.

organization_id: str

UUID of the Organization the namespace belongs to.

project_id: str

UUID of the Project the namespace belongs to.

region: str

Region in which the namespace will be created.

registry_endpoint: str

Registry endpoint of the namespace.

registry_namespace_id: str

UUID of the registry namespace.

secret_environment_variables: List[SecretHashedValue]

Secret environment variables of the namespace.

status: NamespaceStatus

Status of the namespace.

tags: List[str]

List of tags applied to the Serverless Container Namespace.

updated_at: datetime | None = None

Last update date of the namespace.

vpc_integration_activated: bool | None = False

The value of this field doesn’t matter anymore, and will be removed in a near future.

class scaleway.container.v1beta1.NamespaceStatus(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

CREATING = 'creating'
DELETING = 'deleting'
ERROR = 'error'
LOCKED = 'locked'
PENDING = 'pending'
READY = 'ready'
UNKNOWN = 'unknown'
class scaleway.container.v1beta1.Secret(key: 'str', value: 'Optional[str]' = None)

Bases: object

key: str
value: str | None = None
class scaleway.container.v1beta1.SecretHashedValue(key: 'str', hashed_value: 'str')

Bases: object

hashed_value: str
key: str
class scaleway.container.v1beta1.Token(id: 'str', token: 'str', status: 'TokenStatus', public_key: 'Optional[str]' = None, description: 'Optional[str]' = None, expires_at: 'Optional[datetime]' = None, container_id: 'Optional[str]' = None, namespace_id: 'Optional[str]' = None)

Bases: object

container_id: str | None = None
description: str | None = None

Description of the token.

expires_at: datetime | None = None

Expiry date of the token.

id: str

UUID of the token.

namespace_id: str | None = None
public_key: str | None = None

Public key of the token.

status: TokenStatus

Status of the token.

token: str

Identifier of the token.

class scaleway.container.v1beta1.TokenStatus(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

CREATING = 'creating'
DELETING = 'deleting'
ERROR = 'error'
READY = 'ready'
UNKNOWN = 'unknown'
class scaleway.container.v1beta1.Trigger(id: 'str', name: 'str', description: 'str', container_id: 'str', input_type: 'TriggerInputType', status: 'TriggerStatus', error_message: 'Optional[str]' = None, scw_sqs_config: 'Optional[TriggerMnqSqsClientConfig]' = None, scw_nats_config: 'Optional[TriggerMnqNatsClientConfig]' = None, sqs_config: 'Optional[TriggerSqsClientConfig]' = None)

Bases: object

container_id: str

ID of the container to trigger.

description: str

Description of the trigger.

error_message: str | None = None

Error message of the trigger.

id: str

ID of the trigger.

input_type: TriggerInputType

Type of the input.

name: str

Name of the trigger.

scw_nats_config: TriggerMnqNatsClientConfig | None = None
scw_sqs_config: TriggerMnqSqsClientConfig | None = None
sqs_config: TriggerSqsClientConfig | None = None
status: TriggerStatus

Status of the trigger.

class scaleway.container.v1beta1.TriggerInputType(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

NATS = 'nats'
SCW_NATS = 'scw_nats'
SCW_SQS = 'scw_sqs'
SQS = 'sqs'
UNKNOWN_INPUT_TYPE = 'unknown_input_type'
class scaleway.container.v1beta1.TriggerMnqNatsClientConfig(subject: 'str', mnq_nats_account_id: 'str', mnq_project_id: 'str', mnq_region: 'str', mnq_credential_id: 'Optional[str]' = None)

Bases: object

mnq_credential_id: str | None = None

ID of the Messaging and Queuing credentials used to subscribe to the NATS subject.

mnq_nats_account_id: str

ID of the Messaging and Queuing NATS account.

mnq_project_id: str

ID of the Messaging and Queuing project.

mnq_region: str

Currently, only the fr-par and nl-ams regions are available.

subject: str

Name of the NATS subject the trigger listens to.

class scaleway.container.v1beta1.TriggerMnqSqsClientConfig(queue: 'str', mnq_project_id: 'str', mnq_region: 'str', mnq_credential_id: 'Optional[str]' = None)

Bases: object

mnq_credential_id: str | None = None

ID of the Messaging and Queuing credentials used to read from the SQS queue.

mnq_project_id: str

ID of the Messaging and Queuing project.

mnq_region: str

Currently, only the fr-par and nl-ams regions are available.

queue: str

Name of the SQS queue the trigger listens to.

class scaleway.container.v1beta1.TriggerSqsClientConfig(endpoint: 'str', queue_url: 'str', access_key: 'str', secret_key: 'str')

Bases: object

access_key: str
endpoint: str
queue_url: str
secret_key: str
class scaleway.container.v1beta1.TriggerStatus(value: str, names: Any | None = None, *args: Any, **kwargs: Any)

Bases: str, Enum

CREATING = 'creating'
DELETING = 'deleting'
ERROR = 'error'
PENDING = 'pending'
READY = 'ready'
UNKNOWN_STATUS = 'unknown_status'
class scaleway.container.v1beta1.UpdateContainerRequest(container_id: 'str', region: 'Optional[ScwRegion]' = None, environment_variables: 'Optional[Dict[str, str]]' = <factory>, min_scale: 'Optional[int]' = 0, max_scale: 'Optional[int]' = 0, memory_limit: 'Optional[int]' = 0, cpu_limit: 'Optional[int]' = 0, timeout: 'Optional[str]' = None, redeploy: 'Optional[bool]' = False, privacy: 'Optional[ContainerPrivacy]' = <ContainerPrivacy.UNKNOWN_PRIVACY: 'unknown_privacy'>, description: 'Optional[str]' = None, registry_image: 'Optional[str]' = None, max_concurrency: 'Optional[int]' = 0, protocol: 'Optional[ContainerProtocol]' = <ContainerProtocol.UNKNOWN_PROTOCOL: 'unknown_protocol'>, port: 'Optional[int]' = 0, secret_environment_variables: 'Optional[List[Secret]]' = <factory>, http_option: 'Optional[ContainerHttpOption]' = <ContainerHttpOption.UNKNOWN_HTTP_OPTION: 'unknown_http_option'>, sandbox: 'Optional[ContainerSandbox]' = <ContainerSandbox.UNKNOWN_SANDBOX: 'unknown_sandbox'>, local_storage_limit: 'Optional[int]' = 0, scaling_option: 'Optional[ContainerScalingOption]' = None, health_check: 'Optional[ContainerHealthCheckSpec]' = None, tags: 'Optional[List[str]]' = <factory>, private_network_id: 'Optional[str]' = None, command: 'Optional[List[str]]' = <factory>, args: 'Optional[List[str]]' = <factory>)

Bases: object

args: List[str] | None

Arguments passed to the command specified in the “command” field. These override the default arguments from the container image, and behave like command-line parameters.

command: List[str] | None

Command executed when the container starts. This overrides the default command defined in the container image. This is usually the main executable, or entry point script to run.

container_id: str

UUID of the container to update.

cpu_limit: int | None = 0

CPU limit of the container in mvCPU.

description: str | None = None

Description of the container.

environment_variables: Dict[str, str] | None

Environment variables of the container.

health_check: ContainerHealthCheckSpec | None = None

Health check configuration of the container.

http_option: ContainerHttpOption | None = 'unknown_http_option'

Possible values:

  • redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.

  • enabled: Serve both HTTP and HTTPS traffic.

local_storage_limit: int | None = 0

Local storage limit of the container (in MB).

max_concurrency: int | None = 0

Number of maximum concurrent executions of the container.

max_scale: int | None = 0

Maximum number of instances to scale the container to.

memory_limit: int | None = 0

Memory limit of the container in MB.

min_scale: int | None = 0

Minimum number of instances to scale the container to.

port: int | None = 0

Port the container listens on.

privacy: ContainerPrivacy | None = 'unknown_privacy'

Privacy settings of the container.

private_network_id: str | None = None

When connected to a Private Network, the container can access other Scaleway resources in this Private Network.

protocol: ContainerProtocol | None = 'unknown_protocol'

Protocol the container uses.

redeploy: bool | None = False

Defines whether to redeploy failed containers.

region: str | None = None

Region to target. If none is passed will use default region from the config.

registry_image: str | None = None

Name of the registry image (e.g. “rg.fr-par.scw.cloud/something/image:tag”).

sandbox: ContainerSandbox | None = 'unknown_sandbox'

Execution environment of the container.

scaling_option: ContainerScalingOption | None = None

Possible values:

  • concurrent_requests_threshold: Scale depending on the number of concurrent requests being processed per container instance.

  • cpu_usage_threshold: Scale depending on the CPU usage of a container instance.

  • memory_usage_threshold: Scale depending on the memory usage of a container instance.

secret_environment_variables: List[Secret] | None

During an update, secret environment variables that are not specified in this field will be kept unchanged.

In order to delete a specific secret environment variable, you must reference its key, but not provide any value for it. For example, the following payload will delete the TO_DELETE secret environment variable:

```json {

“secret_environment_variables”:[

{“key”:”TO_DELETE”}

]

} ```.

tags: List[str] | None

Tags of the Serverless Container.

timeout: str | None = None

Processing time limit for the container.

class scaleway.container.v1beta1.UpdateCronRequest(cron_id: 'str', region: 'Optional[ScwRegion]' = None, container_id: 'Optional[str]' = None, schedule: 'Optional[str]' = None, args: 'Optional[Dict[str, Any]]' = <factory>, name: 'Optional[str]' = None)

Bases: object

args: Dict[str, Any] | None

Arguments to pass with the cron.

container_id: str | None = None

UUID of the container invoked by the cron.

cron_id: str

UUID of the cron to update.

name: str | None = None

Name of the cron.

region: str | None = None

Region to target. If none is passed will use default region from the config.

schedule: str | None = None

UNIX cron schedule.

class scaleway.container.v1beta1.UpdateNamespaceRequest(namespace_id: 'str', region: 'Optional[ScwRegion]' = None, environment_variables: 'Optional[Dict[str, str]]' = <factory>, description: 'Optional[str]' = None, secret_environment_variables: 'Optional[List[Secret]]' = <factory>, tags: 'Optional[List[str]]' = <factory>)

Bases: object

description: str | None = None

Description of the namespace to update.

environment_variables: Dict[str, str] | None

Environment variables of the namespace to update.

namespace_id: str

UUID of the namespace to update.

region: str | None = None

Region to target. If none is passed will use default region from the config.

secret_environment_variables: List[Secret] | None

Secret environment variables of the namespace to update.

tags: List[str] | None

Tags of the Serverless Container Namespace.

class scaleway.container.v1beta1.UpdateTriggerRequest(trigger_id: 'str', region: 'Optional[ScwRegion]' = None, name: 'Optional[str]' = None, description: 'Optional[str]' = None, sqs_config: 'Optional[UpdateTriggerRequestSqsClientConfig]' = None)

Bases: object

description: str | None = None

Description of the trigger.

name: str | None = None

Name of the trigger.

region: str | None = None

Region to target. If none is passed will use default region from the config.

sqs_config: UpdateTriggerRequestSqsClientConfig | None = None
trigger_id: str

ID of the trigger to update.

class scaleway.container.v1beta1.UpdateTriggerRequestSqsClientConfig(access_key: 'Optional[str]' = None, secret_key: 'Optional[str]' = None)

Bases: object

access_key: str | None = None
secret_key: str | None = None