Show / Hide Table of Contents

Class ProjectsResource.LocationsResource.FunctionsResource

The "functions" collection of methods.

Inheritance
object
ProjectsResource.LocationsResource.FunctionsResource
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Google.Apis.CloudFunctions.v2alpha
Assembly: Google.Apis.CloudFunctions.v2alpha.dll
Syntax
public class ProjectsResource.LocationsResource.FunctionsResource

Constructors

FunctionsResource(IClientService)

Constructs a new resource.

Declaration
public FunctionsResource(IClientService service)
Parameters
Type Name Description
IClientService service

Methods

AbortFunctionUpgrade(AbortFunctionUpgradeRequest, string)

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.

Declaration
public virtual ProjectsResource.LocationsResource.FunctionsResource.AbortFunctionUpgradeRequest AbortFunctionUpgrade(AbortFunctionUpgradeRequest body, string name)
Parameters
Type Name Description
AbortFunctionUpgradeRequest body

The body of the request.

string name

Required. The name of the function for which upgrade should be aborted.

Returns
Type Description
ProjectsResource.LocationsResource.FunctionsResource.AbortFunctionUpgradeRequest

CommitFunctionUpgrade(CommitFunctionUpgradeRequest, string)

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.

Declaration
public virtual ProjectsResource.LocationsResource.FunctionsResource.CommitFunctionUpgradeRequest CommitFunctionUpgrade(CommitFunctionUpgradeRequest body, string name)
Parameters
Type Name Description
CommitFunctionUpgradeRequest body

The body of the request.

string name

Required. The name of the function for which upgrade should be finalized.

Returns
Type Description
ProjectsResource.LocationsResource.FunctionsResource.CommitFunctionUpgradeRequest

Create(Function, 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(Function body, string parent)
Parameters
Type Name Description
Function body

The body of the request.

string parent

Required. The project and location in which the function should be created, specified in the format projects/*/locations/*

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
string name

Required. The name of the function which should be deleted.

Returns
Type Description
ProjectsResource.LocationsResource.FunctionsResource.DeleteRequest

DetachFunction(DetachFunctionRequest, string)

Detaches 2nd Gen function to Cloud Run function.

Declaration
public virtual ProjectsResource.LocationsResource.FunctionsResource.DetachFunctionRequest DetachFunction(DetachFunctionRequest body, string name)
Parameters
Type Name Description
DetachFunctionRequest body

The body of the request.

string name

Required. The name of the function for which should be detached.

Returns
Type Description
ProjectsResource.LocationsResource.FunctionsResource.DetachFunctionRequest

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 30 minutes of 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.

string name

Required. 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. * 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

Declaration
public virtual ProjectsResource.LocationsResource.FunctionsResource.GenerateUploadUrlRequest GenerateUploadUrl(GenerateUploadUrlRequest body, string parent)
Parameters
Type Name Description
GenerateUploadUrlRequest body

The body of the request.

string parent

Required. The project and location in which the Google Cloud Storage signed URL should be generated, specified in the format projects/*/locations/*.

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
string name

Required. The name of the function which details should be obtained.

Returns
Type Description
ProjectsResource.LocationsResource.FunctionsResource.GetRequest

GetIamPolicy(string)

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Declaration
public virtual ProjectsResource.LocationsResource.FunctionsResource.GetIamPolicyRequest GetIamPolicy(string resource)
Parameters
Type Name Description
string resource

REQUIRED: The resource for which the policy is being requested. See Resource names for the appropriate value for this field.

Returns
Type Description
ProjectsResource.LocationsResource.FunctionsResource.GetIamPolicyRequest

List(string)

Returns a list of functions that belong to the requested project.

Declaration
public virtual ProjectsResource.LocationsResource.FunctionsResource.ListRequest List(string parent)
Parameters
Type Name Description
string 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
Type Description
ProjectsResource.LocationsResource.FunctionsResource.ListRequest

Patch(Function, string)

Updates existing function.

Declaration
public virtual ProjectsResource.LocationsResource.FunctionsResource.PatchRequest Patch(Function body, string name)
Parameters
Type Name Description
Function body

The body of the request.

string name

A user-defined name of the function. Function names must be unique globally and match pattern projects/*/locations/*/functions/*

Returns
Type Description
ProjectsResource.LocationsResource.FunctionsResource.PatchRequest

RedirectFunctionUpgradeTraffic(RedirectFunctionUpgradeTrafficRequest, string)

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.

Declaration
public virtual ProjectsResource.LocationsResource.FunctionsResource.RedirectFunctionUpgradeTrafficRequest RedirectFunctionUpgradeTraffic(RedirectFunctionUpgradeTrafficRequest body, string name)
Parameters
Type Name Description
RedirectFunctionUpgradeTrafficRequest body

The body of the request.

string name

Required. The name of the function for which traffic target should be changed to 2nd Gen from 1st Gen.

Returns
Type Description
ProjectsResource.LocationsResource.FunctionsResource.RedirectFunctionUpgradeTrafficRequest

RollbackFunctionUpgradeTraffic(RollbackFunctionUpgradeTrafficRequest, string)

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.

Declaration
public virtual ProjectsResource.LocationsResource.FunctionsResource.RollbackFunctionUpgradeTrafficRequest RollbackFunctionUpgradeTraffic(RollbackFunctionUpgradeTrafficRequest body, string name)
Parameters
Type Name Description
RollbackFunctionUpgradeTrafficRequest body

The body of the request.

string name

Required. The name of the function for which traffic target should be changed back to 1st Gen from 2nd Gen.

Returns
Type Description
ProjectsResource.LocationsResource.FunctionsResource.RollbackFunctionUpgradeTrafficRequest

SetIamPolicy(SetIamPolicyRequest, string)

Sets the access control policy on the specified resource. Replaces any existing policy. Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.

Declaration
public virtual ProjectsResource.LocationsResource.FunctionsResource.SetIamPolicyRequest SetIamPolicy(SetIamPolicyRequest body, string resource)
Parameters
Type Name Description
SetIamPolicyRequest body

The body of the request.

string resource

REQUIRED: The resource for which the policy is being specified. See Resource names for the appropriate value for this field.

Returns
Type Description
ProjectsResource.LocationsResource.FunctionsResource.SetIamPolicyRequest

SetupFunctionUpgradeConfig(SetupFunctionUpgradeConfigRequest, string)

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.

Declaration
public virtual ProjectsResource.LocationsResource.FunctionsResource.SetupFunctionUpgradeConfigRequest SetupFunctionUpgradeConfig(SetupFunctionUpgradeConfigRequest body, string name)
Parameters
Type Name Description
SetupFunctionUpgradeConfigRequest body

The body of the request.

string name

Required. The name of the function which should have configuration copied for upgrade.

Returns
Type Description
ProjectsResource.LocationsResource.FunctionsResource.SetupFunctionUpgradeConfigRequest

TestIamPermissions(TestIamPermissionsRequest, string)

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.

Declaration
public virtual ProjectsResource.LocationsResource.FunctionsResource.TestIamPermissionsRequest TestIamPermissions(TestIamPermissionsRequest body, string resource)
Parameters
Type Name Description
TestIamPermissionsRequest body

The body of the request.

string resource

REQUIRED: The resource for which the policy detail is being requested. See Resource names for the appropriate value for this field.

Returns
Type Description
ProjectsResource.LocationsResource.FunctionsResource.TestIamPermissionsRequest
In this article
Back to top Generated by DocFX