Class ProjectsResource.LocationsResource.FunctionsResource
The "functions" collection of methods.
Inheritance
Inherited Members
Namespace: Google.Apis.CloudFunctions.v1beta2
Assembly: Google.Apis.CloudFunctions.v1beta2.dll
Syntax
public class FunctionsResource
Constructors
FunctionsResource(IClientService)
Constructs a new resource.
Declaration
public FunctionsResource(IClientService service)
Parameters
Type | Name | Description |
---|---|---|
Google.Apis.Services.IClientService | service |
Methods
Call(CallFunctionRequest, String)
Synchronously invokes a deployed Cloud Function. To be used for testing purposes as very limited traffic is allowed. For more information on the actual limits refer to API Calls.
Declaration
public virtual ProjectsResource.LocationsResource.FunctionsResource.CallRequest Call(CallFunctionRequest body, string name)
Parameters
Type | Name | Description |
---|---|---|
CallFunctionRequest | body | The body of the request. |
System.String | name | Required. The name of the function to be called. |
Returns
Type | Description |
---|---|
ProjectsResource.LocationsResource.FunctionsResource.CallRequest |
Create(CloudFunction, String)
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.
Declaration
public virtual ProjectsResource.LocationsResource.FunctionsResource.CreateRequest Create(CloudFunction body, string location)
Parameters
Type | Name | Description |
---|---|---|
CloudFunction | body | The body of the request. |
System.String | location | Required. The project and location in which the function should be created, specified in the
format |
Returns
Type | Description |
---|---|
ProjectsResource.LocationsResource.FunctionsResource.CreateRequest |
Delete(String)
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.
Declaration
public virtual ProjectsResource.LocationsResource.FunctionsResource.DeleteRequest Delete(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Required. The name of the function which should be deleted. |
Returns
Type | Description |
---|---|
ProjectsResource.LocationsResource.FunctionsResource.DeleteRequest |
GenerateDownloadUrl(GenerateDownloadUrlRequest, String)
Returns a signed URL for downloading deployed function source code. The URL is only valid for a limited period and should be used within minutes after generation. For more information about the signed URL usage see: https://cloud.google.com/storage/docs/access-control/signed-urls
Declaration
public virtual ProjectsResource.LocationsResource.FunctionsResource.GenerateDownloadUrlRequest GenerateDownloadUrl(GenerateDownloadUrlRequest body, string name)
Parameters
Type | Name | Description |
---|---|---|
GenerateDownloadUrlRequest | body | The body of the request. |
System.String | name | The name of function for which source code Google Cloud Storage signed URL should be generated. |
Returns
Type | Description |
---|---|
ProjectsResource.LocationsResource.FunctionsResource.GenerateDownloadUrlRequest |
GenerateUploadUrl(GenerateUploadUrlRequest, String)
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. * Source file size should not exceed 100MB limit. * 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
*x-goog-content-length-range: 0,104857600
And this header SHOULD NOT be specified:
Authorization: Bearer YOUR_TOKEN
Declaration
public virtual ProjectsResource.LocationsResource.FunctionsResource.GenerateUploadUrlRequest GenerateUploadUrl(GenerateUploadUrlRequest body, string parent)
Parameters
Type | Name | Description |
---|---|---|
GenerateUploadUrlRequest | body | The body of the request. |
System.String | parent | The project and location in which the Google Cloud Storage signed URL should be generated,
specified in the format |
Returns
Type | Description |
---|---|
ProjectsResource.LocationsResource.FunctionsResource.GenerateUploadUrlRequest |
Get(String)
Returns a function with the given name from the requested project.
Declaration
public virtual ProjectsResource.LocationsResource.FunctionsResource.GetRequest Get(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Required. The name of the function which details should be obtained. |
Returns
Type | Description |
---|---|
ProjectsResource.LocationsResource.FunctionsResource.GetRequest |
List(String)
Returns a list of functions that belong to the requested project.
Declaration
public virtual ProjectsResource.LocationsResource.FunctionsResource.ListRequest List(string location)
Parameters
Type | Name | Description |
---|---|---|
System.String | location | Required. The project and location from which the function should be listed, specified in the
format |
Returns
Type | Description |
---|---|
ProjectsResource.LocationsResource.FunctionsResource.ListRequest |
Update(CloudFunction, String)
Updates existing function.
Declaration
public virtual ProjectsResource.LocationsResource.FunctionsResource.UpdateRequest Update(CloudFunction body, string name)
Parameters
Type | Name | Description |
---|---|---|
CloudFunction | body | The body of the request. |
System.String | name | Required. The name of the function to be updated. |
Returns
Type | Description |
---|---|
ProjectsResource.LocationsResource.FunctionsResource.UpdateRequest |