diff --git a/model/clusters_mgmt/v1/pending_delete_cluster_resource.model b/model/clusters_mgmt/v1/pending_delete_cluster_resource.model new file mode 100644 index 00000000..417e4bef --- /dev/null +++ b/model/clusters_mgmt/v1/pending_delete_cluster_resource.model @@ -0,0 +1,28 @@ +/* +Copyright (c) 2023 Red Hat, Inc. + +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. +*/ + +// Manages a specific pending delete cluster. +resource PendingDeleteCluster { + // Retrieves the details of the pending delete cluster. + method Get { + out Body PendingDeleteCluster + } + + // Updates the pending delete cluster entry. + method Update { + in out Body PendingDeleteCluster + } +} diff --git a/model/clusters_mgmt/v1/pending_delete_cluster_type.model b/model/clusters_mgmt/v1/pending_delete_cluster_type.model new file mode 100644 index 00000000..2d3eeb9d --- /dev/null +++ b/model/clusters_mgmt/v1/pending_delete_cluster_type.model @@ -0,0 +1,28 @@ +/* +Copyright (c) 2023 Red Hat, Inc. + +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. +*/ + +// Represents a pending delete entry for a specific cluster. +class PendingDeleteCluster { + // Cluster is the details of the cluster that is pending deletion. + link Cluster Cluster + + // Date and time when the cluster was initially created, using the + // format defined in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt). + CreationTimestamp Date + + // Flag indicating if the cluster deletion should be best-effort mode or not. + BestEffort Boolean +} diff --git a/model/clusters_mgmt/v1/pending_delete_clusters_resource.model b/model/clusters_mgmt/v1/pending_delete_clusters_resource.model new file mode 100644 index 00000000..03021c46 --- /dev/null +++ b/model/clusters_mgmt/v1/pending_delete_clusters_resource.model @@ -0,0 +1,70 @@ +/* +Copyright (c) 2023 Red Hat, Inc. + +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. +*/ + +// Manages the collection of pending delete clusters. +resource PendingDeleteClusters { + // Retrieves the list of pending delete clusters. + method List { + // Index of the requested page, where one corresponds to the first page. + in out Page Integer = 1 + + // Maximum number of items that will be contained in the returned page. + in out Size Integer = 100 + + // Search criteria. + // + // The syntax of this parameter is similar to the syntax of the _where_ clause of a + // SQL statement, but using the names of the attributes of the pending delete cluster instead of + // the names of the columns of a table. For example, in order to retrieve all the + // pending delete clusters with creation time later than 2023-03-01T00:00:00Z the following is required: + // + // ```sql + // creation_timestamp > '2023-03-01T00:00:00Z' + // ``` + // + // If the parameter isn't provided, or if the value is empty, then all the + // pending delete clusters that the user has permission to see will be returned. + in Search String + + // Order criteria. + // + // The syntax of this parameter is similar to the syntax of the _order by_ clause of + // a SQL statement, but using the names of the attributes of the pending delete cluster instead of + // the names of the columns of a table. For example, in order to sort the pending delete clusters + // descending by creation timestamp (i.e. their deletion time) the value should be: + // + // ```sql + // creation_timestamp desc + // ``` + // + // If the parameter isn't provided, or if the value is empty, then the order of the + // results is undefined. + in Order String + + // Total number of items of the collection that match the search criteria, + // regardless of the size of the page. + out Total Integer + + // Retrieved list of pending delete clusters. + out Items []PendingDeleteCluster + } + + // Returns a reference to the service that manages an specific pending delete cluster. + locator PendingDeleteCluster { + target PendingDeleteCluster + variable ID + } +} diff --git a/model/clusters_mgmt/v1/root_resource.model b/model/clusters_mgmt/v1/root_resource.model index e7580545..b26dd920 100644 --- a/model/clusters_mgmt/v1/root_resource.model +++ b/model/clusters_mgmt/v1/root_resource.model @@ -88,12 +88,17 @@ resource Root { } // Reference to the resource that manages the environment. - locator Environment { - target Environment - } + locator Environment { + target Environment + } // Reference to the resource that manages oidc locator OidcConfigs { target OidcConfigs } + + // Reference to the resource that manages the collection of pending delete clusters. + locator PendingDeleteClusters { + target PendingDeleteClusters + } }