public sealed class FunctionServiceClientImpl : FunctionServiceClient
Reference documentation and code samples for the Cloud Functions v2 API class FunctionServiceClientImpl.
FunctionService client wrapper implementation, for convenient use.
Namespace
Google.Cloud.Functions.V2Assembly
Google.Cloud.Functions.V2.dll
Remarks
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
FunctionServiceClientImpl(FunctionService.FunctionServiceClient, FunctionServiceSettings, ILogger)
public FunctionServiceClientImpl(FunctionService.FunctionServiceClient grpcClient, FunctionServiceSettings settings, ILogger logger)
Constructs a client wrapper for the FunctionService service, with the specified gRPC client and settings.
Parameters | |
---|---|
Name | Description |
grpcClient | FunctionService.FunctionServiceClient The underlying gRPC client. |
settings | FunctionServiceSettings The base FunctionServiceSettings used within this client. |
logger | Microsoft.Extensions.Logging.ILogger Optional Microsoft.Extensions.Logging.ILogger to use within this client. |
Properties
CreateFunctionOperationsClient
public override OperationsClient CreateFunctionOperationsClient { get; }
The long-running operations client for CreateFunction
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
DeleteFunctionOperationsClient
public override OperationsClient DeleteFunctionOperationsClient { get; }
The long-running operations client for DeleteFunction
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
GrpcClient
public override FunctionService.FunctionServiceClient GrpcClient { get; }
The underlying gRPC FunctionService client
Property Value | |
---|---|
Type | Description |
FunctionService.FunctionServiceClient |
IAMPolicyClient
public override IAMPolicyClient IAMPolicyClient { get; }
The IAMPolicyClient associated with this client.
Property Value | |
---|---|
Type | Description |
IAMPolicyClient |
LocationsClient
public override LocationsClient LocationsClient { get; }
The LocationsClient associated with this client.
Property Value | |
---|---|
Type | Description |
LocationsClient |
UpdateFunctionOperationsClient
public override OperationsClient UpdateFunctionOperationsClient { get; }
The long-running operations client for UpdateFunction
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
Methods
CreateFunction(CreateFunctionRequest, CallSettings)
public override Operation<Function, OperationMetadata> CreateFunction(CreateFunctionRequest request, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
request | CreateFunctionRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Function, OperationMetadata> | The RPC response. |
CreateFunctionAsync(CreateFunctionRequest, CallSettings)
public override async Task<Operation<Function, OperationMetadata>> CreateFunctionAsync(CreateFunctionRequest request, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
request | CreateFunctionRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Function, OperationMetadata>> | A Task containing the RPC response. |
DeleteFunction(DeleteFunctionRequest, CallSettings)
public override Operation<Empty, OperationMetadata> DeleteFunction(DeleteFunctionRequest request, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
request | DeleteFunctionRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Empty, OperationMetadata> | The RPC response. |
DeleteFunctionAsync(DeleteFunctionRequest, CallSettings)
public override async Task<Operation<Empty, OperationMetadata>> DeleteFunctionAsync(DeleteFunctionRequest request, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
request | DeleteFunctionRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
GenerateDownloadUrl(GenerateDownloadUrlRequest, CallSettings)
public override GenerateDownloadUrlResponse GenerateDownloadUrl(GenerateDownloadUrlRequest request, CallSettings callSettings = null)
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
Parameters | |
---|---|
Name | Description |
request | GenerateDownloadUrlRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
GenerateDownloadUrlResponse | The RPC response. |
GenerateDownloadUrlAsync(GenerateDownloadUrlRequest, CallSettings)
public override Task<GenerateDownloadUrlResponse> GenerateDownloadUrlAsync(GenerateDownloadUrlRequest request, CallSettings callSettings = null)
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
Parameters | |
---|---|
Name | Description |
request | GenerateDownloadUrlRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<GenerateDownloadUrlResponse> | A Task containing the RPC response. |
GenerateUploadUrl(GenerateUploadUrlRequest, CallSettings)
public override GenerateUploadUrlResponse GenerateUploadUrl(GenerateUploadUrlRequest request, CallSettings callSettings = null)
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
Parameters | |
---|---|
Name | Description |
request | GenerateUploadUrlRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
GenerateUploadUrlResponse | The RPC response. |
GenerateUploadUrlAsync(GenerateUploadUrlRequest, CallSettings)
public override Task<GenerateUploadUrlResponse> GenerateUploadUrlAsync(GenerateUploadUrlRequest request, CallSettings callSettings = null)
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
Parameters | |
---|---|
Name | Description |
request | GenerateUploadUrlRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<GenerateUploadUrlResponse> | A Task containing the RPC response. |
GetFunction(GetFunctionRequest, CallSettings)
public override Function GetFunction(GetFunctionRequest request, CallSettings callSettings = null)
Returns a function with the given name from the requested project.
Parameters | |
---|---|
Name | Description |
request | GetFunctionRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Function | The RPC response. |
GetFunctionAsync(GetFunctionRequest, CallSettings)
public override Task<Function> GetFunctionAsync(GetFunctionRequest request, CallSettings callSettings = null)
Returns a function with the given name from the requested project.
Parameters | |
---|---|
Name | Description |
request | GetFunctionRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Function> | A Task containing the RPC response. |
ListFunctions(ListFunctionsRequest, CallSettings)
public override PagedEnumerable<ListFunctionsResponse, Function> ListFunctions(ListFunctionsRequest request, CallSettings callSettings = null)
Returns a list of functions that belong to the requested project.
Parameters | |
---|---|
Name | Description |
request | ListFunctionsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListFunctionsResponse, Function> | A pageable sequence of Function resources. |
ListFunctionsAsync(ListFunctionsRequest, CallSettings)
public override PagedAsyncEnumerable<ListFunctionsResponse, Function> ListFunctionsAsync(ListFunctionsRequest request, CallSettings callSettings = null)
Returns a list of functions that belong to the requested project.
Parameters | |
---|---|
Name | Description |
request | ListFunctionsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListFunctionsResponse, Function> | A pageable asynchronous sequence of Function resources. |
ListRuntimes(ListRuntimesRequest, CallSettings)
public override ListRuntimesResponse ListRuntimes(ListRuntimesRequest request, CallSettings callSettings = null)
Returns a list of runtimes that are supported for the requested project.
Parameters | |
---|---|
Name | Description |
request | ListRuntimesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ListRuntimesResponse | The RPC response. |
ListRuntimesAsync(ListRuntimesRequest, CallSettings)
public override Task<ListRuntimesResponse> ListRuntimesAsync(ListRuntimesRequest request, CallSettings callSettings = null)
Returns a list of runtimes that are supported for the requested project.
Parameters | |
---|---|
Name | Description |
request | ListRuntimesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<ListRuntimesResponse> | A Task containing the RPC response. |
UpdateFunction(UpdateFunctionRequest, CallSettings)
public override Operation<Function, OperationMetadata> UpdateFunction(UpdateFunctionRequest request, CallSettings callSettings = null)
Updates existing function.
Parameters | |
---|---|
Name | Description |
request | UpdateFunctionRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Function, OperationMetadata> | The RPC response. |
UpdateFunctionAsync(UpdateFunctionRequest, CallSettings)
public override async Task<Operation<Function, OperationMetadata>> UpdateFunctionAsync(UpdateFunctionRequest request, CallSettings callSettings = null)
Updates existing function.
Parameters | |
---|---|
Name | Description |
request | UpdateFunctionRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Function, OperationMetadata>> | A Task containing the RPC response. |