FunctionService class final
Google Cloud Functions is used to deploy functions that are executed by Google in response to various events. Data connected with that event is passed to a function as the input data.
A function is a resource which describes a function that should be executed and how it is triggered.
Constructors
- FunctionService({required Client client})
-
Creates a
FunctionServiceusingclientfor transport. - FunctionService.fromApiKey([String? apiKey])
-
Creates a
FunctionServicethat does authentication through an API key.factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
) → void - Closes the client and cleans up any resources associated with it.
-
createFunction(
CreateFunctionRequest request) → Future< Operation< Function$, OperationMetadata> > -
Creates a new function. If a function with the given name already exists in
the specified project, the long running operation will return
ALREADY_EXISTSerror. -
deleteFunction(
DeleteFunctionRequest request) → Future< Operation< Empty, OperationMetadata> > - Deletes a function with the given name from the specified project. If the given function is used by some trigger, the trigger will be updated to remove this function.
-
generateDownloadUrl(
GenerateDownloadUrlRequest request) → Future< GenerateDownloadUrlResponse> - Returns a signed URL for downloading deployed function source code. The URL is only valid for a limited period and should be used within 30 minutes of generation. For more information about the signed URL usage see: https://cloud.google.com/storage/docs/access-control/signed-urls
-
generateUploadUrl(
GenerateUploadUrlRequest request) → Future< GenerateUploadUrlResponse> - Returns a signed URL for uploading a function source code. For more information about the signed URL usage see: https://cloud.google.com/storage/docs/access-control/signed-urls. Once the function source code upload is complete, the used signed URL should be provided in CreateFunction or UpdateFunction request as a reference to the function source code.
-
getFunction(
GetFunctionRequest request) → Future< Function$> - Returns a function with the given name from the requested project.
-
getIamPolicy(
GetIamPolicyRequest request) → Future< Policy> - Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
-
getOperation<
T extends ProtoMessage, S extends ProtoMessage> (Operation< T, S> request) → Future<Operation< T, S> > -
Provides the
Operationsservice functionality in this service. -
listFunctions(
ListFunctionsRequest request) → Future< ListFunctionsResponse> - Returns a list of functions that belong to the requested project.
-
listLocations(
ListLocationsRequest request) → Future< ListLocationsResponse> - Lists information about the supported locations for this service.
-
listOperations(
ListOperationsRequest request) → Future< ListOperationsResponse> -
Provides the
Operationsservice functionality in this service. -
listRuntimes(
ListRuntimesRequest request) → Future< ListRuntimesResponse> - Returns a list of runtimes that are supported for the requested project.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setIamPolicy(
SetIamPolicyRequest request) → Future< Policy> - Sets the access control policy on the specified resource. Replaces any existing policy.
-
testIamPermissions(
TestIamPermissionsRequest request) → Future< TestIamPermissionsResponse> -
Returns permissions that a caller has on the specified resource. If the
resource does not exist, this will return an empty set of
permissions, not a
NOT_FOUNDerror. -
toString(
) → String -
A string representation of this object.
inherited
-
updateFunction(
UpdateFunctionRequest request) → Future< Operation< Function$, OperationMetadata> > - Updates existing function.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited