scaleway_async.function.v1beta1 package
Submodules
scaleway_async.function.v1beta1.api module
- class scaleway_async.function.v1beta1.api.FunctionV1Beta1API(client: Client, *, bypass_validation: bool = False)
Bases:
APIThis API allows you to manage your Serverless Functions.
- async create_cron(*, function_id: str, schedule: str, region: str | None = None, args: Dict[str, Any] | None = None, name: str | None = None) Cron
Create a new cron. Create a new cronjob for a function with the specified ID. :param function_id: UUID of the function to use the cron with. :param schedule: Schedule of the cron in UNIX cron format. :param region: Region to target. If none is passed will use default region from the config. :param args: Arguments to use with the cron. :param name: Name of the cron. :return:
CronUsage:
result = await api.create_cron( function_id="example", schedule="example", )
- async create_domain(*, hostname: str, function_id: str, region: str | None = None) Domain
Create a domain name binding. Create a domain name binding for the function with the specified ID. :param hostname: Hostame to create. :param function_id: UUID of the function to associate the domain with. :param region: Region to target. If none is passed will use default region from the config. :return:
DomainUsage:
result = await api.create_domain( hostname="example", function_id="example", )
- async create_function(*, namespace_id: str, region: str | None = None, name: str | None = None, environment_variables: Dict[str, str] | None = None, min_scale: int | None = None, max_scale: int | None = None, runtime: FunctionRuntime | None = None, memory_limit: int | None = None, timeout: str | None = None, handler: str | None = None, privacy: FunctionPrivacy | None = None, description: str | None = None, secret_environment_variables: List[Secret] | None = None, http_option: FunctionHttpOption | None = None, sandbox: FunctionSandbox | None = None, tags: List[str] | None = None, private_network_id: str | None = None) Function
Create a new function. Create a new function in the specified region for a specified Organization or Project. :param namespace_id: UUID of the namespace the function will be created in. :param region: Region to target. If none is passed will use default region from the config. :param name: Name of the function to create. :param environment_variables: Environment variables of the function. :param min_scale: Minimum number of instances to scale the function to. :param max_scale: Maximum number of instances to scale the function to. :param runtime: Runtime to use with the function. :param memory_limit: Memory limit of the function in MB. :param timeout: Request processing time limit for the function. :param handler: Handler to use with the function. :param privacy: Privacy setting of the function. :param description: Description of the function. :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 function.
tags – Tags of the Serverless Function.
private_network_id – When connected to a Private Network, the function can access other Scaleway resources in this Private Network.
- Returns:
Function
Usage:
result = await api.create_function( namespace_id="example", )
- async create_namespace(*, region: str | None = None, name: str | None = None, environment_variables: Dict[str, str] | None = None, project_id: str | None = None, description: str | None = None, secret_environment_variables: List[Secret] | None = None, tags: List[str] | None = None, activate_vpc_integration: bool | None = None) Namespace
Create a new namespace. Create a new namespace in a specified Organization or Project. :param region: Region to target. If none is passed will use default region from the config. :param name: :param environment_variables: Environment variables of the namespace. :param project_id: UUID of the project in which the namespace will be created. :param description: Description of the namespace. :param secret_environment_variables: Secret environment variables of the namespace. :param tags: Tags of the Serverless Function Namespace. :param activate_vpc_integration: Setting this field to true doesn’t matter anymore. It will be removed in a near future. :return:
NamespaceUsage:
result = await api.create_namespace()
- async create_token(*, region: str | None = None, function_id: str | None = None, namespace_id: str | None = None, description: str | None = None, expires_at: datetime | None = None) Token
Create a new revocable token. :param region: Region to target. If none is passed will use default region from the config. :param function_id: UUID of the function to associate the token with. One-Of (‘scope’): at most one of ‘function_id’, ‘namespace_id’ could be set. :param namespace_id: UUID of the namespace to associate the token with. One-Of (‘scope’): at most one of ‘function_id’, ‘namespace_id’ could be set. :param description: Description of the token. :param expires_at: Date on which the token expires. :return:
TokenUsage:
result = await api.create_token()
- async create_trigger(*, name: str, function_id: str, region: str | None = None, description: str | None = None, scw_sqs_config: CreateTriggerRequestMnqSqsClientConfig | None = None, scw_nats_config: CreateTriggerRequestMnqNatsClientConfig | None = None, sqs_config: CreateTriggerRequestSqsClientConfig | None = None) Trigger
Create a trigger. Create a new trigger for a specified function. :param name: Name of the trigger. :param function_id: ID of the function 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:
TriggerUsage:
result = await api.create_trigger( name="example", function_id="example", )
- async delete_cron(*, cron_id: str, region: str | None = None) Cron
Delete an existing cron. Delete the cron associated with the specified ID. :param cron_id: UUID of the cron to delete. :param region: Region to target. If none is passed will use default region from the config. :return:
CronUsage:
result = await api.delete_cron( cron_id="example", )
- async delete_domain(*, domain_id: str, region: str | None = None) Domain
Delete a domain name binding. Delete a domain name binding for the function with the specified 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:
DomainUsage:
result = await api.delete_domain( domain_id="example", )
- async delete_function(*, function_id: str, region: str | None = None) Function
Delete a function. Delete the function associated with the specified ID. :param function_id: UUID of the function to delete. :param region: Region to target. If none is passed will use default region from the config. :return:
FunctionUsage:
result = await api.delete_function( function_id="example", )
- async delete_namespace(*, namespace_id: str, region: str | None = None) Namespace
Delete an existing namespace. Delete the namespace associated with the specified ID. :param namespace_id: UUID of the namespace. :param region: Region to target. If none is passed will use default region from the config. :return:
NamespaceUsage:
result = await api.delete_namespace( namespace_id="example", )
- async delete_token(*, token_id: str, region: str | None = None) Token
Delete a token. :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:
TokenUsage:
result = await api.delete_token( token_id="example", )
- async delete_trigger(*, trigger_id: str, region: str | None = None) Trigger
Delete a trigger. Delete a trigger with a specified ID. :param trigger_id: ID of the trigger to delete. :param region: Region to target. If none is passed will use default region from the config. :return:
TriggerUsage:
result = await api.delete_trigger( trigger_id="example", )
- async deploy_function(*, function_id: str, region: str | None = None) Function
Deploy a function. Deploy a function associated with the specified ID. :param function_id: UUID of the function to deploy. :param region: Region to target. If none is passed will use default region from the config. :return:
FunctionUsage:
result = await api.deploy_function( function_id="example", )
- async get_cron(*, cron_id: str, region: str | None = None) Cron
Get a cron. Get the cron associated with the specified ID. :param cron_id: UUID of the cron to get. :param region: Region to target. If none is passed will use default region from the config. :return:
CronUsage:
result = await api.get_cron( cron_id="example", )
- async get_domain(*, domain_id: str, region: str | None = None) Domain
Get a domain name binding. Get a domain name binding for the function 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:
DomainUsage:
result = await api.get_domain( domain_id="example", )
- async get_function(*, function_id: str, region: str | None = None) Function
Get a function. Get the function associated with the specified ID. :param function_id: UUID of the function. :param region: Region to target. If none is passed will use default region from the config. :return:
FunctionUsage:
result = await api.get_function( function_id="example", )
- async get_function_download_url(*, function_id: str, region: str | None = None) DownloadURL
Get a download URL of a function. Get a download URL for a function associated with the specified ID. :param function_id: UUID of the function to get the download URL for. :param region: Region to target. If none is passed will use default region from the config. :return:
DownloadURLUsage:
result = await api.get_function_download_url( function_id="example", )
- async get_function_upload_url(*, function_id: str, content_length: int, region: str | None = None) UploadURL
Get an upload URL of a function. Get an upload URL of a function associated with the specified ID. :param function_id: UUID of the function to get the upload URL for. :param content_length: Size of the archive to upload in bytes. :param region: Region to target. If none is passed will use default region from the config. :return:
UploadURLUsage:
result = await api.get_function_upload_url( function_id="example", content_length=1, )
- async get_namespace(*, namespace_id: str, region: str | None = None) Namespace
Get a namespace. Get the namespace associated with the specified ID. :param namespace_id: UUID of the namespace. :param region: Region to target. If none is passed will use default region from the config. :return:
NamespaceUsage:
result = await api.get_namespace( namespace_id="example", )
- async get_token(*, token_id: str, region: str | None = None) Token
Get a token. :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:
TokenUsage:
result = await api.get_token( token_id="example", )
- async get_trigger(*, trigger_id: str, region: str | None = None) Trigger
Get a trigger. Get a trigger with a specified ID. :param trigger_id: ID of the trigger to get. :param region: Region to target. If none is passed will use default region from the config. :return:
TriggerUsage:
result = await api.get_trigger( trigger_id="example", )
- async list_crons(*, function_id: str, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListCronsRequestOrderBy | None = None) ListCronsResponse
List all crons. List all the cronjobs in a specified region. :param function_id: UUID of the function. :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:
ListCronsResponseUsage:
result = await api.list_crons( function_id="example", )
- async list_crons_all(*, function_id: str, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListCronsRequestOrderBy | None = None) List[Cron]
List all crons. List all the cronjobs in a specified region. :param function_id: UUID of the function. :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 = await api.list_crons_all( function_id="example", )
- async list_domains(*, function_id: str, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListDomainsRequestOrderBy | None = None) ListDomainsResponse
List all domain name bindings. List all domain name bindings in a specified region. :param function_id: UUID of the function the domain is associated with. :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:
ListDomainsResponseUsage:
result = await api.list_domains( function_id="example", )
- async list_domains_all(*, function_id: str, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListDomainsRequestOrderBy | None = None) List[Domain]
List all domain name bindings. List all domain name bindings in a specified region. :param function_id: UUID of the function the domain is associated with. :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 = await api.list_domains_all( function_id="example", )
- async list_function_runtimes(*, region: str | None = None) ListFunctionRuntimesResponse
List function runtimes. List available function runtimes. :param region: Region to target. If none is passed will use default region from the config. :return:
ListFunctionRuntimesResponseUsage:
result = await api.list_function_runtimes()
- async list_functions(*, namespace_id: str, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListFunctionsRequestOrderBy | None = None, name: str | None = None, organization_id: str | None = None, project_id: str | None = None) ListFunctionsResponse
List all your functions. :param namespace_id: UUID of the namespace the function 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 functions per page. :param order_by: Order of the functions. :param name: Name of the function. :param organization_id: UUID of the Organization the function belongs to. :param project_id: UUID of the Project the function belongs to. :return:
ListFunctionsResponseUsage:
result = await api.list_functions( namespace_id="example", )
- async list_functions_all(*, namespace_id: str, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListFunctionsRequestOrderBy | None = None, name: str | None = None, organization_id: str | None = None, project_id: str | None = None) List[Function]
List all your functions. :param namespace_id: UUID of the namespace the function 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 functions per page. :param order_by: Order of the functions. :param name: Name of the function. :param organization_id: UUID of the Organization the function belongs to. :param project_id: UUID of the Project the function belongs to. :return:
List[Function]Usage:
result = await api.list_functions_all( namespace_id="example", )
- async list_namespaces(*, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListNamespacesRequestOrderBy | None = None, name: str | None = None, organization_id: str | None = None, project_id: str | None = None) ListNamespacesResponse
List all your namespaces. List all existing namespaces in the 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 namespace. :param organization_id: UUID of the Organization the namespace belongs to. :param project_id: UUID of the Project the namespace belongs to. :return:
ListNamespacesResponseUsage:
result = await api.list_namespaces()
- async list_namespaces_all(*, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListNamespacesRequestOrderBy | None = None, name: str | None = None, organization_id: str | None = None, project_id: str | None = None) List[Namespace]
List all your namespaces. List all existing namespaces in the 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 namespace. :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 = await api.list_namespaces_all()
- async list_tokens(*, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListTokensRequestOrderBy | None = None, function_id: str | None = None, namespace_id: str | None = None) ListTokensResponse
List all tokens. :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: Sort order for the tokens. :param function_id: UUID of the function the token is associated with. :param namespace_id: UUID of the namespace the token is associated with. :return:
ListTokensResponseUsage:
result = await api.list_tokens()
- async list_tokens_all(*, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListTokensRequestOrderBy | None = None, function_id: str | None = None, namespace_id: str | None = None) List[Token]
List all tokens. :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: Sort order for the tokens. :param function_id: UUID of the function the token is associated with. :param namespace_id: UUID of the namespace the token is associated with. :return:
List[Token]Usage:
result = await api.list_tokens_all()
- async list_triggers(*, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListTriggersRequestOrderBy | None = None, function_id: str | None = None, namespace_id: str | None = None, project_id: str | None = None) ListTriggersResponse
List all triggers. List all triggers belonging to a specified Organization or Project. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number to return. :param page_size: Maximum number of triggers to return per page. :param order_by: Order in which to return results. :param function_id: ID of the function the triggers belongs to. One-Of (‘scope’): at most one of ‘function_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 ‘function_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 ‘function_id’, ‘namespace_id’, ‘project_id’ could be set. :return:
ListTriggersResponseUsage:
result = await api.list_triggers()
- async list_triggers_all(*, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListTriggersRequestOrderBy | None = None, function_id: str | None = None, namespace_id: str | None = None, project_id: str | None = None) List[Trigger]
List all triggers. List all triggers belonging to a specified Organization or Project. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number to return. :param page_size: Maximum number of triggers to return per page. :param order_by: Order in which to return results. :param function_id: ID of the function the triggers belongs to. One-Of (‘scope’): at most one of ‘function_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 ‘function_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 ‘function_id’, ‘namespace_id’, ‘project_id’ could be set. :return:
List[Trigger]Usage:
result = await api.list_triggers_all()
- async update_cron(*, cron_id: str, region: str | None = None, function_id: str | None = None, schedule: str | None = None, args: Dict[str, Any] | None = None, name: str | None = None) Cron
Update an existing cron. Update the cron associated with the specified ID. :param cron_id: UUID of the cron to update. :param region: Region to target. If none is passed will use default region from the config. :param function_id: UUID of the function to use the cron with. :param schedule: Schedule of the cron in UNIX cron format. :param args: Arguments to use with the cron. :param name: Name of the cron. :return:
CronUsage:
result = await api.update_cron( cron_id="example", )
- async update_function(*, function_id: str, region: str | None = None, environment_variables: Dict[str, str] | None = None, min_scale: int | None = None, max_scale: int | None = None, runtime: FunctionRuntime | None = None, memory_limit: int | None = None, timeout: str | None = None, redeploy: bool | None = None, handler: str | None = None, privacy: FunctionPrivacy | None = None, description: str | None = None, secret_environment_variables: List[Secret] | None = None, http_option: FunctionHttpOption | None = None, sandbox: FunctionSandbox | None = None, tags: List[str] | None = None, private_network_id: str | None = None) Function
Update an existing function. Update the function associated with the specified ID.
When updating a function, the function is automatically redeployed to apply the changes. This behavior can be changed by setting the redeploy field to false in the request. :param function_id: UUID of the function 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 function to update. :param min_scale: Minimum number of instances to scale the function to. :param max_scale: Maximum number of instances to scale the function to. :param runtime: Runtime to use with the function. :param memory_limit: Memory limit of the function in MB. :param timeout: Processing time limit for the function. :param redeploy: Redeploy failed function. :param handler: Handler to use with the function. :param privacy: Privacy setting of the function. :param description: Description of the function. :param secret_environment_variables: During an update, secret environment variables that are not specified in this field will be kept unchanged.
In order to delete a specific secret environment variable, you must reference its key, but not provide any value for it. For example, the following payload will delete the TO_DELETE secret environment variable:
- “secret_environment_variables”:[
{“key”:”TO_DELETE”}
]
} ```. :param http_option: Possible values:
redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.
enabled: Serve both HTTP and HTTPS traffic.
- Parameters:
sandbox – Execution environment of the function.
tags – Tags of the Serverless Function.
private_network_id – When connected to a Private Network, the function can access other Scaleway resources in this Private Network.
- Returns:
Function
Usage:
result = await api.update_function( function_id="example", )
- async update_namespace(*, namespace_id: str, region: str | None = None, environment_variables: Dict[str, str] | None = None, description: str | None = None, secret_environment_variables: List[Secret] | None = None, tags: List[str] | None = None) Namespace
Update an existing namespace. Update the namespace associated with the specified ID. :param namespace_id: UUID of the namespapce. :param region: Region to target. If none is passed will use default region from the config. :param environment_variables: Environment variables of the namespace. :param description: Description of the namespace. :param secret_environment_variables: Secret environment variables of the namespace. :param tags: Tags of the Serverless Function Namespace. :return:
NamespaceUsage:
result = await api.update_namespace( namespace_id="example", )
- async update_trigger(*, trigger_id: str, region: str | None = None, name: str | None = None, description: str | None = None, sqs_config: UpdateTriggerRequestSqsClientConfig | None = None) Trigger
Update a trigger. Update a trigger with a specified ID. :param trigger_id: ID of the trigger to update. :param region: Region to target. If none is passed will use default region from the config. :param name: Name of the trigger. :param description: Description of the trigger. :param sqs_config: Configuration for an AWS SQS queue. One-Of (‘config’): at most one of ‘sqs_config’ could be set. :return:
TriggerUsage:
result = await api.update_trigger( trigger_id="example", )
- async wait_for_cron(*, cron_id: str, region: str | None = None, options: WaitForOptions[Cron, bool | Awaitable[bool]] | None = None) Cron
Get a cron. Get the cron associated with the specified ID. :param cron_id: UUID of the cron to get. :param region: Region to target. If none is passed will use default region from the config. :return:
CronUsage:
result = await api.get_cron( cron_id="example", )
- async wait_for_domain(*, domain_id: str, region: str | None = None, options: WaitForOptions[Domain, bool | Awaitable[bool]] | None = None) Domain
Get a domain name binding. Get a domain name binding for the function 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:
DomainUsage:
result = await api.get_domain( domain_id="example", )
- async wait_for_function(*, function_id: str, region: str | None = None, options: WaitForOptions[Function, bool | Awaitable[bool]] | None = None) Function
Get a function. Get the function associated with the specified ID. :param function_id: UUID of the function. :param region: Region to target. If none is passed will use default region from the config. :return:
FunctionUsage:
result = await api.get_function( function_id="example", )
- async wait_for_namespace(*, namespace_id: str, region: str | None = None, options: WaitForOptions[Namespace, bool | Awaitable[bool]] | None = None) Namespace
Get a namespace. Get the namespace associated with the specified ID. :param namespace_id: UUID of the namespace. :param region: Region to target. If none is passed will use default region from the config. :return:
NamespaceUsage:
result = await api.get_namespace( namespace_id="example", )
- async wait_for_token(*, token_id: str, region: str | None = None, options: WaitForOptions[Token, bool | Awaitable[bool]] | None = None) Token
Get a token. :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:
TokenUsage:
result = await api.get_token( token_id="example", )
- async wait_for_trigger(*, trigger_id: str, region: str | None = None, options: WaitForOptions[Trigger, bool | Awaitable[bool]] | None = None) Trigger
Get a trigger. Get a trigger with a specified ID. :param trigger_id: ID of the trigger to get. :param region: Region to target. If none is passed will use default region from the config. :return:
TriggerUsage:
result = await api.get_trigger( trigger_id="example", )
scaleway_async.function.v1beta1.content module
- scaleway_async.function.v1beta1.content.CRON_TRANSIENT_STATUSES: List[CronStatus] = [<CronStatus.DELETING: 'deleting'>, <CronStatus.CREATING: 'creating'>, <CronStatus.PENDING: 'pending'>]
Lists transient statutes of the enum
CronStatus.
- scaleway_async.function.v1beta1.content.DOMAIN_TRANSIENT_STATUSES: List[DomainStatus] = [<DomainStatus.DELETING: 'deleting'>, <DomainStatus.CREATING: 'creating'>, <DomainStatus.PENDING: 'pending'>]
Lists transient statutes of the enum
DomainStatus.
- scaleway_async.function.v1beta1.content.FUNCTION_TRANSIENT_STATUSES: List[FunctionStatus] = [<FunctionStatus.DELETING: 'deleting'>, <FunctionStatus.CREATING: 'creating'>, <FunctionStatus.PENDING: 'pending'>]
Lists transient statutes of the enum
FunctionStatus.
- scaleway_async.function.v1beta1.content.NAMESPACE_TRANSIENT_STATUSES: List[NamespaceStatus] = [<NamespaceStatus.DELETING: 'deleting'>, <NamespaceStatus.CREATING: 'creating'>, <NamespaceStatus.PENDING: 'pending'>]
Lists transient statutes of the enum
NamespaceStatus.
- scaleway_async.function.v1beta1.content.TOKEN_TRANSIENT_STATUSES: List[TokenStatus] = [<TokenStatus.DELETING: 'deleting'>, <TokenStatus.CREATING: 'creating'>]
Lists transient statutes of the enum
TokenStatus.
- scaleway_async.function.v1beta1.content.TRIGGER_TRANSIENT_STATUSES: List[TriggerStatus] = [<TriggerStatus.DELETING: 'deleting'>, <TriggerStatus.CREATING: 'creating'>, <TriggerStatus.PENDING: 'pending'>]
Lists transient statutes of the enum
TriggerStatus.
scaleway_async.function.v1beta1.marshalling module
- scaleway_async.function.v1beta1.marshalling.marshal_CreateCronRequest(request: CreateCronRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.function.v1beta1.marshalling.marshal_CreateDomainRequest(request: CreateDomainRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.function.v1beta1.marshalling.marshal_CreateFunctionRequest(request: CreateFunctionRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.function.v1beta1.marshalling.marshal_CreateNamespaceRequest(request: CreateNamespaceRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.function.v1beta1.marshalling.marshal_CreateTokenRequest(request: CreateTokenRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.function.v1beta1.marshalling.marshal_CreateTriggerRequest(request: CreateTriggerRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.function.v1beta1.marshalling.marshal_CreateTriggerRequestMnqNatsClientConfig(request: CreateTriggerRequestMnqNatsClientConfig, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.function.v1beta1.marshalling.marshal_CreateTriggerRequestMnqSqsClientConfig(request: CreateTriggerRequestMnqSqsClientConfig, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.function.v1beta1.marshalling.marshal_CreateTriggerRequestSqsClientConfig(request: CreateTriggerRequestSqsClientConfig, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.function.v1beta1.marshalling.marshal_Secret(request: Secret, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.function.v1beta1.marshalling.marshal_UpdateCronRequest(request: UpdateCronRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.function.v1beta1.marshalling.marshal_UpdateFunctionRequest(request: UpdateFunctionRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.function.v1beta1.marshalling.marshal_UpdateNamespaceRequest(request: UpdateNamespaceRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.function.v1beta1.marshalling.marshal_UpdateTriggerRequest(request: UpdateTriggerRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.function.v1beta1.marshalling.marshal_UpdateTriggerRequestSqsClientConfig(request: UpdateTriggerRequestSqsClientConfig, defaults: ProfileDefaults) Dict[str, Any]
- scaleway_async.function.v1beta1.marshalling.unmarshal_DownloadURL(data: Any) DownloadURL
- scaleway_async.function.v1beta1.marshalling.unmarshal_ListCronsResponse(data: Any) ListCronsResponse
- scaleway_async.function.v1beta1.marshalling.unmarshal_ListDomainsResponse(data: Any) ListDomainsResponse
- scaleway_async.function.v1beta1.marshalling.unmarshal_ListFunctionRuntimesResponse(data: Any) ListFunctionRuntimesResponse
- scaleway_async.function.v1beta1.marshalling.unmarshal_ListFunctionsResponse(data: Any) ListFunctionsResponse
- scaleway_async.function.v1beta1.marshalling.unmarshal_ListNamespacesResponse(data: Any) ListNamespacesResponse
- scaleway_async.function.v1beta1.marshalling.unmarshal_ListTokensResponse(data: Any) ListTokensResponse
- scaleway_async.function.v1beta1.marshalling.unmarshal_ListTriggersResponse(data: Any) ListTriggersResponse
- scaleway_async.function.v1beta1.marshalling.unmarshal_SecretHashedValue(data: Any) SecretHashedValue
- scaleway_async.function.v1beta1.marshalling.unmarshal_TriggerMnqNatsClientConfig(data: Any) TriggerMnqNatsClientConfig
- scaleway_async.function.v1beta1.marshalling.unmarshal_TriggerMnqSqsClientConfig(data: Any) TriggerMnqSqsClientConfig
- scaleway_async.function.v1beta1.marshalling.unmarshal_TriggerSqsClientConfig(data: Any) TriggerSqsClientConfig
scaleway_async.function.v1beta1.types module
- class scaleway_async.function.v1beta1.types.CreateCronRequest(function_id: 'str', schedule: 'str', region: 'Optional[ScwRegion]' = None, args: 'Optional[Dict[str, Any]]' = <factory>, name: 'Optional[str]' = None)
Bases:
object- args: Dict[str, Any] | None
Arguments to use with the cron.
- function_id: str
UUID of the function to use the cron with.
- name: str | None = None
Name of the cron.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- schedule: str
Schedule of the cron in UNIX cron format.
- class scaleway_async.function.v1beta1.types.CreateDomainRequest(hostname: 'str', function_id: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- function_id: str
UUID of the function to associate the domain with.
- hostname: str
Hostame to create.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.function.v1beta1.types.CreateFunctionRequest(namespace_id: 'str', region: 'Optional[ScwRegion]' = None, name: 'Optional[str]' = None, environment_variables: 'Optional[Dict[str, str]]' = <factory>, min_scale: 'Optional[int]' = 0, max_scale: 'Optional[int]' = 0, runtime: 'Optional[FunctionRuntime]' = <FunctionRuntime.UNKNOWN_RUNTIME: 'unknown_runtime'>, memory_limit: 'Optional[int]' = 0, timeout: 'Optional[str]' = None, handler: 'Optional[str]' = None, privacy: 'Optional[FunctionPrivacy]' = <FunctionPrivacy.UNKNOWN_PRIVACY: 'unknown_privacy'>, description: 'Optional[str]' = None, secret_environment_variables: 'Optional[List[Secret]]' = <factory>, http_option: 'Optional[FunctionHttpOption]' = <FunctionHttpOption.UNKNOWN_HTTP_OPTION: 'unknown_http_option'>, sandbox: 'Optional[FunctionSandbox]' = <FunctionSandbox.UNKNOWN_SANDBOX: 'unknown_sandbox'>, tags: 'Optional[List[str]]' = <factory>, private_network_id: 'Optional[str]' = None)
Bases:
object- description: str | None = None
Description of the function.
- environment_variables: Dict[str, str] | None
Environment variables of the function.
- handler: str | None = None
Handler to use with the function.
- http_option: FunctionHttpOption | None = 'unknown_http_option'
Possible values:
redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.
enabled: Serve both HTTP and HTTPS traffic.
- max_scale: int | None = 0
Maximum number of instances to scale the function to.
- memory_limit: int | None = 0
Memory limit of the function in MB.
- min_scale: int | None = 0
Minimum number of instances to scale the function to.
- name: str | None = None
Name of the function to create.
- namespace_id: str
UUID of the namespace the function will be created in.
- privacy: FunctionPrivacy | None = 'unknown_privacy'
Privacy setting of the function.
- private_network_id: str | None = None
When connected to a Private Network, the function can access other Scaleway resources in this Private Network.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- runtime: FunctionRuntime | None = 'unknown_runtime'
Runtime to use with the function.
- sandbox: FunctionSandbox | None = 'unknown_sandbox'
Execution environment of the function.
- tags: List[str] | None
Tags of the Serverless Function.
- timeout: str | None = None
Request processing time limit for the function.
- class scaleway_async.function.v1beta1.types.CreateNamespaceRequest(region: 'Optional[ScwRegion]' = None, name: 'Optional[str]' = None, environment_variables: 'Optional[Dict[str, str]]' = <factory>, project_id: 'Optional[str]' = None, description: 'Optional[str]' = None, secret_environment_variables: 'Optional[List[Secret]]' = <factory>, tags: 'Optional[List[str]]' = <factory>, activate_vpc_integration: 'Optional[bool]' = False)
Bases:
object- activate_vpc_integration: bool | None = False
Setting this field to true doesn’t matter anymore. It will be removed in a near future.
- description: str | None = None
Description of the namespace.
- environment_variables: Dict[str, str] | None
Environment variables of the namespace.
- name: str | None = None
- project_id: str | None = None
UUID of the project in which the namespace will be created.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- tags: List[str] | None
Tags of the Serverless Function Namespace.
- class scaleway_async.function.v1beta1.types.CreateTokenRequest(region: 'Optional[ScwRegion]' = None, description: 'Optional[str]' = None, expires_at: 'Optional[datetime]' = None, function_id: 'Optional[str]' = None, namespace_id: 'Optional[str]' = None)
Bases:
object- description: str | None = None
Description of the token.
- expires_at: datetime | None = None
Date on which the token expires.
- function_id: str | None = None
- namespace_id: str | None = None
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.function.v1beta1.types.CreateTriggerRequest(name: 'str', function_id: 'str', region: 'Optional[ScwRegion]' = None, description: 'Optional[str]' = None, scw_sqs_config: 'Optional[CreateTriggerRequestMnqSqsClientConfig]' = None, scw_nats_config: 'Optional[CreateTriggerRequestMnqNatsClientConfig]' = None, sqs_config: 'Optional[CreateTriggerRequestSqsClientConfig]' = None)
Bases:
object- description: str | None = None
Description of the trigger.
- function_id: str
ID of the function to trigger.
- name: str
Name of the trigger.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- scw_nats_config: CreateTriggerRequestMnqNatsClientConfig | None = None
- scw_sqs_config: CreateTriggerRequestMnqSqsClientConfig | None = None
- sqs_config: CreateTriggerRequestSqsClientConfig | None = None
- class scaleway_async.function.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_async.function.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_async.function.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_async.function.v1beta1.types.Cron(id: 'str', function_id: 'str', schedule: 'str', status: 'CronStatus', name: 'str', args: 'Optional[Dict[str, Any]]' = <factory>)
Bases:
object- args: Dict[str, Any] | None
Arguments to pass with the cron.
- function_id: str
UUID of the function the cron applies to.
- id: str
UUID of the cron.
- name: str
Name of the cron.
- schedule: str
Schedule of the cron.
- status: CronStatus
Status of the cron.
- class scaleway_async.function.v1beta1.types.CronStatus(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- CREATING = 'creating'
- DELETING = 'deleting'
- ERROR = 'error'
- LOCKED = 'locked'
- PENDING = 'pending'
- READY = 'ready'
- UNKNOWN = 'unknown'
- class scaleway_async.function.v1beta1.types.DeleteCronRequest(cron_id: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- cron_id: str
UUID of the cron to delete.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.function.v1beta1.types.DeleteDomainRequest(domain_id: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- domain_id: str
UUID of the domain to delete.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.function.v1beta1.types.DeleteFunctionRequest(function_id: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- function_id: str
UUID of the function to delete.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.function.v1beta1.types.DeleteNamespaceRequest(namespace_id: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- namespace_id: str
UUID of the namespace.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.function.v1beta1.types.DeleteTokenRequest(token_id: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- region: str | None = None
Region to target. If none is passed will use default region from the config.
- token_id: str
UUID of the token to delete.
- class scaleway_async.function.v1beta1.types.DeleteTriggerRequest(trigger_id: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- region: str | None = None
Region to target. If none is passed will use default region from the config.
- trigger_id: str
ID of the trigger to delete.
- class scaleway_async.function.v1beta1.types.DeployFunctionRequest(function_id: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- function_id: str
UUID of the function to deploy.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.function.v1beta1.types.Domain(id: 'str', hostname: 'str', function_id: 'str', url: 'str', status: 'DomainStatus', error_message: 'Optional[str]' = None)
Bases:
object- error_message: str | None = None
Error message if the domain is in “error” state.
- function_id: str
UUID of the function the domain is associated with.
- hostname: str
Hostname associated with the function.
- id: str
UUID of the domain.
- status: DomainStatus
State of the doamin.
- url: str
URL of the function.
- class scaleway_async.function.v1beta1.types.DomainStatus(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- CREATING = 'creating'
- DELETING = 'deleting'
- ERROR = 'error'
- PENDING = 'pending'
- READY = 'ready'
- UNKNOWN = 'unknown'
- class scaleway_async.function.v1beta1.types.DownloadURL(url: 'str', headers: 'Dict[str, List[str]]')
Bases:
object- headers: Dict[str, List[str]]
- url: str
- class scaleway_async.function.v1beta1.types.Function(id: 'str', name: 'str', namespace_id: 'str', status: 'FunctionStatus', environment_variables: 'Dict[str, str]', min_scale: 'int', max_scale: 'int', runtime: 'FunctionRuntime', memory_limit: 'int', cpu_limit: 'int', handler: 'str', privacy: 'FunctionPrivacy', domain_name: 'str', secret_environment_variables: 'List[SecretHashedValue]', region: 'ScwRegion', http_option: 'FunctionHttpOption', runtime_message: 'str', sandbox: 'FunctionSandbox', tags: 'List[str]', timeout: 'Optional[str]' = None, error_message: 'Optional[str]' = None, build_message: 'Optional[str]' = None, description: 'Optional[str]' = None, created_at: 'Optional[datetime]' = None, updated_at: 'Optional[datetime]' = None, ready_at: 'Optional[datetime]' = None, private_network_id: 'Optional[str]' = None)
Bases:
object- build_message: str | None = None
Description of the current build step.
- cpu_limit: int
CPU limit of the function.
- created_at: datetime | None = None
Creation date of the function.
- description: str | None = None
Description of the function.
- domain_name: str
Domain name associated with the function.
- environment_variables: Dict[str, str]
Environment variables of the function.
- error_message: str | None = None
Error message if the function is in “error” state.
- handler: str
Handler to use for the function.
- http_option: FunctionHttpOption
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 function.
- max_scale: int
Maximum number of instances to scale the function to.
- memory_limit: int
Memory limit of the function in MB.
- min_scale: int
Minimum number of instances to scale the function to.
- name: str
Name of the function.
- namespace_id: str
UUID of the namespace the function belongs to.
- privacy: FunctionPrivacy
Privacy setting of the function.
- private_network_id: str | None = None
When connected to a Private Network, the function can access other Scaleway resources in this Private Network.
- ready_at: datetime | None = None
Last date when the function was successfully deployed and set to ready.
- region: str
Region in which the function is deployed.
- runtime: FunctionRuntime
Runtime of the function.
- runtime_message: str
- sandbox: FunctionSandbox
Execution environment of the function.
- secret_environment_variables: List[SecretHashedValue]
Secret environment variables of the function.
- status: FunctionStatus
Status of the function.
- tags: List[str]
List of tags applied to the Serverless Function.
- timeout: str | None = None
Request processing time limit for the function.
- updated_at: datetime | None = None
Last update date of the function.
- class scaleway_async.function.v1beta1.types.FunctionHttpOption(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- ENABLED = 'enabled'
- REDIRECTED = 'redirected'
- UNKNOWN_HTTP_OPTION = 'unknown_http_option'
- class scaleway_async.function.v1beta1.types.FunctionPrivacy(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- PRIVATE = 'private'
- PUBLIC = 'public'
- UNKNOWN_PRIVACY = 'unknown_privacy'
- class scaleway_async.function.v1beta1.types.FunctionRuntime(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- GO113 = 'go113'
- GO117 = 'go117'
- GO118 = 'go118'
- GO119 = 'go119'
- GO120 = 'go120'
- GO121 = 'go121'
- GO122 = 'go122'
- GO123 = 'go123'
- GO124 = 'go124'
- GOLANG = 'golang'
- NODE10 = 'node10'
- NODE14 = 'node14'
- NODE16 = 'node16'
- NODE17 = 'node17'
- NODE18 = 'node18'
- NODE19 = 'node19'
- NODE20 = 'node20'
- NODE22 = 'node22'
- NODE8 = 'node8'
- PHP82 = 'php82'
- PHP83 = 'php83'
- PHP84 = 'php84'
- PYTHON = 'python'
- PYTHON3 = 'python3'
- PYTHON310 = 'python310'
- PYTHON311 = 'python311'
- PYTHON312 = 'python312'
- PYTHON313 = 'python313'
- PYTHON37 = 'python37'
- PYTHON38 = 'python38'
- PYTHON39 = 'python39'
- RUST165 = 'rust165'
- RUST179 = 'rust179'
- RUST185 = 'rust185'
- UNKNOWN_RUNTIME = 'unknown_runtime'
- class scaleway_async.function.v1beta1.types.FunctionSandbox(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- UNKNOWN_SANDBOX = 'unknown_sandbox'
- V1 = 'v1'
- V2 = 'v2'
- class scaleway_async.function.v1beta1.types.FunctionStatus(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- CREATED = 'created'
- CREATING = 'creating'
- DELETING = 'deleting'
- ERROR = 'error'
- LOCKED = 'locked'
- PENDING = 'pending'
- READY = 'ready'
- UNKNOWN = 'unknown'
- class scaleway_async.function.v1beta1.types.GetCronRequest(cron_id: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- cron_id: str
UUID of the cron to get.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.function.v1beta1.types.GetDomainRequest(domain_id: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- domain_id: str
UUID of the domain to get.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.function.v1beta1.types.GetFunctionDownloadURLRequest(function_id: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- function_id: str
UUID of the function to get the download URL for.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.function.v1beta1.types.GetFunctionRequest(function_id: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- function_id: str
UUID of the function.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.function.v1beta1.types.GetFunctionUploadURLRequest(function_id: 'str', content_length: 'int', region: 'Optional[ScwRegion]' = None)
Bases:
object- content_length: int
Size of the archive to upload in bytes.
- function_id: str
UUID of the function to get the upload URL for.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.function.v1beta1.types.GetNamespaceRequest(namespace_id: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- namespace_id: str
UUID of the namespace.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.function.v1beta1.types.GetTokenRequest(token_id: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- region: str | None = None
Region to target. If none is passed will use default region from the config.
- token_id: str
UUID of the token to get.
- class scaleway_async.function.v1beta1.types.GetTriggerRequest(trigger_id: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- region: str | None = None
Region to target. If none is passed will use default region from the config.
- trigger_id: str
ID of the trigger to get.
- class scaleway_async.function.v1beta1.types.ListCronsRequest(function_id: 'str', region: 'Optional[ScwRegion]' = None, page: 'Optional[int]' = 0, page_size: 'Optional[int]' = 0, order_by: 'Optional[ListCronsRequestOrderBy]' = <ListCronsRequestOrderBy.CREATED_AT_ASC: 'created_at_asc'>)
Bases:
object- function_id: str
UUID of the function.
- order_by: ListCronsRequestOrderBy | None = 'created_at_asc'
Order of the crons.
- page: int | None = 0
Page number.
- page_size: int | None = 0
Number of crons per page.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.function.v1beta1.types.ListCronsRequestOrderBy(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- class scaleway_async.function.v1beta1.types.ListCronsResponse(crons: 'List[Cron]', total_count: 'int')
Bases:
object- total_count: int
Total number of crons.
- class scaleway_async.function.v1beta1.types.ListDomainsRequest(function_id: 'str', region: 'Optional[ScwRegion]' = None, page: 'Optional[int]' = 0, page_size: 'Optional[int]' = 0, order_by: 'Optional[ListDomainsRequestOrderBy]' = <ListDomainsRequestOrderBy.CREATED_AT_ASC: 'created_at_asc'>)
Bases:
object- function_id: str
UUID of the function the domain is associated with.
- order_by: ListDomainsRequestOrderBy | None = 'created_at_asc'
Order of the domains.
- page: int | None = 0
Page number.
- page_size: int | None = 0
Number of domains per page.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.function.v1beta1.types.ListDomainsRequestOrderBy(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- HOSTNAME_ASC = 'hostname_asc'
- HOSTNAME_DESC = 'hostname_desc'
- class scaleway_async.function.v1beta1.types.ListDomainsResponse(domains: 'List[Domain]', total_count: 'int')
Bases:
object- total_count: int
Total number of domains.
- class scaleway_async.function.v1beta1.types.ListFunctionRuntimesRequest(region: 'Optional[ScwRegion]' = None)
Bases:
object- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.function.v1beta1.types.ListFunctionRuntimesResponse(runtimes: 'List[Runtime]', total_count: 'int')
Bases:
object- total_count: int
Total number of runtimes.
- class scaleway_async.function.v1beta1.types.ListFunctionsRequest(namespace_id: 'str', region: 'Optional[ScwRegion]' = None, page: 'Optional[int]' = 0, page_size: 'Optional[int]' = 0, order_by: 'Optional[ListFunctionsRequestOrderBy]' = <ListFunctionsRequestOrderBy.CREATED_AT_ASC: 'created_at_asc'>, name: 'Optional[str]' = None, organization_id: 'Optional[str]' = None, project_id: 'Optional[str]' = None)
Bases:
object- name: str | None = None
Name of the function.
- namespace_id: str
UUID of the namespace the function belongs to.
- order_by: ListFunctionsRequestOrderBy | None = 'created_at_asc'
Order of the functions.
- organization_id: str | None = None
UUID of the Organization the function belongs to.
- page: int | None = 0
Page number.
- page_size: int | None = 0
Number of functions per page.
- project_id: str | None = None
UUID of the Project the function belongs to.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.function.v1beta1.types.ListFunctionsRequestOrderBy(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- NAME_ASC = 'name_asc'
- NAME_DESC = 'name_desc'
- class scaleway_async.function.v1beta1.types.ListFunctionsResponse(functions: 'List[Function]', total_count: 'int')
Bases:
object- total_count: int
Total number of functions.
- class scaleway_async.function.v1beta1.types.ListNamespacesRequest(region: 'Optional[ScwRegion]' = None, page: 'Optional[int]' = 0, page_size: 'Optional[int]' = 0, order_by: 'Optional[ListNamespacesRequestOrderBy]' = <ListNamespacesRequestOrderBy.CREATED_AT_ASC: 'created_at_asc'>, name: 'Optional[str]' = None, organization_id: 'Optional[str]' = None, project_id: 'Optional[str]' = None)
Bases:
object- name: str | None = None
Name of the namespace.
- order_by: ListNamespacesRequestOrderBy | None = 'created_at_asc'
Order of the namespaces.
- organization_id: str | None = None
UUID of the Organization the namespace belongs to.
- page: int | None = 0
Page number.
- page_size: int | None = 0
Number of namespaces per page.
- project_id: str | None = None
UUID of the Project the namespace belongs to.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.function.v1beta1.types.ListNamespacesRequestOrderBy(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- NAME_ASC = 'name_asc'
- NAME_DESC = 'name_desc'
- class scaleway_async.function.v1beta1.types.ListNamespacesResponse(namespaces: 'List[Namespace]', total_count: 'int')
Bases:
object- total_count: int
Total number of namespaces.
- class scaleway_async.function.v1beta1.types.ListTokensRequest(region: 'Optional[ScwRegion]' = None, page: 'Optional[int]' = 0, page_size: 'Optional[int]' = 0, order_by: 'Optional[ListTokensRequestOrderBy]' = <ListTokensRequestOrderBy.CREATED_AT_ASC: 'created_at_asc'>, function_id: 'Optional[str]' = None, namespace_id: 'Optional[str]' = None)
Bases:
object- function_id: str | None = None
UUID of the function the token is associated with.
- namespace_id: str | None = None
UUID of the namespace the token is associated with.
- order_by: ListTokensRequestOrderBy | None = 'created_at_asc'
Sort order for the tokens.
- page: int | None = 0
Page number.
- page_size: int | None = 0
Number of tokens per page.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.function.v1beta1.types.ListTokensRequestOrderBy(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- class scaleway_async.function.v1beta1.types.ListTokensResponse(tokens: 'List[Token]', total_count: 'int')
Bases:
object- total_count: int
- class scaleway_async.function.v1beta1.types.ListTriggersRequest(region: 'Optional[ScwRegion]' = None, page: 'Optional[int]' = 0, page_size: 'Optional[int]' = 0, order_by: 'Optional[ListTriggersRequestOrderBy]' = <ListTriggersRequestOrderBy.CREATED_AT_ASC: 'created_at_asc'>, function_id: 'Optional[str]' = None, namespace_id: 'Optional[str]' = None, project_id: 'Optional[str]' = None)
Bases:
object- function_id: str | None = None
- namespace_id: str | None = None
- order_by: ListTriggersRequestOrderBy | None = 'created_at_asc'
Order in which to return results.
- page: int | None = 0
Page number to return.
- page_size: int | None = 0
Maximum number of triggers to return per page.
- project_id: str | None = None
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.function.v1beta1.types.ListTriggersRequestOrderBy(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- class scaleway_async.function.v1beta1.types.ListTriggersResponse(total_count: 'int', triggers: 'List[Trigger]')
Bases:
object- total_count: int
Total count of existing triggers (matching any filters specified).
- class scaleway_async.function.v1beta1.types.Namespace(id: 'str', name: 'str', environment_variables: 'Dict[str, str]', organization_id: 'str', project_id: 'str', status: 'NamespaceStatus', registry_namespace_id: 'str', registry_endpoint: 'str', secret_environment_variables: 'List[SecretHashedValue]', region: 'ScwRegion', tags: 'List[str]', error_message: 'Optional[str]' = None, description: 'Optional[str]' = None, created_at: 'Optional[datetime]' = None, updated_at: 'Optional[datetime]' = None, vpc_integration_activated: 'Optional[bool]' = False)
Bases:
object- created_at: datetime | None = None
Creation date of the namespace.
- description: str | None = None
Description of the namespace.
- environment_variables: Dict[str, str]
Environment variables of the namespace.
- error_message: str | None = None
Error message if the namespace is in “error” state.
- 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 is located.
- registry_endpoint: str
Registry endpoint of the namespace.
- registry_namespace_id: str
UUID of the registry namespace.
- secret_environment_variables: List[SecretHashedValue]
Secret environment variables of the namespace.
- status: NamespaceStatus
Status of the namespace.
- tags: List[str]
List of tags applied to the Serverless Function Namespace.
- updated_at: datetime | None = None
Last update date of the namespace.
- vpc_integration_activated: bool | None = False
The value of this field doesn’t matter anymore, and will be removed in a near future.
- class scaleway_async.function.v1beta1.types.NamespaceStatus(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- CREATING = 'creating'
- DELETING = 'deleting'
- ERROR = 'error'
- LOCKED = 'locked'
- PENDING = 'pending'
- READY = 'ready'
- UNKNOWN = 'unknown'
- class scaleway_async.function.v1beta1.types.Runtime(name: 'str', language: 'str', version: 'str', default_handler: 'str', code_sample: 'str', status: 'RuntimeStatus', status_message: 'str', extension: 'str', implementation: 'str', logo_url: 'str')
Bases:
object- code_sample: str
- default_handler: str
- extension: str
- implementation: str
- language: str
- logo_url: str
- name: str
- status: RuntimeStatus
- status_message: str
- version: str
- class scaleway_async.function.v1beta1.types.RuntimeStatus(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- AVAILABLE = 'available'
- BETA = 'beta'
- DEPRECATED = 'deprecated'
- END_OF_LIFE = 'end_of_life'
- END_OF_SUPPORT = 'end_of_support'
- UNKNOWN_STATUS = 'unknown_status'
- class scaleway_async.function.v1beta1.types.Secret(key: 'str', value: 'Optional[str]' = None)
Bases:
object- key: str
- value: str | None = None
- class scaleway_async.function.v1beta1.types.SecretHashedValue(key: 'str', hashed_value: 'str')
Bases:
object- hashed_value: str
- key: str
- class scaleway_async.function.v1beta1.types.Token(id: 'str', token: 'str', status: 'TokenStatus', public_key: 'Optional[str]' = None, description: 'Optional[str]' = None, expires_at: 'Optional[datetime]' = None, function_id: 'Optional[str]' = None, namespace_id: 'Optional[str]' = None)
Bases:
object- description: str | None = None
Description of the token.
- expires_at: datetime | None = None
Date on which the token expires.
- function_id: str | None = None
- id: str
UUID of the token.
- namespace_id: str | None = None
- public_key: str | None = None
Public key of the token.
- status: TokenStatus
Status of the token.
- token: str
String of the token.
- class scaleway_async.function.v1beta1.types.TokenStatus(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- CREATING = 'creating'
- DELETING = 'deleting'
- ERROR = 'error'
- READY = 'ready'
- UNKNOWN = 'unknown'
- class scaleway_async.function.v1beta1.types.Trigger(id: 'str', name: 'str', description: 'str', function_id: 'str', input_type: 'TriggerInputType', status: 'TriggerStatus', error_message: 'Optional[str]' = None, scw_sqs_config: 'Optional[TriggerMnqSqsClientConfig]' = None, scw_nats_config: 'Optional[TriggerMnqNatsClientConfig]' = None, sqs_config: 'Optional[TriggerSqsClientConfig]' = None)
Bases:
object- description: str
Description of the trigger.
- error_message: str | None = None
Error message of the trigger.
- function_id: str
ID of the function to trigger.
- id: str
ID of the trigger.
- input_type: TriggerInputType
Type of the input.
- name: str
Name of the trigger.
- scw_nats_config: TriggerMnqNatsClientConfig | None = None
- scw_sqs_config: TriggerMnqSqsClientConfig | None = None
- sqs_config: TriggerSqsClientConfig | None = None
- status: TriggerStatus
Status of the trigger.
- class scaleway_async.function.v1beta1.types.TriggerInputType(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- NATS = 'nats'
- SCW_NATS = 'scw_nats'
- SCW_SQS = 'scw_sqs'
- SQS = 'sqs'
- UNKNOWN_INPUT_TYPE = 'unknown_input_type'
- class scaleway_async.function.v1beta1.types.TriggerMnqNatsClientConfig(subject: 'str', mnq_nats_account_id: 'str', mnq_project_id: 'str', mnq_region: 'str', mnq_credential_id: 'Optional[str]' = None)
Bases:
object- mnq_credential_id: str | None = None
ID of the Messaging and Queuing credentials used to subscribe to the NATS subject.
- mnq_nats_account_id: str
ID of the Messaging and Queuing NATS account.
- mnq_project_id: str
ID of the Messaging and Queuing project.
- mnq_region: str
Currently, only the fr-par and nl-ams regions are available.
- subject: str
Name of the NATS subject the trigger listens to.
- class scaleway_async.function.v1beta1.types.TriggerMnqSqsClientConfig(queue: 'str', mnq_project_id: 'str', mnq_region: 'str', mnq_credential_id: 'Optional[str]' = None)
Bases:
object- mnq_credential_id: str | None = None
ID of the Messaging and Queuing credentials used to read from the SQS queue.
- mnq_project_id: str
ID of the Messaging and Queuing project.
- mnq_region: str
Currently, only the fr-par and nl-ams regions are available.
- queue: str
Name of the SQS queue the trigger listens to.
- class scaleway_async.function.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_async.function.v1beta1.types.TriggerStatus(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- CREATING = 'creating'
- DELETING = 'deleting'
- ERROR = 'error'
- PENDING = 'pending'
- READY = 'ready'
- UNKNOWN_STATUS = 'unknown_status'
- class scaleway_async.function.v1beta1.types.UpdateCronRequest(cron_id: 'str', region: 'Optional[ScwRegion]' = None, function_id: 'Optional[str]' = None, schedule: 'Optional[str]' = None, args: 'Optional[Dict[str, Any]]' = <factory>, name: 'Optional[str]' = None)
Bases:
object- args: Dict[str, Any] | None
Arguments to use with the cron.
- cron_id: str
UUID of the cron to update.
- function_id: str | None = None
UUID of the function to use the cron with.
- name: str | None = None
Name of the cron.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- schedule: str | None = None
Schedule of the cron in UNIX cron format.
- class scaleway_async.function.v1beta1.types.UpdateFunctionRequest(function_id: 'str', region: 'Optional[ScwRegion]' = None, environment_variables: 'Optional[Dict[str, str]]' = <factory>, min_scale: 'Optional[int]' = 0, max_scale: 'Optional[int]' = 0, runtime: 'Optional[FunctionRuntime]' = <FunctionRuntime.UNKNOWN_RUNTIME: 'unknown_runtime'>, memory_limit: 'Optional[int]' = 0, timeout: 'Optional[str]' = None, redeploy: 'Optional[bool]' = False, handler: 'Optional[str]' = None, privacy: 'Optional[FunctionPrivacy]' = <FunctionPrivacy.UNKNOWN_PRIVACY: 'unknown_privacy'>, description: 'Optional[str]' = None, secret_environment_variables: 'Optional[List[Secret]]' = <factory>, http_option: 'Optional[FunctionHttpOption]' = <FunctionHttpOption.UNKNOWN_HTTP_OPTION: 'unknown_http_option'>, sandbox: 'Optional[FunctionSandbox]' = <FunctionSandbox.UNKNOWN_SANDBOX: 'unknown_sandbox'>, tags: 'Optional[List[str]]' = <factory>, private_network_id: 'Optional[str]' = None)
Bases:
object- description: str | None = None
Description of the function.
- environment_variables: Dict[str, str] | None
Environment variables of the function to update.
- function_id: str
UUID of the function to update.
- handler: str | None = None
Handler to use with the function.
- http_option: FunctionHttpOption | None = 'unknown_http_option'
Possible values:
redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.
enabled: Serve both HTTP and HTTPS traffic.
- max_scale: int | None = 0
Maximum number of instances to scale the function to.
- memory_limit: int | None = 0
Memory limit of the function in MB.
- min_scale: int | None = 0
Minimum number of instances to scale the function to.
- privacy: FunctionPrivacy | None = 'unknown_privacy'
Privacy setting of the function.
- private_network_id: str | None = None
When connected to a Private Network, the function can access other Scaleway resources in this Private Network.
- redeploy: bool | None = False
Redeploy failed function.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- runtime: FunctionRuntime | None = 'unknown_runtime'
Runtime to use with the function.
- sandbox: FunctionSandbox | None = 'unknown_sandbox'
Execution environment of the function.
- secret_environment_variables: List[Secret] | None
During an update, secret environment variables that are not specified in this field will be kept unchanged.
In order to delete a specific secret environment variable, you must reference its key, but not provide any value for it. For example, the following payload will delete the TO_DELETE secret environment variable:
- “secret_environment_variables”:[
{“key”:”TO_DELETE”}
]
- tags: List[str] | None
Tags of the Serverless Function.
- timeout: str | None = None
Processing time limit for the function.
- class scaleway_async.function.v1beta1.types.UpdateNamespaceRequest(namespace_id: 'str', region: 'Optional[ScwRegion]' = None, environment_variables: 'Optional[Dict[str, str]]' = <factory>, description: 'Optional[str]' = None, secret_environment_variables: 'Optional[List[Secret]]' = <factory>, tags: 'Optional[List[str]]' = <factory>)
Bases:
object- description: str | None = None
Description of the namespace.
- environment_variables: Dict[str, str] | None
Environment variables of the namespace.
- namespace_id: str
UUID of the namespapce.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- tags: List[str] | None
Tags of the Serverless Function Namespace.
- class scaleway_async.function.v1beta1.types.UpdateTriggerRequest(trigger_id: 'str', region: 'Optional[ScwRegion]' = None, name: 'Optional[str]' = None, description: 'Optional[str]' = None, sqs_config: 'Optional[UpdateTriggerRequestSqsClientConfig]' = None)
Bases:
object- description: str | None = None
Description of the trigger.
- name: str | None = None
Name of the trigger.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- sqs_config: UpdateTriggerRequestSqsClientConfig | None = None
- trigger_id: str
ID of the trigger to update.
Module contents
- class scaleway_async.function.v1beta1.CreateCronRequest(function_id: 'str', schedule: 'str', region: 'Optional[ScwRegion]' = None, args: 'Optional[Dict[str, Any]]' = <factory>, name: 'Optional[str]' = None)
Bases:
object- args: Dict[str, Any] | None
Arguments to use with the cron.
- function_id: str
UUID of the function to use the cron with.
- name: str | None = None
Name of the cron.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- schedule: str
Schedule of the cron in UNIX cron format.
- class scaleway_async.function.v1beta1.CreateDomainRequest(hostname: 'str', function_id: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- function_id: str
UUID of the function to associate the domain with.
- hostname: str
Hostame to create.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.function.v1beta1.CreateFunctionRequest(namespace_id: 'str', region: 'Optional[ScwRegion]' = None, name: 'Optional[str]' = None, environment_variables: 'Optional[Dict[str, str]]' = <factory>, min_scale: 'Optional[int]' = 0, max_scale: 'Optional[int]' = 0, runtime: 'Optional[FunctionRuntime]' = <FunctionRuntime.UNKNOWN_RUNTIME: 'unknown_runtime'>, memory_limit: 'Optional[int]' = 0, timeout: 'Optional[str]' = None, handler: 'Optional[str]' = None, privacy: 'Optional[FunctionPrivacy]' = <FunctionPrivacy.UNKNOWN_PRIVACY: 'unknown_privacy'>, description: 'Optional[str]' = None, secret_environment_variables: 'Optional[List[Secret]]' = <factory>, http_option: 'Optional[FunctionHttpOption]' = <FunctionHttpOption.UNKNOWN_HTTP_OPTION: 'unknown_http_option'>, sandbox: 'Optional[FunctionSandbox]' = <FunctionSandbox.UNKNOWN_SANDBOX: 'unknown_sandbox'>, tags: 'Optional[List[str]]' = <factory>, private_network_id: 'Optional[str]' = None)
Bases:
object- description: str | None = None
Description of the function.
- environment_variables: Dict[str, str] | None
Environment variables of the function.
- handler: str | None = None
Handler to use with the function.
- http_option: FunctionHttpOption | None = 'unknown_http_option'
Possible values:
redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.
enabled: Serve both HTTP and HTTPS traffic.
- max_scale: int | None = 0
Maximum number of instances to scale the function to.
- memory_limit: int | None = 0
Memory limit of the function in MB.
- min_scale: int | None = 0
Minimum number of instances to scale the function to.
- name: str | None = None
Name of the function to create.
- namespace_id: str
UUID of the namespace the function will be created in.
- privacy: FunctionPrivacy | None = 'unknown_privacy'
Privacy setting of the function.
- private_network_id: str | None = None
When connected to a Private Network, the function can access other Scaleway resources in this Private Network.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- runtime: FunctionRuntime | None = 'unknown_runtime'
Runtime to use with the function.
- sandbox: FunctionSandbox | None = 'unknown_sandbox'
Execution environment of the function.
- tags: List[str] | None
Tags of the Serverless Function.
- timeout: str | None = None
Request processing time limit for the function.
- class scaleway_async.function.v1beta1.CreateNamespaceRequest(region: 'Optional[ScwRegion]' = None, name: 'Optional[str]' = None, environment_variables: 'Optional[Dict[str, str]]' = <factory>, project_id: 'Optional[str]' = None, description: 'Optional[str]' = None, secret_environment_variables: 'Optional[List[Secret]]' = <factory>, tags: 'Optional[List[str]]' = <factory>, activate_vpc_integration: 'Optional[bool]' = False)
Bases:
object- activate_vpc_integration: bool | None = False
Setting this field to true doesn’t matter anymore. It will be removed in a near future.
- description: str | None = None
Description of the namespace.
- environment_variables: Dict[str, str] | None
Environment variables of the namespace.
- name: str | None = None
- project_id: str | None = None
UUID of the project in which the namespace will be created.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- tags: List[str] | None
Tags of the Serverless Function Namespace.
- class scaleway_async.function.v1beta1.CreateTokenRequest(region: 'Optional[ScwRegion]' = None, description: 'Optional[str]' = None, expires_at: 'Optional[datetime]' = None, function_id: 'Optional[str]' = None, namespace_id: 'Optional[str]' = None)
Bases:
object- description: str | None = None
Description of the token.
- expires_at: datetime | None = None
Date on which the token expires.
- function_id: str | None = None
- namespace_id: str | None = None
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.function.v1beta1.CreateTriggerRequest(name: 'str', function_id: 'str', region: 'Optional[ScwRegion]' = None, description: 'Optional[str]' = None, scw_sqs_config: 'Optional[CreateTriggerRequestMnqSqsClientConfig]' = None, scw_nats_config: 'Optional[CreateTriggerRequestMnqNatsClientConfig]' = None, sqs_config: 'Optional[CreateTriggerRequestSqsClientConfig]' = None)
Bases:
object- description: str | None = None
Description of the trigger.
- function_id: str
ID of the function to trigger.
- name: str
Name of the trigger.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- scw_nats_config: CreateTriggerRequestMnqNatsClientConfig | None = None
- scw_sqs_config: CreateTriggerRequestMnqSqsClientConfig | None = None
- sqs_config: CreateTriggerRequestSqsClientConfig | None = None
- class scaleway_async.function.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_async.function.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_async.function.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_async.function.v1beta1.Cron(id: 'str', function_id: 'str', schedule: 'str', status: 'CronStatus', name: 'str', args: 'Optional[Dict[str, Any]]' = <factory>)
Bases:
object- args: Dict[str, Any] | None
Arguments to pass with the cron.
- function_id: str
UUID of the function the cron applies to.
- id: str
UUID of the cron.
- name: str
Name of the cron.
- schedule: str
Schedule of the cron.
- status: CronStatus
Status of the cron.
- class scaleway_async.function.v1beta1.CronStatus(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- CREATING = 'creating'
- DELETING = 'deleting'
- ERROR = 'error'
- LOCKED = 'locked'
- PENDING = 'pending'
- READY = 'ready'
- UNKNOWN = 'unknown'
- class scaleway_async.function.v1beta1.DeleteCronRequest(cron_id: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- cron_id: str
UUID of the cron to delete.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.function.v1beta1.DeleteDomainRequest(domain_id: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- domain_id: str
UUID of the domain to delete.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.function.v1beta1.DeleteFunctionRequest(function_id: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- function_id: str
UUID of the function to delete.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.function.v1beta1.DeleteNamespaceRequest(namespace_id: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- namespace_id: str
UUID of the namespace.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.function.v1beta1.DeleteTokenRequest(token_id: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- region: str | None = None
Region to target. If none is passed will use default region from the config.
- token_id: str
UUID of the token to delete.
- class scaleway_async.function.v1beta1.DeleteTriggerRequest(trigger_id: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- region: str | None = None
Region to target. If none is passed will use default region from the config.
- trigger_id: str
ID of the trigger to delete.
- class scaleway_async.function.v1beta1.DeployFunctionRequest(function_id: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- function_id: str
UUID of the function to deploy.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.function.v1beta1.Domain(id: 'str', hostname: 'str', function_id: 'str', url: 'str', status: 'DomainStatus', error_message: 'Optional[str]' = None)
Bases:
object- error_message: str | None = None
Error message if the domain is in “error” state.
- function_id: str
UUID of the function the domain is associated with.
- hostname: str
Hostname associated with the function.
- id: str
UUID of the domain.
- status: DomainStatus
State of the doamin.
- url: str
URL of the function.
- class scaleway_async.function.v1beta1.DomainStatus(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- CREATING = 'creating'
- DELETING = 'deleting'
- ERROR = 'error'
- PENDING = 'pending'
- READY = 'ready'
- UNKNOWN = 'unknown'
- class scaleway_async.function.v1beta1.DownloadURL(url: 'str', headers: 'Dict[str, List[str]]')
Bases:
object- headers: Dict[str, List[str]]
- url: str
- class scaleway_async.function.v1beta1.Function(id: 'str', name: 'str', namespace_id: 'str', status: 'FunctionStatus', environment_variables: 'Dict[str, str]', min_scale: 'int', max_scale: 'int', runtime: 'FunctionRuntime', memory_limit: 'int', cpu_limit: 'int', handler: 'str', privacy: 'FunctionPrivacy', domain_name: 'str', secret_environment_variables: 'List[SecretHashedValue]', region: 'ScwRegion', http_option: 'FunctionHttpOption', runtime_message: 'str', sandbox: 'FunctionSandbox', tags: 'List[str]', timeout: 'Optional[str]' = None, error_message: 'Optional[str]' = None, build_message: 'Optional[str]' = None, description: 'Optional[str]' = None, created_at: 'Optional[datetime]' = None, updated_at: 'Optional[datetime]' = None, ready_at: 'Optional[datetime]' = None, private_network_id: 'Optional[str]' = None)
Bases:
object- build_message: str | None = None
Description of the current build step.
- cpu_limit: int
CPU limit of the function.
- created_at: datetime | None = None
Creation date of the function.
- description: str | None = None
Description of the function.
- domain_name: str
Domain name associated with the function.
- environment_variables: Dict[str, str]
Environment variables of the function.
- error_message: str | None = None
Error message if the function is in “error” state.
- handler: str
Handler to use for the function.
- http_option: FunctionHttpOption
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 function.
- max_scale: int
Maximum number of instances to scale the function to.
- memory_limit: int
Memory limit of the function in MB.
- min_scale: int
Minimum number of instances to scale the function to.
- name: str
Name of the function.
- namespace_id: str
UUID of the namespace the function belongs to.
- privacy: FunctionPrivacy
Privacy setting of the function.
- private_network_id: str | None = None
When connected to a Private Network, the function can access other Scaleway resources in this Private Network.
- ready_at: datetime | None = None
Last date when the function was successfully deployed and set to ready.
- region: str
Region in which the function is deployed.
- runtime: FunctionRuntime
Runtime of the function.
- runtime_message: str
- sandbox: FunctionSandbox
Execution environment of the function.
- secret_environment_variables: List[SecretHashedValue]
Secret environment variables of the function.
- status: FunctionStatus
Status of the function.
- tags: List[str]
List of tags applied to the Serverless Function.
- timeout: str | None = None
Request processing time limit for the function.
- updated_at: datetime | None = None
Last update date of the function.
- class scaleway_async.function.v1beta1.FunctionHttpOption(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- ENABLED = 'enabled'
- REDIRECTED = 'redirected'
- UNKNOWN_HTTP_OPTION = 'unknown_http_option'
- class scaleway_async.function.v1beta1.FunctionPrivacy(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- PRIVATE = 'private'
- PUBLIC = 'public'
- UNKNOWN_PRIVACY = 'unknown_privacy'
- class scaleway_async.function.v1beta1.FunctionRuntime(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- GO113 = 'go113'
- GO117 = 'go117'
- GO118 = 'go118'
- GO119 = 'go119'
- GO120 = 'go120'
- GO121 = 'go121'
- GO122 = 'go122'
- GO123 = 'go123'
- GO124 = 'go124'
- GOLANG = 'golang'
- NODE10 = 'node10'
- NODE14 = 'node14'
- NODE16 = 'node16'
- NODE17 = 'node17'
- NODE18 = 'node18'
- NODE19 = 'node19'
- NODE20 = 'node20'
- NODE22 = 'node22'
- NODE8 = 'node8'
- PHP82 = 'php82'
- PHP83 = 'php83'
- PHP84 = 'php84'
- PYTHON = 'python'
- PYTHON3 = 'python3'
- PYTHON310 = 'python310'
- PYTHON311 = 'python311'
- PYTHON312 = 'python312'
- PYTHON313 = 'python313'
- PYTHON37 = 'python37'
- PYTHON38 = 'python38'
- PYTHON39 = 'python39'
- RUST165 = 'rust165'
- RUST179 = 'rust179'
- RUST185 = 'rust185'
- UNKNOWN_RUNTIME = 'unknown_runtime'
- class scaleway_async.function.v1beta1.FunctionSandbox(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- UNKNOWN_SANDBOX = 'unknown_sandbox'
- V1 = 'v1'
- V2 = 'v2'
- class scaleway_async.function.v1beta1.FunctionStatus(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- CREATED = 'created'
- CREATING = 'creating'
- DELETING = 'deleting'
- ERROR = 'error'
- LOCKED = 'locked'
- PENDING = 'pending'
- READY = 'ready'
- UNKNOWN = 'unknown'
- class scaleway_async.function.v1beta1.FunctionV1Beta1API(client: Client, *, bypass_validation: bool = False)
Bases:
APIThis API allows you to manage your Serverless Functions.
- async create_cron(*, function_id: str, schedule: str, region: str | None = None, args: Dict[str, Any] | None = None, name: str | None = None) Cron
Create a new cron. Create a new cronjob for a function with the specified ID. :param function_id: UUID of the function to use the cron with. :param schedule: Schedule of the cron in UNIX cron format. :param region: Region to target. If none is passed will use default region from the config. :param args: Arguments to use with the cron. :param name: Name of the cron. :return:
CronUsage:
result = await api.create_cron( function_id="example", schedule="example", )
- async create_domain(*, hostname: str, function_id: str, region: str | None = None) Domain
Create a domain name binding. Create a domain name binding for the function with the specified ID. :param hostname: Hostame to create. :param function_id: UUID of the function to associate the domain with. :param region: Region to target. If none is passed will use default region from the config. :return:
DomainUsage:
result = await api.create_domain( hostname="example", function_id="example", )
- async create_function(*, namespace_id: str, region: str | None = None, name: str | None = None, environment_variables: Dict[str, str] | None = None, min_scale: int | None = None, max_scale: int | None = None, runtime: FunctionRuntime | None = None, memory_limit: int | None = None, timeout: str | None = None, handler: str | None = None, privacy: FunctionPrivacy | None = None, description: str | None = None, secret_environment_variables: List[Secret] | None = None, http_option: FunctionHttpOption | None = None, sandbox: FunctionSandbox | None = None, tags: List[str] | None = None, private_network_id: str | None = None) Function
Create a new function. Create a new function in the specified region for a specified Organization or Project. :param namespace_id: UUID of the namespace the function will be created in. :param region: Region to target. If none is passed will use default region from the config. :param name: Name of the function to create. :param environment_variables: Environment variables of the function. :param min_scale: Minimum number of instances to scale the function to. :param max_scale: Maximum number of instances to scale the function to. :param runtime: Runtime to use with the function. :param memory_limit: Memory limit of the function in MB. :param timeout: Request processing time limit for the function. :param handler: Handler to use with the function. :param privacy: Privacy setting of the function. :param description: Description of the function. :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 function.
tags – Tags of the Serverless Function.
private_network_id – When connected to a Private Network, the function can access other Scaleway resources in this Private Network.
- Returns:
Usage:
result = await api.create_function( namespace_id="example", )
- async create_namespace(*, region: str | None = None, name: str | None = None, environment_variables: Dict[str, str] | None = None, project_id: str | None = None, description: str | None = None, secret_environment_variables: List[Secret] | None = None, tags: List[str] | None = None, activate_vpc_integration: bool | None = None) Namespace
Create a new namespace. Create a new namespace in a specified Organization or Project. :param region: Region to target. If none is passed will use default region from the config. :param name: :param environment_variables: Environment variables of the namespace. :param project_id: UUID of the project in which the namespace will be created. :param description: Description of the namespace. :param secret_environment_variables: Secret environment variables of the namespace. :param tags: Tags of the Serverless Function Namespace. :param activate_vpc_integration: Setting this field to true doesn’t matter anymore. It will be removed in a near future. :return:
NamespaceUsage:
result = await api.create_namespace()
- async create_token(*, region: str | None = None, function_id: str | None = None, namespace_id: str | None = None, description: str | None = None, expires_at: datetime | None = None) Token
Create a new revocable token. :param region: Region to target. If none is passed will use default region from the config. :param function_id: UUID of the function to associate the token with. One-Of (‘scope’): at most one of ‘function_id’, ‘namespace_id’ could be set. :param namespace_id: UUID of the namespace to associate the token with. One-Of (‘scope’): at most one of ‘function_id’, ‘namespace_id’ could be set. :param description: Description of the token. :param expires_at: Date on which the token expires. :return:
TokenUsage:
result = await api.create_token()
- async create_trigger(*, name: str, function_id: str, region: str | None = None, description: str | None = None, scw_sqs_config: CreateTriggerRequestMnqSqsClientConfig | None = None, scw_nats_config: CreateTriggerRequestMnqNatsClientConfig | None = None, sqs_config: CreateTriggerRequestSqsClientConfig | None = None) Trigger
Create a trigger. Create a new trigger for a specified function. :param name: Name of the trigger. :param function_id: ID of the function 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:
TriggerUsage:
result = await api.create_trigger( name="example", function_id="example", )
- async delete_cron(*, cron_id: str, region: str | None = None) Cron
Delete an existing cron. Delete the cron associated with the specified ID. :param cron_id: UUID of the cron to delete. :param region: Region to target. If none is passed will use default region from the config. :return:
CronUsage:
result = await api.delete_cron( cron_id="example", )
- async delete_domain(*, domain_id: str, region: str | None = None) Domain
Delete a domain name binding. Delete a domain name binding for the function with the specified 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:
DomainUsage:
result = await api.delete_domain( domain_id="example", )
- async delete_function(*, function_id: str, region: str | None = None) Function
Delete a function. Delete the function associated with the specified ID. :param function_id: UUID of the function to delete. :param region: Region to target. If none is passed will use default region from the config. :return:
FunctionUsage:
result = await api.delete_function( function_id="example", )
- async delete_namespace(*, namespace_id: str, region: str | None = None) Namespace
Delete an existing namespace. Delete the namespace associated with the specified ID. :param namespace_id: UUID of the namespace. :param region: Region to target. If none is passed will use default region from the config. :return:
NamespaceUsage:
result = await api.delete_namespace( namespace_id="example", )
- async delete_token(*, token_id: str, region: str | None = None) Token
Delete a token. :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:
TokenUsage:
result = await api.delete_token( token_id="example", )
- async delete_trigger(*, trigger_id: str, region: str | None = None) Trigger
Delete a trigger. Delete a trigger with a specified ID. :param trigger_id: ID of the trigger to delete. :param region: Region to target. If none is passed will use default region from the config. :return:
TriggerUsage:
result = await api.delete_trigger( trigger_id="example", )
- async deploy_function(*, function_id: str, region: str | None = None) Function
Deploy a function. Deploy a function associated with the specified ID. :param function_id: UUID of the function to deploy. :param region: Region to target. If none is passed will use default region from the config. :return:
FunctionUsage:
result = await api.deploy_function( function_id="example", )
- async get_cron(*, cron_id: str, region: str | None = None) Cron
Get a cron. Get the cron associated with the specified ID. :param cron_id: UUID of the cron to get. :param region: Region to target. If none is passed will use default region from the config. :return:
CronUsage:
result = await api.get_cron( cron_id="example", )
- async get_domain(*, domain_id: str, region: str | None = None) Domain
Get a domain name binding. Get a domain name binding for the function 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:
DomainUsage:
result = await api.get_domain( domain_id="example", )
- async get_function(*, function_id: str, region: str | None = None) Function
Get a function. Get the function associated with the specified ID. :param function_id: UUID of the function. :param region: Region to target. If none is passed will use default region from the config. :return:
FunctionUsage:
result = await api.get_function( function_id="example", )
- async get_function_download_url(*, function_id: str, region: str | None = None) DownloadURL
Get a download URL of a function. Get a download URL for a function associated with the specified ID. :param function_id: UUID of the function to get the download URL for. :param region: Region to target. If none is passed will use default region from the config. :return:
DownloadURLUsage:
result = await api.get_function_download_url( function_id="example", )
- async get_function_upload_url(*, function_id: str, content_length: int, region: str | None = None) UploadURL
Get an upload URL of a function. Get an upload URL of a function associated with the specified ID. :param function_id: UUID of the function to get the upload URL for. :param content_length: Size of the archive to upload in bytes. :param region: Region to target. If none is passed will use default region from the config. :return:
UploadURLUsage:
result = await api.get_function_upload_url( function_id="example", content_length=1, )
- async get_namespace(*, namespace_id: str, region: str | None = None) Namespace
Get a namespace. Get the namespace associated with the specified ID. :param namespace_id: UUID of the namespace. :param region: Region to target. If none is passed will use default region from the config. :return:
NamespaceUsage:
result = await api.get_namespace( namespace_id="example", )
- async get_token(*, token_id: str, region: str | None = None) Token
Get a token. :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:
TokenUsage:
result = await api.get_token( token_id="example", )
- async get_trigger(*, trigger_id: str, region: str | None = None) Trigger
Get a trigger. Get a trigger with a specified ID. :param trigger_id: ID of the trigger to get. :param region: Region to target. If none is passed will use default region from the config. :return:
TriggerUsage:
result = await api.get_trigger( trigger_id="example", )
- async list_crons(*, function_id: str, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListCronsRequestOrderBy | None = None) ListCronsResponse
List all crons. List all the cronjobs in a specified region. :param function_id: UUID of the function. :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:
ListCronsResponseUsage:
result = await api.list_crons( function_id="example", )
- async list_crons_all(*, function_id: str, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListCronsRequestOrderBy | None = None) List[Cron]
List all crons. List all the cronjobs in a specified region. :param function_id: UUID of the function. :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 = await api.list_crons_all( function_id="example", )
- async list_domains(*, function_id: str, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListDomainsRequestOrderBy | None = None) ListDomainsResponse
List all domain name bindings. List all domain name bindings in a specified region. :param function_id: UUID of the function the domain is associated with. :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:
ListDomainsResponseUsage:
result = await api.list_domains( function_id="example", )
- async list_domains_all(*, function_id: str, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListDomainsRequestOrderBy | None = None) List[Domain]
List all domain name bindings. List all domain name bindings in a specified region. :param function_id: UUID of the function the domain is associated with. :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 = await api.list_domains_all( function_id="example", )
- async list_function_runtimes(*, region: str | None = None) ListFunctionRuntimesResponse
List function runtimes. List available function runtimes. :param region: Region to target. If none is passed will use default region from the config. :return:
ListFunctionRuntimesResponseUsage:
result = await api.list_function_runtimes()
- async list_functions(*, namespace_id: str, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListFunctionsRequestOrderBy | None = None, name: str | None = None, organization_id: str | None = None, project_id: str | None = None) ListFunctionsResponse
List all your functions. :param namespace_id: UUID of the namespace the function 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 functions per page. :param order_by: Order of the functions. :param name: Name of the function. :param organization_id: UUID of the Organization the function belongs to. :param project_id: UUID of the Project the function belongs to. :return:
ListFunctionsResponseUsage:
result = await api.list_functions( namespace_id="example", )
- async list_functions_all(*, namespace_id: str, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListFunctionsRequestOrderBy | None = None, name: str | None = None, organization_id: str | None = None, project_id: str | None = None) List[Function]
List all your functions. :param namespace_id: UUID of the namespace the function 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 functions per page. :param order_by: Order of the functions. :param name: Name of the function. :param organization_id: UUID of the Organization the function belongs to. :param project_id: UUID of the Project the function belongs to. :return:
List[Function]Usage:
result = await api.list_functions_all( namespace_id="example", )
- async list_namespaces(*, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListNamespacesRequestOrderBy | None = None, name: str | None = None, organization_id: str | None = None, project_id: str | None = None) ListNamespacesResponse
List all your namespaces. List all existing namespaces in the 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 namespace. :param organization_id: UUID of the Organization the namespace belongs to. :param project_id: UUID of the Project the namespace belongs to. :return:
ListNamespacesResponseUsage:
result = await api.list_namespaces()
- async list_namespaces_all(*, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListNamespacesRequestOrderBy | None = None, name: str | None = None, organization_id: str | None = None, project_id: str | None = None) List[Namespace]
List all your namespaces. List all existing namespaces in the 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 namespace. :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 = await api.list_namespaces_all()
- async list_tokens(*, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListTokensRequestOrderBy | None = None, function_id: str | None = None, namespace_id: str | None = None) ListTokensResponse
List all tokens. :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: Sort order for the tokens. :param function_id: UUID of the function the token is associated with. :param namespace_id: UUID of the namespace the token is associated with. :return:
ListTokensResponseUsage:
result = await api.list_tokens()
- async list_tokens_all(*, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListTokensRequestOrderBy | None = None, function_id: str | None = None, namespace_id: str | None = None) List[Token]
List all tokens. :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: Sort order for the tokens. :param function_id: UUID of the function the token is associated with. :param namespace_id: UUID of the namespace the token is associated with. :return:
List[Token]Usage:
result = await api.list_tokens_all()
- async list_triggers(*, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListTriggersRequestOrderBy | None = None, function_id: str | None = None, namespace_id: str | None = None, project_id: str | None = None) ListTriggersResponse
List all triggers. List all triggers belonging to a specified Organization or Project. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number to return. :param page_size: Maximum number of triggers to return per page. :param order_by: Order in which to return results. :param function_id: ID of the function the triggers belongs to. One-Of (‘scope’): at most one of ‘function_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 ‘function_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 ‘function_id’, ‘namespace_id’, ‘project_id’ could be set. :return:
ListTriggersResponseUsage:
result = await api.list_triggers()
- async list_triggers_all(*, region: str | None = None, page: int | None = None, page_size: int | None = None, order_by: ListTriggersRequestOrderBy | None = None, function_id: str | None = None, namespace_id: str | None = None, project_id: str | None = None) List[Trigger]
List all triggers. List all triggers belonging to a specified Organization or Project. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number to return. :param page_size: Maximum number of triggers to return per page. :param order_by: Order in which to return results. :param function_id: ID of the function the triggers belongs to. One-Of (‘scope’): at most one of ‘function_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 ‘function_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 ‘function_id’, ‘namespace_id’, ‘project_id’ could be set. :return:
List[Trigger]Usage:
result = await api.list_triggers_all()
- async update_cron(*, cron_id: str, region: str | None = None, function_id: str | None = None, schedule: str | None = None, args: Dict[str, Any] | None = None, name: str | None = None) Cron
Update an existing cron. Update the cron associated with the specified ID. :param cron_id: UUID of the cron to update. :param region: Region to target. If none is passed will use default region from the config. :param function_id: UUID of the function to use the cron with. :param schedule: Schedule of the cron in UNIX cron format. :param args: Arguments to use with the cron. :param name: Name of the cron. :return:
CronUsage:
result = await api.update_cron( cron_id="example", )
- async update_function(*, function_id: str, region: str | None = None, environment_variables: Dict[str, str] | None = None, min_scale: int | None = None, max_scale: int | None = None, runtime: FunctionRuntime | None = None, memory_limit: int | None = None, timeout: str | None = None, redeploy: bool | None = None, handler: str | None = None, privacy: FunctionPrivacy | None = None, description: str | None = None, secret_environment_variables: List[Secret] | None = None, http_option: FunctionHttpOption | None = None, sandbox: FunctionSandbox | None = None, tags: List[str] | None = None, private_network_id: str | None = None) Function
Update an existing function. Update the function associated with the specified ID.
When updating a function, the function is automatically redeployed to apply the changes. This behavior can be changed by setting the redeploy field to false in the request. :param function_id: UUID of the function 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 function to update. :param min_scale: Minimum number of instances to scale the function to. :param max_scale: Maximum number of instances to scale the function to. :param runtime: Runtime to use with the function. :param memory_limit: Memory limit of the function in MB. :param timeout: Processing time limit for the function. :param redeploy: Redeploy failed function. :param handler: Handler to use with the function. :param privacy: Privacy setting of the function. :param description: Description of the function. :param secret_environment_variables: During an update, secret environment variables that are not specified in this field will be kept unchanged.
In order to delete a specific secret environment variable, you must reference its key, but not provide any value for it. For example, the following payload will delete the TO_DELETE secret environment variable:
- “secret_environment_variables”:[
{“key”:”TO_DELETE”}
]
} ```. :param http_option: Possible values:
redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.
enabled: Serve both HTTP and HTTPS traffic.
- Parameters:
sandbox – Execution environment of the function.
tags – Tags of the Serverless Function.
private_network_id – When connected to a Private Network, the function can access other Scaleway resources in this Private Network.
- Returns:
Usage:
result = await api.update_function( function_id="example", )
- async update_namespace(*, namespace_id: str, region: str | None = None, environment_variables: Dict[str, str] | None = None, description: str | None = None, secret_environment_variables: List[Secret] | None = None, tags: List[str] | None = None) Namespace
Update an existing namespace. Update the namespace associated with the specified ID. :param namespace_id: UUID of the namespapce. :param region: Region to target. If none is passed will use default region from the config. :param environment_variables: Environment variables of the namespace. :param description: Description of the namespace. :param secret_environment_variables: Secret environment variables of the namespace. :param tags: Tags of the Serverless Function Namespace. :return:
NamespaceUsage:
result = await api.update_namespace( namespace_id="example", )
- async update_trigger(*, trigger_id: str, region: str | None = None, name: str | None = None, description: str | None = None, sqs_config: UpdateTriggerRequestSqsClientConfig | None = None) Trigger
Update a trigger. Update a trigger with a specified ID. :param trigger_id: ID of the trigger to update. :param region: Region to target. If none is passed will use default region from the config. :param name: Name of the trigger. :param description: Description of the trigger. :param sqs_config: Configuration for an AWS SQS queue. One-Of (‘config’): at most one of ‘sqs_config’ could be set. :return:
TriggerUsage:
result = await api.update_trigger( trigger_id="example", )
- async wait_for_cron(*, cron_id: str, region: str | None = None, options: WaitForOptions[Cron, bool | Awaitable[bool]] | None = None) Cron
Get a cron. Get the cron associated with the specified ID. :param cron_id: UUID of the cron to get. :param region: Region to target. If none is passed will use default region from the config. :return:
CronUsage:
result = await api.get_cron( cron_id="example", )
- async wait_for_domain(*, domain_id: str, region: str | None = None, options: WaitForOptions[Domain, bool | Awaitable[bool]] | None = None) Domain
Get a domain name binding. Get a domain name binding for the function 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:
DomainUsage:
result = await api.get_domain( domain_id="example", )
- async wait_for_function(*, function_id: str, region: str | None = None, options: WaitForOptions[Function, bool | Awaitable[bool]] | None = None) Function
Get a function. Get the function associated with the specified ID. :param function_id: UUID of the function. :param region: Region to target. If none is passed will use default region from the config. :return:
FunctionUsage:
result = await api.get_function( function_id="example", )
- async wait_for_namespace(*, namespace_id: str, region: str | None = None, options: WaitForOptions[Namespace, bool | Awaitable[bool]] | None = None) Namespace
Get a namespace. Get the namespace associated with the specified ID. :param namespace_id: UUID of the namespace. :param region: Region to target. If none is passed will use default region from the config. :return:
NamespaceUsage:
result = await api.get_namespace( namespace_id="example", )
- async wait_for_token(*, token_id: str, region: str | None = None, options: WaitForOptions[Token, bool | Awaitable[bool]] | None = None) Token
Get a token. :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:
TokenUsage:
result = await api.get_token( token_id="example", )
- async wait_for_trigger(*, trigger_id: str, region: str | None = None, options: WaitForOptions[Trigger, bool | Awaitable[bool]] | None = None) Trigger
Get a trigger. Get a trigger with a specified ID. :param trigger_id: ID of the trigger to get. :param region: Region to target. If none is passed will use default region from the config. :return:
TriggerUsage:
result = await api.get_trigger( trigger_id="example", )
- class scaleway_async.function.v1beta1.GetCronRequest(cron_id: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- cron_id: str
UUID of the cron to get.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.function.v1beta1.GetDomainRequest(domain_id: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- domain_id: str
UUID of the domain to get.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.function.v1beta1.GetFunctionDownloadURLRequest(function_id: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- function_id: str
UUID of the function to get the download URL for.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.function.v1beta1.GetFunctionRequest(function_id: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- function_id: str
UUID of the function.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.function.v1beta1.GetFunctionUploadURLRequest(function_id: 'str', content_length: 'int', region: 'Optional[ScwRegion]' = None)
Bases:
object- content_length: int
Size of the archive to upload in bytes.
- function_id: str
UUID of the function to get the upload URL for.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.function.v1beta1.GetNamespaceRequest(namespace_id: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- namespace_id: str
UUID of the namespace.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.function.v1beta1.GetTokenRequest(token_id: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- region: str | None = None
Region to target. If none is passed will use default region from the config.
- token_id: str
UUID of the token to get.
- class scaleway_async.function.v1beta1.GetTriggerRequest(trigger_id: 'str', region: 'Optional[ScwRegion]' = None)
Bases:
object- region: str | None = None
Region to target. If none is passed will use default region from the config.
- trigger_id: str
ID of the trigger to get.
- class scaleway_async.function.v1beta1.ListCronsRequest(function_id: 'str', region: 'Optional[ScwRegion]' = None, page: 'Optional[int]' = 0, page_size: 'Optional[int]' = 0, order_by: 'Optional[ListCronsRequestOrderBy]' = <ListCronsRequestOrderBy.CREATED_AT_ASC: 'created_at_asc'>)
Bases:
object- function_id: str
UUID of the function.
- order_by: ListCronsRequestOrderBy | None = 'created_at_asc'
Order of the crons.
- page: int | None = 0
Page number.
- page_size: int | None = 0
Number of crons per page.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.function.v1beta1.ListCronsRequestOrderBy(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- class scaleway_async.function.v1beta1.ListCronsResponse(crons: 'List[Cron]', total_count: 'int')
Bases:
object- total_count: int
Total number of crons.
- class scaleway_async.function.v1beta1.ListDomainsRequest(function_id: 'str', region: 'Optional[ScwRegion]' = None, page: 'Optional[int]' = 0, page_size: 'Optional[int]' = 0, order_by: 'Optional[ListDomainsRequestOrderBy]' = <ListDomainsRequestOrderBy.CREATED_AT_ASC: 'created_at_asc'>)
Bases:
object- function_id: str
UUID of the function the domain is associated with.
- order_by: ListDomainsRequestOrderBy | None = 'created_at_asc'
Order of the domains.
- page: int | None = 0
Page number.
- page_size: int | None = 0
Number of domains per page.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.function.v1beta1.ListDomainsRequestOrderBy(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- HOSTNAME_ASC = 'hostname_asc'
- HOSTNAME_DESC = 'hostname_desc'
- class scaleway_async.function.v1beta1.ListDomainsResponse(domains: 'List[Domain]', total_count: 'int')
Bases:
object- total_count: int
Total number of domains.
- class scaleway_async.function.v1beta1.ListFunctionRuntimesRequest(region: 'Optional[ScwRegion]' = None)
Bases:
object- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.function.v1beta1.ListFunctionRuntimesResponse(runtimes: 'List[Runtime]', total_count: 'int')
Bases:
object- total_count: int
Total number of runtimes.
- class scaleway_async.function.v1beta1.ListFunctionsRequest(namespace_id: 'str', region: 'Optional[ScwRegion]' = None, page: 'Optional[int]' = 0, page_size: 'Optional[int]' = 0, order_by: 'Optional[ListFunctionsRequestOrderBy]' = <ListFunctionsRequestOrderBy.CREATED_AT_ASC: 'created_at_asc'>, name: 'Optional[str]' = None, organization_id: 'Optional[str]' = None, project_id: 'Optional[str]' = None)
Bases:
object- name: str | None = None
Name of the function.
- namespace_id: str
UUID of the namespace the function belongs to.
- order_by: ListFunctionsRequestOrderBy | None = 'created_at_asc'
Order of the functions.
- organization_id: str | None = None
UUID of the Organization the function belongs to.
- page: int | None = 0
Page number.
- page_size: int | None = 0
Number of functions per page.
- project_id: str | None = None
UUID of the Project the function belongs to.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.function.v1beta1.ListFunctionsRequestOrderBy(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- NAME_ASC = 'name_asc'
- NAME_DESC = 'name_desc'
- class scaleway_async.function.v1beta1.ListFunctionsResponse(functions: 'List[Function]', total_count: 'int')
Bases:
object- total_count: int
Total number of functions.
- class scaleway_async.function.v1beta1.ListNamespacesRequest(region: 'Optional[ScwRegion]' = None, page: 'Optional[int]' = 0, page_size: 'Optional[int]' = 0, order_by: 'Optional[ListNamespacesRequestOrderBy]' = <ListNamespacesRequestOrderBy.CREATED_AT_ASC: 'created_at_asc'>, name: 'Optional[str]' = None, organization_id: 'Optional[str]' = None, project_id: 'Optional[str]' = None)
Bases:
object- name: str | None = None
Name of the namespace.
- order_by: ListNamespacesRequestOrderBy | None = 'created_at_asc'
Order of the namespaces.
- organization_id: str | None = None
UUID of the Organization the namespace belongs to.
- page: int | None = 0
Page number.
- page_size: int | None = 0
Number of namespaces per page.
- project_id: str | None = None
UUID of the Project the namespace belongs to.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.function.v1beta1.ListNamespacesRequestOrderBy(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- NAME_ASC = 'name_asc'
- NAME_DESC = 'name_desc'
- class scaleway_async.function.v1beta1.ListNamespacesResponse(namespaces: 'List[Namespace]', total_count: 'int')
Bases:
object- total_count: int
Total number of namespaces.
- class scaleway_async.function.v1beta1.ListTokensRequest(region: 'Optional[ScwRegion]' = None, page: 'Optional[int]' = 0, page_size: 'Optional[int]' = 0, order_by: 'Optional[ListTokensRequestOrderBy]' = <ListTokensRequestOrderBy.CREATED_AT_ASC: 'created_at_asc'>, function_id: 'Optional[str]' = None, namespace_id: 'Optional[str]' = None)
Bases:
object- function_id: str | None = None
UUID of the function the token is associated with.
- namespace_id: str | None = None
UUID of the namespace the token is associated with.
- order_by: ListTokensRequestOrderBy | None = 'created_at_asc'
Sort order for the tokens.
- page: int | None = 0
Page number.
- page_size: int | None = 0
Number of tokens per page.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.function.v1beta1.ListTokensRequestOrderBy(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- class scaleway_async.function.v1beta1.ListTokensResponse(tokens: 'List[Token]', total_count: 'int')
Bases:
object- total_count: int
- class scaleway_async.function.v1beta1.ListTriggersRequest(region: 'Optional[ScwRegion]' = None, page: 'Optional[int]' = 0, page_size: 'Optional[int]' = 0, order_by: 'Optional[ListTriggersRequestOrderBy]' = <ListTriggersRequestOrderBy.CREATED_AT_ASC: 'created_at_asc'>, function_id: 'Optional[str]' = None, namespace_id: 'Optional[str]' = None, project_id: 'Optional[str]' = None)
Bases:
object- function_id: str | None = None
- namespace_id: str | None = None
- order_by: ListTriggersRequestOrderBy | None = 'created_at_asc'
Order in which to return results.
- page: int | None = 0
Page number to return.
- page_size: int | None = 0
Maximum number of triggers to return per page.
- project_id: str | None = None
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- class scaleway_async.function.v1beta1.ListTriggersRequestOrderBy(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- class scaleway_async.function.v1beta1.ListTriggersResponse(total_count: 'int', triggers: 'List[Trigger]')
Bases:
object- total_count: int
Total count of existing triggers (matching any filters specified).
- class scaleway_async.function.v1beta1.Namespace(id: 'str', name: 'str', environment_variables: 'Dict[str, str]', organization_id: 'str', project_id: 'str', status: 'NamespaceStatus', registry_namespace_id: 'str', registry_endpoint: 'str', secret_environment_variables: 'List[SecretHashedValue]', region: 'ScwRegion', tags: 'List[str]', error_message: 'Optional[str]' = None, description: 'Optional[str]' = None, created_at: 'Optional[datetime]' = None, updated_at: 'Optional[datetime]' = None, vpc_integration_activated: 'Optional[bool]' = False)
Bases:
object- created_at: datetime | None = None
Creation date of the namespace.
- description: str | None = None
Description of the namespace.
- environment_variables: Dict[str, str]
Environment variables of the namespace.
- error_message: str | None = None
Error message if the namespace is in “error” state.
- 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 is located.
- registry_endpoint: str
Registry endpoint of the namespace.
- registry_namespace_id: str
UUID of the registry namespace.
- secret_environment_variables: List[SecretHashedValue]
Secret environment variables of the namespace.
- status: NamespaceStatus
Status of the namespace.
- tags: List[str]
List of tags applied to the Serverless Function Namespace.
- updated_at: datetime | None = None
Last update date of the namespace.
- vpc_integration_activated: bool | None = False
The value of this field doesn’t matter anymore, and will be removed in a near future.
- class scaleway_async.function.v1beta1.NamespaceStatus(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- CREATING = 'creating'
- DELETING = 'deleting'
- ERROR = 'error'
- LOCKED = 'locked'
- PENDING = 'pending'
- READY = 'ready'
- UNKNOWN = 'unknown'
- class scaleway_async.function.v1beta1.Runtime(name: 'str', language: 'str', version: 'str', default_handler: 'str', code_sample: 'str', status: 'RuntimeStatus', status_message: 'str', extension: 'str', implementation: 'str', logo_url: 'str')
Bases:
object- code_sample: str
- default_handler: str
- extension: str
- implementation: str
- language: str
- logo_url: str
- name: str
- status: RuntimeStatus
- status_message: str
- version: str
- class scaleway_async.function.v1beta1.RuntimeStatus(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- AVAILABLE = 'available'
- BETA = 'beta'
- DEPRECATED = 'deprecated'
- END_OF_LIFE = 'end_of_life'
- END_OF_SUPPORT = 'end_of_support'
- UNKNOWN_STATUS = 'unknown_status'
- class scaleway_async.function.v1beta1.Secret(key: 'str', value: 'Optional[str]' = None)
Bases:
object- key: str
- value: str | None = None
- class scaleway_async.function.v1beta1.SecretHashedValue(key: 'str', hashed_value: 'str')
Bases:
object- hashed_value: str
- key: str
- class scaleway_async.function.v1beta1.Token(id: 'str', token: 'str', status: 'TokenStatus', public_key: 'Optional[str]' = None, description: 'Optional[str]' = None, expires_at: 'Optional[datetime]' = None, function_id: 'Optional[str]' = None, namespace_id: 'Optional[str]' = None)
Bases:
object- description: str | None = None
Description of the token.
- expires_at: datetime | None = None
Date on which the token expires.
- function_id: str | None = None
- id: str
UUID of the token.
- namespace_id: str | None = None
- public_key: str | None = None
Public key of the token.
- status: TokenStatus
Status of the token.
- token: str
String of the token.
- class scaleway_async.function.v1beta1.TokenStatus(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- CREATING = 'creating'
- DELETING = 'deleting'
- ERROR = 'error'
- READY = 'ready'
- UNKNOWN = 'unknown'
- class scaleway_async.function.v1beta1.Trigger(id: 'str', name: 'str', description: 'str', function_id: 'str', input_type: 'TriggerInputType', status: 'TriggerStatus', error_message: 'Optional[str]' = None, scw_sqs_config: 'Optional[TriggerMnqSqsClientConfig]' = None, scw_nats_config: 'Optional[TriggerMnqNatsClientConfig]' = None, sqs_config: 'Optional[TriggerSqsClientConfig]' = None)
Bases:
object- description: str
Description of the trigger.
- error_message: str | None = None
Error message of the trigger.
- function_id: str
ID of the function to trigger.
- id: str
ID of the trigger.
- input_type: TriggerInputType
Type of the input.
- name: str
Name of the trigger.
- scw_nats_config: TriggerMnqNatsClientConfig | None = None
- scw_sqs_config: TriggerMnqSqsClientConfig | None = None
- sqs_config: TriggerSqsClientConfig | None = None
- status: TriggerStatus
Status of the trigger.
- class scaleway_async.function.v1beta1.TriggerInputType(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- NATS = 'nats'
- SCW_NATS = 'scw_nats'
- SCW_SQS = 'scw_sqs'
- SQS = 'sqs'
- UNKNOWN_INPUT_TYPE = 'unknown_input_type'
- class scaleway_async.function.v1beta1.TriggerMnqNatsClientConfig(subject: 'str', mnq_nats_account_id: 'str', mnq_project_id: 'str', mnq_region: 'str', mnq_credential_id: 'Optional[str]' = None)
Bases:
object- mnq_credential_id: str | None = None
ID of the Messaging and Queuing credentials used to subscribe to the NATS subject.
- mnq_nats_account_id: str
ID of the Messaging and Queuing NATS account.
- mnq_project_id: str
ID of the Messaging and Queuing project.
- mnq_region: str
Currently, only the fr-par and nl-ams regions are available.
- subject: str
Name of the NATS subject the trigger listens to.
- class scaleway_async.function.v1beta1.TriggerMnqSqsClientConfig(queue: 'str', mnq_project_id: 'str', mnq_region: 'str', mnq_credential_id: 'Optional[str]' = None)
Bases:
object- mnq_credential_id: str | None = None
ID of the Messaging and Queuing credentials used to read from the SQS queue.
- mnq_project_id: str
ID of the Messaging and Queuing project.
- mnq_region: str
Currently, only the fr-par and nl-ams regions are available.
- queue: str
Name of the SQS queue the trigger listens to.
- class scaleway_async.function.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_async.function.v1beta1.TriggerStatus(value: str, names: Any | None = None, *args: Any, **kwargs: Any)
Bases:
str,Enum- CREATING = 'creating'
- DELETING = 'deleting'
- ERROR = 'error'
- PENDING = 'pending'
- READY = 'ready'
- UNKNOWN_STATUS = 'unknown_status'
- class scaleway_async.function.v1beta1.UpdateCronRequest(cron_id: 'str', region: 'Optional[ScwRegion]' = None, function_id: 'Optional[str]' = None, schedule: 'Optional[str]' = None, args: 'Optional[Dict[str, Any]]' = <factory>, name: 'Optional[str]' = None)
Bases:
object- args: Dict[str, Any] | None
Arguments to use with the cron.
- cron_id: str
UUID of the cron to update.
- function_id: str | None = None
UUID of the function to use the cron with.
- name: str | None = None
Name of the cron.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- schedule: str | None = None
Schedule of the cron in UNIX cron format.
- class scaleway_async.function.v1beta1.UpdateFunctionRequest(function_id: 'str', region: 'Optional[ScwRegion]' = None, environment_variables: 'Optional[Dict[str, str]]' = <factory>, min_scale: 'Optional[int]' = 0, max_scale: 'Optional[int]' = 0, runtime: 'Optional[FunctionRuntime]' = <FunctionRuntime.UNKNOWN_RUNTIME: 'unknown_runtime'>, memory_limit: 'Optional[int]' = 0, timeout: 'Optional[str]' = None, redeploy: 'Optional[bool]' = False, handler: 'Optional[str]' = None, privacy: 'Optional[FunctionPrivacy]' = <FunctionPrivacy.UNKNOWN_PRIVACY: 'unknown_privacy'>, description: 'Optional[str]' = None, secret_environment_variables: 'Optional[List[Secret]]' = <factory>, http_option: 'Optional[FunctionHttpOption]' = <FunctionHttpOption.UNKNOWN_HTTP_OPTION: 'unknown_http_option'>, sandbox: 'Optional[FunctionSandbox]' = <FunctionSandbox.UNKNOWN_SANDBOX: 'unknown_sandbox'>, tags: 'Optional[List[str]]' = <factory>, private_network_id: 'Optional[str]' = None)
Bases:
object- description: str | None = None
Description of the function.
- environment_variables: Dict[str, str] | None
Environment variables of the function to update.
- function_id: str
UUID of the function to update.
- handler: str | None = None
Handler to use with the function.
- http_option: FunctionHttpOption | None = 'unknown_http_option'
Possible values:
redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.
enabled: Serve both HTTP and HTTPS traffic.
- max_scale: int | None = 0
Maximum number of instances to scale the function to.
- memory_limit: int | None = 0
Memory limit of the function in MB.
- min_scale: int | None = 0
Minimum number of instances to scale the function to.
- privacy: FunctionPrivacy | None = 'unknown_privacy'
Privacy setting of the function.
- private_network_id: str | None = None
When connected to a Private Network, the function can access other Scaleway resources in this Private Network.
- redeploy: bool | None = False
Redeploy failed function.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- runtime: FunctionRuntime | None = 'unknown_runtime'
Runtime to use with the function.
- sandbox: FunctionSandbox | None = 'unknown_sandbox'
Execution environment of the function.
- secret_environment_variables: List[Secret] | None
During an update, secret environment variables that are not specified in this field will be kept unchanged.
In order to delete a specific secret environment variable, you must reference its key, but not provide any value for it. For example, the following payload will delete the TO_DELETE secret environment variable:
- “secret_environment_variables”:[
{“key”:”TO_DELETE”}
]
- tags: List[str] | None
Tags of the Serverless Function.
- timeout: str | None = None
Processing time limit for the function.
- class scaleway_async.function.v1beta1.UpdateNamespaceRequest(namespace_id: 'str', region: 'Optional[ScwRegion]' = None, environment_variables: 'Optional[Dict[str, str]]' = <factory>, description: 'Optional[str]' = None, secret_environment_variables: 'Optional[List[Secret]]' = <factory>, tags: 'Optional[List[str]]' = <factory>)
Bases:
object- description: str | None = None
Description of the namespace.
- environment_variables: Dict[str, str] | None
Environment variables of the namespace.
- namespace_id: str
UUID of the namespapce.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- tags: List[str] | None
Tags of the Serverless Function Namespace.
- class scaleway_async.function.v1beta1.UpdateTriggerRequest(trigger_id: 'str', region: 'Optional[ScwRegion]' = None, name: 'Optional[str]' = None, description: 'Optional[str]' = None, sqs_config: 'Optional[UpdateTriggerRequestSqsClientConfig]' = None)
Bases:
object- description: str | None = None
Description of the trigger.
- name: str | None = None
Name of the trigger.
- region: str | None = None
Region to target. If none is passed will use default region from the config.
- sqs_config: UpdateTriggerRequestSqsClientConfig | None = None
- trigger_id: str
ID of the trigger to update.