From 444fb8b0a33840949917f4a159710dd1a08a0c6e Mon Sep 17 00:00:00 2001 From: wuzhuanhong Date: Tue, 6 Feb 2024 10:20:38 +0800 Subject: [PATCH] fix(Workspace): fix Workspace service API comments(4175) --- .../resource_huaweicloud_workspace_access_policy.go | 4 ++-- .../workspace/resource_huaweicloud_workspace_desktop.go | 9 ++++----- .../resource_huaweicloud_workspace_eip_associate.go | 3 ++- .../resource_huaweicloud_workspace_policy_group.go | 6 +++--- .../workspace/resource_huaweicloud_workspace_service.go | 2 ++ .../resource_huaweicloud_workspace_terminal_bindings.go | 5 +++++ .../workspace/resource_huaweicloud_workspace_user.go | 6 +++--- 7 files changed, 21 insertions(+), 14 deletions(-) diff --git a/huaweicloud/services/workspace/resource_huaweicloud_workspace_access_policy.go b/huaweicloud/services/workspace/resource_huaweicloud_workspace_access_policy.go index cba17879e8..32c8fef108 100644 --- a/huaweicloud/services/workspace/resource_huaweicloud_workspace_access_policy.go +++ b/huaweicloud/services/workspace/resource_huaweicloud_workspace_access_policy.go @@ -15,8 +15,8 @@ import ( "github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/config" ) -// @API Workspace GET /v2/{project_id}/access-policy/{policyId}/objects -// @API Workspace PUT /v2/{project_id}/access-policy/{policyId}/objects +// @API Workspace GET /v2/{project_id}/access-policy/{access_policy_id}/objects +// @API Workspace PUT /v2/{project_id}/access-policy/{access_policy_id}/objects // @API Workspace DELETE /v2/{project_id}/access-policy // @API Workspace GET /v2/{project_id}/access-policy // @API Workspace POST /v2/{project_id}/access-policy diff --git a/huaweicloud/services/workspace/resource_huaweicloud_workspace_desktop.go b/huaweicloud/services/workspace/resource_huaweicloud_workspace_desktop.go index 3b7f28a958..cc91057e91 100644 --- a/huaweicloud/services/workspace/resource_huaweicloud_workspace_desktop.go +++ b/huaweicloud/services/workspace/resource_huaweicloud_workspace_desktop.go @@ -58,13 +58,12 @@ func desktopVolumeSchemaResource() *schema.Resource { // @API Workspace POST /v2/{project_id}/desktops/rebuild // @API Workspace POST /v2/{project_id}/desktops/resize -// @API Workspace GET /v2/{project_id}/desktops/{desktopId} -// @API Workspace DELETE /v2/{project_id}/desktops/{desktopId} +// @API Workspace GET /v2/{project_id}/desktops/{desktop_id} +// @API Workspace DELETE /v2/{project_id}/desktops/{desktop_id} // @API Workspace POST /v2/{project_id}/desktops/{id}/tags/action -// @API Workspace GET /v2/{project_id}/users // @API Workspace POST /v2/{project_id}/volumes -// @API Workspace GET /v2/{project_id}/desktops/{desktopId}/networks -// @API Workspace PUT /v2/{project_id}/desktops/{desktopId}/networks +// @API Workspace GET /v2/{project_id}/desktops/{desktop_id}/networks +// @API Workspace PUT /v2/{project_id}/desktops/{desktop_id}/networks // @API Workspace POST /v2/{project_id}/desktops // @API Workspace POST /v2/{project_id}/volumes/expand // @API Workspace GET /v2/{project_id}/workspace-sub-jobs diff --git a/huaweicloud/services/workspace/resource_huaweicloud_workspace_eip_associate.go b/huaweicloud/services/workspace/resource_huaweicloud_workspace_eip_associate.go index 009e15111c..083e74caed 100644 --- a/huaweicloud/services/workspace/resource_huaweicloud_workspace_eip_associate.go +++ b/huaweicloud/services/workspace/resource_huaweicloud_workspace_eip_associate.go @@ -15,7 +15,8 @@ import ( "github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/config" ) -// @API Workspace POST /v2/{project_id}/eips/{bindType} +// @API Workspace POST /v2/{project_id}/eips/binding +// @API Workspace POST /v2/{project_id}/eips/unbinding // @API Workspace GET /v2/{project_id}/eips func ResourceEipAssociate() *schema.Resource { return &schema.Resource{ diff --git a/huaweicloud/services/workspace/resource_huaweicloud_workspace_policy_group.go b/huaweicloud/services/workspace/resource_huaweicloud_workspace_policy_group.go index f9fc46e53b..c794293100 100644 --- a/huaweicloud/services/workspace/resource_huaweicloud_workspace_policy_group.go +++ b/huaweicloud/services/workspace/resource_huaweicloud_workspace_policy_group.go @@ -14,9 +14,9 @@ import ( "github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/utils" ) -// @API Workspace DELETE /v2/{project_id}/policy-groups/{groupId} -// @API Workspace GET /v2/{project_id}/policy-groups/{groupId} -// @API Workspace PUT /v2/{project_id}/policy-groups/{groupId} +// @API Workspace DELETE /v2/{project_id}/policy-groups/{policy_group_id} +// @API Workspace GET /v2/{project_id}/policy-groups/{policy_group_id} +// @API Workspace PUT /v2/{project_id}/policy-groups/{policy_group_id} // @API Workspace POST /v2/{project_id}/policy-groups func ResourcePolicyGroup() *schema.Resource { return &schema.Resource{ diff --git a/huaweicloud/services/workspace/resource_huaweicloud_workspace_service.go b/huaweicloud/services/workspace/resource_huaweicloud_workspace_service.go index 8ddd21bf96..421ef82e1a 100644 --- a/huaweicloud/services/workspace/resource_huaweicloud_workspace_service.go +++ b/huaweicloud/services/workspace/resource_huaweicloud_workspace_service.go @@ -144,6 +144,8 @@ func assistAuthSchemaResource() *schema.Resource { // @API Workspace GET /v2/{project_id}/workspaces // @API Workspace POST /v2/{project_id}/workspaces // @API Workspace PUT /v2/{project_id}/workspaces +// @API Workspace GET /v2/{project_id}/workspaces/lock-status +// @API Workspace PUT /v2/{project_id}/workspaces/lock-status func ResourceService() *schema.Resource { return &schema.Resource{ CreateContext: resourceServiceCreate, diff --git a/huaweicloud/services/workspace/resource_huaweicloud_workspace_terminal_bindings.go b/huaweicloud/services/workspace/resource_huaweicloud_workspace_terminal_bindings.go index 9023bd69b5..17e82529f7 100644 --- a/huaweicloud/services/workspace/resource_huaweicloud_workspace_terminal_bindings.go +++ b/huaweicloud/services/workspace/resource_huaweicloud_workspace_terminal_bindings.go @@ -17,6 +17,11 @@ import ( "github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/utils" ) +// @API Workspace POST /v2/{project_id}/terminals/binding-desktops/batch-delete +// @API Workspace POST /v2/{project_id}/terminals/binding-desktops +// @API Workspace GET /v2/{project_id}/terminals/binding-desktops +// @API Workspace GET /v2/{project_id}/terminals/binding-desktops/config +// @API Workspace POST /v2/{project_id}/terminals/binding-desktops/config func ResourceTerminalBinding() *schema.Resource { return &schema.Resource{ CreateContext: resourceTerminalBindingsCreate, diff --git a/huaweicloud/services/workspace/resource_huaweicloud_workspace_user.go b/huaweicloud/services/workspace/resource_huaweicloud_workspace_user.go index 27a463b984..b5d85e0ae5 100644 --- a/huaweicloud/services/workspace/resource_huaweicloud_workspace_user.go +++ b/huaweicloud/services/workspace/resource_huaweicloud_workspace_user.go @@ -23,9 +23,9 @@ const ( MilliRFC3339NoT = "2006-01-02T15:04:05.000Z" ) -// @API Workspace DELETE /v2/{project_id}/users/{userId} -// @API Workspace GET /v2/{project_id}/users/{userId} -// @API Workspace PUT /v2/{project_id}/users/{userId} +// @API Workspace DELETE /v2/{project_id}/users/{user_id} +// @API Workspace GET /v2/{project_id}/users/{user_id} +// @API Workspace PUT /v2/{project_id}/users/{user_id} // @API Workspace POST /v2/{project_id}/users func ResourceUser() *schema.Resource { return &schema.Resource{