forked from GoogleCloudPlatform/magic-modules
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added monitoring metrics scope and monitored project resources. (Goog…
…leCloudPlatform#5218) * Added monitoring metrics scope and monitored project resources. * Ran make upgrade-dcl * Fixed indentation * Copied tpgtools go.sum lines into mmv1 go.sum. * Apply suggestions from code review Co-authored-by: Scott Suarez <[email protected]> * Attempted to fix strange downstream change in iam.go. * Added missing custom serializer to GA version, upgraded DCL again. * Update ID format so import is possible. Co-authored-by: Scott Suarez <[email protected]> Co-authored-by: Nathan Mckinley <[email protected]>
- Loading branch information
1 parent
a1f5dcc
commit 243d91e
Showing
29 changed files
with
758 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ import ( | |
"fmt" | ||
"log" | ||
"reflect" | ||
"sort" | ||
"strings" | ||
"time" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
# Copyright 2021 Google LLC. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
info: | ||
title: Monitoring/MetricsScope | ||
description: DCL Specification for the Monitoring MetricsScope resource | ||
x-dcl-has-iam: false | ||
paths: | ||
get: | ||
description: The function used to get information about a MetricsScope | ||
parameters: | ||
- name: MetricsScope | ||
required: true | ||
description: A full instance of a MetricsScope | ||
apply: | ||
description: The function used to apply information about a MetricsScope | ||
parameters: | ||
- name: MetricsScope | ||
required: true | ||
description: A full instance of a MetricsScope | ||
components: | ||
schemas: | ||
MetricsScope: | ||
title: MetricsScope | ||
x-dcl-id: locations/global/metricsScopes/{{name}} | ||
x-dcl-locations: | ||
- global | ||
type: object | ||
required: | ||
- name | ||
properties: | ||
createTime: | ||
type: string | ||
format: date-time | ||
x-dcl-go-name: CreateTime | ||
readOnly: true | ||
description: Output only. The time when this `Metrics Scope` was created. | ||
x-kubernetes-immutable: true | ||
monitoredProjects: | ||
type: array | ||
x-dcl-go-name: MonitoredProjects | ||
readOnly: true | ||
description: Output only. The list of projects monitored by this `Metrics | ||
Scope`. | ||
x-kubernetes-immutable: true | ||
x-dcl-send-empty: true | ||
x-dcl-list-type: list | ||
items: | ||
type: object | ||
x-dcl-go-type: MetricsScopeMonitoredProjects | ||
properties: | ||
createTime: | ||
type: string | ||
format: date-time | ||
x-dcl-go-name: CreateTime | ||
readOnly: true | ||
description: Output only. The time when this `MonitoredProject` was | ||
created. | ||
x-kubernetes-immutable: true | ||
name: | ||
type: string | ||
x-dcl-go-name: Name | ||
readOnly: true | ||
description: 'Immutable. The resource name of the `MonitoredProject`. | ||
On input, the resource name includes the scoping project ID and | ||
monitored project ID. On output, it contains the equivalent project | ||
numbers. Example: `locations/global/metricsScopes/{SCOPING_PROJECT_ID_OR_NUMBER}/projects/{MONITORED_PROJECT_ID_OR_NUMBER}`' | ||
x-kubernetes-immutable: true | ||
name: | ||
type: string | ||
x-dcl-go-name: Name | ||
description: 'Immutable. The resource name of the Monitoring Metrics Scope. | ||
On input, the resource name can be specified with the scoping project | ||
ID or number. On output, the resource name is specified with the scoping | ||
project number. Example: `locations/global/metricsScopes/{SCOPING_PROJECT_ID_OR_NUMBER}`' | ||
x-kubernetes-immutable: true | ||
updateTime: | ||
type: string | ||
format: date-time | ||
x-dcl-go-name: UpdateTime | ||
readOnly: true | ||
description: Output only. The time when this `Metrics Scope` record was | ||
last updated. | ||
x-kubernetes-immutable: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# Copyright 2021 Google LLC. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
info: | ||
title: Monitoring/MonitoredProject | ||
description: DCL Specification for the Monitoring MonitoredProject resource | ||
x-dcl-has-iam: false | ||
paths: | ||
get: | ||
description: The function used to get information about a MonitoredProject | ||
parameters: | ||
- name: MonitoredProject | ||
required: true | ||
description: A full instance of a MonitoredProject | ||
apply: | ||
description: The function used to apply information about a MonitoredProject | ||
parameters: | ||
- name: MonitoredProject | ||
required: true | ||
description: A full instance of a MonitoredProject | ||
delete: | ||
description: The function used to delete a MonitoredProject | ||
parameters: | ||
- name: MonitoredProject | ||
required: true | ||
description: A full instance of a MonitoredProject | ||
deleteAll: | ||
description: The function used to delete all MonitoredProject | ||
parameters: | ||
- name: metricsscope | ||
required: true | ||
schema: | ||
type: string | ||
list: | ||
description: The function used to list information about many MonitoredProject | ||
parameters: | ||
- name: metricsscope | ||
required: true | ||
schema: | ||
type: string | ||
components: | ||
schemas: | ||
MonitoredProject: | ||
title: MonitoredProject | ||
x-dcl-id: locations/global/metricsScopes/{{metrics_scope}}/projects/{{name}} | ||
x-dcl-locations: | ||
- global | ||
type: object | ||
required: | ||
- name | ||
- metricsScope | ||
properties: | ||
createTime: | ||
type: string | ||
format: date-time | ||
x-dcl-go-name: CreateTime | ||
readOnly: true | ||
description: Output only. The time when this `MonitoredProject` was created. | ||
x-kubernetes-immutable: true | ||
metricsScope: | ||
type: string | ||
x-dcl-go-name: MetricsScope | ||
description: 'Required. The resource name of the existing Metrics Scope | ||
that will monitor this project. Example: locations/global/metricsScopes/{SCOPING_PROJECT_ID_OR_NUMBER}' | ||
x-kubernetes-immutable: true | ||
x-dcl-references: | ||
- resource: Monitoring/MetricsScope | ||
field: name | ||
name: | ||
type: string | ||
x-dcl-go-name: Name | ||
description: 'Immutable. The resource name of the `MonitoredProject`. On | ||
input, the resource name includes the scoping project ID and monitored | ||
project ID. On output, it contains the equivalent project numbers. Example: | ||
`locations/global/metricsScopes/{SCOPING_PROJECT_ID_OR_NUMBER}/projects/{MONITORED_PROJECT_ID_OR_NUMBER}`' | ||
x-kubernetes-immutable: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
# Copyright 2021 Google LLC. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
info: | ||
title: Monitoring/MetricsScope | ||
description: DCL Specification for the Monitoring MetricsScope resource | ||
x-dcl-has-iam: false | ||
paths: | ||
get: | ||
description: The function used to get information about a MetricsScope | ||
parameters: | ||
- name: MetricsScope | ||
required: true | ||
description: A full instance of a MetricsScope | ||
apply: | ||
description: The function used to apply information about a MetricsScope | ||
parameters: | ||
- name: MetricsScope | ||
required: true | ||
description: A full instance of a MetricsScope | ||
components: | ||
schemas: | ||
MetricsScope: | ||
title: MetricsScope | ||
x-dcl-id: locations/global/metricsScopes/{{name}} | ||
x-dcl-locations: | ||
- global | ||
type: object | ||
required: | ||
- name | ||
properties: | ||
createTime: | ||
type: string | ||
format: date-time | ||
x-dcl-go-name: CreateTime | ||
readOnly: true | ||
description: Output only. The time when this `Metrics Scope` was created. | ||
x-kubernetes-immutable: true | ||
monitoredProjects: | ||
type: array | ||
x-dcl-go-name: MonitoredProjects | ||
readOnly: true | ||
description: Output only. The list of projects monitored by this `Metrics | ||
Scope`. | ||
x-kubernetes-immutable: true | ||
x-dcl-send-empty: true | ||
x-dcl-list-type: list | ||
items: | ||
type: object | ||
x-dcl-go-type: MetricsScopeMonitoredProjects | ||
properties: | ||
createTime: | ||
type: string | ||
format: date-time | ||
x-dcl-go-name: CreateTime | ||
readOnly: true | ||
description: Output only. The time when this `MonitoredProject` was | ||
created. | ||
x-kubernetes-immutable: true | ||
name: | ||
type: string | ||
x-dcl-go-name: Name | ||
readOnly: true | ||
description: 'Immutable. The resource name of the `MonitoredProject`. | ||
On input, the resource name includes the scoping project ID and | ||
monitored project ID. On output, it contains the equivalent project | ||
numbers. Example: `locations/global/metricsScopes/{SCOPING_PROJECT_ID_OR_NUMBER}/projects/{MONITORED_PROJECT_ID_OR_NUMBER}`' | ||
x-kubernetes-immutable: true | ||
name: | ||
type: string | ||
x-dcl-go-name: Name | ||
description: 'Immutable. The resource name of the Monitoring Metrics Scope. | ||
On input, the resource name can be specified with the scoping project | ||
ID or number. On output, the resource name is specified with the scoping | ||
project number. Example: `locations/global/metricsScopes/{SCOPING_PROJECT_ID_OR_NUMBER}`' | ||
x-kubernetes-immutable: true | ||
updateTime: | ||
type: string | ||
format: date-time | ||
x-dcl-go-name: UpdateTime | ||
readOnly: true | ||
description: Output only. The time when this `Metrics Scope` record was | ||
last updated. | ||
x-kubernetes-immutable: true |
Oops, something went wrong.