feat: ListFunctions now include metadata which indicates whether a function is a `GEN_1` or `GEN_2` function

PiperOrigin-RevId: 535193873
pull/807/head^2
Google APIs 2 years ago committed by Copybara-Service
parent d0da39a25e
commit d6b7eb5913
  1. 6
      google/cloud/functions/v2/cloudfunctions_v2.yaml
  2. 45
      google/cloud/functions/v2/functions.proto

@ -10,6 +10,7 @@ apis:
- name: google.longrunning.Operations
types:
- name: google.cloud.functions.v2.LocationMetadata
- name: google.cloud.functions.v2.OperationMetadata
documentation:
@ -43,11 +44,6 @@ events.'
permission-aware UIs and command-line tools, not for authorization
checking. This operation may "fail open" without warning.
- selector: google.longrunning.Operations.ListOperations
description: |-
Lists operations that match the specified filter in the request. If
the server doesn't support this method, it returns `UNIMPLEMENTED`.
backend:
rules:
- selector: 'google.cloud.functions.v2.FunctionService.*'

@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -241,9 +241,6 @@ message Function {
// globally and match pattern `projects/*/locations/*/functions/*`
string name = 1;
// Describe whether the function is 1st Gen or 2nd Gen.
Environment environment = 10;
// User-provided description of a function.
string description = 2;
@ -273,7 +270,13 @@ message Function {
repeated StateMessage state_messages = 9
[(google.api.field_behavior) = OUTPUT_ONLY];
// Resource name of a KMS crypto key (managed by the user) used to
// Describe whether the function is 1st Gen or 2nd Gen.
Environment environment = 10;
// Output only. The deployed url for the function.
string url = 14 [(google.api.field_behavior) = OUTPUT_ONLY];
// [Preview] Resource name of a KMS crypto key (managed by the user) used to
// encrypt/decrypt function resources.
//
// It must match the pattern
@ -281,9 +284,6 @@ message Function {
string kms_key_name = 25 [(google.api.resource_reference) = {
type: "cloudkms.googleapis.com/CryptoKey"
}];
// Output only. The deployed url for the function.
string url = 14 [(google.api.field_behavior) = OUTPUT_ONLY];
}
// Informational messages about the state of the Cloud Function or Operation.
@ -467,18 +467,18 @@ message BuildConfig {
// User-provided build-time environment variables for the function
map<string, string> environment_variables = 6;
// Optional. Docker Registry to use for this deployment. This configuration is
// only applicable to 1st Gen functions, 2nd Gen functions can only use
// Artifact Registry.
// Docker Registry to use for this deployment. This configuration is only
// applicable to 1st Gen functions, 2nd Gen functions can only use Artifact
// Registry.
//
// If `docker_repository` field is specified, this field will be automatically
// set as `ARTIFACT_REGISTRY`.
// If unspecified, it currently defaults to `CONTAINER_REGISTRY`.
// This field may be overridden by the backend for eligible deployments.
DockerRegistry docker_registry = 10 [(google.api.field_behavior) = OPTIONAL];
DockerRegistry docker_registry = 10;
// User managed repository created in Artifact Registry optionally with a
// customer managed encryption key. This is the repository to which the
// User managed repository created in Artifact Registry optionally
// with a customer managed encryption key. This is the repository to which the
// function docker image will be pushed after it is built by Cloud Build.
// If unspecified, GCF will create and use a repository named 'gcf-artifacts'
// for every deployed region.
@ -496,7 +496,6 @@ message BuildConfig {
// Describes the Service being deployed.
// Currently Supported : Cloud Run (fully managed).
// Next tag: 23
message ServiceConfig {
// Available egress settings.
//
@ -537,7 +536,7 @@ message ServiceConfig {
//
// This enforces security protocol on function URL.
//
// Security level is only ocnfigurable for 1st Gen functions, If unspecified,
// Security level is only configurable for 1st Gen functions, If unspecified,
// SECURE_OPTIONAL will be used. 2nd Gen functions are SECURE_ALWAYS ONLY.
enum SecurityLevel {
// Unspecified.
@ -575,7 +574,7 @@ message ServiceConfig {
// a full description.
string available_memory = 13;
// The number of CPUs used in a single container instance.
// [Preview] The number of CPUs used in a single container instance.
// Default value is calculated from available memory.
// Supports the same values as Cloud Run, see
// https://cloud.google.com/run/docs/reference/rest/v1/Container#resourcerequirements
@ -647,8 +646,8 @@ message ServiceConfig {
// Output only. The name of service revision.
string revision = 18 [(google.api.field_behavior) = OUTPUT_ONLY];
// Sets the maximum number of concurrent requests that each instance can
// receive. Defaults to 1.
// [Preview] Sets the maximum number of concurrent requests that each instance
// can receive. Defaults to 1.
int32 max_instance_request_concurrency = 20;
// Security level configure whether the function only accepts https.
@ -925,7 +924,7 @@ message GenerateUploadUrlRequest {
}
];
// Resource name of a KMS crypto key (managed by the user) used to
// [Preview] Resource name of a KMS crypto key (managed by the user) used to
// encrypt/decrypt function source code objects in intermediate Cloud Storage
// buckets. When you generate an upload url and upload your source code, it
// gets copied to an intermediate Cloud Storage bucket. The source code is
@ -1081,6 +1080,12 @@ message OperationMetadata {
repeated Stage stages = 9;
}
// Extra GCF specific location information.
message LocationMetadata {
// The Cloud Function environments this location supports.
repeated Environment environments = 1;
}
// Each Stage of the deployment process
message Stage {
// Possible names for a Stage

Loading…
Cancel
Save