Home / API Documentation / Operations center / Advanced / Update the deep inspection task

Update the deep inspection task

Requests

HTTP request

PUT /apis/testing.alauda.io/v1alpha1/namespaces/{namespace}/functiontests/{name}

replace the specified FunctionTest

Path parameters

Name Type Required Description
name string Truename of the FunctionTest
namespace string Trueobject name and auth scope, such as for teams and projects

Query parameters

Name Type Required Description
dryRun string FalseWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
fieldManager string FalsefieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.
pretty string FalseIf 'true', then the output is pretty printed.

Request body

Content-Type application/json, application/yaml

Sample request

FunctionTest is the Schema for the functiontests API

{
   "apiVersion": "testing.alauda.io/v1alpha1",
   "kind": "FunctionTest",
   "metadata": {
     "name": "check-example",
     "resourceVersion": "48604602"
   },
   "spec": {
     "environment": {
       "businessCluster": "global"
     },
     "failedJobHistoryLimit": 3,
     "functions": [
       "*"
     ],
     "schedule": "5 * * * *",
     "successfulJobHistoryLimit": 3,
     "suspend": false,
     "type": "check"
   }
 }

Parmeters

Name Type Required Description
apiVersion string TrueSee common parameters
kind string TrueSee common parameters
metadata object TrueSee common parameters
spec object True FunctionTestSpec defines the desired state of FunctionTest
Path: spec
spec.environment object True Testing target's environment
Path: spec.environment
environment.businessCluster string True Target business cluster's name.
Path: spec.environment.businessCluster
spec.failedJobHistoryLimit integer (int32) True The number of failed finished jobs to retain. Value must be non-negative integer. Defaults to 1.
Path: spec.failedJobHistoryLimit
spec.functions array True Specify the target functions intend to test.
Path: spec.functions
spec.functions[] string True
Path: spec.functions[]
spec.schedule string True The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
Path: spec.schedule
spec.successfulJobHistoryLimit integer (int32) True The number of successful finished jobs to retain. Value must be non-negative integer. Defaults to 3.
Path: spec.successfulJobHistoryLimit
spec.suspend boolean True This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.
Path: spec.suspend
spec.type string True Specify the test's type, check or test.
Path: spec.type

Responses

Content-Type application/json, application/yaml

Status code: 200

OK

Sample response

FunctionTest is the Schema for the functiontests API

{
   "apiVersion": "testing.alauda.io/v1alpha1",
   "kind": "FunctionTest",
   "metadata": {
     "creationTimestamp": "2021-06-08T10:02:11Z",
     "generation": 9,
     "name": "check-example",
     "namespace": "cpaas-system",
     "resourceVersion": "51268868",
     "selfLink": "/apis/testing.alauda.io/v1alpha1/namespaces/cpaas-system/functiontests/check-example2",
     "uid": "e6bc4a4f-c050-451d-9375-1a3de04c6f58"
   },
   "spec": {
     "environment": {
       "businessCluster": "global"
     },
     "failedJobHistoryLimit": 3,
     "functions": [
       "*"
     ],
     "schedule": "5 * * * *",
     "successfulJobHistoryLimit": 3,
     "suspend": false,
     "type": "check"
   },
   "status": {
     "estimatedCpu": 300,
     "estimatedMemory": 300,
     "estimatedTime": 71,
     "lastScheduleResult": "failed",
     "lastScheduleTime": "2021-06-16T09:00:23Z"
   }
 }

Parameters

Name Type Description
apiVersion string See common parameters
kind string See common parameters
metadata object See common parameters
spec object FunctionTestSpec defines the desired state of FunctionTest
Path: spec
spec.environment object Testing target's environment
Path: spec.environment
environment.businessCluster string Target business cluster's name.
Path: spec.environment.businessCluster
spec.failedJobHistoryLimit integer (int32) The number of failed finished jobs to retain. Value must be non-negative integer. Defaults to 1.
Path: spec.failedJobHistoryLimit
spec.functions array Specify the target functions intend to test.
Path: spec.functions
spec.functions[] string
Path: spec.functions[]
spec.schedule string The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
Path: spec.schedule
spec.successfulJobHistoryLimit integer (int32) The number of successful finished jobs to retain. Value must be non-negative integer. Defaults to 3.
Path: spec.successfulJobHistoryLimit
spec.suspend boolean This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.
Path: spec.suspend
spec.type string Specify the test's type, check or test.
Path: spec.type
status object FunctionTestStatus defines the observed state of FunctionTest
Path: status
status.estimatedCpu integer (int64) Information how many cpu the test created workload will take, unit is m.
Path: status.estimatedCpu
status.estimatedMemory integer (int64) Information how many memory the test created workload will take, unit is Mi.
Path: status.estimatedMemory
status.estimatedTime integer (int64) Information how the test will take to run.
Path: status.estimatedTime
status.lastScheduleResult string Information about the last scheduled job's result
Path: status.lastScheduleResult
status.lastScheduleTime string (date-time) Information when was the last time the job was successfully scheduled.
Path: status.lastScheduleTime

Other status codes

Status code: 201

Created

Status code: 401

Unauthorized