access_groups.go 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. // Copyright 2019 Yunion
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. package compute
  15. import "yunion.io/x/onecloud/pkg/apis"
  16. const (
  17. ACCESS_GROUP_STATUS_AVAILABLE = "available"
  18. ACCESS_GROUP_STATUS_DELETING = "deleting"
  19. ACCESS_GROUP_STATUS_DELETE_FAILED = "delete_failed"
  20. ACCESS_GROUP_STATUS_CREATING = "creating"
  21. ACCESS_GROUP_STATUS_SYNC_RULES = "sync_rules"
  22. ACCESS_GROUP_STATUS_SYNC_RULES_FAILED = "sync_rules_failed"
  23. ACCESS_GROUP_STATUS_UNKNOWN = "unknown"
  24. )
  25. type AccessGroupListInput struct {
  26. apis.StatusInfrasResourceBaseListInput
  27. apis.ExternalizedResourceBaseListInput
  28. ManagedResourceListInput
  29. RegionalFilterListInput
  30. }
  31. type AccessGroupDetails struct {
  32. apis.StatusInfrasResourceBaseDetails
  33. ManagedResourceInfo
  34. CloudregionResourceInfo
  35. }
  36. type AccessGroupResourceInfo struct {
  37. // 权限组名称
  38. AccessGroup string `json:"access_group"`
  39. }
  40. type AccessGroupFilterListInput struct {
  41. // 权限组Id
  42. AccessGroupId string `json:"access_group_id"`
  43. // 以权限组排序
  44. OrderByAccessGroup string `json:"order_by_access_group"`
  45. }
  46. type AccessGroupCreateInput struct {
  47. apis.StatusInfrasResourceBaseCreateInput
  48. CloudproviderResourceInput
  49. CloudregionResourceInput
  50. }