Skip to content

Commit

Permalink
Apply new labels model to more resources (part 3) (#9000)
Browse files Browse the repository at this point in the history
* Apply new labels model to more resources (part 3)

* Use the same format for labels fields

* Ignore labels fileds in import state verify
  • Loading branch information
zli82016 authored Sep 19, 2023
1 parent 34cf135 commit 14abe60
Show file tree
Hide file tree
Showing 39 changed files with 138 additions and 111 deletions.
4 changes: 2 additions & 2 deletions mmv1/products/cloudrun/DomainMapping.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ properties:
description: Metadata associated with this DomainMapping.
properties:
- !ruby/object:Api::Type::KeyValuePairs
name: labels
name: 'labels'
description: |-
Map of string keys and values that can be used to organize and categorize
(scope and select) objects. May match selectors of replication controllers
Expand Down Expand Up @@ -204,7 +204,7 @@ properties:
project ID or project number.
custom_flatten: templates/terraform/custom_flatten/set_to_project.go.erb
- !ruby/object:Api::Type::KeyValuePairs
name: annotations
name: 'annotations'
description: |-
Annotations is a key value map stored with a resource that
may be set by external tools to store and retrieve arbitrary metadata. More
Expand Down
8 changes: 4 additions & 4 deletions mmv1/products/cloudrun/Service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ properties:
default_from_api: true
properties:
- !ruby/object:Api::Type::KeyValuePairs
name: labels
name: 'labels'
description: |-
Map of string keys and values that can be used to organize and categorize
(scope and select) objects.
Expand Down Expand Up @@ -279,7 +279,7 @@ properties:
default_from_api: true
custom_expand: 'templates/terraform/custom_expand/default_to_project.go.erb'
- !ruby/object:Api::Type::KeyValuePairs
name: annotations
name: 'annotations'
description: |-
Annotations is a key value map stored with a resource that
may be set by external tools to store and retrieve arbitrary metadata. More
Expand Down Expand Up @@ -971,7 +971,7 @@ properties:
default_from_api: true
properties:
- !ruby/object:Api::Type::KeyValuePairs
name: labels
name: 'labels'
description: |-
Map of string keys and values that can be used to organize and categorize
(scope and select) objects. May match selectors of replication controllers
Expand Down Expand Up @@ -1013,7 +1013,7 @@ properties:
custom_flatten: templates/terraform/custom_flatten/set_to_project.go.erb
custom_expand: 'templates/terraform/custom_expand/default_to_project.go.erb'
- !ruby/object:Api::Type::KeyValuePairs
name: annotations
name: 'annotations'
description: |-
Annotations is a key value map stored with a resource that
may be set by external tools to store and retrieve arbitrary metadata. More
Expand Down
4 changes: 2 additions & 2 deletions mmv1/products/cloudrunv2/Job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ properties:
Cloud Run API v2 does not support labels with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected.
All system labels in v1 now have a corresponding field in v2 Job.
- !ruby/object:Api::Type::KeyValueAnnotations
name: "annotations"
name: 'annotations'
description: |-
Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects.
Expand Down Expand Up @@ -229,7 +229,7 @@ properties:
Cloud Run API v2 does not support labels with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected.
All system labels in v1 now have a corresponding field in v2 ExecutionTemplate.
- !ruby/object:Api::Type::KeyValuePairs
name: "annotations"
name: 'annotations'
description: |-
Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects.
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/containerattached/Cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ properties:
The Kubernetes version of the cluster.
output: true
- !ruby/object:Api::Type::KeyValueAnnotations
name: annotations
name: 'annotations'
description: |
Optional. Annotations on the cluster. This field has the same
restrictions as Kubernetes annotations. The total size of all keys and
Expand Down
4 changes: 2 additions & 2 deletions mmv1/products/firebasehosting/Channel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ properties:
The number of previous releases to retain on the channel for rollback or other
purposes. Must be a number between 1-100. Defaults to 10 for new channels.
default_from_api: true
- !ruby/object:Api::Type::KeyValuePairs
name: labels
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: Text labels used for extra metadata and/or filtering
- !ruby/object:Api::Type::Time
name: expireTime
Expand Down
4 changes: 2 additions & 2 deletions mmv1/products/gkebackup/BackupPlan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ properties:
If set to True, no further update is allowed on this policy, including
the locked field itself.
default_from_api: true
- !ruby/object:Api::Type::KeyValuePairs
name: labels
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: |
Description: A set of custom labels supplied by the user.
A list of key->value pairs.
Expand Down
4 changes: 2 additions & 2 deletions mmv1/products/gkehub2/Feature.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ properties:
diff_suppress_func: 'tpgresource.CompareSelfLinkOrResourceName'
custom_expand: templates/terraform/custom_expand/resource_from_self_link.go.erb
custom_flatten: templates/terraform/custom_flatten/name_from_self_link.erb
- !ruby/object:Api::Type::KeyValuePairs
name: labels
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: GCP labels for this Feature.
- !ruby/object:Api::Type::NestedObject
name: resourceState
Expand Down
6 changes: 3 additions & 3 deletions mmv1/products/gkeonprem/BareMetalAdminCluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ properties:
through optimistic concurrency control.
output: true
- !ruby/object:Api::Type::KeyValueAnnotations
name: "annotations"
name: 'annotations'
description: |
Annotations on the Bare Metal Admin Cluster.
This field has the same restrictions as Kubernetes annotations.
Expand Down Expand Up @@ -194,7 +194,7 @@ properties:
The default IPv4 address for SSH access and Kubernetes node.
Example: 192.168.0.1
- !ruby/object:Api::Type::KeyValuePairs
name: "labels"
name: 'labels'
description: |
The map of Kubernetes labels (key/value pairs) to be applied to
each node. These will added in addition to any default label(s)
Expand Down Expand Up @@ -233,7 +233,7 @@ properties:
- PREFER_NO_SCHEDULE
- NO_EXECUTE
- !ruby/object:Api::Type::KeyValuePairs
name: "labels"
name: 'labels'
description: |
The map of Kubernetes labels (key/value pairs) to be applied to
each node. These will added in addition to any default label(s)
Expand Down
14 changes: 7 additions & 7 deletions mmv1/products/gkeonprem/BareMetalCluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ properties:
description: |
A human readable description of this Bare Metal User Cluster.
- !ruby/object:Api::Type::KeyValueAnnotations
name: "annotations"
name: 'annotations'
description: |
Annotations on the Bare Metal User Cluster.
This field has the same restrictions as Kubernetes annotations.
Expand Down Expand Up @@ -176,7 +176,7 @@ properties:
The default IPv4 address for SSH access and Kubernetes node.
Example: 192.168.0.1
- !ruby/object:Api::Type::KeyValuePairs
name: "labels"
name: 'labels'
description: |
The map of Kubernetes labels (key/value pairs) to be applied to
each node. These will added in addition to any default label(s)
Expand Down Expand Up @@ -217,7 +217,7 @@ properties:
- PREFER_NO_SCHEDULE
- NO_EXECUTE
- !ruby/object:Api::Type::KeyValuePairs
name: "labels"
name: 'labels'
description: |
The map of Kubernetes labels (key/value pairs) to be applied to
each node. These will added in addition to any default label(s)
Expand Down Expand Up @@ -340,7 +340,7 @@ properties:
The default IPv4 address for SSH access and Kubernetes node.
Example: 192.168.0.1
- !ruby/object:Api::Type::KeyValuePairs
name: "labels"
name: 'labels'
description: |
The map of Kubernetes labels (key/value pairs) to be applied to
each node. These will added in addition to any default label(s)
Expand Down Expand Up @@ -381,7 +381,7 @@ properties:
- PREFER_NO_SCHEDULE
- NO_EXECUTE
- !ruby/object:Api::Type::KeyValuePairs
name: "labels"
name: 'labels'
description: |
The map of Kubernetes labels (key/value pairs) to be applied to
each node. These will added in addition to any default label(s)
Expand Down Expand Up @@ -504,7 +504,7 @@ properties:
The default IPv4 address for SSH access and Kubernetes node.
Example: 192.168.0.1
- !ruby/object:Api::Type::KeyValuePairs
name: "labels"
name: 'labels'
description: |
The map of Kubernetes labels (key/value pairs) to be applied to
each node. These will added in addition to any default label(s)
Expand Down Expand Up @@ -543,7 +543,7 @@ properties:
- PREFER_NO_SCHEDULE
- NO_EXECUTE
- !ruby/object:Api::Type::KeyValuePairs
name: "labels"
name: 'labels'
description: |
The map of Kubernetes labels (key/value pairs) to be applied to
each node. These will added in addition to any default label(s)
Expand Down
4 changes: 2 additions & 2 deletions mmv1/products/gkeonprem/VmwareNodePool.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ properties:
name: "displayName"
description: The display name for the node pool.
- !ruby/object:Api::Type::KeyValueAnnotations
name: "annotations"
name: 'annotations'
description: |
Annotations on the node Pool.
This field has the same restrictions as Kubernetes annotations.
Expand Down Expand Up @@ -148,7 +148,7 @@ properties:
- PREFER_NO_SCHEDULE
- NO_EXECUTE
- !ruby/object:Api::Type::KeyValuePairs
name: "labels"
name: 'labels'
description: |
The map of Kubernetes labels (key/value pairs) to be applied to each node.
These will added in addition to any default label(s) that
Expand Down
4 changes: 2 additions & 2 deletions mmv1/products/healthcare/ConsentStore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ properties:
required: false
description: |
If true, [consents.patch] [google.cloud.healthcare.v1.consent.UpdateConsent] creates the consent if it does not already exist.
- !ruby/object:Api::Type::KeyValuePairs
name: labels
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
required: false
description: |
User-supplied key-value pairs used to organize Consent stores.
Expand Down
4 changes: 2 additions & 2 deletions mmv1/products/healthcare/DicomStore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ properties:
** Changing this property may recreate the Dicom store (removing all data) **
required: true
immutable: true
- !ruby/object:Api::Type::KeyValuePairs
name: labels
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
required: false
description: |
User-supplied key-value pairs used to organize DICOM stores.
Expand Down
4 changes: 2 additions & 2 deletions mmv1/products/healthcare/FhirStore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ properties:
** This property can be changed manually in the Google Cloud Healthcare admin console without recreating the FHIR store **
required: false
immutable: true
- !ruby/object:Api::Type::KeyValuePairs
name: labels
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
required: false
description: |
User-supplied key-value pairs used to organize FHIR stores.
Expand Down
4 changes: 2 additions & 2 deletions mmv1/products/healthcare/Hl7V2Store.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ properties:
- :V1
- :V2
- :V3
- !ruby/object:Api::Type::KeyValuePairs
name: labels
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
required: false
description: |
User-supplied key-value pairs used to organize HL7v2 stores.
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/logging/Metric.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ properties:
- :CUMULATIVE
required: true
- !ruby/object:Api::Type::Array
name: labels
name: 'labels'
description: |
The set of labels that can be used to describe a specific instance of this metric type. For
example, the appengine.googleapis.com/http/server/response_latencies metric type has a label
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/monitoring/AlertPolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,7 @@ properties:
alerting rule, then this value should be taken from the enclosing
rule group.
- !ruby/object:Api::Type::KeyValuePairs
name: labels
name: 'labels'
description: |
Labels to add to or overwrite in the PromQL query result. Label names
must be valid.
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/monitoring/MetricDescriptor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ properties:
the DNS name custom.googleapis.com, external.googleapis.com, or
logging.googleapis.com/user/.
- !ruby/object:Api::Type::Array
name: labels
name: 'labels'
description:
The set of labels that can be used to describe a specific instance of this
metric type. In order to delete a label, the entire resource must be
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/monitoring/NotificationChannel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ custom_diff: [
]
properties:
- !ruby/object:Api::Type::KeyValuePairs
name: labels
name: 'labels'
description: |
Configuration fields that define the channel and its behavior. The
permissible and required labels are specified in the
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/monitoring/UptimeCheckConfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ properties:
resource types
(https://cloud.google.com/logging/docs/api/v2/resource-list).
- !ruby/object:Api::Type::KeyValuePairs
name: labels
name: 'labels'
immutable: true
required: true
description:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ properties:
output: true
description: |
The type of underlying resources used to create the connection.
- !ruby/object:Api::Type::KeyValuePairs
name: "labels"
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: |
User-defined labels.
4 changes: 2 additions & 2 deletions mmv1/products/networksecurity/AddressGroup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ properties:
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
output: true
- !ruby/object:Api::Type::KeyValuePairs
name: "labels"
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: |
Set of label tags associated with the AddressGroup resource.
An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
Expand Down
4 changes: 2 additions & 2 deletions mmv1/products/privateca/CaPool.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -480,8 +480,8 @@ properties:
values:
- :PEM
- :DER
- !ruby/object:Api::Type::KeyValuePairs
name: labels
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: |
Labels with user-defined metadata.
Expand Down
4 changes: 2 additions & 2 deletions mmv1/products/privateca/CertificateAuthority.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -735,8 +735,8 @@ properties:
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine
fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
output: true
- !ruby/object:Api::Type::KeyValuePairs
name: labels
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: |
Labels with user-defined metadata.
Expand Down
6 changes: 3 additions & 3 deletions mmv1/products/secretmanager/Secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ properties:
output: true
description: |
The time at which the Secret was created.
- !ruby/object:Api::Type::KeyValuePairs
name: labels
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: |
The labels assigned to this Secret.
Expand All @@ -85,7 +85,7 @@ properties:
An object containing a list of "key": value pairs. Example:
{ "name": "wrench", "mass": "1.3kg", "count": "3" }.
- !ruby/object:Api::Type::KeyValueAnnotations
name: annotations
name: 'annotations'
description: |
Custom metadata about the secret.
Expand Down
4 changes: 2 additions & 2 deletions mmv1/products/vertexai/Endpoint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,8 @@ properties:
"overwrite" update happens.
output: true
ignore_read: true
- !ruby/object:Api::Type::KeyValuePairs
name: labels
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description:
The labels with user-defined metadata to organize your Endpoints. Label
keys and values can be no longer than 64 characters (Unicode codepoints),
Expand Down
Loading

0 comments on commit 14abe60

Please sign in to comment.