google_api_cloud_functions v0.5.1 GoogleApi.CloudFunctions.V1.Api.Projects View Source

API calls for all endpoints tagged Projects.

Link to this section Summary

Functions

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.

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.

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.

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

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`

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

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.

Lists information about the supported locations for this service.

Link to this section Functions

Link to this function

cloudfunctions_projects_locations_functions_call(connection, projects_id, locations_id, functions_id, optional_params \\ [], opts \\ []) View Source

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.

Parameters

  • connection (GoogleApi.CloudFunctions.V1.Connection): Connection to server
  • projects_id (String.t): Part of `name`. The name of the function to be called.
  • locations_id (String.t): Part of `name`. See documentation of `projectsId`.
  • functions_id (String.t): Part of `name`. See documentation of `projectsId`.
  • optional_params (KeywordList): [optional] Optional parameters

    • :$.xgafv (String.t): V1 error format.
    • :access_token (String.t): OAuth access token.
    • :alt (String.t): Data format for response.
    • :callback (String.t): JSONP
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
    • :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").
    • :body (CallFunctionRequest):

Returns

{:ok, %GoogleApi.CloudFunctions.V1.Model.CallFunctionResponse{}} on success {:error, info} on failure

Link to this function

cloudfunctions_projects_locations_functions_create(connection, projects_id, locations_id, optional_params \\ [], opts \\ []) View Source

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

  • connection (GoogleApi.CloudFunctions.V1.Connection): Connection to server
  • projects_id (String.t): Part of `location`. The project and location in which the function should be created, specified in the format `projects//locations/`
  • locations_id (String.t): Part of `location`. See documentation of `projectsId`.
  • optional_params (KeywordList): [optional] Optional parameters

    • :$.xgafv (String.t): V1 error format.
    • :access_token (String.t): OAuth access token.
    • :alt (String.t): Data format for response.
    • :callback (String.t): JSONP
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
    • :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").
    • :body (CloudFunction):

Returns

{:ok, %GoogleApi.CloudFunctions.V1.Model.Operation{}} on success {:error, info} on failure

Link to this function

cloudfunctions_projects_locations_functions_delete(connection, projects_id, locations_id, functions_id, optional_params \\ [], opts \\ []) View Source

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

  • connection (GoogleApi.CloudFunctions.V1.Connection): Connection to server
  • projects_id (String.t): Part of `name`. The name of the function which should be deleted.
  • locations_id (String.t): Part of `name`. See documentation of `projectsId`.
  • functions_id (String.t): Part of `name`. See documentation of `projectsId`.
  • optional_params (KeywordList): [optional] Optional parameters

    • :$.xgafv (String.t): V1 error format.
    • :access_token (String.t): OAuth access token.
    • :alt (String.t): Data format for response.
    • :callback (String.t): JSONP
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
    • :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").

Returns

{:ok, %GoogleApi.CloudFunctions.V1.Model.Operation{}} on success {:error, info} on failure

Link to this function

cloudfunctions_projects_locations_functions_generate_download_url(connection, projects_id, locations_id, functions_id, optional_params \\ [], opts \\ []) View Source

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

Parameters

  • connection (GoogleApi.CloudFunctions.V1.Connection): Connection to server
  • projects_id (String.t): Part of `name`. The name of function for which source code Google Cloud Storage signed URL should be generated.
  • locations_id (String.t): Part of `name`. See documentation of `projectsId`.
  • functions_id (String.t): Part of `name`. See documentation of `projectsId`.
  • optional_params (KeywordList): [optional] Optional parameters

    • :$.xgafv (String.t): V1 error format.
    • :access_token (String.t): OAuth access token.
    • :alt (String.t): Data format for response.
    • :callback (String.t): JSONP
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
    • :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").
    • :body (GenerateDownloadUrlRequest):

Returns

{:ok, %GoogleApi.CloudFunctions.V1.Model.GenerateDownloadUrlResponse{}} on success {:error, info} on failure

Link to this function

cloudfunctions_projects_locations_functions_generate_upload_url(connection, projects_id, locations_id, optional_params \\ [], opts \\ []) View Source

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`

Parameters

  • connection (GoogleApi.CloudFunctions.V1.Connection): Connection to server
  • projects_id (String.t): Part of `parent`. The project and location in which the Google Cloud Storage signed URL should be generated, specified in the format `projects//locations/`.
  • locations_id (String.t): Part of `parent`. See documentation of `projectsId`.
  • optional_params (KeywordList): [optional] Optional parameters

    • :$.xgafv (String.t): V1 error format.
    • :access_token (String.t): OAuth access token.
    • :alt (String.t): Data format for response.
    • :callback (String.t): JSONP
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
    • :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").
    • :body (GenerateUploadUrlRequest):

Returns

{:ok, %GoogleApi.CloudFunctions.V1.Model.GenerateUploadUrlResponse{}} on success {:error, info} on failure

Link to this function

cloudfunctions_projects_locations_functions_get(connection, projects_id, locations_id, functions_id, optional_params \\ [], opts \\ []) View Source

Returns a function with the given name from the requested project.

Parameters

  • connection (GoogleApi.CloudFunctions.V1.Connection): Connection to server
  • projects_id (String.t): Part of `name`. The name of the function which details should be obtained.
  • locations_id (String.t): Part of `name`. See documentation of `projectsId`.
  • functions_id (String.t): Part of `name`. See documentation of `projectsId`.
  • optional_params (KeywordList): [optional] Optional parameters

    • :$.xgafv (String.t): V1 error format.
    • :access_token (String.t): OAuth access token.
    • :alt (String.t): Data format for response.
    • :callback (String.t): JSONP
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
    • :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").

Returns

{:ok, %GoogleApi.CloudFunctions.V1.Model.CloudFunction{}} on success {:error, info} on failure

Link to this function

cloudfunctions_projects_locations_functions_get_iam_policy(connection, projects_id, locations_id, functions_id, optional_params \\ [], opts \\ []) View Source

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

Parameters

  • connection (GoogleApi.CloudFunctions.V1.Connection): Connection to server
  • projects_id (String.t): Part of `resource`. REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.
  • locations_id (String.t): Part of `resource`. See documentation of `projectsId`.
  • functions_id (String.t): Part of `resource`. See documentation of `projectsId`.
  • optional_params (KeywordList): [optional] Optional parameters

    • :$.xgafv (String.t): V1 error format.
    • :access_token (String.t): OAuth access token.
    • :alt (String.t): Data format for response.
    • :callback (String.t): JSONP
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
    • :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").

Returns

{:ok, %GoogleApi.CloudFunctions.V1.Model.Policy{}} on success {:error, info} on failure

Link to this function

cloudfunctions_projects_locations_functions_list(connection, projects_id, locations_id, optional_params \\ [], opts \\ []) View Source

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

Parameters

  • connection (GoogleApi.CloudFunctions.V1.Connection): Connection to server
  • projects_id (String.t): Part of `parent`. 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.
  • locations_id (String.t): Part of `parent`. See documentation of `projectsId`.
  • optional_params (KeywordList): [optional] Optional parameters

    • :$.xgafv (String.t): V1 error format.
    • :access_token (String.t): OAuth access token.
    • :alt (String.t): Data format for response.
    • :callback (String.t): JSONP
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
    • :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").
    • :pageSize (integer()): Maximum number of functions to return per call.
    • :pageToken (String.t): The value returned by the last `ListFunctionsResponse`; indicates that this is a continuation of a prior `ListFunctions` call, and that the system should return the next page of data.

Returns

{:ok, %GoogleApi.CloudFunctions.V1.Model.ListFunctionsResponse{}} on success {:error, info} on failure

Link to this function

cloudfunctions_projects_locations_functions_patch(connection, projects_id, locations_id, functions_id, optional_params \\ [], opts \\ []) View Source

Updates existing function.

Parameters

  • connection (GoogleApi.CloudFunctions.V1.Connection): Connection to server
  • projects_id (String.t): Part of `function.name`. A user-defined name of the function. Function names must be unique globally and match pattern `projects//locations//functions/*`
  • locations_id (String.t): Part of `function.name`. See documentation of `projectsId`.
  • functions_id (String.t): Part of `function.name`. See documentation of `projectsId`.
  • optional_params (KeywordList): [optional] Optional parameters

    • :$.xgafv (String.t): V1 error format.
    • :access_token (String.t): OAuth access token.
    • :alt (String.t): Data format for response.
    • :callback (String.t): JSONP
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
    • :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").
    • :updateMask (String.t): Required list of fields to be updated in this request.
    • :body (CloudFunction):

Returns

{:ok, %GoogleApi.CloudFunctions.V1.Model.Operation{}} on success {:error, info} on failure

Link to this function

cloudfunctions_projects_locations_functions_set_iam_policy(connection, projects_id, locations_id, functions_id, optional_params \\ [], opts \\ []) View Source

Sets the IAM access control policy on the specified function. Replaces any existing policy.

Parameters

  • connection (GoogleApi.CloudFunctions.V1.Connection): Connection to server
  • projects_id (String.t): Part of `resource`. REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.
  • locations_id (String.t): Part of `resource`. See documentation of `projectsId`.
  • functions_id (String.t): Part of `resource`. See documentation of `projectsId`.
  • optional_params (KeywordList): [optional] Optional parameters

    • :$.xgafv (String.t): V1 error format.
    • :access_token (String.t): OAuth access token.
    • :alt (String.t): Data format for response.
    • :callback (String.t): JSONP
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
    • :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").
    • :body (SetIamPolicyRequest):

Returns

{:ok, %GoogleApi.CloudFunctions.V1.Model.Policy{}} on success {:error, info} on failure

Link to this function

cloudfunctions_projects_locations_functions_test_iam_permissions(connection, projects_id, locations_id, functions_id, optional_params \\ [], opts \\ []) View Source

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.

Parameters

  • connection (GoogleApi.CloudFunctions.V1.Connection): Connection to server
  • projects_id (String.t): Part of `resource`. REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.
  • locations_id (String.t): Part of `resource`. See documentation of `projectsId`.
  • functions_id (String.t): Part of `resource`. See documentation of `projectsId`.
  • optional_params (KeywordList): [optional] Optional parameters

    • :$.xgafv (String.t): V1 error format.
    • :access_token (String.t): OAuth access token.
    • :alt (String.t): Data format for response.
    • :callback (String.t): JSONP
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
    • :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").
    • :body (TestIamPermissionsRequest):

Returns

{:ok, %GoogleApi.CloudFunctions.V1.Model.TestIamPermissionsResponse{}} on success {:error, info} on failure

Link to this function

cloudfunctions_projects_locations_list(connection, projects_id, optional_params \\ [], opts \\ []) View Source

Lists information about the supported locations for this service.

Parameters

  • connection (GoogleApi.CloudFunctions.V1.Connection): Connection to server
  • projects_id (String.t): Part of `name`. The resource that owns the locations collection, if applicable.
  • optional_params (KeywordList): [optional] Optional parameters

    • :$.xgafv (String.t): V1 error format.
    • :access_token (String.t): OAuth access token.
    • :alt (String.t): Data format for response.
    • :callback (String.t): JSONP
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
    • :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").
    • :filter (String.t): The standard list filter.
    • :pageSize (integer()): The standard list page size.
    • :pageToken (String.t): The standard list page token.

Returns

{:ok, %GoogleApi.CloudFunctions.V1.Model.ListLocationsResponse{}} on success {:error, info} on failure