scaleway.function.v1beta1 package
Submodules
scaleway.function.v1beta1.api module
- class scaleway.function.v1beta1.api.FunctionV1Beta1API(client: Client, *, bypass_validation: bool = False)
Bases:
API
This API allows you to manage your Serverless Functions.
- create_cron(*, function_id: str, schedule: str, region: Optional[str] = None, args: Optional[Dict[str, Any]] = None, name: Optional[str] = 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:
Cron
Usage:
result = api.create_cron( function_id="example", schedule="example", )
- create_domain(*, hostname: str, function_id: str, region: Optional[str] = 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:
Domain
Usage:
result = api.create_domain( hostname="example", function_id="example", )
- create_function(*, namespace_id: str, region: Optional[str] = None, name: Optional[str] = None, environment_variables: Optional[Dict[str, str]] = None, min_scale: Optional[int] = None, max_scale: Optional[int] = None, runtime: Optional[FunctionRuntime] = None, memory_limit: Optional[int] = None, timeout: Optional[str] = None, handler: Optional[str] = None, privacy: Optional[FunctionPrivacy] = None, description: Optional[str] = None, secret_environment_variables: Optional[List[Secret]] = None, http_option: Optional[FunctionHttpOption] = None, sandbox: Optional[FunctionSandbox] = 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: Minumum 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.
- Returns:
Function
Usage:
result = api.create_function( namespace_id="example", )
- create_namespace(*, region: Optional[str] = None, name: Optional[str] = None, environment_variables: Optional[Dict[str, str]] = None, project_id: Optional[str] = None, description: Optional[str] = None, secret_environment_variables: Optional[List[Secret]] = None, tags: Optional[List[str]] = None) Namespace
Create a new namespace. Create a new namespace in a specified 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: [ALPHA] Tags of the Serverless Function Namespace. :return:
Namespace
Usage:
result = api.create_namespace()
- create_token(*, region: Optional[str] = None, function_id: Optional[str] = None, namespace_id: Optional[str] = None, description: Optional[str] = None, expires_at: Optional[datetime] = None) Token
Create a new revocable token. :param region: Region to target. If none is passed will use default region from the config. :param 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:
Token
Usage:
result = api.create_token()
- create_trigger(*, name: str, function_id: str, region: Optional[str] = None, description: Optional[str] = None, scw_sqs_config: Optional[CreateTriggerRequestMnqSqsClientConfig] = None, scw_nats_config: Optional[CreateTriggerRequestMnqNatsClientConfig] = None, sqs_config: Optional[CreateTriggerRequestSqsClientConfig] = None) Trigger
Create a trigger. Create a new trigger for a specified 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:
Trigger
Usage:
result = api.create_trigger( name="example", function_id="example", )
- delete_cron(*, cron_id: str, region: Optional[str] = None) Cron
Delete an existing cron. Delete the cron associated with the specified ID. :param cron_id: UUID of the cron to delete. :param region: Region to target. If none is passed will use default region from the config. :return:
Cron
Usage:
result = api.delete_cron( cron_id="example", )
- delete_domain(*, domain_id: str, region: Optional[str] = None) Domain
Delete a domain name binding. Delete 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:
Domain
Usage:
result = api.delete_domain( domain_id="example", )
- delete_function(*, function_id: str, region: Optional[str] = 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:
Function
Usage:
result = api.delete_function( function_id="example", )
- delete_namespace(*, namespace_id: str, region: Optional[str] = None) Namespace
Delete an existing namespace. Delete the namespace associated with the specified ID. :param namespace_id: UUID of the namespace. :param region: Region to target. If none is passed will use default region from the config. :return:
Namespace
Usage:
result = api.delete_namespace( namespace_id="example", )
- delete_token(*, token_id: str, region: Optional[str] = None) Token
Delete a token. :param token_id: UUID of the token to delete. :param region: Region to target. If none is passed will use default region from the config. :return:
Token
Usage:
result = api.delete_token( token_id="example", )
- delete_trigger(*, trigger_id: str, region: Optional[str] = None) Trigger
Delete a trigger. Delete a trigger with a specified ID. :param trigger_id: ID of the trigger to delete. :param region: Region to target. If none is passed will use default region from the config. :return:
Trigger
Usage:
result = api.delete_trigger( trigger_id="example", )
- deploy_function(*, function_id: str, region: Optional[str] = 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:
Function
Usage:
result = api.deploy_function( function_id="example", )
- get_cron(*, cron_id: str, region: Optional[str] = None) Cron
Get a cron. Get the cron associated with the specified ID. :param cron_id: UUID of the cron to get. :param region: Region to target. If none is passed will use default region from the config. :return:
Cron
Usage:
result = api.get_cron( cron_id="example", )
- get_domain(*, domain_id: str, region: Optional[str] = None) Domain
Get a domain name binding. Get a domain name binding for the 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:
Domain
Usage:
result = api.get_domain( domain_id="example", )
- get_function(*, function_id: str, region: Optional[str] = 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:
Function
Usage:
result = api.get_function( function_id="example", )
- get_function_download_url(*, function_id: str, region: Optional[str] = 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 the download URL for. :param region: Region to target. If none is passed will use default region from the config. :return:
DownloadURL
Usage:
result = api.get_function_download_url( function_id="example", )
- get_function_upload_url(*, function_id: str, content_length: int, region: Optional[str] = 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:
UploadURL
Usage:
result = api.get_function_upload_url( function_id="example", content_length=1, )
- get_namespace(*, namespace_id: str, region: Optional[str] = None) Namespace
Get a namespace. Get the namespace associated with the specified ID. :param namespace_id: UUID of the namespace. :param region: Region to target. If none is passed will use default region from the config. :return:
Namespace
Usage:
result = api.get_namespace( namespace_id="example", )
- get_token(*, token_id: str, region: Optional[str] = None) Token
Get a token. :param token_id: UUID of the token to get. :param region: Region to target. If none is passed will use default region from the config. :return:
Token
Usage:
result = api.get_token( token_id="example", )
- get_trigger(*, trigger_id: str, region: Optional[str] = None) Trigger
Get a trigger. Get a trigger with a specified ID. :param trigger_id: ID of the trigger to get. :param region: Region to target. If none is passed will use default region from the config. :return:
Trigger
Usage:
result = api.get_trigger( trigger_id="example", )
- list_crons(*, function_id: str, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListCronsRequestOrderBy] = 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:
ListCronsResponse
Usage:
result = api.list_crons( function_id="example", )
- list_crons_all(*, function_id: str, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListCronsRequestOrderBy] = 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 = api.list_crons_all( function_id="example", )
- list_domains(*, function_id: str, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListDomainsRequestOrderBy] = None) ListDomainsResponse
List all domain name bindings. List all domain name bindings in a specified region. :param function_id: UUID of the function the domain is assoicated 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:
ListDomainsResponse
Usage:
result = api.list_domains( function_id="example", )
- list_domains_all(*, function_id: str, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListDomainsRequestOrderBy] = None) List[Domain]
List all domain name bindings. List all domain name bindings in a specified region. :param function_id: UUID of the function the domain is assoicated 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 = api.list_domains_all( function_id="example", )
- list_function_runtimes(*, region: Optional[str] = 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:
ListFunctionRuntimesResponse
Usage:
result = api.list_function_runtimes()
- list_functions(*, namespace_id: str, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListFunctionsRequestOrderBy] = None, name: Optional[str] = None, organization_id: Optional[str] = None, project_id: Optional[str] = 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 Organziation the function belongs to. :param project_id: UUID of the Project the function belongs to. :return:
ListFunctionsResponse
Usage:
result = api.list_functions( namespace_id="example", )
- list_functions_all(*, namespace_id: str, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListFunctionsRequestOrderBy] = None, name: Optional[str] = None, organization_id: Optional[str] = None, project_id: Optional[str] = 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 Organziation the function belongs to. :param project_id: UUID of the Project the function belongs to. :return:
List[Function]
Usage:
result = api.list_functions_all( namespace_id="example", )
- list_namespaces(*, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListNamespacesRequestOrderBy] = None, name: Optional[str] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None) ListNamespacesResponse
List all your namespaces. List all 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:
ListNamespacesResponse
Usage:
result = api.list_namespaces()
- list_namespaces_all(*, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListNamespacesRequestOrderBy] = None, name: Optional[str] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None) List[Namespace]
List all your namespaces. List all 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 = api.list_namespaces_all()
- list_tokens(*, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListTokensRequestOrderBy] = None, function_id: Optional[str] = None, namespace_id: Optional[str] = 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 assoicated with. :param namespace_id: UUID of the namespace the token is associated with. :return:
ListTokensResponse
Usage:
result = api.list_tokens()
- list_tokens_all(*, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListTokensRequestOrderBy] = None, function_id: Optional[str] = None, namespace_id: Optional[str] = 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 assoicated with. :param namespace_id: UUID of the namespace the token is associated with. :return:
List[Token]
Usage:
result = api.list_tokens_all()
- list_triggers(*, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListTriggersRequestOrderBy] = None, function_id: Optional[str] = None, namespace_id: Optional[str] = None, project_id: Optional[str] = None) ListTriggersResponse
List all triggers. List all triggers belonging to a specified Organization or Project. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number to return. :param page_size: Maximum number of triggers to return per page. :param order_by: Order in which to return results. :param 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:
ListTriggersResponse
Usage:
result = api.list_triggers()
- list_triggers_all(*, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListTriggersRequestOrderBy] = None, function_id: Optional[str] = None, namespace_id: Optional[str] = None, project_id: Optional[str] = None) List[Trigger]
List all triggers. List all triggers belonging to a specified Organization or Project. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number to return. :param page_size: Maximum number of triggers to return per page. :param order_by: Order in which to return results. :param 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 = api.list_triggers_all()
- update_cron(*, cron_id: str, region: Optional[str] = None, function_id: Optional[str] = None, schedule: Optional[str] = None, args: Optional[Dict[str, Any]] = None, name: Optional[str] = None) Cron
Update an existing cron. Update the cron associated with the specified ID. :param cron_id: UUID of the cron to update. :param region: Region to target. If none is passed will use default region from the config. :param 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:
Cron
Usage:
result = api.update_cron( cron_id="example", )
- update_function(*, function_id: str, region: Optional[str] = None, environment_variables: Optional[Dict[str, str]] = None, min_scale: Optional[int] = None, max_scale: Optional[int] = None, runtime: Optional[FunctionRuntime] = None, memory_limit: Optional[int] = None, timeout: Optional[str] = None, redeploy: Optional[bool] = None, handler: Optional[str] = None, privacy: Optional[FunctionPrivacy] = None, description: Optional[str] = None, secret_environment_variables: Optional[List[Secret]] = None, http_option: Optional[FunctionHttpOption] = None, sandbox: Optional[FunctionSandbox] = None) Function
Update an existing function. Update the function associated with the specified ID. :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: Minumum 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: Secret environment variables of the function. :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.
- Returns:
Function
Usage:
result = api.update_function( function_id="example", )
- update_namespace(*, namespace_id: str, region: Optional[str] = None, environment_variables: Optional[Dict[str, str]] = None, description: Optional[str] = None, secret_environment_variables: Optional[List[Secret]] = None, tags: Optional[List[str]] = None) Namespace
Update an existing namespace. Update the 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: [ALPHA] Tags of the Serverless Function Namespace. :return:
Namespace
Usage:
result = api.update_namespace( namespace_id="example", )
- update_trigger(*, trigger_id: str, region: Optional[str] = None, name: Optional[str] = None, description: Optional[str] = None, sqs_config: Optional[UpdateTriggerRequestSqsClientConfig] = None) Trigger
Update a trigger. Update a trigger with a specified ID. :param trigger_id: ID of the trigger to update. :param region: Region to target. If none is passed will use default region from the config. :param name: Name of the trigger. :param description: Description of the trigger. :param sqs_config: Configuration for an AWS SQS queue. One-Of (‘config’): at most one of ‘sqs_config’ could be set. :return:
Trigger
Usage:
result = api.update_trigger( trigger_id="example", )
- wait_for_cron(*, cron_id: str, region: Optional[str] = None, options: Optional[WaitForOptions[Cron, bool]] = None) Cron
Get a cron. Get the cron associated with the specified ID. :param cron_id: UUID of the cron to get. :param region: Region to target. If none is passed will use default region from the config. :return:
Cron
Usage:
result = api.get_cron( cron_id="example", )
- wait_for_domain(*, domain_id: str, region: Optional[str] = None, options: Optional[WaitForOptions[Domain, bool]] = None) Domain
Get a domain name binding. Get a domain name binding for the 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:
Domain
Usage:
result = api.get_domain( domain_id="example", )
- wait_for_function(*, function_id: str, region: Optional[str] = None, options: Optional[WaitForOptions[Function, bool]] = 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:
Function
Usage:
result = api.get_function( function_id="example", )
- wait_for_namespace(*, namespace_id: str, region: Optional[str] = None, options: Optional[WaitForOptions[Namespace, bool]] = None) Namespace
Get a namespace. Get the namespace associated with the specified ID. :param namespace_id: UUID of the namespace. :param region: Region to target. If none is passed will use default region from the config. :return:
Namespace
Usage:
result = api.get_namespace( namespace_id="example", )
- wait_for_token(*, token_id: str, region: Optional[str] = None, options: Optional[WaitForOptions[Token, bool]] = None) Token
Get a token. :param token_id: UUID of the token to get. :param region: Region to target. If none is passed will use default region from the config. :return:
Token
Usage:
result = api.get_token( token_id="example", )
- wait_for_trigger(*, trigger_id: str, region: Optional[str] = None, options: Optional[WaitForOptions[Trigger, bool]] = None) Trigger
Get a trigger. Get a trigger with a specified ID. :param trigger_id: ID of the trigger to get. :param region: Region to target. If none is passed will use default region from the config. :return:
Trigger
Usage:
result = api.get_trigger( trigger_id="example", )
scaleway.function.v1beta1.content module
- scaleway.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.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.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.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.function.v1beta1.content.TOKEN_TRANSIENT_STATUSES: List[TokenStatus] = [<TokenStatus.DELETING: 'deleting'>, <TokenStatus.CREATING: 'creating'>]
Lists transient statutes of the enum
TokenStatus
.
- scaleway.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.function.v1beta1.marshalling module
- scaleway.function.v1beta1.marshalling.marshal_CreateCronRequest(request: CreateCronRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway.function.v1beta1.marshalling.marshal_CreateDomainRequest(request: CreateDomainRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway.function.v1beta1.marshalling.marshal_CreateFunctionRequest(request: CreateFunctionRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway.function.v1beta1.marshalling.marshal_CreateNamespaceRequest(request: CreateNamespaceRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway.function.v1beta1.marshalling.marshal_CreateTokenRequest(request: CreateTokenRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway.function.v1beta1.marshalling.marshal_CreateTriggerRequest(request: CreateTriggerRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway.function.v1beta1.marshalling.marshal_CreateTriggerRequestMnqNatsClientConfig(request: CreateTriggerRequestMnqNatsClientConfig, defaults: ProfileDefaults) Dict[str, Any]
- scaleway.function.v1beta1.marshalling.marshal_CreateTriggerRequestMnqSqsClientConfig(request: CreateTriggerRequestMnqSqsClientConfig, defaults: ProfileDefaults) Dict[str, Any]
- scaleway.function.v1beta1.marshalling.marshal_CreateTriggerRequestSqsClientConfig(request: CreateTriggerRequestSqsClientConfig, defaults: ProfileDefaults) Dict[str, Any]
- scaleway.function.v1beta1.marshalling.marshal_Secret(request: Secret, defaults: ProfileDefaults) Dict[str, Any]
- scaleway.function.v1beta1.marshalling.marshal_UpdateCronRequest(request: UpdateCronRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway.function.v1beta1.marshalling.marshal_UpdateFunctionRequest(request: UpdateFunctionRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway.function.v1beta1.marshalling.marshal_UpdateNamespaceRequest(request: UpdateNamespaceRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway.function.v1beta1.marshalling.marshal_UpdateTriggerRequest(request: UpdateTriggerRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway.function.v1beta1.marshalling.marshal_UpdateTriggerRequestSqsClientConfig(request: UpdateTriggerRequestSqsClientConfig, defaults: ProfileDefaults) Dict[str, Any]
- scaleway.function.v1beta1.marshalling.unmarshal_DownloadURL(data: Any) DownloadURL
- scaleway.function.v1beta1.marshalling.unmarshal_ListCronsResponse(data: Any) ListCronsResponse
- scaleway.function.v1beta1.marshalling.unmarshal_ListDomainsResponse(data: Any) ListDomainsResponse
- scaleway.function.v1beta1.marshalling.unmarshal_ListFunctionRuntimesResponse(data: Any) ListFunctionRuntimesResponse
- scaleway.function.v1beta1.marshalling.unmarshal_ListFunctionsResponse(data: Any) ListFunctionsResponse
- scaleway.function.v1beta1.marshalling.unmarshal_ListNamespacesResponse(data: Any) ListNamespacesResponse
- scaleway.function.v1beta1.marshalling.unmarshal_ListTokensResponse(data: Any) ListTokensResponse
- scaleway.function.v1beta1.marshalling.unmarshal_ListTriggersResponse(data: Any) ListTriggersResponse
- scaleway.function.v1beta1.marshalling.unmarshal_SecretHashedValue(data: Any) SecretHashedValue
- scaleway.function.v1beta1.marshalling.unmarshal_TriggerMnqNatsClientConfig(data: Any) TriggerMnqNatsClientConfig
- scaleway.function.v1beta1.marshalling.unmarshal_TriggerMnqSqsClientConfig(data: Any) TriggerMnqSqsClientConfig
- scaleway.function.v1beta1.marshalling.unmarshal_TriggerSqsClientConfig(data: Any) TriggerSqsClientConfig
scaleway.function.v1beta1.types module
- class scaleway.function.v1beta1.types.CreateCronRequest(function_id: 'str', schedule: 'str', region: 'Optional[Region]', args: 'Optional[Dict[str, Any]]', name: 'Optional[str]')
Bases:
object
- args: Optional[Dict[str, Any]]
Arguments to use with the cron.
- function_id: str
UUID of the function to use the cron with.
- name: Optional[str]
Name of the cron.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- schedule: str
Schedule of the cron in UNIX cron format.
- class scaleway.function.v1beta1.types.CreateDomainRequest(hostname: 'str', function_id: 'str', region: 'Optional[Region]')
Bases:
object
- function_id: str
UUID of the function to associate the domain with.
- hostname: str
Hostame to create.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.function.v1beta1.types.CreateFunctionRequest(namespace_id: 'str', region: 'Optional[Region]', name: 'Optional[str]', environment_variables: 'Optional[Dict[str, str]]', min_scale: 'Optional[int]', max_scale: 'Optional[int]', runtime: 'Optional[FunctionRuntime]', memory_limit: 'Optional[int]', timeout: 'Optional[str]', handler: 'Optional[str]', privacy: 'Optional[FunctionPrivacy]', description: 'Optional[str]', secret_environment_variables: 'Optional[List[Secret]]', http_option: 'Optional[FunctionHttpOption]', sandbox: 'Optional[FunctionSandbox]')
Bases:
object
- description: Optional[str]
Description of the function.
- environment_variables: Optional[Dict[str, str]]
Environment variables of the function.
- handler: Optional[str]
Handler to use with the function.
- http_option: Optional[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.
- max_scale: Optional[int]
Maximum number of instances to scale the function to.
- memory_limit: Optional[int]
Memory limit of the function in MB.
- min_scale: Optional[int]
Minumum number of instances to scale the function to.
- name: Optional[str]
Name of the function to create.
- namespace_id: str
UUID of the namespace the function will be created in.
- privacy: Optional[FunctionPrivacy]
Privacy setting of the function.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- runtime: Optional[FunctionRuntime]
Runtime to use with the function.
- sandbox: Optional[FunctionSandbox]
Execution environment of the function.
- timeout: Optional[str]
Request processing time limit for the function.
- class scaleway.function.v1beta1.types.CreateNamespaceRequest(region: 'Optional[Region]', name: 'Optional[str]', environment_variables: 'Optional[Dict[str, str]]', project_id: 'Optional[str]', description: 'Optional[str]', secret_environment_variables: 'Optional[List[Secret]]', tags: 'Optional[List[str]]')
Bases:
object
- description: Optional[str]
Description of the namespace.
- environment_variables: Optional[Dict[str, str]]
Environment variables of the namespace.
- name: Optional[str]
- project_id: Optional[str]
UUID of the project in which the namespace will be created.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- secret_environment_variables: Optional[List[Secret]]
Secret environment variables of the namespace.
- tags: Optional[List[str]]
[ALPHA] Tags of the Serverless Function Namespace.
- class scaleway.function.v1beta1.types.CreateTokenRequest(region: 'Optional[Region]', description: 'Optional[str]', expires_at: 'Optional[datetime]', function_id: 'Optional[str]', namespace_id: 'Optional[str]')
Bases:
object
- description: Optional[str]
Description of the token.
- expires_at: Optional[datetime]
Date on which the token expires.
- function_id: Optional[str]
- namespace_id: Optional[str]
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.function.v1beta1.types.CreateTriggerRequest(name: 'str', function_id: 'str', region: 'Optional[Region]', description: 'Optional[str]', scw_sqs_config: 'Optional[CreateTriggerRequestMnqSqsClientConfig]', scw_nats_config: 'Optional[CreateTriggerRequestMnqNatsClientConfig]', sqs_config: 'Optional[CreateTriggerRequestSqsClientConfig]')
Bases:
object
- description: Optional[str]
Description of the trigger.
- function_id: str
ID of the function to trigger.
- name: str
Name of the trigger.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- scw_nats_config: Optional[CreateTriggerRequestMnqNatsClientConfig]
- scw_sqs_config: Optional[CreateTriggerRequestMnqSqsClientConfig]
- sqs_config: Optional[CreateTriggerRequestSqsClientConfig]
- class scaleway.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.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.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.function.v1beta1.types.Cron(id: 'str', function_id: 'str', schedule: 'str', status: 'CronStatus', name: 'str', args: 'Optional[Dict[str, Any]]')
Bases:
object
- args: Optional[Dict[str, Any]]
Arguments to pass with the cron.
- 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.function.v1beta1.types.CronStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- CREATING = 'creating'
- DELETING = 'deleting'
- ERROR = 'error'
- LOCKED = 'locked'
- PENDING = 'pending'
- READY = 'ready'
- UNKNOWN = 'unknown'
- class scaleway.function.v1beta1.types.DeleteCronRequest(cron_id: 'str', region: 'Optional[Region]')
Bases:
object
- cron_id: str
UUID of the cron to delete.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.function.v1beta1.types.DeleteDomainRequest(domain_id: 'str', region: 'Optional[Region]')
Bases:
object
- domain_id: str
UUID of the domain to delete.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.function.v1beta1.types.DeleteFunctionRequest(function_id: 'str', region: 'Optional[Region]')
Bases:
object
- function_id: str
UUID of the function to delete.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.function.v1beta1.types.DeleteNamespaceRequest(namespace_id: 'str', region: 'Optional[Region]')
Bases:
object
- namespace_id: str
UUID of the namespace.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.function.v1beta1.types.DeleteTokenRequest(token_id: 'str', region: 'Optional[Region]')
Bases:
object
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- token_id: str
UUID of the token to delete.
- class scaleway.function.v1beta1.types.DeleteTriggerRequest(trigger_id: 'str', region: 'Optional[Region]')
Bases:
object
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- trigger_id: str
ID of the trigger to delete.
- class scaleway.function.v1beta1.types.DeployFunctionRequest(function_id: 'str', region: 'Optional[Region]')
Bases:
object
- function_id: str
UUID of the function to deploy.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.function.v1beta1.types.Domain(id: 'str', hostname: 'str', function_id: 'str', url: 'str', status: 'DomainStatus', error_message: 'Optional[str]')
Bases:
object
- error_message: Optional[str]
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.function.v1beta1.types.DomainStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- CREATING = 'creating'
- DELETING = 'deleting'
- ERROR = 'error'
- PENDING = 'pending'
- READY = 'ready'
- UNKNOWN = 'unknown'
- class scaleway.function.v1beta1.types.DownloadURL(url: 'str', headers: 'Dict[str, List[str]]')
Bases:
object
- headers: Dict[str, List[str]]
- url: str
- class scaleway.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]', timeout: 'Optional[str]', error_message: 'Optional[str]', build_message: 'Optional[str]', description: 'Optional[str]', region: 'Region', http_option: 'FunctionHttpOption', runtime_message: 'str', sandbox: 'FunctionSandbox', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]', ready_at: 'Optional[datetime]')
Bases:
object
- build_message: Optional[str]
Description of the current build step.
- cpu_limit: int
CPU limit of the function.
- created_at: Optional[datetime]
Creation date of the function.
- description: Optional[str]
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: Optional[str]
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.
- ready_at: Optional[datetime]
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.
- timeout: Optional[str]
Request processing time limit for the function.
- updated_at: Optional[datetime]
Last update date of the function.
- class scaleway.function.v1beta1.types.FunctionHttpOption(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- ENABLED = 'enabled'
- REDIRECTED = 'redirected'
- UNKNOWN_HTTP_OPTION = 'unknown_http_option'
- class scaleway.function.v1beta1.types.FunctionPrivacy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- PRIVATE = 'private'
- PUBLIC = 'public'
- UNKNOWN_PRIVACY = 'unknown_privacy'
- class scaleway.function.v1beta1.types.FunctionRuntime(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- GO113 = 'go113'
- GO117 = 'go117'
- GO118 = 'go118'
- GO119 = 'go119'
- GO120 = 'go120'
- GO121 = 'go121'
- GO122 = 'go122'
- GOLANG = 'golang'
- NODE10 = 'node10'
- NODE14 = 'node14'
- NODE16 = 'node16'
- NODE17 = 'node17'
- NODE18 = 'node18'
- NODE19 = 'node19'
- NODE20 = 'node20'
- NODE22 = 'node22'
- NODE8 = 'node8'
- PHP82 = 'php82'
- PHP83 = 'php83'
- PYTHON = 'python'
- PYTHON3 = 'python3'
- PYTHON310 = 'python310'
- PYTHON311 = 'python311'
- PYTHON312 = 'python312'
- PYTHON37 = 'python37'
- PYTHON38 = 'python38'
- PYTHON39 = 'python39'
- RUST165 = 'rust165'
- RUST179 = 'rust179'
- UNKNOWN_RUNTIME = 'unknown_runtime'
- class scaleway.function.v1beta1.types.FunctionSandbox(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- UNKNOWN_SANDBOX = 'unknown_sandbox'
- V1 = 'v1'
- V2 = 'v2'
- class scaleway.function.v1beta1.types.FunctionStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- CREATED = 'created'
- CREATING = 'creating'
- DELETING = 'deleting'
- ERROR = 'error'
- LOCKED = 'locked'
- PENDING = 'pending'
- READY = 'ready'
- UNKNOWN = 'unknown'
- class scaleway.function.v1beta1.types.GetCronRequest(cron_id: 'str', region: 'Optional[Region]')
Bases:
object
- cron_id: str
UUID of the cron to get.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.function.v1beta1.types.GetDomainRequest(domain_id: 'str', region: 'Optional[Region]')
Bases:
object
- domain_id: str
UUID of the domain to get.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.function.v1beta1.types.GetFunctionDownloadURLRequest(function_id: 'str', region: 'Optional[Region]')
Bases:
object
- function_id: str
UUID of the function to get the the download URL for.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.function.v1beta1.types.GetFunctionRequest(function_id: 'str', region: 'Optional[Region]')
Bases:
object
- function_id: str
UUID of the function.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.function.v1beta1.types.GetFunctionUploadURLRequest(function_id: 'str', content_length: 'int', region: 'Optional[Region]')
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: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.function.v1beta1.types.GetNamespaceRequest(namespace_id: 'str', region: 'Optional[Region]')
Bases:
object
- namespace_id: str
UUID of the namespace.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.function.v1beta1.types.GetTokenRequest(token_id: 'str', region: 'Optional[Region]')
Bases:
object
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- token_id: str
UUID of the token to get.
- class scaleway.function.v1beta1.types.GetTriggerRequest(trigger_id: 'str', region: 'Optional[Region]')
Bases:
object
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- trigger_id: str
ID of the trigger to get.
- class scaleway.function.v1beta1.types.ListCronsRequest(function_id: 'str', region: 'Optional[Region]', page: 'Optional[int]', page_size: 'Optional[int]', order_by: 'Optional[ListCronsRequestOrderBy]')
Bases:
object
- function_id: str
UUID of the function.
- order_by: Optional[ListCronsRequestOrderBy]
Order of the crons.
- page: Optional[int]
Page number.
- page_size: Optional[int]
Number of crons per page.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.function.v1beta1.types.ListCronsRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- class scaleway.function.v1beta1.types.ListCronsResponse(crons: 'List[Cron]', total_count: 'int')
Bases:
object
- total_count: int
Total number of crons.
- class scaleway.function.v1beta1.types.ListDomainsRequest(function_id: 'str', region: 'Optional[Region]', page: 'Optional[int]', page_size: 'Optional[int]', order_by: 'Optional[ListDomainsRequestOrderBy]')
Bases:
object
- function_id: str
UUID of the function the domain is assoicated with.
- order_by: Optional[ListDomainsRequestOrderBy]
Order of the domains.
- page: Optional[int]
Page number.
- page_size: Optional[int]
Number of domains per page.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.function.v1beta1.types.ListDomainsRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- HOSTNAME_ASC = 'hostname_asc'
- HOSTNAME_DESC = 'hostname_desc'
- class scaleway.function.v1beta1.types.ListDomainsResponse(domains: 'List[Domain]', total_count: 'int')
Bases:
object
- total_count: int
Total number of domains.
- class scaleway.function.v1beta1.types.ListFunctionRuntimesRequest(region: 'Optional[Region]')
Bases:
object
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.function.v1beta1.types.ListFunctionRuntimesResponse(runtimes: 'List[Runtime]', total_count: 'int')
Bases:
object
- total_count: int
Total number of runtimes.
- class scaleway.function.v1beta1.types.ListFunctionsRequest(namespace_id: 'str', region: 'Optional[Region]', page: 'Optional[int]', page_size: 'Optional[int]', order_by: 'Optional[ListFunctionsRequestOrderBy]', name: 'Optional[str]', organization_id: 'Optional[str]', project_id: 'Optional[str]')
Bases:
object
- name: Optional[str]
Name of the function.
- namespace_id: str
UUID of the namespace the function belongs to.
- order_by: Optional[ListFunctionsRequestOrderBy]
Order of the functions.
- organization_id: Optional[str]
UUID of the Organziation the function belongs to.
- page: Optional[int]
Page number.
- page_size: Optional[int]
Number of functions per page.
- project_id: Optional[str]
UUID of the Project the function belongs to.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.function.v1beta1.types.ListFunctionsRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- NAME_ASC = 'name_asc'
- NAME_DESC = 'name_desc'
- class scaleway.function.v1beta1.types.ListFunctionsResponse(functions: 'List[Function]', total_count: 'int')
Bases:
object
- total_count: int
Total number of functions.
- class scaleway.function.v1beta1.types.ListNamespacesRequest(region: 'Optional[Region]', page: 'Optional[int]', page_size: 'Optional[int]', order_by: 'Optional[ListNamespacesRequestOrderBy]', name: 'Optional[str]', organization_id: 'Optional[str]', project_id: 'Optional[str]')
Bases:
object
- name: Optional[str]
Name of the namespace.
- order_by: Optional[ListNamespacesRequestOrderBy]
Order of the namespaces.
- organization_id: Optional[str]
UUID of the Organization the namespace belongs to.
- page: Optional[int]
Page number.
- page_size: Optional[int]
Number of namespaces per page.
- project_id: Optional[str]
UUID of the Project the namespace belongs to.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.function.v1beta1.types.ListNamespacesRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- NAME_ASC = 'name_asc'
- NAME_DESC = 'name_desc'
- class scaleway.function.v1beta1.types.ListNamespacesResponse(namespaces: 'List[Namespace]', total_count: 'int')
Bases:
object
- total_count: int
Total number of namespaces.
- class scaleway.function.v1beta1.types.ListTokensRequest(region: 'Optional[Region]', page: 'Optional[int]', page_size: 'Optional[int]', order_by: 'Optional[ListTokensRequestOrderBy]', function_id: 'Optional[str]', namespace_id: 'Optional[str]')
Bases:
object
- function_id: Optional[str]
UUID of the function the token is assoicated with.
- namespace_id: Optional[str]
UUID of the namespace the token is associated with.
- order_by: Optional[ListTokensRequestOrderBy]
Sort order for the tokens.
- page: Optional[int]
Page number.
- page_size: Optional[int]
Number of tokens per page.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.function.v1beta1.types.ListTokensRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- class scaleway.function.v1beta1.types.ListTokensResponse(tokens: 'List[Token]', total_count: 'int')
Bases:
object
- total_count: int
- class scaleway.function.v1beta1.types.ListTriggersRequest(region: 'Optional[Region]', page: 'Optional[int]', page_size: 'Optional[int]', order_by: 'Optional[ListTriggersRequestOrderBy]', function_id: 'Optional[str]', namespace_id: 'Optional[str]', project_id: 'Optional[str]')
Bases:
object
- function_id: Optional[str]
- namespace_id: Optional[str]
- order_by: Optional[ListTriggersRequestOrderBy]
Order in which to return results.
- page: Optional[int]
Page number to return.
- page_size: Optional[int]
Maximum number of triggers to return per page.
- project_id: Optional[str]
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.function.v1beta1.types.ListTriggersRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- class scaleway.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.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: 'Region', tags: 'List[str]', error_message: 'Optional[str]', description: 'Optional[str]', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]')
Bases:
object
- created_at: Optional[datetime]
Creation date of the namespace.
- description: Optional[str]
Description of the namespace.
- environment_variables: Dict[str, str]
Environment variables of the namespace.
- error_message: Optional[str]
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]
[ALPHA] List of tags applied to the Serverless Function Namespace.
- updated_at: Optional[datetime]
Last update date of the namespace.
- class scaleway.function.v1beta1.types.NamespaceStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- CREATING = 'creating'
- DELETING = 'deleting'
- ERROR = 'error'
- LOCKED = 'locked'
- PENDING = 'pending'
- READY = 'ready'
- UNKNOWN = 'unknown'
- class scaleway.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.function.v1beta1.types.RuntimeStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- AVAILABLE = 'available'
- BETA = 'beta'
- DEPRECATED = 'deprecated'
- END_OF_LIFE = 'end_of_life'
- END_OF_SUPPORT = 'end_of_support'
- UNKNOWN_STATUS = 'unknown_status'
- class scaleway.function.v1beta1.types.Secret(key: 'str', value: 'Optional[str]')
Bases:
object
- key: str
- value: Optional[str]
- class scaleway.function.v1beta1.types.SecretHashedValue(key: 'str', hashed_value: 'str')
Bases:
object
- hashed_value: str
- key: str
- class scaleway.function.v1beta1.types.Token(id: 'str', token: 'str', status: 'TokenStatus', public_key: 'Optional[str]', description: 'Optional[str]', expires_at: 'Optional[datetime]', function_id: 'Optional[str]', namespace_id: 'Optional[str]')
Bases:
object
- description: Optional[str]
Description of the token.
- expires_at: Optional[datetime]
Date on which the token expires.
- function_id: Optional[str]
- id: str
UUID of the token.
- namespace_id: Optional[str]
- public_key: Optional[str]
Public key of the token.
- status: TokenStatus
Status of the token.
- token: str
String of the token.
- class scaleway.function.v1beta1.types.TokenStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- CREATING = 'creating'
- DELETING = 'deleting'
- ERROR = 'error'
- READY = 'ready'
- UNKNOWN = 'unknown'
- class scaleway.function.v1beta1.types.Trigger(id: 'str', name: 'str', description: 'str', function_id: 'str', input_type: 'TriggerInputType', status: 'TriggerStatus', error_message: 'Optional[str]', scw_sqs_config: 'Optional[TriggerMnqSqsClientConfig]', scw_nats_config: 'Optional[TriggerMnqNatsClientConfig]', sqs_config: 'Optional[TriggerSqsClientConfig]')
Bases:
object
- description: str
Description of the trigger.
- error_message: Optional[str]
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: Optional[TriggerMnqNatsClientConfig]
- scw_sqs_config: Optional[TriggerMnqSqsClientConfig]
- sqs_config: Optional[TriggerSqsClientConfig]
- status: TriggerStatus
Status of the trigger.
- class scaleway.function.v1beta1.types.TriggerInputType(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- NATS = 'nats'
- SCW_NATS = 'scw_nats'
- SCW_SQS = 'scw_sqs'
- SQS = 'sqs'
- UNKNOWN_INPUT_TYPE = 'unknown_input_type'
- class scaleway.function.v1beta1.types.TriggerMnqNatsClientConfig(subject: 'str', mnq_nats_account_id: 'str', mnq_project_id: 'str', mnq_region: 'str', mnq_credential_id: 'Optional[str]')
Bases:
object
- mnq_credential_id: Optional[str]
ID of the Messaging and Queuing credentials used to subscribe to the NATS subject.
- mnq_nats_account_id: str
ID of the Messaging and Queuing NATS account.
- mnq_project_id: str
ID of the Messaging and Queuing project.
- mnq_region: str
Currently, only the fr-par and nl-ams regions are available.
- subject: str
Name of the NATS subject the trigger listens to.
- class scaleway.function.v1beta1.types.TriggerMnqSqsClientConfig(queue: 'str', mnq_project_id: 'str', mnq_region: 'str', mnq_credential_id: 'Optional[str]')
Bases:
object
- mnq_credential_id: Optional[str]
ID of the Messaging and Queuing credentials used to read from the SQS queue.
- mnq_project_id: str
ID of the Messaging and Queuing project.
- mnq_region: str
Currently, only the fr-par and nl-ams regions are available.
- queue: str
Name of the SQS queue the trigger listens to.
- class scaleway.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.function.v1beta1.types.TriggerStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- CREATING = 'creating'
- DELETING = 'deleting'
- ERROR = 'error'
- PENDING = 'pending'
- READY = 'ready'
- UNKNOWN_STATUS = 'unknown_status'
- class scaleway.function.v1beta1.types.UpdateCronRequest(cron_id: 'str', region: 'Optional[Region]', function_id: 'Optional[str]', schedule: 'Optional[str]', args: 'Optional[Dict[str, Any]]', name: 'Optional[str]')
Bases:
object
- args: Optional[Dict[str, Any]]
Arguments to use with the cron.
- cron_id: str
UUID of the cron to update.
- function_id: Optional[str]
UUID of the function to use the cron with.
- name: Optional[str]
Name of the cron.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- schedule: Optional[str]
Schedule of the cron in UNIX cron format.
- class scaleway.function.v1beta1.types.UpdateFunctionRequest(function_id: 'str', region: 'Optional[Region]', environment_variables: 'Optional[Dict[str, str]]', min_scale: 'Optional[int]', max_scale: 'Optional[int]', runtime: 'Optional[FunctionRuntime]', memory_limit: 'Optional[int]', timeout: 'Optional[str]', redeploy: 'Optional[bool]', handler: 'Optional[str]', privacy: 'Optional[FunctionPrivacy]', description: 'Optional[str]', secret_environment_variables: 'Optional[List[Secret]]', http_option: 'Optional[FunctionHttpOption]', sandbox: 'Optional[FunctionSandbox]')
Bases:
object
- description: Optional[str]
Description of the function.
- environment_variables: Optional[Dict[str, str]]
Environment variables of the function to update.
- function_id: str
UUID of the function to update.
- handler: Optional[str]
Handler to use with the function.
- http_option: Optional[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.
- max_scale: Optional[int]
Maximum number of instances to scale the function to.
- memory_limit: Optional[int]
Memory limit of the function in MB.
- min_scale: Optional[int]
Minumum number of instances to scale the function to.
- privacy: Optional[FunctionPrivacy]
Privacy setting of the function.
- redeploy: Optional[bool]
Redeploy failed function.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- runtime: Optional[FunctionRuntime]
Runtime to use with the function.
- sandbox: Optional[FunctionSandbox]
Execution environment of the function.
- timeout: Optional[str]
Processing time limit for the function.
- class scaleway.function.v1beta1.types.UpdateNamespaceRequest(namespace_id: 'str', region: 'Optional[Region]', environment_variables: 'Optional[Dict[str, str]]', description: 'Optional[str]', secret_environment_variables: 'Optional[List[Secret]]', tags: 'Optional[List[str]]')
Bases:
object
- description: Optional[str]
Description of the namespace.
- environment_variables: Optional[Dict[str, str]]
Environment variables of the namespace.
- namespace_id: str
UUID of the namespapce.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- secret_environment_variables: Optional[List[Secret]]
Secret environment variables of the namespace.
- tags: Optional[List[str]]
[ALPHA] Tags of the Serverless Function Namespace.
- class scaleway.function.v1beta1.types.UpdateTriggerRequest(trigger_id: 'str', region: 'Optional[Region]', name: 'Optional[str]', description: 'Optional[str]', sqs_config: 'Optional[UpdateTriggerRequestSqsClientConfig]')
Bases:
object
- description: Optional[str]
Description of the trigger.
- name: Optional[str]
Name of the trigger.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- sqs_config: Optional[UpdateTriggerRequestSqsClientConfig]
- trigger_id: str
ID of the trigger to update.
Module contents
- class scaleway.function.v1beta1.CreateCronRequest(function_id: 'str', schedule: 'str', region: 'Optional[Region]', args: 'Optional[Dict[str, Any]]', name: 'Optional[str]')
Bases:
object
- args: Optional[Dict[str, Any]]
Arguments to use with the cron.
- function_id: str
UUID of the function to use the cron with.
- name: Optional[str]
Name of the cron.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- schedule: str
Schedule of the cron in UNIX cron format.
- class scaleway.function.v1beta1.CreateDomainRequest(hostname: 'str', function_id: 'str', region: 'Optional[Region]')
Bases:
object
- function_id: str
UUID of the function to associate the domain with.
- hostname: str
Hostame to create.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.function.v1beta1.CreateFunctionRequest(namespace_id: 'str', region: 'Optional[Region]', name: 'Optional[str]', environment_variables: 'Optional[Dict[str, str]]', min_scale: 'Optional[int]', max_scale: 'Optional[int]', runtime: 'Optional[FunctionRuntime]', memory_limit: 'Optional[int]', timeout: 'Optional[str]', handler: 'Optional[str]', privacy: 'Optional[FunctionPrivacy]', description: 'Optional[str]', secret_environment_variables: 'Optional[List[Secret]]', http_option: 'Optional[FunctionHttpOption]', sandbox: 'Optional[FunctionSandbox]')
Bases:
object
- description: Optional[str]
Description of the function.
- environment_variables: Optional[Dict[str, str]]
Environment variables of the function.
- handler: Optional[str]
Handler to use with the function.
- http_option: Optional[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.
- max_scale: Optional[int]
Maximum number of instances to scale the function to.
- memory_limit: Optional[int]
Memory limit of the function in MB.
- min_scale: Optional[int]
Minumum number of instances to scale the function to.
- name: Optional[str]
Name of the function to create.
- namespace_id: str
UUID of the namespace the function will be created in.
- privacy: Optional[FunctionPrivacy]
Privacy setting of the function.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- runtime: Optional[FunctionRuntime]
Runtime to use with the function.
- sandbox: Optional[FunctionSandbox]
Execution environment of the function.
- timeout: Optional[str]
Request processing time limit for the function.
- class scaleway.function.v1beta1.CreateNamespaceRequest(region: 'Optional[Region]', name: 'Optional[str]', environment_variables: 'Optional[Dict[str, str]]', project_id: 'Optional[str]', description: 'Optional[str]', secret_environment_variables: 'Optional[List[Secret]]', tags: 'Optional[List[str]]')
Bases:
object
- description: Optional[str]
Description of the namespace.
- environment_variables: Optional[Dict[str, str]]
Environment variables of the namespace.
- name: Optional[str]
- project_id: Optional[str]
UUID of the project in which the namespace will be created.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- secret_environment_variables: Optional[List[Secret]]
Secret environment variables of the namespace.
- tags: Optional[List[str]]
[ALPHA] Tags of the Serverless Function Namespace.
- class scaleway.function.v1beta1.CreateTokenRequest(region: 'Optional[Region]', description: 'Optional[str]', expires_at: 'Optional[datetime]', function_id: 'Optional[str]', namespace_id: 'Optional[str]')
Bases:
object
- description: Optional[str]
Description of the token.
- expires_at: Optional[datetime]
Date on which the token expires.
- function_id: Optional[str]
- namespace_id: Optional[str]
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.function.v1beta1.CreateTriggerRequest(name: 'str', function_id: 'str', region: 'Optional[Region]', description: 'Optional[str]', scw_sqs_config: 'Optional[CreateTriggerRequestMnqSqsClientConfig]', scw_nats_config: 'Optional[CreateTriggerRequestMnqNatsClientConfig]', sqs_config: 'Optional[CreateTriggerRequestSqsClientConfig]')
Bases:
object
- description: Optional[str]
Description of the trigger.
- function_id: str
ID of the function to trigger.
- name: str
Name of the trigger.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- scw_nats_config: Optional[CreateTriggerRequestMnqNatsClientConfig]
- scw_sqs_config: Optional[CreateTriggerRequestMnqSqsClientConfig]
- sqs_config: Optional[CreateTriggerRequestSqsClientConfig]
- class scaleway.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.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.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.function.v1beta1.Cron(id: 'str', function_id: 'str', schedule: 'str', status: 'CronStatus', name: 'str', args: 'Optional[Dict[str, Any]]')
Bases:
object
- args: Optional[Dict[str, Any]]
Arguments to pass with the cron.
- 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.function.v1beta1.CronStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- CREATING = 'creating'
- DELETING = 'deleting'
- ERROR = 'error'
- LOCKED = 'locked'
- PENDING = 'pending'
- READY = 'ready'
- UNKNOWN = 'unknown'
- class scaleway.function.v1beta1.DeleteCronRequest(cron_id: 'str', region: 'Optional[Region]')
Bases:
object
- cron_id: str
UUID of the cron to delete.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.function.v1beta1.DeleteDomainRequest(domain_id: 'str', region: 'Optional[Region]')
Bases:
object
- domain_id: str
UUID of the domain to delete.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.function.v1beta1.DeleteFunctionRequest(function_id: 'str', region: 'Optional[Region]')
Bases:
object
- function_id: str
UUID of the function to delete.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.function.v1beta1.DeleteNamespaceRequest(namespace_id: 'str', region: 'Optional[Region]')
Bases:
object
- namespace_id: str
UUID of the namespace.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.function.v1beta1.DeleteTokenRequest(token_id: 'str', region: 'Optional[Region]')
Bases:
object
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- token_id: str
UUID of the token to delete.
- class scaleway.function.v1beta1.DeleteTriggerRequest(trigger_id: 'str', region: 'Optional[Region]')
Bases:
object
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- trigger_id: str
ID of the trigger to delete.
- class scaleway.function.v1beta1.DeployFunctionRequest(function_id: 'str', region: 'Optional[Region]')
Bases:
object
- function_id: str
UUID of the function to deploy.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.function.v1beta1.Domain(id: 'str', hostname: 'str', function_id: 'str', url: 'str', status: 'DomainStatus', error_message: 'Optional[str]')
Bases:
object
- error_message: Optional[str]
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.function.v1beta1.DomainStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- CREATING = 'creating'
- DELETING = 'deleting'
- ERROR = 'error'
- PENDING = 'pending'
- READY = 'ready'
- UNKNOWN = 'unknown'
- class scaleway.function.v1beta1.DownloadURL(url: 'str', headers: 'Dict[str, List[str]]')
Bases:
object
- headers: Dict[str, List[str]]
- url: str
- class scaleway.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]', timeout: 'Optional[str]', error_message: 'Optional[str]', build_message: 'Optional[str]', description: 'Optional[str]', region: 'Region', http_option: 'FunctionHttpOption', runtime_message: 'str', sandbox: 'FunctionSandbox', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]', ready_at: 'Optional[datetime]')
Bases:
object
- build_message: Optional[str]
Description of the current build step.
- cpu_limit: int
CPU limit of the function.
- created_at: Optional[datetime]
Creation date of the function.
- description: Optional[str]
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: Optional[str]
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.
- ready_at: Optional[datetime]
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.
- timeout: Optional[str]
Request processing time limit for the function.
- updated_at: Optional[datetime]
Last update date of the function.
- class scaleway.function.v1beta1.FunctionHttpOption(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- ENABLED = 'enabled'
- REDIRECTED = 'redirected'
- UNKNOWN_HTTP_OPTION = 'unknown_http_option'
- class scaleway.function.v1beta1.FunctionPrivacy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- PRIVATE = 'private'
- PUBLIC = 'public'
- UNKNOWN_PRIVACY = 'unknown_privacy'
- class scaleway.function.v1beta1.FunctionRuntime(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- GO113 = 'go113'
- GO117 = 'go117'
- GO118 = 'go118'
- GO119 = 'go119'
- GO120 = 'go120'
- GO121 = 'go121'
- GO122 = 'go122'
- GOLANG = 'golang'
- NODE10 = 'node10'
- NODE14 = 'node14'
- NODE16 = 'node16'
- NODE17 = 'node17'
- NODE18 = 'node18'
- NODE19 = 'node19'
- NODE20 = 'node20'
- NODE22 = 'node22'
- NODE8 = 'node8'
- PHP82 = 'php82'
- PHP83 = 'php83'
- PYTHON = 'python'
- PYTHON3 = 'python3'
- PYTHON310 = 'python310'
- PYTHON311 = 'python311'
- PYTHON312 = 'python312'
- PYTHON37 = 'python37'
- PYTHON38 = 'python38'
- PYTHON39 = 'python39'
- RUST165 = 'rust165'
- RUST179 = 'rust179'
- UNKNOWN_RUNTIME = 'unknown_runtime'
- class scaleway.function.v1beta1.FunctionSandbox(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- UNKNOWN_SANDBOX = 'unknown_sandbox'
- V1 = 'v1'
- V2 = 'v2'
- class scaleway.function.v1beta1.FunctionStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- CREATED = 'created'
- CREATING = 'creating'
- DELETING = 'deleting'
- ERROR = 'error'
- LOCKED = 'locked'
- PENDING = 'pending'
- READY = 'ready'
- UNKNOWN = 'unknown'
- class scaleway.function.v1beta1.FunctionV1Beta1API(client: Client, *, bypass_validation: bool = False)
Bases:
API
This API allows you to manage your Serverless Functions.
- create_cron(*, function_id: str, schedule: str, region: Optional[str] = None, args: Optional[Dict[str, Any]] = None, name: Optional[str] = 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:
Cron
Usage:
result = api.create_cron( function_id="example", schedule="example", )
- create_domain(*, hostname: str, function_id: str, region: Optional[str] = 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:
Domain
Usage:
result = api.create_domain( hostname="example", function_id="example", )
- create_function(*, namespace_id: str, region: Optional[str] = None, name: Optional[str] = None, environment_variables: Optional[Dict[str, str]] = None, min_scale: Optional[int] = None, max_scale: Optional[int] = None, runtime: Optional[FunctionRuntime] = None, memory_limit: Optional[int] = None, timeout: Optional[str] = None, handler: Optional[str] = None, privacy: Optional[FunctionPrivacy] = None, description: Optional[str] = None, secret_environment_variables: Optional[List[Secret]] = None, http_option: Optional[FunctionHttpOption] = None, sandbox: Optional[FunctionSandbox] = 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: Minumum 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.
- Returns:
Usage:
result = api.create_function( namespace_id="example", )
- create_namespace(*, region: Optional[str] = None, name: Optional[str] = None, environment_variables: Optional[Dict[str, str]] = None, project_id: Optional[str] = None, description: Optional[str] = None, secret_environment_variables: Optional[List[Secret]] = None, tags: Optional[List[str]] = None) Namespace
Create a new namespace. Create a new namespace in a specified 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: [ALPHA] Tags of the Serverless Function Namespace. :return:
Namespace
Usage:
result = api.create_namespace()
- create_token(*, region: Optional[str] = None, function_id: Optional[str] = None, namespace_id: Optional[str] = None, description: Optional[str] = None, expires_at: Optional[datetime] = None) Token
Create a new revocable token. :param region: Region to target. If none is passed will use default region from the config. :param 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:
Token
Usage:
result = api.create_token()
- create_trigger(*, name: str, function_id: str, region: Optional[str] = None, description: Optional[str] = None, scw_sqs_config: Optional[CreateTriggerRequestMnqSqsClientConfig] = None, scw_nats_config: Optional[CreateTriggerRequestMnqNatsClientConfig] = None, sqs_config: Optional[CreateTriggerRequestSqsClientConfig] = None) Trigger
Create a trigger. Create a new trigger for a specified 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:
Trigger
Usage:
result = api.create_trigger( name="example", function_id="example", )
- delete_cron(*, cron_id: str, region: Optional[str] = None) Cron
Delete an existing cron. Delete the cron associated with the specified ID. :param cron_id: UUID of the cron to delete. :param region: Region to target. If none is passed will use default region from the config. :return:
Cron
Usage:
result = api.delete_cron( cron_id="example", )
- delete_domain(*, domain_id: str, region: Optional[str] = None) Domain
Delete a domain name binding. Delete 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:
Domain
Usage:
result = api.delete_domain( domain_id="example", )
- delete_function(*, function_id: str, region: Optional[str] = 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:
Function
Usage:
result = api.delete_function( function_id="example", )
- delete_namespace(*, namespace_id: str, region: Optional[str] = None) Namespace
Delete an existing namespace. Delete the namespace associated with the specified ID. :param namespace_id: UUID of the namespace. :param region: Region to target. If none is passed will use default region from the config. :return:
Namespace
Usage:
result = api.delete_namespace( namespace_id="example", )
- delete_token(*, token_id: str, region: Optional[str] = None) Token
Delete a token. :param token_id: UUID of the token to delete. :param region: Region to target. If none is passed will use default region from the config. :return:
Token
Usage:
result = api.delete_token( token_id="example", )
- delete_trigger(*, trigger_id: str, region: Optional[str] = None) Trigger
Delete a trigger. Delete a trigger with a specified ID. :param trigger_id: ID of the trigger to delete. :param region: Region to target. If none is passed will use default region from the config. :return:
Trigger
Usage:
result = api.delete_trigger( trigger_id="example", )
- deploy_function(*, function_id: str, region: Optional[str] = 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:
Function
Usage:
result = api.deploy_function( function_id="example", )
- get_cron(*, cron_id: str, region: Optional[str] = None) Cron
Get a cron. Get the cron associated with the specified ID. :param cron_id: UUID of the cron to get. :param region: Region to target. If none is passed will use default region from the config. :return:
Cron
Usage:
result = api.get_cron( cron_id="example", )
- get_domain(*, domain_id: str, region: Optional[str] = None) Domain
Get a domain name binding. Get a domain name binding for the 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:
Domain
Usage:
result = api.get_domain( domain_id="example", )
- get_function(*, function_id: str, region: Optional[str] = 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:
Function
Usage:
result = api.get_function( function_id="example", )
- get_function_download_url(*, function_id: str, region: Optional[str] = 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 the download URL for. :param region: Region to target. If none is passed will use default region from the config. :return:
DownloadURL
Usage:
result = api.get_function_download_url( function_id="example", )
- get_function_upload_url(*, function_id: str, content_length: int, region: Optional[str] = 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:
UploadURL
Usage:
result = api.get_function_upload_url( function_id="example", content_length=1, )
- get_namespace(*, namespace_id: str, region: Optional[str] = None) Namespace
Get a namespace. Get the namespace associated with the specified ID. :param namespace_id: UUID of the namespace. :param region: Region to target. If none is passed will use default region from the config. :return:
Namespace
Usage:
result = api.get_namespace( namespace_id="example", )
- get_token(*, token_id: str, region: Optional[str] = None) Token
Get a token. :param token_id: UUID of the token to get. :param region: Region to target. If none is passed will use default region from the config. :return:
Token
Usage:
result = api.get_token( token_id="example", )
- get_trigger(*, trigger_id: str, region: Optional[str] = None) Trigger
Get a trigger. Get a trigger with a specified ID. :param trigger_id: ID of the trigger to get. :param region: Region to target. If none is passed will use default region from the config. :return:
Trigger
Usage:
result = api.get_trigger( trigger_id="example", )
- list_crons(*, function_id: str, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListCronsRequestOrderBy] = 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:
ListCronsResponse
Usage:
result = api.list_crons( function_id="example", )
- list_crons_all(*, function_id: str, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListCronsRequestOrderBy] = 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 = api.list_crons_all( function_id="example", )
- list_domains(*, function_id: str, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListDomainsRequestOrderBy] = None) ListDomainsResponse
List all domain name bindings. List all domain name bindings in a specified region. :param function_id: UUID of the function the domain is assoicated 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:
ListDomainsResponse
Usage:
result = api.list_domains( function_id="example", )
- list_domains_all(*, function_id: str, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListDomainsRequestOrderBy] = None) List[Domain]
List all domain name bindings. List all domain name bindings in a specified region. :param function_id: UUID of the function the domain is assoicated 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 = api.list_domains_all( function_id="example", )
- list_function_runtimes(*, region: Optional[str] = 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:
ListFunctionRuntimesResponse
Usage:
result = api.list_function_runtimes()
- list_functions(*, namespace_id: str, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListFunctionsRequestOrderBy] = None, name: Optional[str] = None, organization_id: Optional[str] = None, project_id: Optional[str] = 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 Organziation the function belongs to. :param project_id: UUID of the Project the function belongs to. :return:
ListFunctionsResponse
Usage:
result = api.list_functions( namespace_id="example", )
- list_functions_all(*, namespace_id: str, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListFunctionsRequestOrderBy] = None, name: Optional[str] = None, organization_id: Optional[str] = None, project_id: Optional[str] = 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 Organziation the function belongs to. :param project_id: UUID of the Project the function belongs to. :return:
List[Function]
Usage:
result = api.list_functions_all( namespace_id="example", )
- list_namespaces(*, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListNamespacesRequestOrderBy] = None, name: Optional[str] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None) ListNamespacesResponse
List all your namespaces. List all 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:
ListNamespacesResponse
Usage:
result = api.list_namespaces()
- list_namespaces_all(*, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListNamespacesRequestOrderBy] = None, name: Optional[str] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None) List[Namespace]
List all your namespaces. List all 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 = api.list_namespaces_all()
- list_tokens(*, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListTokensRequestOrderBy] = None, function_id: Optional[str] = None, namespace_id: Optional[str] = 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 assoicated with. :param namespace_id: UUID of the namespace the token is associated with. :return:
ListTokensResponse
Usage:
result = api.list_tokens()
- list_tokens_all(*, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListTokensRequestOrderBy] = None, function_id: Optional[str] = None, namespace_id: Optional[str] = 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 assoicated with. :param namespace_id: UUID of the namespace the token is associated with. :return:
List[Token]
Usage:
result = api.list_tokens_all()
- list_triggers(*, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListTriggersRequestOrderBy] = None, function_id: Optional[str] = None, namespace_id: Optional[str] = None, project_id: Optional[str] = None) ListTriggersResponse
List all triggers. List all triggers belonging to a specified Organization or Project. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number to return. :param page_size: Maximum number of triggers to return per page. :param order_by: Order in which to return results. :param 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:
ListTriggersResponse
Usage:
result = api.list_triggers()
- list_triggers_all(*, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListTriggersRequestOrderBy] = None, function_id: Optional[str] = None, namespace_id: Optional[str] = None, project_id: Optional[str] = None) List[Trigger]
List all triggers. List all triggers belonging to a specified Organization or Project. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number to return. :param page_size: Maximum number of triggers to return per page. :param order_by: Order in which to return results. :param 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 = api.list_triggers_all()
- update_cron(*, cron_id: str, region: Optional[str] = None, function_id: Optional[str] = None, schedule: Optional[str] = None, args: Optional[Dict[str, Any]] = None, name: Optional[str] = None) Cron
Update an existing cron. Update the cron associated with the specified ID. :param cron_id: UUID of the cron to update. :param region: Region to target. If none is passed will use default region from the config. :param 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:
Cron
Usage:
result = api.update_cron( cron_id="example", )
- update_function(*, function_id: str, region: Optional[str] = None, environment_variables: Optional[Dict[str, str]] = None, min_scale: Optional[int] = None, max_scale: Optional[int] = None, runtime: Optional[FunctionRuntime] = None, memory_limit: Optional[int] = None, timeout: Optional[str] = None, redeploy: Optional[bool] = None, handler: Optional[str] = None, privacy: Optional[FunctionPrivacy] = None, description: Optional[str] = None, secret_environment_variables: Optional[List[Secret]] = None, http_option: Optional[FunctionHttpOption] = None, sandbox: Optional[FunctionSandbox] = None) Function
Update an existing function. Update the function associated with the specified ID. :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: Minumum 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: Secret environment variables of the function. :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.
- Returns:
Usage:
result = api.update_function( function_id="example", )
- update_namespace(*, namespace_id: str, region: Optional[str] = None, environment_variables: Optional[Dict[str, str]] = None, description: Optional[str] = None, secret_environment_variables: Optional[List[Secret]] = None, tags: Optional[List[str]] = None) Namespace
Update an existing namespace. Update the 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: [ALPHA] Tags of the Serverless Function Namespace. :return:
Namespace
Usage:
result = api.update_namespace( namespace_id="example", )
- update_trigger(*, trigger_id: str, region: Optional[str] = None, name: Optional[str] = None, description: Optional[str] = None, sqs_config: Optional[UpdateTriggerRequestSqsClientConfig] = None) Trigger
Update a trigger. Update a trigger with a specified ID. :param trigger_id: ID of the trigger to update. :param region: Region to target. If none is passed will use default region from the config. :param name: Name of the trigger. :param description: Description of the trigger. :param sqs_config: Configuration for an AWS SQS queue. One-Of (‘config’): at most one of ‘sqs_config’ could be set. :return:
Trigger
Usage:
result = api.update_trigger( trigger_id="example", )
- wait_for_cron(*, cron_id: str, region: Optional[str] = None, options: Optional[WaitForOptions[Cron, bool]] = None) Cron
Get a cron. Get the cron associated with the specified ID. :param cron_id: UUID of the cron to get. :param region: Region to target. If none is passed will use default region from the config. :return:
Cron
Usage:
result = api.get_cron( cron_id="example", )
- wait_for_domain(*, domain_id: str, region: Optional[str] = None, options: Optional[WaitForOptions[Domain, bool]] = None) Domain
Get a domain name binding. Get a domain name binding for the 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:
Domain
Usage:
result = api.get_domain( domain_id="example", )
- wait_for_function(*, function_id: str, region: Optional[str] = None, options: Optional[WaitForOptions[Function, bool]] = 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:
Function
Usage:
result = api.get_function( function_id="example", )
- wait_for_namespace(*, namespace_id: str, region: Optional[str] = None, options: Optional[WaitForOptions[Namespace, bool]] = None) Namespace
Get a namespace. Get the namespace associated with the specified ID. :param namespace_id: UUID of the namespace. :param region: Region to target. If none is passed will use default region from the config. :return:
Namespace
Usage:
result = api.get_namespace( namespace_id="example", )
- wait_for_token(*, token_id: str, region: Optional[str] = None, options: Optional[WaitForOptions[Token, bool]] = None) Token
Get a token. :param token_id: UUID of the token to get. :param region: Region to target. If none is passed will use default region from the config. :return:
Token
Usage:
result = api.get_token( token_id="example", )
- wait_for_trigger(*, trigger_id: str, region: Optional[str] = None, options: Optional[WaitForOptions[Trigger, bool]] = None) Trigger
Get a trigger. Get a trigger with a specified ID. :param trigger_id: ID of the trigger to get. :param region: Region to target. If none is passed will use default region from the config. :return:
Trigger
Usage:
result = api.get_trigger( trigger_id="example", )
- class scaleway.function.v1beta1.GetCronRequest(cron_id: 'str', region: 'Optional[Region]')
Bases:
object
- cron_id: str
UUID of the cron to get.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.function.v1beta1.GetDomainRequest(domain_id: 'str', region: 'Optional[Region]')
Bases:
object
- domain_id: str
UUID of the domain to get.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.function.v1beta1.GetFunctionDownloadURLRequest(function_id: 'str', region: 'Optional[Region]')
Bases:
object
- function_id: str
UUID of the function to get the the download URL for.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.function.v1beta1.GetFunctionRequest(function_id: 'str', region: 'Optional[Region]')
Bases:
object
- function_id: str
UUID of the function.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.function.v1beta1.GetFunctionUploadURLRequest(function_id: 'str', content_length: 'int', region: 'Optional[Region]')
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: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.function.v1beta1.GetNamespaceRequest(namespace_id: 'str', region: 'Optional[Region]')
Bases:
object
- namespace_id: str
UUID of the namespace.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.function.v1beta1.GetTokenRequest(token_id: 'str', region: 'Optional[Region]')
Bases:
object
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- token_id: str
UUID of the token to get.
- class scaleway.function.v1beta1.GetTriggerRequest(trigger_id: 'str', region: 'Optional[Region]')
Bases:
object
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- trigger_id: str
ID of the trigger to get.
- class scaleway.function.v1beta1.ListCronsRequest(function_id: 'str', region: 'Optional[Region]', page: 'Optional[int]', page_size: 'Optional[int]', order_by: 'Optional[ListCronsRequestOrderBy]')
Bases:
object
- function_id: str
UUID of the function.
- order_by: Optional[ListCronsRequestOrderBy]
Order of the crons.
- page: Optional[int]
Page number.
- page_size: Optional[int]
Number of crons per page.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.function.v1beta1.ListCronsRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- class scaleway.function.v1beta1.ListCronsResponse(crons: 'List[Cron]', total_count: 'int')
Bases:
object
- total_count: int
Total number of crons.
- class scaleway.function.v1beta1.ListDomainsRequest(function_id: 'str', region: 'Optional[Region]', page: 'Optional[int]', page_size: 'Optional[int]', order_by: 'Optional[ListDomainsRequestOrderBy]')
Bases:
object
- function_id: str
UUID of the function the domain is assoicated with.
- order_by: Optional[ListDomainsRequestOrderBy]
Order of the domains.
- page: Optional[int]
Page number.
- page_size: Optional[int]
Number of domains per page.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.function.v1beta1.ListDomainsRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- HOSTNAME_ASC = 'hostname_asc'
- HOSTNAME_DESC = 'hostname_desc'
- class scaleway.function.v1beta1.ListDomainsResponse(domains: 'List[Domain]', total_count: 'int')
Bases:
object
- total_count: int
Total number of domains.
- class scaleway.function.v1beta1.ListFunctionRuntimesRequest(region: 'Optional[Region]')
Bases:
object
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.function.v1beta1.ListFunctionRuntimesResponse(runtimes: 'List[Runtime]', total_count: 'int')
Bases:
object
- total_count: int
Total number of runtimes.
- class scaleway.function.v1beta1.ListFunctionsRequest(namespace_id: 'str', region: 'Optional[Region]', page: 'Optional[int]', page_size: 'Optional[int]', order_by: 'Optional[ListFunctionsRequestOrderBy]', name: 'Optional[str]', organization_id: 'Optional[str]', project_id: 'Optional[str]')
Bases:
object
- name: Optional[str]
Name of the function.
- namespace_id: str
UUID of the namespace the function belongs to.
- order_by: Optional[ListFunctionsRequestOrderBy]
Order of the functions.
- organization_id: Optional[str]
UUID of the Organziation the function belongs to.
- page: Optional[int]
Page number.
- page_size: Optional[int]
Number of functions per page.
- project_id: Optional[str]
UUID of the Project the function belongs to.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.function.v1beta1.ListFunctionsRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- NAME_ASC = 'name_asc'
- NAME_DESC = 'name_desc'
- class scaleway.function.v1beta1.ListFunctionsResponse(functions: 'List[Function]', total_count: 'int')
Bases:
object
- total_count: int
Total number of functions.
- class scaleway.function.v1beta1.ListNamespacesRequest(region: 'Optional[Region]', page: 'Optional[int]', page_size: 'Optional[int]', order_by: 'Optional[ListNamespacesRequestOrderBy]', name: 'Optional[str]', organization_id: 'Optional[str]', project_id: 'Optional[str]')
Bases:
object
- name: Optional[str]
Name of the namespace.
- order_by: Optional[ListNamespacesRequestOrderBy]
Order of the namespaces.
- organization_id: Optional[str]
UUID of the Organization the namespace belongs to.
- page: Optional[int]
Page number.
- page_size: Optional[int]
Number of namespaces per page.
- project_id: Optional[str]
UUID of the Project the namespace belongs to.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.function.v1beta1.ListNamespacesRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- NAME_ASC = 'name_asc'
- NAME_DESC = 'name_desc'
- class scaleway.function.v1beta1.ListNamespacesResponse(namespaces: 'List[Namespace]', total_count: 'int')
Bases:
object
- total_count: int
Total number of namespaces.
- class scaleway.function.v1beta1.ListTokensRequest(region: 'Optional[Region]', page: 'Optional[int]', page_size: 'Optional[int]', order_by: 'Optional[ListTokensRequestOrderBy]', function_id: 'Optional[str]', namespace_id: 'Optional[str]')
Bases:
object
- function_id: Optional[str]
UUID of the function the token is assoicated with.
- namespace_id: Optional[str]
UUID of the namespace the token is associated with.
- order_by: Optional[ListTokensRequestOrderBy]
Sort order for the tokens.
- page: Optional[int]
Page number.
- page_size: Optional[int]
Number of tokens per page.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.function.v1beta1.ListTokensRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- class scaleway.function.v1beta1.ListTokensResponse(tokens: 'List[Token]', total_count: 'int')
Bases:
object
- total_count: int
- class scaleway.function.v1beta1.ListTriggersRequest(region: 'Optional[Region]', page: 'Optional[int]', page_size: 'Optional[int]', order_by: 'Optional[ListTriggersRequestOrderBy]', function_id: 'Optional[str]', namespace_id: 'Optional[str]', project_id: 'Optional[str]')
Bases:
object
- function_id: Optional[str]
- namespace_id: Optional[str]
- order_by: Optional[ListTriggersRequestOrderBy]
Order in which to return results.
- page: Optional[int]
Page number to return.
- page_size: Optional[int]
Maximum number of triggers to return per page.
- project_id: Optional[str]
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway.function.v1beta1.ListTriggersRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- class scaleway.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.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: 'Region', tags: 'List[str]', error_message: 'Optional[str]', description: 'Optional[str]', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]')
Bases:
object
- created_at: Optional[datetime]
Creation date of the namespace.
- description: Optional[str]
Description of the namespace.
- environment_variables: Dict[str, str]
Environment variables of the namespace.
- error_message: Optional[str]
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]
[ALPHA] List of tags applied to the Serverless Function Namespace.
- updated_at: Optional[datetime]
Last update date of the namespace.
- class scaleway.function.v1beta1.NamespaceStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- CREATING = 'creating'
- DELETING = 'deleting'
- ERROR = 'error'
- LOCKED = 'locked'
- PENDING = 'pending'
- READY = 'ready'
- UNKNOWN = 'unknown'
- class scaleway.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.function.v1beta1.RuntimeStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- AVAILABLE = 'available'
- BETA = 'beta'
- DEPRECATED = 'deprecated'
- END_OF_LIFE = 'end_of_life'
- END_OF_SUPPORT = 'end_of_support'
- UNKNOWN_STATUS = 'unknown_status'
- class scaleway.function.v1beta1.Secret(key: 'str', value: 'Optional[str]')
Bases:
object
- key: str
- value: Optional[str]
- class scaleway.function.v1beta1.SecretHashedValue(key: 'str', hashed_value: 'str')
Bases:
object
- hashed_value: str
- key: str
- class scaleway.function.v1beta1.Token(id: 'str', token: 'str', status: 'TokenStatus', public_key: 'Optional[str]', description: 'Optional[str]', expires_at: 'Optional[datetime]', function_id: 'Optional[str]', namespace_id: 'Optional[str]')
Bases:
object
- description: Optional[str]
Description of the token.
- expires_at: Optional[datetime]
Date on which the token expires.
- function_id: Optional[str]
- id: str
UUID of the token.
- namespace_id: Optional[str]
- public_key: Optional[str]
Public key of the token.
- status: TokenStatus
Status of the token.
- token: str
String of the token.
- class scaleway.function.v1beta1.TokenStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- CREATING = 'creating'
- DELETING = 'deleting'
- ERROR = 'error'
- READY = 'ready'
- UNKNOWN = 'unknown'
- class scaleway.function.v1beta1.Trigger(id: 'str', name: 'str', description: 'str', function_id: 'str', input_type: 'TriggerInputType', status: 'TriggerStatus', error_message: 'Optional[str]', scw_sqs_config: 'Optional[TriggerMnqSqsClientConfig]', scw_nats_config: 'Optional[TriggerMnqNatsClientConfig]', sqs_config: 'Optional[TriggerSqsClientConfig]')
Bases:
object
- description: str
Description of the trigger.
- error_message: Optional[str]
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: Optional[TriggerMnqNatsClientConfig]
- scw_sqs_config: Optional[TriggerMnqSqsClientConfig]
- sqs_config: Optional[TriggerSqsClientConfig]
- status: TriggerStatus
Status of the trigger.
- class scaleway.function.v1beta1.TriggerInputType(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- NATS = 'nats'
- SCW_NATS = 'scw_nats'
- SCW_SQS = 'scw_sqs'
- SQS = 'sqs'
- UNKNOWN_INPUT_TYPE = 'unknown_input_type'
- class scaleway.function.v1beta1.TriggerMnqNatsClientConfig(subject: 'str', mnq_nats_account_id: 'str', mnq_project_id: 'str', mnq_region: 'str', mnq_credential_id: 'Optional[str]')
Bases:
object
- mnq_credential_id: Optional[str]
ID of the Messaging and Queuing credentials used to subscribe to the NATS subject.
- mnq_nats_account_id: str
ID of the Messaging and Queuing NATS account.
- mnq_project_id: str
ID of the Messaging and Queuing project.
- mnq_region: str
Currently, only the fr-par and nl-ams regions are available.
- subject: str
Name of the NATS subject the trigger listens to.
- class scaleway.function.v1beta1.TriggerMnqSqsClientConfig(queue: 'str', mnq_project_id: 'str', mnq_region: 'str', mnq_credential_id: 'Optional[str]')
Bases:
object
- mnq_credential_id: Optional[str]
ID of the Messaging and Queuing credentials used to read from the SQS queue.
- mnq_project_id: str
ID of the Messaging and Queuing project.
- mnq_region: str
Currently, only the fr-par and nl-ams regions are available.
- queue: str
Name of the SQS queue the trigger listens to.
- class scaleway.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.function.v1beta1.TriggerStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- CREATING = 'creating'
- DELETING = 'deleting'
- ERROR = 'error'
- PENDING = 'pending'
- READY = 'ready'
- UNKNOWN_STATUS = 'unknown_status'
- class scaleway.function.v1beta1.UpdateCronRequest(cron_id: 'str', region: 'Optional[Region]', function_id: 'Optional[str]', schedule: 'Optional[str]', args: 'Optional[Dict[str, Any]]', name: 'Optional[str]')
Bases:
object
- args: Optional[Dict[str, Any]]
Arguments to use with the cron.
- cron_id: str
UUID of the cron to update.
- function_id: Optional[str]
UUID of the function to use the cron with.
- name: Optional[str]
Name of the cron.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- schedule: Optional[str]
Schedule of the cron in UNIX cron format.
- class scaleway.function.v1beta1.UpdateFunctionRequest(function_id: 'str', region: 'Optional[Region]', environment_variables: 'Optional[Dict[str, str]]', min_scale: 'Optional[int]', max_scale: 'Optional[int]', runtime: 'Optional[FunctionRuntime]', memory_limit: 'Optional[int]', timeout: 'Optional[str]', redeploy: 'Optional[bool]', handler: 'Optional[str]', privacy: 'Optional[FunctionPrivacy]', description: 'Optional[str]', secret_environment_variables: 'Optional[List[Secret]]', http_option: 'Optional[FunctionHttpOption]', sandbox: 'Optional[FunctionSandbox]')
Bases:
object
- description: Optional[str]
Description of the function.
- environment_variables: Optional[Dict[str, str]]
Environment variables of the function to update.
- function_id: str
UUID of the function to update.
- handler: Optional[str]
Handler to use with the function.
- http_option: Optional[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.
- max_scale: Optional[int]
Maximum number of instances to scale the function to.
- memory_limit: Optional[int]
Memory limit of the function in MB.
- min_scale: Optional[int]
Minumum number of instances to scale the function to.
- privacy: Optional[FunctionPrivacy]
Privacy setting of the function.
- redeploy: Optional[bool]
Redeploy failed function.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- runtime: Optional[FunctionRuntime]
Runtime to use with the function.
- sandbox: Optional[FunctionSandbox]
Execution environment of the function.
- timeout: Optional[str]
Processing time limit for the function.
- class scaleway.function.v1beta1.UpdateNamespaceRequest(namespace_id: 'str', region: 'Optional[Region]', environment_variables: 'Optional[Dict[str, str]]', description: 'Optional[str]', secret_environment_variables: 'Optional[List[Secret]]', tags: 'Optional[List[str]]')
Bases:
object
- description: Optional[str]
Description of the namespace.
- environment_variables: Optional[Dict[str, str]]
Environment variables of the namespace.
- namespace_id: str
UUID of the namespapce.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- secret_environment_variables: Optional[List[Secret]]
Secret environment variables of the namespace.
- tags: Optional[List[str]]
[ALPHA] Tags of the Serverless Function Namespace.
- class scaleway.function.v1beta1.UpdateTriggerRequest(trigger_id: 'str', region: 'Optional[Region]', name: 'Optional[str]', description: 'Optional[str]', sqs_config: 'Optional[UpdateTriggerRequestSqsClientConfig]')
Bases:
object
- description: Optional[str]
Description of the trigger.
- name: Optional[str]
Name of the trigger.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- sqs_config: Optional[UpdateTriggerRequestSqsClientConfig]
- trigger_id: str
ID of the trigger to update.