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: Optional[str] = None, environment_variables: Optional[Dict[str, str]] = None, min_scale: Optional[int] = None, max_scale: Optional[int] = None, memory_limit: Optional[int] = None, cpu_limit: Optional[int] = None, timeout: Optional[str] = None, privacy: Optional[ContainerPrivacy] = None, description: Optional[str] = None, registry_image: Optional[str] = None, max_concurrency: Optional[int] = None, protocol: Optional[ContainerProtocol] = None, port: Optional[int] = None, secret_environment_variables: Optional[List[Secret]] = None, http_option: Optional[ContainerHttpOption] = None, sandbox: Optional[ContainerSandbox] = None, local_storage_limit: Optional[int] = None, scaling_option: Optional[ContainerScalingOption] = None, health_check: Optional[ContainerHealthCheckSpec] = 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.

Returns:

Container

Usage:

result = api.create_container(
    namespace_id="example",
    name="example",
)
create_cron(*, container_id: str, schedule: str, region: Optional[str] = None, args: Optional[Dict[str, Any]] = None, name: Optional[str] = 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: Optional[str] = None) Domain

Create a domain name binding. Create a domain name binding 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: Optional[str] = None, name: Optional[str] = None, environment_variables: Optional[Dict[str, str]] = None, project_id: Optional[str] = None, description: Optional[str] = None, secret_environment_variables: Optional[List[Secret]] = None, tags: Optional[List[str]] = 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: [ALPHA] Tags of the Serverless Container Namespace. :return: Namespace

Usage:

result = api.create_namespace()
create_token(*, region: Optional[str] = None, container_id: Optional[str] = None, namespace_id: Optional[str] = None, description: Optional[str] = None, expires_at: Optional[datetime] = 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: Optional[str] = None, description: Optional[str] = None, scw_sqs_config: Optional[CreateTriggerRequestMnqSqsClientConfig] = None, scw_nats_config: Optional[CreateTriggerRequestMnqNatsClientConfig] = None, sqs_config: Optional[CreateTriggerRequestSqsClientConfig] = 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: Optional[str] = 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: Optional[str] = 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: Optional[str] = None) Domain

Delete a domain name binding. Delete the domain name binding 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: Optional[str] = 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: Optional[str] = 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: Optional[str] = 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: Optional[str] = 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: Optional[str] = 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: Optional[str] = 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: Optional[str] = None) Domain

Get a domain name binding. Get a domain name binding 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: Optional[str] = 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: Optional[str] = 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: Optional[str] = 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: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListContainersRequestOrderBy] = None, name: Optional[str] = None, organization_id: Optional[str] = None, project_id: Optional[str] = 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: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListContainersRequestOrderBy] = None, name: Optional[str] = None, organization_id: Optional[str] = None, project_id: Optional[str] = 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: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListCronsRequestOrderBy] = 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: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListCronsRequestOrderBy] = 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: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListDomainsRequestOrderBy] = None) ListDomainsResponse

List all domain name bindings. List all domain name bindings 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: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListDomainsRequestOrderBy] = None) List[Domain]

List all domain name bindings. List all domain name bindings 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: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListNamespacesRequestOrderBy] = None, name: Optional[str] = None, organization_id: Optional[str] = None, project_id: Optional[str] = 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: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListNamespacesRequestOrderBy] = None, name: Optional[str] = None, organization_id: Optional[str] = None, project_id: Optional[str] = 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: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListTokensRequestOrderBy] = None, container_id: Optional[str] = None, namespace_id: Optional[str] = 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: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListTokensRequestOrderBy] = None, container_id: Optional[str] = None, namespace_id: Optional[str] = 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: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListTriggersRequestOrderBy] = None, container_id: Optional[str] = None, namespace_id: Optional[str] = None, project_id: Optional[str] = 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: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListTriggersRequestOrderBy] = None, container_id: Optional[str] = None, namespace_id: Optional[str] = None, project_id: Optional[str] = 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: Optional[str] = None, environment_variables: Optional[Dict[str, str]] = None, min_scale: Optional[int] = None, max_scale: Optional[int] = None, memory_limit: Optional[int] = None, cpu_limit: Optional[int] = None, timeout: Optional[str] = None, redeploy: Optional[bool] = None, privacy: Optional[ContainerPrivacy] = None, description: Optional[str] = None, registry_image: Optional[str] = None, max_concurrency: Optional[int] = None, protocol: Optional[ContainerProtocol] = None, port: Optional[int] = None, secret_environment_variables: Optional[List[Secret]] = None, http_option: Optional[ContainerHttpOption] = None, sandbox: Optional[ContainerSandbox] = None, local_storage_limit: Optional[int] = None, scaling_option: Optional[ContainerScalingOption] = None, health_check: Optional[ContainerHealthCheckSpec] = None) Container

Update an existing container. Update the container associated with the specified ID. :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: :param port: :param secret_environment_variables: :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.

Returns:

Container

Usage:

result = api.update_container(
    container_id="example",
)
update_cron(*, cron_id: str, region: Optional[str] = None, container_id: Optional[str] = None, schedule: Optional[str] = None, args: Optional[Dict[str, Any]] = None, name: Optional[str] = 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: Optional[str] = None, environment_variables: Optional[Dict[str, str]] = None, description: Optional[str] = None, secret_environment_variables: Optional[List[Secret]] = None, tags: Optional[List[str]] = 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: [ALPHA] Tags of the Serverless Container Namespace. :return: Namespace

Usage:

result = api.update_namespace(
    namespace_id="example",
)
update_trigger(*, trigger_id: str, region: Optional[str] = None, name: Optional[str] = None, description: Optional[str] = None, sqs_config: Optional[UpdateTriggerRequestSqsClientConfig] = 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: Optional[str] = None, options: Optional[WaitForOptions[Container, bool]] = 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: Optional[str] = None, options: Optional[WaitForOptions[Cron, bool]] = 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: Optional[str] = None, options: Optional[WaitForOptions[Domain, bool]] = None) Domain

Get a domain name binding. Get a domain name binding 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: Optional[str] = None, options: Optional[WaitForOptions[Namespace, bool]] = 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: Optional[str] = None, options: Optional[WaitForOptions[Token, bool]] = 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: Optional[str] = None, options: Optional[WaitForOptions[Trigger, bool]] = 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', timeout: 'Optional[str]', error_message: 'Optional[str]', description: 'Optional[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: 'Region', scaling_option: 'Optional[ContainerScalingOption]', health_check: 'Optional[ContainerHealthCheckSpec]', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]', ready_at: 'Optional[datetime]')

Bases: object

cpu_limit: int

CPU limit of the container in mvCPU.

created_at: Optional[datetime]

Creation date of the container.

description: Optional[str]

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: Optional[str]

Last error message of the container.

health_check: Optional[ContainerHealthCheckSpec]

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.

protocol: ContainerProtocol

Protocol the container uses.

ready_at: Optional[datetime]

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: Optional[ContainerScalingOption]

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.

timeout: Optional[str]

Processing time limit for the container.

updated_at: Optional[datetime]

Last update date of the container.

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

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: Optional[ContainerHealthCheckSpecHTTPProbe]
interval: Optional[str]

Period between health checks.

tcp: Optional[ContainerHealthCheckSpecTCPProbe]
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: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

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

Bases: str, Enum

An enumeration.

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

Bases: str, Enum

An enumeration.

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

Bases: str, Enum

An enumeration.

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

Bases: object

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

Bases: str, Enum

An enumeration.

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[Region]', environment_variables: 'Optional[Dict[str, str]]', min_scale: 'Optional[int]', max_scale: 'Optional[int]', memory_limit: 'Optional[int]', cpu_limit: 'Optional[int]', timeout: 'Optional[str]', privacy: 'Optional[ContainerPrivacy]', description: 'Optional[str]', registry_image: 'Optional[str]', max_concurrency: 'Optional[int]', protocol: 'Optional[ContainerProtocol]', port: 'Optional[int]', secret_environment_variables: 'Optional[List[Secret]]', http_option: 'Optional[ContainerHttpOption]', sandbox: 'Optional[ContainerSandbox]', local_storage_limit: 'Optional[int]', scaling_option: 'Optional[ContainerScalingOption]', health_check: 'Optional[ContainerHealthCheckSpec]')

Bases: object

cpu_limit: Optional[int]

CPU limit of the container in mvCPU.

description: Optional[str]

Description of the container.

environment_variables: Optional[Dict[str, str]]

Environment variables of the container.

health_check: Optional[ContainerHealthCheckSpec]

Health check configuration of the container.

http_option: Optional[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.

local_storage_limit: Optional[int]

Local storage limit of the container (in MB).

max_concurrency: Optional[int]

Number of maximum concurrent executions of the container.

max_scale: Optional[int]

Maximum number of instances to scale the container to.

memory_limit: Optional[int]

Memory limit of the container in MB.

min_scale: Optional[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: Optional[int]

Port the container listens on.

privacy: Optional[ContainerPrivacy]

Privacy setting of the container.

protocol: Optional[ContainerProtocol]

Protocol the container uses.

region: Optional[str]

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

registry_image: Optional[str]

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

sandbox: Optional[ContainerSandbox]

Execution environment of the container.

scaling_option: Optional[ContainerScalingOption]

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: Optional[List[Secret]]

Secret environment variables of the container.

timeout: Optional[str]

Processing time limit for the container.

class scaleway.container.v1beta1.types.CreateCronRequest(container_id: 'str', schedule: 'str', region: 'Optional[Region]', args: 'Optional[Dict[str, Any]]', name: 'Optional[str]')

Bases: object

args: Optional[Dict[str, Any]]

Arguments to pass with the cron.

container_id: str

UUID of the container to invoke by the cron.

name: Optional[str]

Name of the cron to create.

region: Optional[str]

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[Region]')

Bases: object

container_id: str

UUID of the container to assign the domain to.

hostname: str

Domain to assign.

region: Optional[str]

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

class scaleway.container.v1beta1.types.CreateNamespaceRequest(region: 'Optional[Region]', name: 'Optional[str]', environment_variables: 'Optional[Dict[str, str]]', project_id: 'Optional[str]', description: 'Optional[str]', secret_environment_variables: 'Optional[List[Secret]]', tags: 'Optional[List[str]]')

Bases: object

description: Optional[str]

Description of the namespace to create.

environment_variables: Optional[Dict[str, str]]

Environment variables of the namespace to create.

name: Optional[str]

Name of the namespace to create.

project_id: Optional[str]

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

region: Optional[str]

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

secret_environment_variables: Optional[List[Secret]]

Secret environment variables of the namespace to create.

tags: Optional[List[str]]

[ALPHA] Tags of the Serverless Container Namespace.

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

Bases: object

container_id: Optional[str]
description: Optional[str]

Description of the token.

expires_at: Optional[datetime]

Expiry date of the token.

namespace_id: Optional[str]
region: Optional[str]

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[Region]', description: 'Optional[str]', scw_sqs_config: 'Optional[CreateTriggerRequestMnqSqsClientConfig]', scw_nats_config: 'Optional[CreateTriggerRequestMnqNatsClientConfig]', sqs_config: 'Optional[CreateTriggerRequestSqsClientConfig]')

Bases: object

container_id: str

ID of the container to trigger.

description: Optional[str]

Description of the trigger.

name: str

Name of the trigger.

region: Optional[str]

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

scw_nats_config: Optional[CreateTriggerRequestMnqNatsClientConfig]
scw_sqs_config: Optional[CreateTriggerRequestMnqSqsClientConfig]
sqs_config: Optional[CreateTriggerRequestSqsClientConfig]
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]]')

Bases: object

args: Optional[Dict[str, Any]]

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: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

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[Region]')

Bases: object

container_id: str

UUID of the container to delete.

region: Optional[str]

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[Region]')

Bases: object

cron_id: str

UUID of the cron to delete.

region: Optional[str]

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[Region]')

Bases: object

domain_id: str

UUID of the domain to delete.

region: Optional[str]

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[Region]')

Bases: object

namespace_id: str

UUID of the namespace to delete.

region: Optional[str]

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[Region]')

Bases: object

region: Optional[str]

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[Region]')

Bases: object

region: Optional[str]

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[Region]')

Bases: object

container_id: str

UUID of the container to deploy.

region: Optional[str]

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]')

Bases: object

container_id: str

UUID of the container.

error_message: Optional[str]

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: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

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

Bases: object

container_id: str

UUID of the container to get.

region: Optional[str]

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[Region]')

Bases: object

cron_id: str

UUID of the cron to get.

region: Optional[str]

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[Region]')

Bases: object

domain_id: str

UUID of the domain to get.

region: Optional[str]

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[Region]')

Bases: object

namespace_id: str

UUID of the namespace to get.

region: Optional[str]

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[Region]')

Bases: object

region: Optional[str]

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[Region]')

Bases: object

region: Optional[str]

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[Region]', page: 'Optional[int]', page_size: 'Optional[int]', order_by: 'Optional[ListContainersRequestOrderBy]', name: 'Optional[str]', organization_id: 'Optional[str]', project_id: 'Optional[str]')

Bases: object

name: Optional[str]

Name of the container.

namespace_id: str

UUID of the namespace the container belongs to.

order_by: Optional[ListContainersRequestOrderBy]

Order of the containers.

organization_id: Optional[str]

UUID of the Organization the container belongs to.

page: Optional[int]

Page number.

page_size: Optional[int]

Number of containers per page.

project_id: Optional[str]

UUID of the Project the container belongs to.

region: Optional[str]

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

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

Bases: str, Enum

An enumeration.

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[Region]', page: 'Optional[int]', page_size: 'Optional[int]', order_by: 'Optional[ListCronsRequestOrderBy]')

Bases: object

container_id: str

UUID of the container invoked by the cron.

order_by: Optional[ListCronsRequestOrderBy]

Order of the crons.

page: Optional[int]

Page number.

page_size: Optional[int]

Number of crons per page.

region: Optional[str]

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

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

Bases: str, Enum

An enumeration.

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[Region]', page: 'Optional[int]', page_size: 'Optional[int]', order_by: 'Optional[ListDomainsRequestOrderBy]')

Bases: object

container_id: str

UUID of the container the domain belongs to.

order_by: Optional[ListDomainsRequestOrderBy]

Order of the domains.

page: Optional[int]

Page number.

page_size: Optional[int]

Number of domains per page.

region: Optional[str]

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

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

Bases: str, Enum

An enumeration.

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[Region]', page: 'Optional[int]', page_size: 'Optional[int]', order_by: 'Optional[ListNamespacesRequestOrderBy]', name: 'Optional[str]', organization_id: 'Optional[str]', project_id: 'Optional[str]')

Bases: object

name: Optional[str]

Name of the namespaces.

order_by: Optional[ListNamespacesRequestOrderBy]

Order of the namespaces.

organization_id: Optional[str]

UUID of the Organization the namespace belongs to.

page: Optional[int]

Page number.

page_size: Optional[int]

Number of namespaces per page.

project_id: Optional[str]

UUID of the Project the namespace belongs to.

region: Optional[str]

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

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

Bases: str, Enum

An enumeration.

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[Region]', page: 'Optional[int]', page_size: 'Optional[int]', order_by: 'Optional[ListTokensRequestOrderBy]', container_id: 'Optional[str]', namespace_id: 'Optional[str]')

Bases: object

container_id: Optional[str]

UUID of the container the token belongs to.

namespace_id: Optional[str]

UUID of the namespace the token belongs to.

order_by: Optional[ListTokensRequestOrderBy]

Order of the tokens.

page: Optional[int]

Page number.

page_size: Optional[int]

Number of tokens per page.

region: Optional[str]

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

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

Bases: str, Enum

An enumeration.

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[Region]', page: 'Optional[int]', page_size: 'Optional[int]', order_by: 'Optional[ListTriggersRequestOrderBy]', container_id: 'Optional[str]', namespace_id: 'Optional[str]', project_id: 'Optional[str]')

Bases: object

container_id: Optional[str]
namespace_id: Optional[str]
order_by: Optional[ListTriggersRequestOrderBy]

Order in which to return results.

page: Optional[int]

Page number to return.

page_size: Optional[int]

Maximum number of triggers to return per page.

project_id: Optional[str]
region: Optional[str]

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

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

Bases: str, Enum

An enumeration.

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: 'Region', tags: 'List[str]', error_message: 'Optional[str]', description: 'Optional[str]', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]')

Bases: object

created_at: Optional[datetime]

Creation date of the namespace.

description: Optional[str]

Description of the endpoint.

environment_variables: Dict[str, str]

Environment variables of the namespace.

error_message: Optional[str]

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]

[ALPHA] List of tags applied to the Serverless Container Namespace.

updated_at: Optional[datetime]

Last update date of the namespace.

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

Bases: str, Enum

An enumeration.

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]')

Bases: object

key: str
value: Optional[str]
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]', description: 'Optional[str]', expires_at: 'Optional[datetime]', container_id: 'Optional[str]', namespace_id: 'Optional[str]')

Bases: object

container_id: Optional[str]
description: Optional[str]

Description of the token.

expires_at: Optional[datetime]

Expiry date of the token.

id: str

UUID of the token.

namespace_id: Optional[str]
public_key: Optional[str]

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: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

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]', scw_sqs_config: 'Optional[TriggerMnqSqsClientConfig]', scw_nats_config: 'Optional[TriggerMnqNatsClientConfig]', sqs_config: 'Optional[TriggerSqsClientConfig]')

Bases: object

container_id: str

ID of the container to trigger.

description: str

Description of the trigger.

error_message: Optional[str]

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: Optional[TriggerMnqNatsClientConfig]
scw_sqs_config: Optional[TriggerMnqSqsClientConfig]
sqs_config: Optional[TriggerSqsClientConfig]
status: TriggerStatus

Status of the trigger.

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

Bases: str, Enum

An enumeration.

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]')

Bases: object

mnq_credential_id: Optional[str]

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]')

Bases: object

mnq_credential_id: Optional[str]

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: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

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[Region]', environment_variables: 'Optional[Dict[str, str]]', min_scale: 'Optional[int]', max_scale: 'Optional[int]', memory_limit: 'Optional[int]', cpu_limit: 'Optional[int]', timeout: 'Optional[str]', redeploy: 'Optional[bool]', privacy: 'Optional[ContainerPrivacy]', description: 'Optional[str]', registry_image: 'Optional[str]', max_concurrency: 'Optional[int]', protocol: 'Optional[ContainerProtocol]', port: 'Optional[int]', secret_environment_variables: 'Optional[List[Secret]]', http_option: 'Optional[ContainerHttpOption]', sandbox: 'Optional[ContainerSandbox]', local_storage_limit: 'Optional[int]', scaling_option: 'Optional[ContainerScalingOption]', health_check: 'Optional[ContainerHealthCheckSpec]')

Bases: object

container_id: str

UUID of the container to update.

cpu_limit: Optional[int]

CPU limit of the container in mvCPU.

description: Optional[str]

Description of the container.

environment_variables: Optional[Dict[str, str]]

Environment variables of the container.

health_check: Optional[ContainerHealthCheckSpec]

Health check configuration of the container.

http_option: Optional[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.

local_storage_limit: Optional[int]

Local storage limit of the container (in MB).

max_concurrency: Optional[int]

Number of maximum concurrent executions of the container.

max_scale: Optional[int]

Maximum number of instances to scale the container to.

memory_limit: Optional[int]

Memory limit of the container in MB.

min_scale: Optional[int]

Minimum number of instances to scale the container to.

port: Optional[int]
privacy: Optional[ContainerPrivacy]

Privacy settings of the container.

protocol: Optional[ContainerProtocol]
redeploy: Optional[bool]

Defines whether to redeploy failed containers.

region: Optional[str]

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

registry_image: Optional[str]

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

sandbox: Optional[ContainerSandbox]

Execution environment of the container.

scaling_option: Optional[ContainerScalingOption]

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: Optional[List[Secret]]
timeout: Optional[str]

Processing time limit for the container.

class scaleway.container.v1beta1.types.UpdateCronRequest(cron_id: 'str', region: 'Optional[Region]', container_id: 'Optional[str]', schedule: 'Optional[str]', args: 'Optional[Dict[str, Any]]', name: 'Optional[str]')

Bases: object

args: Optional[Dict[str, Any]]

Arguments to pass with the cron.

container_id: Optional[str]

UUID of the container invoked by the cron.

cron_id: str

UUID of the cron to update.

name: Optional[str]

Name of the cron.

region: Optional[str]

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

schedule: Optional[str]

UNIX cron schedule.

class scaleway.container.v1beta1.types.UpdateNamespaceRequest(namespace_id: 'str', region: 'Optional[Region]', environment_variables: 'Optional[Dict[str, str]]', description: 'Optional[str]', secret_environment_variables: 'Optional[List[Secret]]', tags: 'Optional[List[str]]')

Bases: object

description: Optional[str]

Description of the namespace to update.

environment_variables: Optional[Dict[str, str]]

Environment variables of the namespace to update.

namespace_id: str

UUID of the namespace to update.

region: Optional[str]

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

secret_environment_variables: Optional[List[Secret]]

Secret environment variables of the namespace to update.

tags: Optional[List[str]]

[ALPHA] Tags of the Serverless Container Namespace.

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

Bases: object

description: Optional[str]

Description of the trigger.

name: Optional[str]

Name of the trigger.

region: Optional[str]

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

sqs_config: Optional[UpdateTriggerRequestSqsClientConfig]
trigger_id: str

ID of the trigger to update.

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

Bases: object

access_key: Optional[str]
secret_key: Optional[str]

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', timeout: 'Optional[str]', error_message: 'Optional[str]', description: 'Optional[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: 'Region', scaling_option: 'Optional[ContainerScalingOption]', health_check: 'Optional[ContainerHealthCheckSpec]', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]', ready_at: 'Optional[datetime]')

Bases: object

cpu_limit: int

CPU limit of the container in mvCPU.

created_at: Optional[datetime]

Creation date of the container.

description: Optional[str]

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: Optional[str]

Last error message of the container.

health_check: Optional[ContainerHealthCheckSpec]

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.

protocol: ContainerProtocol

Protocol the container uses.

ready_at: Optional[datetime]

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: Optional[ContainerScalingOption]

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.

timeout: Optional[str]

Processing time limit for the container.

updated_at: Optional[datetime]

Last update date of the container.

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

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: Optional[ContainerHealthCheckSpecHTTPProbe]
interval: Optional[str]

Period between health checks.

tcp: Optional[ContainerHealthCheckSpecTCPProbe]
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: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

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

Bases: str, Enum

An enumeration.

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

Bases: str, Enum

An enumeration.

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

Bases: str, Enum

An enumeration.

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

Bases: object

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

Bases: str, Enum

An enumeration.

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: Optional[str] = None, environment_variables: Optional[Dict[str, str]] = None, min_scale: Optional[int] = None, max_scale: Optional[int] = None, memory_limit: Optional[int] = None, cpu_limit: Optional[int] = None, timeout: Optional[str] = None, privacy: Optional[ContainerPrivacy] = None, description: Optional[str] = None, registry_image: Optional[str] = None, max_concurrency: Optional[int] = None, protocol: Optional[ContainerProtocol] = None, port: Optional[int] = None, secret_environment_variables: Optional[List[Secret]] = None, http_option: Optional[ContainerHttpOption] = None, sandbox: Optional[ContainerSandbox] = None, local_storage_limit: Optional[int] = None, scaling_option: Optional[ContainerScalingOption] = None, health_check: Optional[ContainerHealthCheckSpec] = 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.

Returns:

Container

Usage:

result = api.create_container(
    namespace_id="example",
    name="example",
)
create_cron(*, container_id: str, schedule: str, region: Optional[str] = None, args: Optional[Dict[str, Any]] = None, name: Optional[str] = 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: Optional[str] = None) Domain

Create a domain name binding. Create a domain name binding 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: Optional[str] = None, name: Optional[str] = None, environment_variables: Optional[Dict[str, str]] = None, project_id: Optional[str] = None, description: Optional[str] = None, secret_environment_variables: Optional[List[Secret]] = None, tags: Optional[List[str]] = 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: [ALPHA] Tags of the Serverless Container Namespace. :return: Namespace

Usage:

result = api.create_namespace()
create_token(*, region: Optional[str] = None, container_id: Optional[str] = None, namespace_id: Optional[str] = None, description: Optional[str] = None, expires_at: Optional[datetime] = 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: Optional[str] = None, description: Optional[str] = None, scw_sqs_config: Optional[CreateTriggerRequestMnqSqsClientConfig] = None, scw_nats_config: Optional[CreateTriggerRequestMnqNatsClientConfig] = None, sqs_config: Optional[CreateTriggerRequestSqsClientConfig] = 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: Optional[str] = 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: Optional[str] = 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: Optional[str] = None) Domain

Delete a domain name binding. Delete the domain name binding 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: Optional[str] = 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: Optional[str] = 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: Optional[str] = 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: Optional[str] = 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: Optional[str] = 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: Optional[str] = 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: Optional[str] = None) Domain

Get a domain name binding. Get a domain name binding 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: Optional[str] = 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: Optional[str] = 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: Optional[str] = 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: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListContainersRequestOrderBy] = None, name: Optional[str] = None, organization_id: Optional[str] = None, project_id: Optional[str] = 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: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListContainersRequestOrderBy] = None, name: Optional[str] = None, organization_id: Optional[str] = None, project_id: Optional[str] = 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: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListCronsRequestOrderBy] = 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: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListCronsRequestOrderBy] = 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: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListDomainsRequestOrderBy] = None) ListDomainsResponse

List all domain name bindings. List all domain name bindings 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: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListDomainsRequestOrderBy] = None) List[Domain]

List all domain name bindings. List all domain name bindings 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: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListNamespacesRequestOrderBy] = None, name: Optional[str] = None, organization_id: Optional[str] = None, project_id: Optional[str] = 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: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListNamespacesRequestOrderBy] = None, name: Optional[str] = None, organization_id: Optional[str] = None, project_id: Optional[str] = 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: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListTokensRequestOrderBy] = None, container_id: Optional[str] = None, namespace_id: Optional[str] = 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: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListTokensRequestOrderBy] = None, container_id: Optional[str] = None, namespace_id: Optional[str] = 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: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListTriggersRequestOrderBy] = None, container_id: Optional[str] = None, namespace_id: Optional[str] = None, project_id: Optional[str] = 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: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListTriggersRequestOrderBy] = None, container_id: Optional[str] = None, namespace_id: Optional[str] = None, project_id: Optional[str] = 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: Optional[str] = None, environment_variables: Optional[Dict[str, str]] = None, min_scale: Optional[int] = None, max_scale: Optional[int] = None, memory_limit: Optional[int] = None, cpu_limit: Optional[int] = None, timeout: Optional[str] = None, redeploy: Optional[bool] = None, privacy: Optional[ContainerPrivacy] = None, description: Optional[str] = None, registry_image: Optional[str] = None, max_concurrency: Optional[int] = None, protocol: Optional[ContainerProtocol] = None, port: Optional[int] = None, secret_environment_variables: Optional[List[Secret]] = None, http_option: Optional[ContainerHttpOption] = None, sandbox: Optional[ContainerSandbox] = None, local_storage_limit: Optional[int] = None, scaling_option: Optional[ContainerScalingOption] = None, health_check: Optional[ContainerHealthCheckSpec] = None) Container

Update an existing container. Update the container associated with the specified ID. :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: :param port: :param secret_environment_variables: :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.

Returns:

Container

Usage:

result = api.update_container(
    container_id="example",
)
update_cron(*, cron_id: str, region: Optional[str] = None, container_id: Optional[str] = None, schedule: Optional[str] = None, args: Optional[Dict[str, Any]] = None, name: Optional[str] = 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: Optional[str] = None, environment_variables: Optional[Dict[str, str]] = None, description: Optional[str] = None, secret_environment_variables: Optional[List[Secret]] = None, tags: Optional[List[str]] = 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: [ALPHA] Tags of the Serverless Container Namespace. :return: Namespace

Usage:

result = api.update_namespace(
    namespace_id="example",
)
update_trigger(*, trigger_id: str, region: Optional[str] = None, name: Optional[str] = None, description: Optional[str] = None, sqs_config: Optional[UpdateTriggerRequestSqsClientConfig] = 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: Optional[str] = None, options: Optional[WaitForOptions[Container, bool]] = 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: Optional[str] = None, options: Optional[WaitForOptions[Cron, bool]] = 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: Optional[str] = None, options: Optional[WaitForOptions[Domain, bool]] = None) Domain

Get a domain name binding. Get a domain name binding 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: Optional[str] = None, options: Optional[WaitForOptions[Namespace, bool]] = 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: Optional[str] = None, options: Optional[WaitForOptions[Token, bool]] = 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: Optional[str] = None, options: Optional[WaitForOptions[Trigger, bool]] = 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[Region]', environment_variables: 'Optional[Dict[str, str]]', min_scale: 'Optional[int]', max_scale: 'Optional[int]', memory_limit: 'Optional[int]', cpu_limit: 'Optional[int]', timeout: 'Optional[str]', privacy: 'Optional[ContainerPrivacy]', description: 'Optional[str]', registry_image: 'Optional[str]', max_concurrency: 'Optional[int]', protocol: 'Optional[ContainerProtocol]', port: 'Optional[int]', secret_environment_variables: 'Optional[List[Secret]]', http_option: 'Optional[ContainerHttpOption]', sandbox: 'Optional[ContainerSandbox]', local_storage_limit: 'Optional[int]', scaling_option: 'Optional[ContainerScalingOption]', health_check: 'Optional[ContainerHealthCheckSpec]')

Bases: object

cpu_limit: Optional[int]

CPU limit of the container in mvCPU.

description: Optional[str]

Description of the container.

environment_variables: Optional[Dict[str, str]]

Environment variables of the container.

health_check: Optional[ContainerHealthCheckSpec]

Health check configuration of the container.

http_option: Optional[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.

local_storage_limit: Optional[int]

Local storage limit of the container (in MB).

max_concurrency: Optional[int]

Number of maximum concurrent executions of the container.

max_scale: Optional[int]

Maximum number of instances to scale the container to.

memory_limit: Optional[int]

Memory limit of the container in MB.

min_scale: Optional[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: Optional[int]

Port the container listens on.

privacy: Optional[ContainerPrivacy]

Privacy setting of the container.

protocol: Optional[ContainerProtocol]

Protocol the container uses.

region: Optional[str]

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

registry_image: Optional[str]

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

sandbox: Optional[ContainerSandbox]

Execution environment of the container.

scaling_option: Optional[ContainerScalingOption]

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: Optional[List[Secret]]

Secret environment variables of the container.

timeout: Optional[str]

Processing time limit for the container.

class scaleway.container.v1beta1.CreateCronRequest(container_id: 'str', schedule: 'str', region: 'Optional[Region]', args: 'Optional[Dict[str, Any]]', name: 'Optional[str]')

Bases: object

args: Optional[Dict[str, Any]]

Arguments to pass with the cron.

container_id: str

UUID of the container to invoke by the cron.

name: Optional[str]

Name of the cron to create.

region: Optional[str]

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[Region]')

Bases: object

container_id: str

UUID of the container to assign the domain to.

hostname: str

Domain to assign.

region: Optional[str]

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

class scaleway.container.v1beta1.CreateNamespaceRequest(region: 'Optional[Region]', name: 'Optional[str]', environment_variables: 'Optional[Dict[str, str]]', project_id: 'Optional[str]', description: 'Optional[str]', secret_environment_variables: 'Optional[List[Secret]]', tags: 'Optional[List[str]]')

Bases: object

description: Optional[str]

Description of the namespace to create.

environment_variables: Optional[Dict[str, str]]

Environment variables of the namespace to create.

name: Optional[str]

Name of the namespace to create.

project_id: Optional[str]

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

region: Optional[str]

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

secret_environment_variables: Optional[List[Secret]]

Secret environment variables of the namespace to create.

tags: Optional[List[str]]

[ALPHA] Tags of the Serverless Container Namespace.

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

Bases: object

container_id: Optional[str]
description: Optional[str]

Description of the token.

expires_at: Optional[datetime]

Expiry date of the token.

namespace_id: Optional[str]
region: Optional[str]

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[Region]', description: 'Optional[str]', scw_sqs_config: 'Optional[CreateTriggerRequestMnqSqsClientConfig]', scw_nats_config: 'Optional[CreateTriggerRequestMnqNatsClientConfig]', sqs_config: 'Optional[CreateTriggerRequestSqsClientConfig]')

Bases: object

container_id: str

ID of the container to trigger.

description: Optional[str]

Description of the trigger.

name: str

Name of the trigger.

region: Optional[str]

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

scw_nats_config: Optional[CreateTriggerRequestMnqNatsClientConfig]
scw_sqs_config: Optional[CreateTriggerRequestMnqSqsClientConfig]
sqs_config: Optional[CreateTriggerRequestSqsClientConfig]
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]]')

Bases: object

args: Optional[Dict[str, Any]]

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: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

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

Bases: object

container_id: str

UUID of the container to delete.

region: Optional[str]

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

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

Bases: object

cron_id: str

UUID of the cron to delete.

region: Optional[str]

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

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

Bases: object

domain_id: str

UUID of the domain to delete.

region: Optional[str]

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

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

Bases: object

namespace_id: str

UUID of the namespace to delete.

region: Optional[str]

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

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

Bases: object

region: Optional[str]

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[Region]')

Bases: object

region: Optional[str]

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[Region]')

Bases: object

container_id: str

UUID of the container to deploy.

region: Optional[str]

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]')

Bases: object

container_id: str

UUID of the container.

error_message: Optional[str]

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: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

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

Bases: object

container_id: str

UUID of the container to get.

region: Optional[str]

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

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

Bases: object

cron_id: str

UUID of the cron to get.

region: Optional[str]

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

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

Bases: object

domain_id: str

UUID of the domain to get.

region: Optional[str]

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

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

Bases: object

namespace_id: str

UUID of the namespace to get.

region: Optional[str]

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

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

Bases: object

region: Optional[str]

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[Region]')

Bases: object

region: Optional[str]

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[Region]', page: 'Optional[int]', page_size: 'Optional[int]', order_by: 'Optional[ListContainersRequestOrderBy]', name: 'Optional[str]', organization_id: 'Optional[str]', project_id: 'Optional[str]')

Bases: object

name: Optional[str]

Name of the container.

namespace_id: str

UUID of the namespace the container belongs to.

order_by: Optional[ListContainersRequestOrderBy]

Order of the containers.

organization_id: Optional[str]

UUID of the Organization the container belongs to.

page: Optional[int]

Page number.

page_size: Optional[int]

Number of containers per page.

project_id: Optional[str]

UUID of the Project the container belongs to.

region: Optional[str]

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

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

Bases: str, Enum

An enumeration.

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[Region]', page: 'Optional[int]', page_size: 'Optional[int]', order_by: 'Optional[ListCronsRequestOrderBy]')

Bases: object

container_id: str

UUID of the container invoked by the cron.

order_by: Optional[ListCronsRequestOrderBy]

Order of the crons.

page: Optional[int]

Page number.

page_size: Optional[int]

Number of crons per page.

region: Optional[str]

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

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

Bases: str, Enum

An enumeration.

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[Region]', page: 'Optional[int]', page_size: 'Optional[int]', order_by: 'Optional[ListDomainsRequestOrderBy]')

Bases: object

container_id: str

UUID of the container the domain belongs to.

order_by: Optional[ListDomainsRequestOrderBy]

Order of the domains.

page: Optional[int]

Page number.

page_size: Optional[int]

Number of domains per page.

region: Optional[str]

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

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

Bases: str, Enum

An enumeration.

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[Region]', page: 'Optional[int]', page_size: 'Optional[int]', order_by: 'Optional[ListNamespacesRequestOrderBy]', name: 'Optional[str]', organization_id: 'Optional[str]', project_id: 'Optional[str]')

Bases: object

name: Optional[str]

Name of the namespaces.

order_by: Optional[ListNamespacesRequestOrderBy]

Order of the namespaces.

organization_id: Optional[str]

UUID of the Organization the namespace belongs to.

page: Optional[int]

Page number.

page_size: Optional[int]

Number of namespaces per page.

project_id: Optional[str]

UUID of the Project the namespace belongs to.

region: Optional[str]

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

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

Bases: str, Enum

An enumeration.

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[Region]', page: 'Optional[int]', page_size: 'Optional[int]', order_by: 'Optional[ListTokensRequestOrderBy]', container_id: 'Optional[str]', namespace_id: 'Optional[str]')

Bases: object

container_id: Optional[str]

UUID of the container the token belongs to.

namespace_id: Optional[str]

UUID of the namespace the token belongs to.

order_by: Optional[ListTokensRequestOrderBy]

Order of the tokens.

page: Optional[int]

Page number.

page_size: Optional[int]

Number of tokens per page.

region: Optional[str]

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

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

Bases: str, Enum

An enumeration.

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[Region]', page: 'Optional[int]', page_size: 'Optional[int]', order_by: 'Optional[ListTriggersRequestOrderBy]', container_id: 'Optional[str]', namespace_id: 'Optional[str]', project_id: 'Optional[str]')

Bases: object

container_id: Optional[str]
namespace_id: Optional[str]
order_by: Optional[ListTriggersRequestOrderBy]

Order in which to return results.

page: Optional[int]

Page number to return.

page_size: Optional[int]

Maximum number of triggers to return per page.

project_id: Optional[str]
region: Optional[str]

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

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

Bases: str, Enum

An enumeration.

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: 'Region', tags: 'List[str]', error_message: 'Optional[str]', description: 'Optional[str]', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]')

Bases: object

created_at: Optional[datetime]

Creation date of the namespace.

description: Optional[str]

Description of the endpoint.

environment_variables: Dict[str, str]

Environment variables of the namespace.

error_message: Optional[str]

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]

[ALPHA] List of tags applied to the Serverless Container Namespace.

updated_at: Optional[datetime]

Last update date of the namespace.

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

Bases: str, Enum

An enumeration.

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

Bases: object

key: str
value: Optional[str]
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]', description: 'Optional[str]', expires_at: 'Optional[datetime]', container_id: 'Optional[str]', namespace_id: 'Optional[str]')

Bases: object

container_id: Optional[str]
description: Optional[str]

Description of the token.

expires_at: Optional[datetime]

Expiry date of the token.

id: str

UUID of the token.

namespace_id: Optional[str]
public_key: Optional[str]

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: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

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]', scw_sqs_config: 'Optional[TriggerMnqSqsClientConfig]', scw_nats_config: 'Optional[TriggerMnqNatsClientConfig]', sqs_config: 'Optional[TriggerSqsClientConfig]')

Bases: object

container_id: str

ID of the container to trigger.

description: str

Description of the trigger.

error_message: Optional[str]

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: Optional[TriggerMnqNatsClientConfig]
scw_sqs_config: Optional[TriggerMnqSqsClientConfig]
sqs_config: Optional[TriggerSqsClientConfig]
status: TriggerStatus

Status of the trigger.

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

Bases: str, Enum

An enumeration.

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]')

Bases: object

mnq_credential_id: Optional[str]

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]')

Bases: object

mnq_credential_id: Optional[str]

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: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

CREATING = 'creating'
DELETING = 'deleting'
ERROR = 'error'
PENDING = 'pending'
READY = 'ready'
UNKNOWN_STATUS = 'unknown_status'
class scaleway.container.v1beta1.UpdateContainerRequest(container_id: 'str', region: 'Optional[Region]', environment_variables: 'Optional[Dict[str, str]]', min_scale: 'Optional[int]', max_scale: 'Optional[int]', memory_limit: 'Optional[int]', cpu_limit: 'Optional[int]', timeout: 'Optional[str]', redeploy: 'Optional[bool]', privacy: 'Optional[ContainerPrivacy]', description: 'Optional[str]', registry_image: 'Optional[str]', max_concurrency: 'Optional[int]', protocol: 'Optional[ContainerProtocol]', port: 'Optional[int]', secret_environment_variables: 'Optional[List[Secret]]', http_option: 'Optional[ContainerHttpOption]', sandbox: 'Optional[ContainerSandbox]', local_storage_limit: 'Optional[int]', scaling_option: 'Optional[ContainerScalingOption]', health_check: 'Optional[ContainerHealthCheckSpec]')

Bases: object

container_id: str

UUID of the container to update.

cpu_limit: Optional[int]

CPU limit of the container in mvCPU.

description: Optional[str]

Description of the container.

environment_variables: Optional[Dict[str, str]]

Environment variables of the container.

health_check: Optional[ContainerHealthCheckSpec]

Health check configuration of the container.

http_option: Optional[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.

local_storage_limit: Optional[int]

Local storage limit of the container (in MB).

max_concurrency: Optional[int]

Number of maximum concurrent executions of the container.

max_scale: Optional[int]

Maximum number of instances to scale the container to.

memory_limit: Optional[int]

Memory limit of the container in MB.

min_scale: Optional[int]

Minimum number of instances to scale the container to.

port: Optional[int]
privacy: Optional[ContainerPrivacy]

Privacy settings of the container.

protocol: Optional[ContainerProtocol]
redeploy: Optional[bool]

Defines whether to redeploy failed containers.

region: Optional[str]

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

registry_image: Optional[str]

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

sandbox: Optional[ContainerSandbox]

Execution environment of the container.

scaling_option: Optional[ContainerScalingOption]

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: Optional[List[Secret]]
timeout: Optional[str]

Processing time limit for the container.

class scaleway.container.v1beta1.UpdateCronRequest(cron_id: 'str', region: 'Optional[Region]', container_id: 'Optional[str]', schedule: 'Optional[str]', args: 'Optional[Dict[str, Any]]', name: 'Optional[str]')

Bases: object

args: Optional[Dict[str, Any]]

Arguments to pass with the cron.

container_id: Optional[str]

UUID of the container invoked by the cron.

cron_id: str

UUID of the cron to update.

name: Optional[str]

Name of the cron.

region: Optional[str]

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

schedule: Optional[str]

UNIX cron schedule.

class scaleway.container.v1beta1.UpdateNamespaceRequest(namespace_id: 'str', region: 'Optional[Region]', environment_variables: 'Optional[Dict[str, str]]', description: 'Optional[str]', secret_environment_variables: 'Optional[List[Secret]]', tags: 'Optional[List[str]]')

Bases: object

description: Optional[str]

Description of the namespace to update.

environment_variables: Optional[Dict[str, str]]

Environment variables of the namespace to update.

namespace_id: str

UUID of the namespace to update.

region: Optional[str]

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

secret_environment_variables: Optional[List[Secret]]

Secret environment variables of the namespace to update.

tags: Optional[List[str]]

[ALPHA] Tags of the Serverless Container Namespace.

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

Bases: object

description: Optional[str]

Description of the trigger.

name: Optional[str]

Name of the trigger.

region: Optional[str]

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

sqs_config: Optional[UpdateTriggerRequestSqsClientConfig]
trigger_id: str

ID of the trigger to update.

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

Bases: object

access_key: Optional[str]
secret_key: Optional[str]