Google_Service_CloudFunctions_Resource_ProjectsLocationsFunctions
extends Google_Service_Resource
in package
The "functions" collection of methods.
Typical usage is:
$cloudfunctionsService = new Google_Service_CloudFunctions(...);
$functions = $cloudfunctionsService->functions;
Table of Contents
- $client : Google_Client
- $methods : array<string|int, mixed>
- $resourceName : string
- $rootUrl : string
- $serviceName : string
- $servicePath : string
- $stackParameters : mixed
- __construct() : mixed
- call() : Google_Http_Request|expectedClass
- TODO: This function needs simplifying.
- callProjectsLocationsFunctions() : Google_Service_CloudFunctions_CallFunctionResponse
- 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 [Rate Limits](https://cloud.google.com/functions/quotas#rate_limits).
- create() : Google_Service_CloudFunctions_Operation
- 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. (functions.create)
- createRequestUri() : string
- Parse/expand request parameters and create a fully qualified request uri.
- delete() : Google_Service_CloudFunctions_Operation
- 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. (functions.delete)
- generateDownloadUrl() : Google_Service_CloudFunctions_GenerateDownloadUrlResponse
- 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 (functions.generateDownloadUrl)
- generateUploadUrl() : Google_Service_CloudFunctions_GenerateUploadUrlResponse
- 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` (functions.generateUploadUrl)
- get() : Google_Service_CloudFunctions_CloudFunction
- Returns a function with the given name from the requested project.
- getIamPolicy() : Google_Service_CloudFunctions_Policy
- Gets the IAM access control policy for a function. Returns an empty policy if the function exists and does not have a policy set. (functions.getIamPolicy)
- listProjectsLocationsFunctions() : Google_Service_CloudFunctions_ListFunctionsResponse
- Returns a list of functions that belong to the requested project.
- patch() : Google_Service_CloudFunctions_Operation
- Updates existing function. (functions.patch)
- setIamPolicy() : Google_Service_CloudFunctions_Policy
- Sets the IAM access control policy on the specified function. Replaces any existing policy. (functions.setIamPolicy)
- testIamPermissions() : Google_Service_CloudFunctions_TestIamPermissionsResponse
- Tests the specified permissions against the IAM access control policy for a function. If the function does not exist, this will return an empty set of permissions, not a NOT_FOUND error. (functions.testIamPermissions)
- convertToArrayAndStripNulls() : mixed
Properties
$client
private
Google_Client
$client
$methods
private
array<string|int, mixed>
$methods
$resourceName
private
string
$resourceName
$rootUrl
private
string
$rootUrl
$serviceName
private
string
$serviceName
$servicePath
private
string
$servicePath
$stackParameters
private
mixed
$stackParameters
= array('alt' => array('type' => 'string', 'location' => 'query'), 'fields' => array('type' => 'string', 'location' => 'query'), 'trace' => array('type' => 'string', 'location' => 'query'), 'userIp' => array('type' => 'string', 'location' => 'query'), 'quotaUser' => array('type' => 'string', 'location' => 'query'), 'data' => array('type' => 'string', 'location' => 'body'), 'mimeType' => array('type' => 'string', 'location' => 'header'), 'uploadType' => array('type' => 'string', 'location' => 'query'), 'mediaUpload' => array('type' => 'complex', 'location' => 'query'), 'prettyPrint' => array('type' => 'string', 'location' => 'query'))
Methods
__construct()
public
__construct(mixed $service, mixed $serviceName, mixed $resourceName, mixed $resource) : mixed
Parameters
- $service : mixed
- $serviceName : mixed
- $resourceName : mixed
- $resource : mixed
Return values
mixed —call()
TODO: This function needs simplifying.
public
call( $name, $arguments[, $expectedClass = null ]) : Google_Http_Request|expectedClass
Parameters
Tags
Return values
Google_Http_Request|expectedClass —callProjectsLocationsFunctions()
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 [Rate Limits](https://cloud.google.com/functions/quotas#rate_limits).
public
callProjectsLocationsFunctions(string $name, Google_Service_CloudFunctions_CallFunctionRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_CloudFunctions_CallFunctionResponse
(functions.callProjectsLocationsFunctions)
Parameters
- $name : string
-
Required. The name of the function to be called.
- $postBody : Google_Service_CloudFunctions_CallFunctionRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_CloudFunctions_CallFunctionResponse —create()
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. (functions.create)
public
create(string $location, Google_Service_CloudFunctions_CloudFunction $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_CloudFunctions_Operation
Parameters
- $location : string
-
Required. The project and location in which the function should be created, specified in the format
projects/locations - $postBody : Google_Service_CloudFunctions_CloudFunction
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_CloudFunctions_Operation —createRequestUri()
Parse/expand request parameters and create a fully qualified request uri.
public
createRequestUri(string $restPath, array<string|int, mixed> $params) : string
Parameters
- $restPath : string
- $params : array<string|int, mixed>
Tags
Return values
string —$requestUrl
delete()
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. (functions.delete)
public
delete(string $name[, array<string|int, mixed> $optParams = array() ]) : Google_Service_CloudFunctions_Operation
Parameters
- $name : string
-
Required. The name of the function which should be deleted.
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_CloudFunctions_Operation —generateDownloadUrl()
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 (functions.generateDownloadUrl)
public
generateDownloadUrl(string $name, Google_Service_CloudFunctions_GenerateDownloadUrlRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_CloudFunctions_GenerateDownloadUrlResponse
Parameters
- $name : string
-
The name of function for which source code Google Cloud Storage signed URL should be generated.
- $postBody : Google_Service_CloudFunctions_GenerateDownloadUrlRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_CloudFunctions_GenerateDownloadUrlResponse —generateUploadUrl()
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` (functions.generateUploadUrl)
public
generateUploadUrl(string $parent, Google_Service_CloudFunctions_GenerateUploadUrlRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_CloudFunctions_GenerateUploadUrlResponse
Parameters
- $parent : string
-
The project and location in which the Google Cloud Storage signed URL should be generated, specified in the format
projects/locations. - $postBody : Google_Service_CloudFunctions_GenerateUploadUrlRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_CloudFunctions_GenerateUploadUrlResponse —get()
Returns a function with the given name from the requested project.
public
get(string $name[, array<string|int, mixed> $optParams = array() ]) : Google_Service_CloudFunctions_CloudFunction
(functions.get)
Parameters
- $name : string
-
Required. The name of the function which details should be obtained.
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_CloudFunctions_CloudFunction —getIamPolicy()
Gets the IAM access control policy for a function. Returns an empty policy if the function exists and does not have a policy set. (functions.getIamPolicy)
public
getIamPolicy(string $resource[, array<string|int, mixed> $optParams = array() ]) : Google_Service_CloudFunctions_Policy
Parameters
- $resource : string
-
REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Tags
Return values
Google_Service_CloudFunctions_Policy —listProjectsLocationsFunctions()
Returns a list of functions that belong to the requested project.
public
listProjectsLocationsFunctions(string $parent[, array<string|int, mixed> $optParams = array() ]) : Google_Service_CloudFunctions_ListFunctionsResponse
(functions.listProjectsLocationsFunctions)
Parameters
- $parent : string
-
The project and location from which the function should be listed, specified in the format
projects/locationsIf 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. - $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Tags
Return values
Google_Service_CloudFunctions_ListFunctionsResponse —patch()
Updates existing function. (functions.patch)
public
patch(string $name, Google_Service_CloudFunctions_CloudFunction $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_CloudFunctions_Operation
Parameters
- $name : string
-
A user-defined name of the function. Function names must be unique globally and match pattern
projects/locations/functions - $postBody : Google_Service_CloudFunctions_CloudFunction
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Tags
Return values
Google_Service_CloudFunctions_Operation —setIamPolicy()
Sets the IAM access control policy on the specified function. Replaces any existing policy. (functions.setIamPolicy)
public
setIamPolicy(string $resource, Google_Service_CloudFunctions_SetIamPolicyRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_CloudFunctions_Policy
Parameters
- $resource : string
-
REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.
- $postBody : Google_Service_CloudFunctions_SetIamPolicyRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_CloudFunctions_Policy —testIamPermissions()
Tests the specified permissions against the IAM access control policy for a function. If the function does not exist, this will return an empty set of permissions, not a NOT_FOUND error. (functions.testIamPermissions)
public
testIamPermissions(string $resource, Google_Service_CloudFunctions_TestIamPermissionsRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_CloudFunctions_TestIamPermissionsResponse
Parameters
- $resource : string
-
REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.
- $postBody : Google_Service_CloudFunctions_TestIamPermissionsRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_CloudFunctions_TestIamPermissionsResponse —convertToArrayAndStripNulls()
protected
convertToArrayAndStripNulls(mixed $o) : mixed
Parameters
- $o : mixed