target.apidocs.com.google.api.services.cloudfunctions.v2alpha.CloudFunctions.Projects.Locations.Functions.html Maven / Gradle / Ivy
CloudFunctions.Projects.Locations.Functions (Cloud Functions API v2alpha-rev20250130-2.0.0)
com.google.api.services.cloudfunctions.v2alpha
Class CloudFunctions.Projects.Locations.Functions
- java.lang.Object
-
- com.google.api.services.cloudfunctions.v2alpha.CloudFunctions.Projects.Locations.Functions
-
- Enclosing class:
- CloudFunctions.Projects.Locations
public class CloudFunctions.Projects.Locations.Functions
extends Object
The "functions" collection of methods.
-
-
Nested Class Summary
-
Constructor Summary
Constructors
Constructor and Description
Functions()
-
Method Summary
-
-
Method Detail
-
abortFunctionUpgrade
public CloudFunctions.Projects.Locations.Functions.AbortFunctionUpgrade abortFunctionUpgrade(String name,
AbortFunctionUpgradeRequest content)
throws IOException
Aborts generation upgrade process for a function with the given name from the specified project.
Deletes all 2nd Gen copy related configuration and resources which were created during the
upgrade process.
Create a request for the method "functions.abortFunctionUpgrade".
This request holds the parameters needed by the cloudfunctions server. After setting any
optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote
operation.
- Parameters:
name - Required. The name of the function for which upgrade should be aborted.
content - the AbortFunctionUpgradeRequest
- Returns:
- the request
- Throws:
IOException
-
commitFunctionUpgrade
public CloudFunctions.Projects.Locations.Functions.CommitFunctionUpgrade commitFunctionUpgrade(String name,
CommitFunctionUpgradeRequest content)
throws IOException
Finalizes the upgrade after which function upgrade can not be rolled back. This is the last step
of the multi step process to upgrade 1st Gen functions to 2nd Gen. Deletes all original 1st Gen
related configuration and resources.
Create a request for the method "functions.commitFunctionUpgrade".
This request holds the parameters needed by the cloudfunctions server. After setting any
optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote
operation.
- Parameters:
name - Required. The name of the function for which upgrade should be finalized.
content - the CommitFunctionUpgradeRequest
- Returns:
- the request
- Throws:
IOException
-
create
public CloudFunctions.Projects.Locations.Functions.Create create(String parent,
Function content)
throws IOException
Creates a new function. If a function with the given name already exists in the specified
project, the long running operation will return `ALREADY_EXISTS` error.
Create a request for the method "functions.create".
This request holds the parameters needed by the cloudfunctions server. After setting any
optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
- Parameters:
parent - Required. The project and location in which the function should be created, specified in the format
`projects/locations`
content - the Function
- Returns:
- the request
- Throws:
IOException
-
delete
public CloudFunctions.Projects.Locations.Functions.Delete delete(String name)
throws IOException
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.
Create a request for the method "functions.delete".
This request holds the parameters needed by the cloudfunctions server. After setting any
optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
- Parameters:
name - Required. The name of the function which should be deleted.
- Returns:
- the request
- Throws:
IOException
-
detachFunction
public CloudFunctions.Projects.Locations.Functions.DetachFunction detachFunction(String name,
DetachFunctionRequest content)
throws IOException
Detaches 2nd Gen function to Cloud Run function.
Create a request for the method "functions.detachFunction".
This request holds the parameters needed by the cloudfunctions server. After setting any
optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote
operation.
- Parameters:
name - Required. The name of the function for which should be detached.
content - the DetachFunctionRequest
- Returns:
- the request
- Throws:
IOException
-
generateDownloadUrl
public CloudFunctions.Projects.Locations.Functions.GenerateDownloadUrl generateDownloadUrl(String name,
GenerateDownloadUrlRequest content)
throws IOException
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
Create a request for the method "functions.generateDownloadUrl".
This request holds the parameters needed by the cloudfunctions server. After setting any
optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote
operation.
- Parameters:
name - Required. The name of function for which source code Google Cloud Storage signed URL should be
generated.
content - the GenerateDownloadUrlRequest
- Returns:
- the request
- Throws:
IOException
-
generateUploadUrl
public CloudFunctions.Projects.Locations.Functions.GenerateUploadUrl generateUploadUrl(String parent,
GenerateUploadUrlRequest content)
throws IOException
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. When uploading source code
to the generated signed URL, please follow these restrictions: * Source file type should be a zip
file. * No credentials should be attached - the signed URLs provide access to the target bucket
using internal service identity; if credentials were attached, the identity from the credentials
would be used, but that identity does not have permissions to upload files to the URL. When
making a HTTP PUT request, specify this header: * `content-type: application/zip` Do not specify
this header: * `Authorization: Bearer YOUR_TOKEN`
Create a request for the method "functions.generateUploadUrl".
This request holds the parameters needed by the cloudfunctions server. After setting any
optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote
operation.
- Parameters:
parent - Required. The project and location in which the Google Cloud Storage signed URL should be generated,
specified in the format `projects/locations`.
content - the GenerateUploadUrlRequest
- Returns:
- the request
- Throws:
IOException
-
get
public CloudFunctions.Projects.Locations.Functions.Get get(String name)
throws IOException
Returns a function with the given name from the requested project.
Create a request for the method "functions.get".
This request holds the parameters needed by the cloudfunctions server. After setting any
optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
- Parameters:
name - Required. The name of the function which details should be obtained.
- Returns:
- the request
- Throws:
IOException
-
getIamPolicy
public CloudFunctions.Projects.Locations.Functions.GetIamPolicy getIamPolicy(String resource)
throws IOException
Gets the access control policy for a resource. Returns an empty policy if the resource exists and
does not have a policy set.
Create a request for the method "functions.getIamPolicy".
This request holds the parameters needed by the cloudfunctions server. After setting any
optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote
operation.
- Parameters:
resource - REQUIRED: The resource for which the policy is being requested. See [Resource
names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for
this field.
- Returns:
- the request
- Throws:
IOException
-
list
public CloudFunctions.Projects.Locations.Functions.List list(String parent)
throws IOException
Returns a list of functions that belong to the requested project.
Create a request for the method "functions.list".
This request holds the parameters needed by the cloudfunctions server. After setting any
optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
- Parameters:
parent - Required. The project and location from which the function should be listed, specified in the format
`projects/locations` If you want to list functions in all locations, use "-" in place of a
location. When listing functions in all locations, if one or more location(s) are
unreachable, the response will contain functions from all reachable locations along with
the names of any unreachable locations.
- Returns:
- the request
- Throws:
IOException
-
patch
public CloudFunctions.Projects.Locations.Functions.Patch patch(String name,
Function content)
throws IOException
Updates existing function.
Create a request for the method "functions.patch".
This request holds the parameters needed by the cloudfunctions server. After setting any
optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
- Parameters:
name - A user-defined name of the function. Function names must be unique globally and match pattern
`projects/locations/functions`
content - the Function
- Returns:
- the request
- Throws:
IOException
-
redirectFunctionUpgradeTraffic
public CloudFunctions.Projects.Locations.Functions.RedirectFunctionUpgradeTraffic redirectFunctionUpgradeTraffic(String name,
RedirectFunctionUpgradeTrafficRequest content)
throws IOException
Changes the traffic target of a function from the original 1st Gen function to the 2nd Gen copy.
This is the second step of the multi step process to upgrade 1st Gen functions to 2nd Gen. After
this operation, all new traffic will be served by 2nd Gen copy.
Create a request for the method "functions.redirectFunctionUpgradeTraffic".
This request holds the parameters needed by the cloudfunctions server. After setting any
optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke
the remote operation.
- Parameters:
name - Required. The name of the function for which traffic target should be changed to 2nd Gen from 1st
Gen.
content - the RedirectFunctionUpgradeTrafficRequest
- Returns:
- the request
- Throws:
IOException
-
rollbackFunctionUpgradeTraffic
public CloudFunctions.Projects.Locations.Functions.RollbackFunctionUpgradeTraffic rollbackFunctionUpgradeTraffic(String name,
RollbackFunctionUpgradeTrafficRequest content)
throws IOException
Reverts the traffic target of a function from the 2nd Gen copy to the original 1st Gen function.
After this operation, all new traffic would be served by the 1st Gen.
Create a request for the method "functions.rollbackFunctionUpgradeTraffic".
This request holds the parameters needed by the cloudfunctions server. After setting any
optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke
the remote operation.
- Parameters:
name - Required. The name of the function for which traffic target should be changed back to 1st Gen from
2nd Gen.
content - the RollbackFunctionUpgradeTrafficRequest
- Returns:
- the request
- Throws:
IOException
-
setIamPolicy
public CloudFunctions.Projects.Locations.Functions.SetIamPolicy setIamPolicy(String resource,
SetIamPolicyRequest content)
throws IOException
Sets the access control policy on the specified resource. Replaces any existing policy. Can
return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
Create a request for the method "functions.setIamPolicy".
This request holds the parameters needed by the cloudfunctions server. After setting any
optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote
operation.
- Parameters:
resource - REQUIRED: The resource for which the policy is being specified. See [Resource
names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for
this field.
content - the SetIamPolicyRequest
- Returns:
- the request
- Throws:
IOException
-
setupFunctionUpgradeConfig
public CloudFunctions.Projects.Locations.Functions.SetupFunctionUpgradeConfig setupFunctionUpgradeConfig(String name,
SetupFunctionUpgradeConfigRequest content)
throws IOException
Creates a 2nd Gen copy of the function configuration based on the 1st Gen function with the given
name. This is the first step of the multi step process to upgrade 1st Gen functions to 2nd Gen.
Only 2nd Gen configuration is setup as part of this request and traffic continues to be served by
1st Gen.
Create a request for the method "functions.setupFunctionUpgradeConfig".
This request holds the parameters needed by the cloudfunctions server. After setting any
optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the
remote operation.
- Parameters:
name - Required. The name of the function which should have configuration copied for upgrade.
content - the SetupFunctionUpgradeConfigRequest
- Returns:
- the request
- Throws:
IOException
-
testIamPermissions
public CloudFunctions.Projects.Locations.Functions.TestIamPermissions testIamPermissions(String resource,
TestIamPermissionsRequest content)
throws IOException
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_FOUND` error. Note: This operation is
designed to be used for building permission-aware UIs and command-line tools, not for
authorization checking. This operation may "fail open" without warning.
Create a request for the method "functions.testIamPermissions".
This request holds the parameters needed by the cloudfunctions server. After setting any
optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote
operation.
- Parameters:
resource - REQUIRED: The resource for which the policy detail is being requested. See [Resource
names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for
this field.
content - the TestIamPermissionsRequest
- Returns:
- the request
- Throws:
IOException
Copyright © 2011–2025 Google. All rights reserved.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy