DescribeParameterGroupAttachedInstances.go 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. // Copyright 2018 JDCLOUD.COM
  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. //
  15. // NOTE: This class is auto generated by the jdcloud code generator program.
  16. package apis
  17. import (
  18. "github.com/jdcloud-api/jdcloud-sdk-go/core"
  19. rds "github.com/jdcloud-api/jdcloud-sdk-go/services/rds/models"
  20. )
  21. type DescribeParameterGroupAttachedInstancesRequest struct {
  22. core.JDCloudRequest
  23. /* Region ID */
  24. RegionId string `json:"regionId"`
  25. /* Parameter Group ID */
  26. ParameterGroupId string `json:"parameterGroupId"`
  27. /* 显示数据的页码,默认为1,取值范围:[-1,∞)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页 (Optional) */
  28. PageNumber *int `json:"pageNumber"`
  29. /* 每页显示的数据条数,默认为10,取值范围:[10,100],且为10的整数倍 (Optional) */
  30. PageSize *int `json:"pageSize"`
  31. }
  32. /*
  33. * param regionId: Region ID (Required)
  34. * param parameterGroupId: Parameter Group ID (Required)
  35. *
  36. * @Deprecated, not compatible when mandatory parameters changed
  37. */
  38. func NewDescribeParameterGroupAttachedInstancesRequest(
  39. regionId string,
  40. parameterGroupId string,
  41. ) *DescribeParameterGroupAttachedInstancesRequest {
  42. return &DescribeParameterGroupAttachedInstancesRequest{
  43. JDCloudRequest: core.JDCloudRequest{
  44. URL: "/regions/{regionId}/parameterGroups/{parameterGroupId}/instances",
  45. Method: "GET",
  46. Header: nil,
  47. Version: "v1",
  48. },
  49. RegionId: regionId,
  50. ParameterGroupId: parameterGroupId,
  51. }
  52. }
  53. /*
  54. * param regionId: Region ID (Required)
  55. * param parameterGroupId: Parameter Group ID (Required)
  56. * param pageNumber: 显示数据的页码,默认为1,取值范围:[-1,∞)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页 (Optional)
  57. * param pageSize: 每页显示的数据条数,默认为10,取值范围:[10,100],且为10的整数倍 (Optional)
  58. */
  59. func NewDescribeParameterGroupAttachedInstancesRequestWithAllParams(
  60. regionId string,
  61. parameterGroupId string,
  62. pageNumber *int,
  63. pageSize *int,
  64. ) *DescribeParameterGroupAttachedInstancesRequest {
  65. return &DescribeParameterGroupAttachedInstancesRequest{
  66. JDCloudRequest: core.JDCloudRequest{
  67. URL: "/regions/{regionId}/parameterGroups/{parameterGroupId}/instances",
  68. Method: "GET",
  69. Header: nil,
  70. Version: "v1",
  71. },
  72. RegionId: regionId,
  73. ParameterGroupId: parameterGroupId,
  74. PageNumber: pageNumber,
  75. PageSize: pageSize,
  76. }
  77. }
  78. /* This constructor has better compatible ability when API parameters changed */
  79. func NewDescribeParameterGroupAttachedInstancesRequestWithoutParam() *DescribeParameterGroupAttachedInstancesRequest {
  80. return &DescribeParameterGroupAttachedInstancesRequest{
  81. JDCloudRequest: core.JDCloudRequest{
  82. URL: "/regions/{regionId}/parameterGroups/{parameterGroupId}/instances",
  83. Method: "GET",
  84. Header: nil,
  85. Version: "v1",
  86. },
  87. }
  88. }
  89. /* param regionId: Region ID(Required) */
  90. func (r *DescribeParameterGroupAttachedInstancesRequest) SetRegionId(regionId string) {
  91. r.RegionId = regionId
  92. }
  93. /* param parameterGroupId: Parameter Group ID(Required) */
  94. func (r *DescribeParameterGroupAttachedInstancesRequest) SetParameterGroupId(parameterGroupId string) {
  95. r.ParameterGroupId = parameterGroupId
  96. }
  97. /* param pageNumber: 显示数据的页码,默认为1,取值范围:[-1,∞)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页(Optional) */
  98. func (r *DescribeParameterGroupAttachedInstancesRequest) SetPageNumber(pageNumber int) {
  99. r.PageNumber = &pageNumber
  100. }
  101. /* param pageSize: 每页显示的数据条数,默认为10,取值范围:[10,100],且为10的整数倍(Optional) */
  102. func (r *DescribeParameterGroupAttachedInstancesRequest) SetPageSize(pageSize int) {
  103. r.PageSize = &pageSize
  104. }
  105. // GetRegionId returns path parameter 'regionId' if exist,
  106. // otherwise return empty string
  107. func (r DescribeParameterGroupAttachedInstancesRequest) GetRegionId() string {
  108. return r.RegionId
  109. }
  110. type DescribeParameterGroupAttachedInstancesResponse struct {
  111. RequestID string `json:"requestId"`
  112. Error core.ErrorResponse `json:"error"`
  113. Result DescribeParameterGroupAttachedInstancesResult `json:"result"`
  114. }
  115. type DescribeParameterGroupAttachedInstancesResult struct {
  116. Instances []rds.AttachedDBInstance `json:"instances"`
  117. TotalCount int `json:"totalCount"`
  118. }