
target.apidocs.com.google.api.services.cloudfunctions.v2.CloudFunctions.Projects.Locations.Functions.html Maven / Gradle / Ivy
CloudFunctions.Projects.Locations.Functions (Cloud Functions API v2-rev20230907-2.0.0)
com.google.api.services.cloudfunctions.v2
Class CloudFunctions.Projects.Locations.Functions
- java.lang.Object
-
- com.google.api.services.cloudfunctions.v2.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
-
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
-
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, these two headers need to be specified: * `content-type:
application/zip` And this header SHOULD NOT be specified: * `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
-
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
-
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–2023 Google. All rights reserved.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy