fastly 14.0.0 → 15.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (222) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +45 -0
  3. data/Gemfile.lock +1 -1
  4. data/README.md +22 -13
  5. data/docs/ApiDiscoveryResponseBodyGetAllServices.md +13 -0
  6. data/docs/ApiDiscoveryResponseCustomer.md +10 -0
  7. data/docs/ApiDiscoveryResponseCustomerCustomer.md +11 -0
  8. data/docs/ApiDiscoveryResponseEnable.md +12 -0
  9. data/docs/ApiDiscoveryResponseEnabledServices.md +10 -0
  10. data/docs/ApiDiscoveryResponseLinks.md +10 -0
  11. data/docs/ApiDiscoveryResponseLinksGetAllServices.md +10 -0
  12. data/docs/ApiDiscoveryResponseLinksGetAllServicesLinks.md +10 -0
  13. data/docs/ApiDiscoveryResponseLinksLinks.md +10 -0
  14. data/docs/ApiDiscoveryResponseProduct.md +10 -0
  15. data/docs/ApiDiscoveryResponseProductProduct.md +11 -0
  16. data/docs/ApiDiscoveryResponseService.md +10 -0
  17. data/docs/{BotManagementResponseServiceService.md → ApiDiscoveryResponseServiceService.md} +1 -1
  18. data/docs/BotManagementResponseBodyEnable.md +1 -1
  19. data/docs/BotManagementResponseService.md +1 -1
  20. data/docs/BrotliCompressionResponseBodyEnable.md +1 -1
  21. data/docs/BrotliCompressionResponseService.md +1 -1
  22. data/docs/DdosProtectionApi.md +2 -0
  23. data/docs/DdosProtectionEvent.md +2 -0
  24. data/docs/DdosProtectionEventAllOf.md +2 -0
  25. data/docs/DdosProtectionRequestEnableMode.md +10 -0
  26. data/docs/DdosProtectionResponseConfigure.md +1 -1
  27. data/docs/DdosProtectionResponseEnable.md +1 -1
  28. data/docs/DdosProtectionResponseService.md +1 -1
  29. data/docs/DdosProtectionRuleWithStats.md +23 -0
  30. data/docs/DdosProtectionRuleWithStatsAllOf.md +10 -0
  31. data/docs/DdosProtectionTrafficStats.md +1 -0
  32. data/docs/DdosProtectionTrafficStatsAllOf.md +1 -0
  33. data/docs/DmDomainsApi.md +220 -0
  34. data/docs/DomainInspectorHistoricalApi.md +1 -1
  35. data/docs/DomainInspectorResponseBodyEnable.md +1 -1
  36. data/docs/DomainInspectorResponseService.md +1 -1
  37. data/docs/DomainOwnershipsApi.md +2 -2
  38. data/docs/DomainResearchApi.md +103 -0
  39. data/docs/DomainResearchResponseBodyEnable.md +12 -0
  40. data/docs/DomainResearchResponseCustomer.md +10 -0
  41. data/docs/DomainResearchResponseLinks.md +10 -0
  42. data/docs/DomainResearchResponseLinksLinks.md +10 -0
  43. data/docs/DomainResearchResponseProduct.md +10 -0
  44. data/docs/DomainResearchResponseProductProduct.md +11 -0
  45. data/docs/FanoutResponseBodyEnable.md +1 -1
  46. data/docs/FanoutResponseService.md +1 -1
  47. data/docs/Healthcheck.md +1 -1
  48. data/docs/HealthcheckApi.md +4 -4
  49. data/docs/HealthcheckResponse.md +1 -1
  50. data/docs/IamRolesApi.md +23 -253
  51. data/docs/IamV1RoleListResponse.md +12 -0
  52. data/docs/IamV1RoleResponse.md +14 -0
  53. data/docs/ImageOptimizerResponseBodyEnable.md +1 -1
  54. data/docs/ImageOptimizerResponseService.md +1 -1
  55. data/docs/InlineResponse20010.md +11 -0
  56. data/docs/InlineResponse20011.md +10 -0
  57. data/docs/InlineResponse2003.md +2 -2
  58. data/docs/InlineResponse2004.md +2 -1
  59. data/docs/InlineResponse2005.md +1 -2
  60. data/docs/InlineResponse2006.md +1 -2
  61. data/docs/InlineResponse2007.md +1 -1
  62. data/docs/InlineResponse2008.md +1 -1
  63. data/docs/InlineResponse2009.md +2 -1
  64. data/docs/InvitationDataAttributes.md +1 -0
  65. data/docs/KvStoreApi.md +43 -4
  66. data/docs/KvStoreDetails.md +2 -0
  67. data/docs/KvStoreItemApi.md +2 -2
  68. data/docs/{KvStoreRequestCreate.md → KvStoreRequestCreateOrUpdate.md} +1 -1
  69. data/docs/LogExplorerInsightsResponseBodyEnable.md +1 -1
  70. data/docs/LogExplorerInsightsResponseService.md +1 -1
  71. data/docs/LoggingHttpsAdditional.md +1 -0
  72. data/docs/LoggingHttpsApi.md +4 -0
  73. data/docs/LoggingHttpsResponse.md +1 -0
  74. data/docs/MetricsPlatformApi.md +75 -0
  75. data/docs/NgwafRequestEnable.md +1 -0
  76. data/docs/NgwafResponseConfigure.md +1 -1
  77. data/docs/NgwafResponseEnable.md +1 -1
  78. data/docs/NgwafResponseService.md +1 -1
  79. data/docs/Offer.md +12 -0
  80. data/docs/OfferAllOf.md +12 -0
  81. data/docs/OriginInspectorHistoricalApi.md +1 -1
  82. data/docs/OriginInspectorResponseBodyEnable.md +1 -1
  83. data/docs/OriginInspectorResponseService.md +1 -1
  84. data/docs/PlatformMetadata.md +14 -0
  85. data/docs/PlatformMetricsResponse.md +11 -0
  86. data/docs/PlatformValues.md +25 -0
  87. data/docs/ProductApiDiscoveryApi.md +163 -0
  88. data/docs/ProductDdosProtectionApi.md +3 -1
  89. data/docs/ProductDomainResearchApi.md +115 -0
  90. data/docs/RealtimeEntryAggregated.md +5 -0
  91. data/docs/RealtimeMeasurements.md +5 -0
  92. data/docs/RequestBodyForCreate.md +12 -0
  93. data/docs/RequestBodyForUpdate.md +11 -0
  94. data/docs/Results.md +5 -0
  95. data/docs/SchemasUserResponse.md +1 -0
  96. data/docs/SecretStoreApi.md +2 -2
  97. data/docs/SecretStoreItemApi.md +2 -2
  98. data/docs/ServiceAuthorizationsApi.md +2 -2
  99. data/docs/Status.md +15 -0
  100. data/docs/StatusAllOf.md +15 -0
  101. data/docs/SuccessfulResponseAsObject.md +17 -0
  102. data/docs/SuccessfulResponseAsObjectAllOf.md +15 -0
  103. data/docs/Suggestion.md +13 -0
  104. data/docs/SuggestionAllOf.md +13 -0
  105. data/docs/User.md +1 -0
  106. data/docs/UserApi.md +4 -0
  107. data/docs/UserResponse.md +1 -0
  108. data/docs/WebsocketsResponseBodyEnable.md +1 -1
  109. data/docs/WebsocketsResponseService.md +1 -1
  110. data/lib/fastly/api/ddos_protection_api.rb +3 -0
  111. data/lib/fastly/api/dm_domains_api.rb +362 -0
  112. data/lib/fastly/api/domain_inspector_historical_api.rb +1 -1
  113. data/lib/fastly/api/domain_ownerships_api.rb +3 -3
  114. data/lib/fastly/api/domain_research_api.rb +163 -0
  115. data/lib/fastly/api/healthcheck_api.rb +20 -4
  116. data/lib/fastly/api/iam_roles_api.rb +43 -435
  117. data/lib/fastly/api/kv_store_api.rb +74 -6
  118. data/lib/fastly/api/kv_store_item_api.rb +3 -3
  119. data/lib/fastly/api/logging_https_api.rb +6 -0
  120. data/lib/fastly/api/metrics_platform_api.rb +134 -0
  121. data/lib/fastly/api/origin_inspector_historical_api.rb +1 -1
  122. data/lib/fastly/api/product_api_discovery_api.rb +263 -0
  123. data/lib/fastly/api/product_ddos_protection_api.rb +10 -3
  124. data/lib/fastly/api/product_domain_research_api.rb +186 -0
  125. data/lib/fastly/api/secret_store_api.rb +3 -3
  126. data/lib/fastly/api/secret_store_item_api.rb +3 -3
  127. data/lib/fastly/api/service_authorizations_api.rb +3 -3
  128. data/lib/fastly/api/user_api.rb +6 -0
  129. data/lib/fastly/configuration.rb +98 -38
  130. data/lib/fastly/models/api_discovery_response_body_get_all_services.rb +256 -0
  131. data/lib/fastly/models/api_discovery_response_customer.rb +216 -0
  132. data/lib/fastly/models/api_discovery_response_customer_customer.rb +227 -0
  133. data/lib/fastly/models/api_discovery_response_enable.rb +243 -0
  134. data/lib/fastly/models/api_discovery_response_enabled_services.rb +219 -0
  135. data/lib/fastly/models/api_discovery_response_links.rb +216 -0
  136. data/lib/fastly/models/api_discovery_response_links_get_all_services.rb +216 -0
  137. data/lib/fastly/models/api_discovery_response_links_get_all_services_links.rb +217 -0
  138. data/lib/fastly/models/api_discovery_response_links_links.rb +217 -0
  139. data/lib/fastly/models/api_discovery_response_product.rb +216 -0
  140. data/lib/fastly/models/api_discovery_response_product_product.rb +227 -0
  141. data/lib/fastly/models/api_discovery_response_service.rb +216 -0
  142. data/lib/fastly/models/{bot_management_response_service_service.rb → api_discovery_response_service_service.rb} +3 -3
  143. data/lib/fastly/models/bot_management_response_body_enable.rb +1 -1
  144. data/lib/fastly/models/bot_management_response_service.rb +1 -1
  145. data/lib/fastly/models/brotli_compression_response_body_enable.rb +1 -1
  146. data/lib/fastly/models/brotli_compression_response_service.rb +1 -1
  147. data/lib/fastly/models/ddos_protection_event.rb +21 -1
  148. data/lib/fastly/models/ddos_protection_event_all_of.rb +21 -1
  149. data/lib/fastly/models/ddos_protection_request_enable_mode.rb +251 -0
  150. data/lib/fastly/models/ddos_protection_response_configure.rb +1 -1
  151. data/lib/fastly/models/ddos_protection_response_enable.rb +1 -1
  152. data/lib/fastly/models/ddos_protection_response_service.rb +1 -1
  153. data/lib/fastly/models/ddos_protection_rule_with_stats.rb +365 -0
  154. data/lib/fastly/models/ddos_protection_rule_with_stats_all_of.rb +216 -0
  155. data/lib/fastly/models/ddos_protection_traffic_stats.rb +20 -4
  156. data/lib/fastly/models/ddos_protection_traffic_stats_all_of.rb +20 -4
  157. data/lib/fastly/models/domain_inspector_response_body_enable.rb +1 -1
  158. data/lib/fastly/models/domain_inspector_response_service.rb +1 -1
  159. data/lib/fastly/models/domain_research_response_body_enable.rb +243 -0
  160. data/lib/fastly/models/domain_research_response_customer.rb +216 -0
  161. data/lib/fastly/models/domain_research_response_links.rb +216 -0
  162. data/lib/fastly/models/domain_research_response_links_links.rb +217 -0
  163. data/lib/fastly/models/domain_research_response_product.rb +216 -0
  164. data/lib/fastly/models/domain_research_response_product_product.rb +227 -0
  165. data/lib/fastly/models/fanout_response_body_enable.rb +1 -1
  166. data/lib/fastly/models/fanout_response_service.rb +1 -1
  167. data/lib/fastly/models/healthcheck.rb +25 -1
  168. data/lib/fastly/models/healthcheck_response.rb +25 -1
  169. data/lib/fastly/models/iam_v1_role_list_response.rb +240 -0
  170. data/lib/fastly/models/{iam_role_all_of.rb → iam_v1_role_response.rb} +23 -34
  171. data/lib/fastly/models/image_optimizer_response_body_enable.rb +1 -1
  172. data/lib/fastly/models/image_optimizer_response_service.rb +1 -1
  173. data/lib/fastly/models/inline_response20010.rb +227 -0
  174. data/lib/fastly/models/inline_response20011.rb +218 -0
  175. data/lib/fastly/models/inline_response2003.rb +11 -1
  176. data/lib/fastly/models/inline_response2004.rb +20 -8
  177. data/lib/fastly/models/inline_response2005.rb +8 -18
  178. data/lib/fastly/models/inline_response2006.rb +8 -17
  179. data/lib/fastly/models/inline_response2007.rb +1 -1
  180. data/lib/fastly/models/inline_response2008.rb +1 -1
  181. data/lib/fastly/models/inline_response2009.rb +13 -4
  182. data/lib/fastly/models/invitation_data_attributes.rb +12 -1
  183. data/lib/fastly/models/kv_store_details.rb +24 -4
  184. data/lib/fastly/models/{kv_store_request_create.rb → kv_store_request_create_or_update.rb} +3 -3
  185. data/lib/fastly/models/log_explorer_insights_response_body_enable.rb +1 -1
  186. data/lib/fastly/models/log_explorer_insights_response_service.rb +1 -1
  187. data/lib/fastly/models/logging_https_additional.rb +16 -4
  188. data/lib/fastly/models/logging_https_response.rb +13 -1
  189. data/lib/fastly/models/ngwaf_request_enable.rb +14 -4
  190. data/lib/fastly/models/ngwaf_response_configure.rb +1 -1
  191. data/lib/fastly/models/ngwaf_response_enable.rb +1 -1
  192. data/lib/fastly/models/ngwaf_response_service.rb +1 -1
  193. data/lib/fastly/models/offer.rb +245 -0
  194. data/lib/fastly/models/offer_all_of.rb +237 -0
  195. data/lib/fastly/models/origin_inspector_response_body_enable.rb +1 -1
  196. data/lib/fastly/models/origin_inspector_response_service.rb +1 -1
  197. data/lib/fastly/models/platform_metadata.rb +258 -0
  198. data/lib/fastly/models/platform_metrics_response.rb +228 -0
  199. data/lib/fastly/models/platform_values.rb +368 -0
  200. data/lib/fastly/models/realtime_entry_aggregated.rb +54 -4
  201. data/lib/fastly/models/realtime_measurements.rb +54 -4
  202. data/lib/fastly/models/request_body_for_create.rb +244 -0
  203. data/lib/fastly/models/request_body_for_update.rb +229 -0
  204. data/lib/fastly/models/results.rb +51 -1
  205. data/lib/fastly/models/role_user.rb +2 -0
  206. data/lib/fastly/models/schemas_user_response.rb +13 -1
  207. data/lib/fastly/models/status.rb +276 -0
  208. data/lib/fastly/models/status_all_of.rb +268 -0
  209. data/lib/fastly/models/{iam_role.rb → successful_response_as_object.rb} +37 -35
  210. data/lib/fastly/models/successful_response_as_object_all_of.rb +268 -0
  211. data/lib/fastly/models/suggestion.rb +255 -0
  212. data/lib/fastly/models/suggestion_all_of.rb +247 -0
  213. data/lib/fastly/models/user.rb +13 -1
  214. data/lib/fastly/models/user_response.rb +13 -1
  215. data/lib/fastly/models/websockets_response_body_enable.rb +1 -1
  216. data/lib/fastly/models/websockets_response_service.rb +1 -1
  217. data/lib/fastly/version.rb +1 -1
  218. data/lib/fastly.rb +45 -4
  219. data/sig.json +1 -1
  220. metadata +92 -10
  221. data/docs/IamRole.md +0 -17
  222. data/docs/IamRoleAllOf.md +0 -15
@@ -17,291 +17,41 @@ module Fastly
17
17
  def initialize(api_client = ApiClient.default)
18
18
  @api_client = api_client
19
19
  end
20
- # Add permissions to a role
21
- # Add permissions to a role.
20
+ # Get IAM role by ID
21
+ # Retrieve a single IAM role by its unique identifier.
22
22
  # @option opts [String] :role_id Alphanumeric string identifying the role. (required)
23
- # @option opts [Hash<String, Object>] :request_body
24
- # @return [Object]
25
- def add_role_permissions(opts = {})
26
- data, _status_code, _headers = add_role_permissions_with_http_info(opts)
23
+ # @option opts [String] :include Include related data (i.e., permissions).
24
+ # @return [IamV1RoleResponse]
25
+ def iam_v1_roles_get(opts = {})
26
+ data, _status_code, _headers = iam_v1_roles_get_with_http_info(opts)
27
27
  data
28
28
  end
29
29
 
30
- # Add permissions to a role
31
- # Add permissions to a role.
30
+ # Get IAM role by ID
31
+ # Retrieve a single IAM role by its unique identifier.
32
32
  # @option opts [String] :role_id Alphanumeric string identifying the role. (required)
33
- # @option opts [Hash<String, Object>] :request_body
34
- # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
35
- def add_role_permissions_with_http_info(opts = {})
33
+ # @option opts [String] :include Include related data (i.e., permissions).
34
+ # @return [Array<(IamV1RoleResponse, Integer, Hash)>] IamV1RoleResponse data, response status code and response headers
35
+ def iam_v1_roles_get_with_http_info(opts = {})
36
36
  if @api_client.config.debugging
37
- @api_client.config.logger.debug 'Calling API: IamRolesApi.add_role_permissions ...'
37
+ @api_client.config.logger.debug 'Calling API: IamRolesApi.iam_v1_roles_get ...'
38
38
  end
39
39
  # unbox the parameters from the hash
40
40
  role_id = opts[:'role_id']
41
41
  # verify the required parameter 'role_id' is set
42
42
  if @api_client.config.client_side_validation && role_id.nil?
43
- fail ArgumentError, "Missing the required parameter 'role_id' when calling IamRolesApi.add_role_permissions"
43
+ fail ArgumentError, "Missing the required parameter 'role_id' when calling IamRolesApi.iam_v1_roles_get"
44
44
  end
45
- # resource path
46
- local_var_path = '/roles/{role_id}/permissions'.sub('{' + 'role_id' + '}', CGI.escape(role_id.to_s))
47
-
48
- # query parameters
49
- query_params = opts[:query_params] || {}
50
-
51
- # header parameters
52
- header_params = opts[:header_params] || {}
53
- # HTTP header 'Accept' (if needed)
54
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
- # HTTP header 'Content-Type'
56
- content_type = @api_client.select_header_content_type(['application/json'])
57
- if !content_type.nil?
58
- header_params['Content-Type'] = content_type
59
- end
60
-
61
- # form parameters
62
- form_params = opts[:form_params] || {}
63
-
64
- # http body (model)
65
- post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'request_body'])
66
-
67
- # return_type
68
- return_type = opts[:debug_return_type] || 'Object'
69
-
70
- # auth_names
71
- auth_names = opts[:debug_auth_names] || ['token']
72
-
73
- new_options = opts.merge(
74
- :operation => :"IamRolesApi.add_role_permissions",
75
- :header_params => header_params,
76
- :query_params => query_params,
77
- :form_params => form_params,
78
- :body => post_body,
79
- :auth_names => auth_names,
80
- :return_type => return_type
81
- )
82
-
83
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
84
- if @api_client.config.debugging
85
- @api_client.config.logger.debug "API called: IamRolesApi#add_role_permissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
- end
87
- return data, status_code, headers
88
- end
89
-
90
- # Create a role
91
- # Create a role.
92
- # @option opts [Hash<String, Object>] :request_body
93
- # @return [Object]
94
- def create_a_role(opts = {})
95
- data, _status_code, _headers = create_a_role_with_http_info(opts)
96
- data
97
- end
98
-
99
- # Create a role
100
- # Create a role.
101
- # @option opts [Hash<String, Object>] :request_body
102
- # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
103
- def create_a_role_with_http_info(opts = {})
104
- if @api_client.config.debugging
105
- @api_client.config.logger.debug 'Calling API: IamRolesApi.create_a_role ...'
106
- end
107
- # unbox the parameters from the hash
108
- # resource path
109
- local_var_path = '/roles'
110
-
111
- # query parameters
112
- query_params = opts[:query_params] || {}
113
-
114
- # header parameters
115
- header_params = opts[:header_params] || {}
116
- # HTTP header 'Accept' (if needed)
117
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
118
- # HTTP header 'Content-Type'
119
- content_type = @api_client.select_header_content_type(['application/json'])
120
- if !content_type.nil?
121
- header_params['Content-Type'] = content_type
122
- end
123
-
124
- # form parameters
125
- form_params = opts[:form_params] || {}
126
-
127
- # http body (model)
128
- post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'request_body'])
129
-
130
- # return_type
131
- return_type = opts[:debug_return_type] || 'Object'
132
-
133
- # auth_names
134
- auth_names = opts[:debug_auth_names] || ['token']
135
-
136
- new_options = opts.merge(
137
- :operation => :"IamRolesApi.create_a_role",
138
- :header_params => header_params,
139
- :query_params => query_params,
140
- :form_params => form_params,
141
- :body => post_body,
142
- :auth_names => auth_names,
143
- :return_type => return_type
144
- )
145
-
146
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
147
- if @api_client.config.debugging
148
- @api_client.config.logger.debug "API called: IamRolesApi#create_a_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
149
- end
150
- return data, status_code, headers
151
- end
152
-
153
- # Delete a role
154
- # Delete a role.
155
- # @option opts [String] :role_id Alphanumeric string identifying the role. (required)
156
- # @return [nil]
157
- def delete_a_role(opts = {})
158
- delete_a_role_with_http_info(opts)
159
- nil
160
- end
161
-
162
- # Delete a role
163
- # Delete a role.
164
- # @option opts [String] :role_id Alphanumeric string identifying the role. (required)
165
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
166
- def delete_a_role_with_http_info(opts = {})
167
- if @api_client.config.debugging
168
- @api_client.config.logger.debug 'Calling API: IamRolesApi.delete_a_role ...'
169
- end
170
- # unbox the parameters from the hash
171
- role_id = opts[:'role_id']
172
- # verify the required parameter 'role_id' is set
173
- if @api_client.config.client_side_validation && role_id.nil?
174
- fail ArgumentError, "Missing the required parameter 'role_id' when calling IamRolesApi.delete_a_role"
175
- end
176
- # resource path
177
- local_var_path = '/roles/{role_id}'.sub('{' + 'role_id' + '}', CGI.escape(role_id.to_s))
178
-
179
- # query parameters
180
- query_params = opts[:query_params] || {}
181
-
182
- # header parameters
183
- header_params = opts[:header_params] || {}
184
-
185
- # form parameters
186
- form_params = opts[:form_params] || {}
187
-
188
- # http body (model)
189
- post_body = opts[:debug_body]
190
-
191
- # return_type
192
- return_type = opts[:debug_return_type]
193
-
194
- # auth_names
195
- auth_names = opts[:debug_auth_names] || ['token']
196
-
197
- new_options = opts.merge(
198
- :operation => :"IamRolesApi.delete_a_role",
199
- :header_params => header_params,
200
- :query_params => query_params,
201
- :form_params => form_params,
202
- :body => post_body,
203
- :auth_names => auth_names,
204
- :return_type => return_type
205
- )
206
-
207
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
208
- if @api_client.config.debugging
209
- @api_client.config.logger.debug "API called: IamRolesApi#delete_a_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
210
- end
211
- return data, status_code, headers
212
- end
213
-
214
- # Get a role
215
- # Get a role.
216
- # @option opts [String] :role_id Alphanumeric string identifying the role. (required)
217
- # @return [Object]
218
- def get_a_role(opts = {})
219
- data, _status_code, _headers = get_a_role_with_http_info(opts)
220
- data
221
- end
222
-
223
- # Get a role
224
- # Get a role.
225
- # @option opts [String] :role_id Alphanumeric string identifying the role. (required)
226
- # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
227
- def get_a_role_with_http_info(opts = {})
228
- if @api_client.config.debugging
229
- @api_client.config.logger.debug 'Calling API: IamRolesApi.get_a_role ...'
230
- end
231
- # unbox the parameters from the hash
232
- role_id = opts[:'role_id']
233
- # verify the required parameter 'role_id' is set
234
- if @api_client.config.client_side_validation && role_id.nil?
235
- fail ArgumentError, "Missing the required parameter 'role_id' when calling IamRolesApi.get_a_role"
236
- end
237
- # resource path
238
- local_var_path = '/roles/{role_id}'.sub('{' + 'role_id' + '}', CGI.escape(role_id.to_s))
239
-
240
- # query parameters
241
- query_params = opts[:query_params] || {}
242
-
243
- # header parameters
244
- header_params = opts[:header_params] || {}
245
- # HTTP header 'Accept' (if needed)
246
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
247
-
248
- # form parameters
249
- form_params = opts[:form_params] || {}
250
-
251
- # http body (model)
252
- post_body = opts[:debug_body]
253
-
254
- # return_type
255
- return_type = opts[:debug_return_type] || 'Object'
256
-
257
- # auth_names
258
- auth_names = opts[:debug_auth_names] || ['token']
259
-
260
- new_options = opts.merge(
261
- :operation => :"IamRolesApi.get_a_role",
262
- :header_params => header_params,
263
- :query_params => query_params,
264
- :form_params => form_params,
265
- :body => post_body,
266
- :auth_names => auth_names,
267
- :return_type => return_type
268
- )
269
-
270
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
271
- if @api_client.config.debugging
272
- @api_client.config.logger.debug "API called: IamRolesApi#get_a_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
273
- end
274
- return data, status_code, headers
275
- end
276
-
277
- # List permissions in a role
278
- # List all permissions in a role.
279
- # @option opts [String] :role_id Alphanumeric string identifying the role. (required)
280
- # @return [Object]
281
- def list_role_permissions(opts = {})
282
- data, _status_code, _headers = list_role_permissions_with_http_info(opts)
283
- data
284
- end
285
-
286
- # List permissions in a role
287
- # List all permissions in a role.
288
- # @option opts [String] :role_id Alphanumeric string identifying the role. (required)
289
- # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
290
- def list_role_permissions_with_http_info(opts = {})
291
- if @api_client.config.debugging
292
- @api_client.config.logger.debug 'Calling API: IamRolesApi.list_role_permissions ...'
293
- end
294
- # unbox the parameters from the hash
295
- role_id = opts[:'role_id']
296
- # verify the required parameter 'role_id' is set
297
- if @api_client.config.client_side_validation && role_id.nil?
298
- fail ArgumentError, "Missing the required parameter 'role_id' when calling IamRolesApi.list_role_permissions"
45
+ allowable_values = ["permissions"]
46
+ if @api_client.config.client_side_validation && opts[:'include'] && !allowable_values.include?(opts[:'include'])
47
+ fail ArgumentError, "invalid value for \"include\", must be one of #{allowable_values}"
299
48
  end
300
49
  # resource path
301
- local_var_path = '/roles/{role_id}/permissions'.sub('{' + 'role_id' + '}', CGI.escape(role_id.to_s))
50
+ local_var_path = '/iam/v1/roles/{role_id}'.sub('{' + 'role_id' + '}', CGI.escape(role_id.to_s))
302
51
 
303
52
  # query parameters
304
53
  query_params = opts[:query_params] || {}
54
+ query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?
305
55
 
306
56
  # header parameters
307
57
  header_params = opts[:header_params] || {}
@@ -315,13 +65,13 @@ module Fastly
315
65
  post_body = opts[:debug_body]
316
66
 
317
67
  # return_type
318
- return_type = opts[:debug_return_type] || 'Object'
68
+ return_type = opts[:debug_return_type] || 'IamV1RoleResponse'
319
69
 
320
70
  # auth_names
321
71
  auth_names = opts[:debug_auth_names] || ['token']
322
72
 
323
73
  new_options = opts.merge(
324
- :operation => :"IamRolesApi.list_role_permissions",
74
+ :operation => :"IamRolesApi.iam_v1_roles_get",
325
75
  :header_params => header_params,
326
76
  :query_params => query_params,
327
77
  :form_params => form_params,
@@ -332,46 +82,42 @@ module Fastly
332
82
 
333
83
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
334
84
  if @api_client.config.debugging
335
- @api_client.config.logger.debug "API called: IamRolesApi#list_role_permissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
85
+ @api_client.config.logger.debug "API called: IamRolesApi#iam_v1_roles_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
336
86
  end
337
87
  return data, status_code, headers
338
88
  end
339
89
 
340
- # List roles
341
- # List all roles.
342
- # @option opts [Integer] :per_page Number of records per page. (default to 20)
343
- # @option opts [Integer] :page Current page.
344
- # @return [Object]
345
- def list_roles(opts = {})
346
- data, _status_code, _headers = list_roles_with_http_info(opts)
90
+ # List IAM roles
91
+ # Retrieve a paginated list of IAM roles available in the account.
92
+ # @option opts [Integer] :limit Number of results per page. The maximum is 1000. (default to 100)
93
+ # @option opts [String] :cursor Cursor value from the &#x60;next_cursor&#x60; field of a previous response, used to retrieve the next page. To request the first page, this should be empty.
94
+ # @return [IamV1RoleListResponse]
95
+ def iam_v1_roles_list(opts = {})
96
+ data, _status_code, _headers = iam_v1_roles_list_with_http_info(opts)
347
97
  data
348
98
  end
349
99
 
350
- # List roles
351
- # List all roles.
352
- # @option opts [Integer] :per_page Number of records per page. (default to 20)
353
- # @option opts [Integer] :page Current page.
354
- # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
355
- def list_roles_with_http_info(opts = {})
100
+ # List IAM roles
101
+ # Retrieve a paginated list of IAM roles available in the account.
102
+ # @option opts [Integer] :limit Number of results per page. The maximum is 1000. (default to 100)
103
+ # @option opts [String] :cursor Cursor value from the &#x60;next_cursor&#x60; field of a previous response, used to retrieve the next page. To request the first page, this should be empty.
104
+ # @return [Array<(IamV1RoleListResponse, Integer, Hash)>] IamV1RoleListResponse data, response status code and response headers
105
+ def iam_v1_roles_list_with_http_info(opts = {})
356
106
  if @api_client.config.debugging
357
- @api_client.config.logger.debug 'Calling API: IamRolesApi.list_roles ...'
107
+ @api_client.config.logger.debug 'Calling API: IamRolesApi.iam_v1_roles_list ...'
358
108
  end
359
109
  # unbox the parameters from the hash
360
- if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] > 100
361
- fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling IamRolesApi.list_roles, must be smaller than or equal to 100.'
362
- end
363
-
364
- if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] < 1
365
- fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling IamRolesApi.list_roles, must be greater than or equal to 1.'
110
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 1000
111
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling IamRolesApi.iam_v1_roles_list, must be smaller than or equal to 1000.'
366
112
  end
367
113
 
368
114
  # resource path
369
- local_var_path = '/roles'
115
+ local_var_path = '/iam/v1/roles'
370
116
 
371
117
  # query parameters
372
118
  query_params = opts[:query_params] || {}
373
- query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
374
- query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
119
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
120
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
375
121
 
376
122
  # header parameters
377
123
  header_params = opts[:header_params] || {}
@@ -385,13 +131,13 @@ module Fastly
385
131
  post_body = opts[:debug_body]
386
132
 
387
133
  # return_type
388
- return_type = opts[:debug_return_type] || 'Object'
134
+ return_type = opts[:debug_return_type] || 'IamV1RoleListResponse'
389
135
 
390
136
  # auth_names
391
137
  auth_names = opts[:debug_auth_names] || ['token']
392
138
 
393
139
  new_options = opts.merge(
394
- :operation => :"IamRolesApi.list_roles",
140
+ :operation => :"IamRolesApi.iam_v1_roles_list",
395
141
  :header_params => header_params,
396
142
  :query_params => query_params,
397
143
  :form_params => form_params,
@@ -402,145 +148,7 @@ module Fastly
402
148
 
403
149
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
404
150
  if @api_client.config.debugging
405
- @api_client.config.logger.debug "API called: IamRolesApi#list_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
406
- end
407
- return data, status_code, headers
408
- end
409
-
410
- # Remove permissions from a role
411
- # Remove permissions from a role.
412
- # @option opts [String] :role_id Alphanumeric string identifying the role. (required)
413
- # @option opts [Hash<String, Object>] :request_body
414
- # @return [nil]
415
- def remove_role_permissions(opts = {})
416
- remove_role_permissions_with_http_info(opts)
417
- nil
418
- end
419
-
420
- # Remove permissions from a role
421
- # Remove permissions from a role.
422
- # @option opts [String] :role_id Alphanumeric string identifying the role. (required)
423
- # @option opts [Hash<String, Object>] :request_body
424
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
425
- def remove_role_permissions_with_http_info(opts = {})
426
- if @api_client.config.debugging
427
- @api_client.config.logger.debug 'Calling API: IamRolesApi.remove_role_permissions ...'
428
- end
429
- # unbox the parameters from the hash
430
- role_id = opts[:'role_id']
431
- # verify the required parameter 'role_id' is set
432
- if @api_client.config.client_side_validation && role_id.nil?
433
- fail ArgumentError, "Missing the required parameter 'role_id' when calling IamRolesApi.remove_role_permissions"
434
- end
435
- # resource path
436
- local_var_path = '/roles/{role_id}/permissions'.sub('{' + 'role_id' + '}', CGI.escape(role_id.to_s))
437
-
438
- # query parameters
439
- query_params = opts[:query_params] || {}
440
-
441
- # header parameters
442
- header_params = opts[:header_params] || {}
443
- # HTTP header 'Content-Type'
444
- content_type = @api_client.select_header_content_type(['application/json'])
445
- if !content_type.nil?
446
- header_params['Content-Type'] = content_type
447
- end
448
-
449
- # form parameters
450
- form_params = opts[:form_params] || {}
451
-
452
- # http body (model)
453
- post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'request_body'])
454
-
455
- # return_type
456
- return_type = opts[:debug_return_type]
457
-
458
- # auth_names
459
- auth_names = opts[:debug_auth_names] || ['token']
460
-
461
- new_options = opts.merge(
462
- :operation => :"IamRolesApi.remove_role_permissions",
463
- :header_params => header_params,
464
- :query_params => query_params,
465
- :form_params => form_params,
466
- :body => post_body,
467
- :auth_names => auth_names,
468
- :return_type => return_type
469
- )
470
-
471
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
472
- if @api_client.config.debugging
473
- @api_client.config.logger.debug "API called: IamRolesApi#remove_role_permissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
474
- end
475
- return data, status_code, headers
476
- end
477
-
478
- # Update a role
479
- # Update a role.
480
- # @option opts [String] :role_id Alphanumeric string identifying the role. (required)
481
- # @option opts [Hash<String, Object>] :request_body
482
- # @return [Object]
483
- def update_a_role(opts = {})
484
- data, _status_code, _headers = update_a_role_with_http_info(opts)
485
- data
486
- end
487
-
488
- # Update a role
489
- # Update a role.
490
- # @option opts [String] :role_id Alphanumeric string identifying the role. (required)
491
- # @option opts [Hash<String, Object>] :request_body
492
- # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
493
- def update_a_role_with_http_info(opts = {})
494
- if @api_client.config.debugging
495
- @api_client.config.logger.debug 'Calling API: IamRolesApi.update_a_role ...'
496
- end
497
- # unbox the parameters from the hash
498
- role_id = opts[:'role_id']
499
- # verify the required parameter 'role_id' is set
500
- if @api_client.config.client_side_validation && role_id.nil?
501
- fail ArgumentError, "Missing the required parameter 'role_id' when calling IamRolesApi.update_a_role"
502
- end
503
- # resource path
504
- local_var_path = '/roles/{role_id}'.sub('{' + 'role_id' + '}', CGI.escape(role_id.to_s))
505
-
506
- # query parameters
507
- query_params = opts[:query_params] || {}
508
-
509
- # header parameters
510
- header_params = opts[:header_params] || {}
511
- # HTTP header 'Accept' (if needed)
512
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
513
- # HTTP header 'Content-Type'
514
- content_type = @api_client.select_header_content_type(['application/json'])
515
- if !content_type.nil?
516
- header_params['Content-Type'] = content_type
517
- end
518
-
519
- # form parameters
520
- form_params = opts[:form_params] || {}
521
-
522
- # http body (model)
523
- post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'request_body'])
524
-
525
- # return_type
526
- return_type = opts[:debug_return_type] || 'Object'
527
-
528
- # auth_names
529
- auth_names = opts[:debug_auth_names] || ['token']
530
-
531
- new_options = opts.merge(
532
- :operation => :"IamRolesApi.update_a_role",
533
- :header_params => header_params,
534
- :query_params => query_params,
535
- :form_params => form_params,
536
- :body => post_body,
537
- :auth_names => auth_names,
538
- :return_type => return_type
539
- )
540
-
541
- data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
542
- if @api_client.config.debugging
543
- @api_client.config.logger.debug "API called: IamRolesApi#update_a_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
151
+ @api_client.config.logger.debug "API called: IamRolesApi#iam_v1_roles_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
544
152
  end
545
153
  return data, status_code, headers
546
154
  end
@@ -20,7 +20,7 @@ module Fastly
20
20
  # Create a KV store.
21
21
  # Create a KV store.
22
22
  # @option opts [String] :location
23
- # @option opts [KvStoreRequestCreate] :kv_store_request_create
23
+ # @option opts [KvStoreRequestCreateOrUpdate] :kv_store_request_create_or_update
24
24
  # @return [KvStoreDetails]
25
25
  def kv_store_create(opts = {})
26
26
  data, _status_code, _headers = kv_store_create_with_http_info(opts)
@@ -30,7 +30,7 @@ module Fastly
30
30
  # Create a KV store.
31
31
  # Create a KV store.
32
32
  # @option opts [String] :location
33
- # @option opts [KvStoreRequestCreate] :kv_store_request_create
33
+ # @option opts [KvStoreRequestCreateOrUpdate] :kv_store_request_create_or_update
34
34
  # @return [Array<(KvStoreDetails, Integer, Hash)>] KvStoreDetails data, response status code and response headers
35
35
  def kv_store_create_with_http_info(opts = {})
36
36
  if @api_client.config.debugging
@@ -62,7 +62,7 @@ module Fastly
62
62
  form_params = opts[:form_params] || {}
63
63
 
64
64
  # http body (model)
65
- post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'kv_store_request_create'])
65
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'kv_store_request_create_or_update'])
66
66
 
67
67
  # return_type
68
68
  return_type = opts[:debug_return_type] || 'KvStoreDetails'
@@ -216,7 +216,7 @@ module Fastly
216
216
  # @option opts [String] :cursor
217
217
  # @option opts [Integer] :limit (default to 1000)
218
218
  # @option opts [String] :name Returns a one-element array containing the details for the named KV store.
219
- # @return [InlineResponse2005]
219
+ # @return [InlineResponse2007]
220
220
  def kv_store_list(opts = {})
221
221
  data, _status_code, _headers = kv_store_list_with_http_info(opts)
222
222
  data
@@ -227,7 +227,7 @@ module Fastly
227
227
  # @option opts [String] :cursor
228
228
  # @option opts [Integer] :limit (default to 1000)
229
229
  # @option opts [String] :name Returns a one-element array containing the details for the named KV store.
230
- # @return [Array<(InlineResponse2005, Integer, Hash)>] InlineResponse2005 data, response status code and response headers
230
+ # @return [Array<(InlineResponse2007, Integer, Hash)>] InlineResponse2007 data, response status code and response headers
231
231
  def kv_store_list_with_http_info(opts = {})
232
232
  if @api_client.config.debugging
233
233
  @api_client.config.logger.debug 'Calling API: KvStoreApi.kv_store_list ...'
@@ -258,7 +258,7 @@ module Fastly
258
258
  post_body = opts[:debug_body]
259
259
 
260
260
  # return_type
261
- return_type = opts[:debug_return_type] || 'InlineResponse2005'
261
+ return_type = opts[:debug_return_type] || 'InlineResponse2007'
262
262
 
263
263
  # auth_names
264
264
  auth_names = opts[:debug_auth_names] || ['token']
@@ -279,5 +279,73 @@ module Fastly
279
279
  end
280
280
  return data, status_code, headers
281
281
  end
282
+
283
+ # Update a KV store.
284
+ # Update the name of a KV store.
285
+ # @option opts [String] :store_id (required)
286
+ # @option opts [KvStoreRequestCreateOrUpdate] :kv_store_request_create_or_update
287
+ # @return [nil]
288
+ def kv_store_put(opts = {})
289
+ kv_store_put_with_http_info(opts)
290
+ nil
291
+ end
292
+
293
+ # Update a KV store.
294
+ # Update the name of a KV store.
295
+ # @option opts [String] :store_id (required)
296
+ # @option opts [KvStoreRequestCreateOrUpdate] :kv_store_request_create_or_update
297
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
298
+ def kv_store_put_with_http_info(opts = {})
299
+ if @api_client.config.debugging
300
+ @api_client.config.logger.debug 'Calling API: KvStoreApi.kv_store_put ...'
301
+ end
302
+ # unbox the parameters from the hash
303
+ store_id = opts[:'store_id']
304
+ # verify the required parameter 'store_id' is set
305
+ if @api_client.config.client_side_validation && store_id.nil?
306
+ fail ArgumentError, "Missing the required parameter 'store_id' when calling KvStoreApi.kv_store_put"
307
+ end
308
+ # resource path
309
+ local_var_path = '/resources/stores/kv/{store_id}'.sub('{' + 'store_id' + '}', CGI.escape(store_id.to_s))
310
+
311
+ # query parameters
312
+ query_params = opts[:query_params] || {}
313
+
314
+ # header parameters
315
+ header_params = opts[:header_params] || {}
316
+ # HTTP header 'Content-Type'
317
+ content_type = @api_client.select_header_content_type(['application/json'])
318
+ if !content_type.nil?
319
+ header_params['Content-Type'] = content_type
320
+ end
321
+
322
+ # form parameters
323
+ form_params = opts[:form_params] || {}
324
+
325
+ # http body (model)
326
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'kv_store_request_create_or_update'])
327
+
328
+ # return_type
329
+ return_type = opts[:debug_return_type]
330
+
331
+ # auth_names
332
+ auth_names = opts[:debug_auth_names] || ['token']
333
+
334
+ new_options = opts.merge(
335
+ :operation => :"KvStoreApi.kv_store_put",
336
+ :header_params => header_params,
337
+ :query_params => query_params,
338
+ :form_params => form_params,
339
+ :body => post_body,
340
+ :auth_names => auth_names,
341
+ :return_type => return_type
342
+ )
343
+
344
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
345
+ if @api_client.config.debugging
346
+ @api_client.config.logger.debug "API called: KvStoreApi#kv_store_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
347
+ end
348
+ return data, status_code, headers
349
+ end
282
350
  end
283
351
  end