fastly 5.3.0 → 6.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (224) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +62 -0
  3. data/Gemfile.lock +1 -1
  4. data/README.md +86 -63
  5. data/docs/AclEntry.md +1 -1
  6. data/docs/AclEntryApi.md +176 -0
  7. data/docs/AclEntryResponse.md +1 -1
  8. data/docs/ApexRedirectApi.md +56 -0
  9. data/docs/Batch.md +12 -0
  10. data/docs/BatchErrors.md +13 -0
  11. data/docs/BulkUpdateAclEntry.md +1 -1
  12. data/docs/ClientKey.md +12 -0
  13. data/docs/ContactApi.md +50 -0
  14. data/docs/Content.md +2 -2
  15. data/docs/ContentApi.md +52 -0
  16. data/docs/DirectorApi.md +42 -0
  17. data/docs/DomainInspector.md +12 -0
  18. data/docs/DomainInspectorEntry.md +11 -0
  19. data/docs/DomainInspectorEntryDimensions.md +12 -0
  20. data/docs/DomainInspectorHistoricalApi.md +72 -0
  21. data/docs/DomainInspectorMeasurements.md +71 -0
  22. data/docs/DomainInspectorRealtimeApi.md +132 -0
  23. data/docs/DomainInspectorRealtimeEntry.md +12 -0
  24. data/docs/EventAttributes.md +1 -1
  25. data/docs/{EventsResponseAllOf.md → EventData.md} +1 -1
  26. data/docs/HistoricalDomains.md +13 -0
  27. data/docs/HistoricalDomainsData.md +11 -0
  28. data/docs/HistoricalDomainsMeta.md +18 -0
  29. data/docs/HistoricalDomainsMetaFilters.md +12 -0
  30. data/docs/HistoricalDomainsResponse.md +13 -0
  31. data/docs/HistoricalDomainsResponseAllOf.md +10 -0
  32. data/docs/{HistoricalFieldResultsAttributesAllOf.md → HistoricalFieldResultsAttributesAdditional.md} +1 -1
  33. data/docs/HistoricalOriginsResponse.md +13 -0
  34. data/docs/HistoricalOriginsResponseAllOf.md +10 -0
  35. data/docs/IamRolesApi.md +157 -0
  36. data/docs/IamServiceGroupsApi.md +157 -0
  37. data/docs/IamUserGroupsApi.md +315 -0
  38. data/docs/InlineResponse2005.md +11 -0
  39. data/docs/InlineResponse2006.md +11 -0
  40. data/docs/InlineResponse2007.md +10 -0
  41. data/docs/InlineResponse400.md +10 -0
  42. data/docs/LegacyWafConfigurationSet.md +11 -0
  43. data/docs/LegacyWafConfigurationSetsApi.md +125 -0
  44. data/docs/LegacyWafFirewall.md +18 -0
  45. data/docs/LegacyWafFirewallApi.md +352 -0
  46. data/docs/LegacyWafOwasp.md +38 -0
  47. data/docs/LegacyWafOwaspApi.md +138 -0
  48. data/docs/LegacyWafRule.md +14 -0
  49. data/docs/LegacyWafRuleApi.md +184 -0
  50. data/docs/LegacyWafRuleStatus.md +12 -0
  51. data/docs/LegacyWafRuleStatusApi.md +202 -0
  52. data/docs/LegacyWafRuleset.md +11 -0
  53. data/docs/LegacyWafRulesetApi.md +136 -0
  54. data/docs/LegacyWafTag.md +10 -0
  55. data/docs/LegacyWafTagApi.md +58 -0
  56. data/docs/LegacyWafUpdateStatus.md +15 -0
  57. data/docs/LegacyWafUpdateStatusApi.md +102 -0
  58. data/docs/LoggingKafkaApi.md +42 -0
  59. data/docs/LoggingKinesisApi.md +42 -0
  60. data/docs/OriginInspector.md +12 -0
  61. data/docs/OriginInspectorDimensions.md +12 -0
  62. data/docs/OriginInspectorEntry.md +11 -0
  63. data/docs/OriginInspectorHistorical.md +13 -0
  64. data/docs/OriginInspectorHistoricalApi.md +72 -0
  65. data/docs/OriginInspectorHistoricalData.md +11 -0
  66. data/docs/OriginInspectorHistoricalMeta.md +18 -0
  67. data/docs/OriginInspectorHistoricalMetaFilters.md +12 -0
  68. data/docs/OriginInspectorMeasurements.md +161 -0
  69. data/docs/OriginInspectorRealtimeApi.md +132 -0
  70. data/docs/OriginInspectorRealtimeEntry.md +12 -0
  71. data/docs/OriginInspectorRealtimeEntryRecorded.md +9 -0
  72. data/docs/OriginInspectorSubsequentRequestTimestamp.md +9 -0
  73. data/docs/OriginInspectorValues.md +161 -0
  74. data/docs/PaginationCursorMeta.md +11 -0
  75. data/docs/ReadOnlyServiceId.md +9 -0
  76. data/docs/ReadOnlyVersion.md +9 -0
  77. data/docs/RealtimeEntry.md +2 -2
  78. data/docs/RealtimeEntryAggregated.md +227 -0
  79. data/docs/RealtimeEntryRecorded.md +9 -0
  80. data/docs/RealtimeMeasurements.md +1 -1
  81. data/docs/RecordedTimestamp.md +9 -0
  82. data/docs/RequestSettingsApi.md +40 -0
  83. data/docs/ResponseObjectApi.md +82 -0
  84. data/docs/SchemasSnippetResponse.md +1 -1
  85. data/docs/Secret.md +12 -0
  86. data/docs/SecretResponse.md +13 -0
  87. data/docs/SecretStore.md +10 -0
  88. data/docs/SecretStoreApi.md +233 -0
  89. data/docs/SecretStoreItemApi.md +255 -0
  90. data/docs/SecretStoreResponse.md +12 -0
  91. data/docs/ServiceAuthorizationsApi.md +76 -0
  92. data/docs/SigningKey.md +10 -0
  93. data/docs/Snippet.md +1 -1
  94. data/docs/SnippetApi.md +46 -4
  95. data/docs/SnippetResponse.md +1 -1
  96. data/docs/SubsequentRequestTimestamp.md +9 -0
  97. data/docs/SudoApi.md +52 -0
  98. data/docs/SudoGenericTokenError.md +10 -0
  99. data/docs/SudoRequest.md +12 -0
  100. data/docs/SudoResponse.md +10 -0
  101. data/docs/TokensAdditionalProps.md +9 -0
  102. data/docs/TokensApi.md +70 -0
  103. data/docs/ValidatorResult.md +1 -5
  104. data/docs/ValidatorResultData.md +12 -0
  105. data/docs/ValidatorResultDataAttributes.md +14 -0
  106. data/docs/{ValidatorResultMessages.md → ValidatorResultDataAttributesMessages.md} +2 -2
  107. data/docs/Values.md +71 -0
  108. data/docs/VclApi.md +8 -6
  109. data/docs/VclSyntaxHighlightingResponse.md +10 -0
  110. data/docs/WafActiveRulesApi.md +41 -0
  111. data/lib/fastly/api/acl_entry_api.rb +332 -0
  112. data/lib/fastly/api/apex_redirect_api.rb +111 -0
  113. data/lib/fastly/api/contact_api.rb +90 -0
  114. data/lib/fastly/api/content_api.rb +79 -0
  115. data/lib/fastly/api/director_api.rb +82 -0
  116. data/lib/fastly/api/domain_inspector_historical_api.rb +125 -0
  117. data/lib/fastly/api/domain_inspector_realtime_api.rb +223 -0
  118. data/lib/fastly/api/iam_roles_api.rb +271 -0
  119. data/lib/fastly/api/iam_service_groups_api.rb +271 -0
  120. data/lib/fastly/api/iam_user_groups_api.rb +547 -0
  121. data/lib/fastly/api/legacy_waf_configuration_sets_api.rb +209 -0
  122. data/lib/fastly/api/legacy_waf_firewall_api.rb +627 -0
  123. data/lib/fastly/api/legacy_waf_owasp_api.rb +244 -0
  124. data/lib/fastly/api/legacy_waf_rule_api.rb +307 -0
  125. data/lib/fastly/api/legacy_waf_rule_status_api.rb +366 -0
  126. data/lib/fastly/api/legacy_waf_ruleset_api.rb +237 -0
  127. data/lib/fastly/api/legacy_waf_tag_api.rb +96 -0
  128. data/lib/fastly/api/legacy_waf_update_status_api.rb +184 -0
  129. data/lib/fastly/api/logging_kafka_api.rb +82 -0
  130. data/lib/fastly/api/logging_kinesis_api.rb +82 -0
  131. data/lib/fastly/api/origin_inspector_historical_api.rb +125 -0
  132. data/lib/fastly/api/origin_inspector_realtime_api.rb +223 -0
  133. data/lib/fastly/api/request_settings_api.rb +75 -0
  134. data/lib/fastly/api/response_object_api.rb +157 -0
  135. data/lib/fastly/api/secret_store_api.rb +381 -0
  136. data/lib/fastly/api/secret_store_item_api.rb +437 -0
  137. data/lib/fastly/api/service_authorizations_api.rb +126 -0
  138. data/lib/fastly/api/snippet_api.rb +88 -6
  139. data/lib/fastly/api/sudo_api.rb +83 -0
  140. data/lib/fastly/api/tokens_api.rb +122 -0
  141. data/lib/fastly/api/vcl_api.rb +10 -10
  142. data/lib/fastly/api/waf_active_rules_api.rb +75 -0
  143. data/lib/fastly/configuration.rb +504 -0
  144. data/lib/fastly/models/acl_entry.rb +1 -1
  145. data/lib/fastly/models/acl_entry_response.rb +1 -1
  146. data/lib/fastly/models/batch.rb +239 -0
  147. data/lib/fastly/models/batch_errors.rb +247 -0
  148. data/lib/fastly/models/bulk_update_acl_entry.rb +1 -1
  149. data/lib/fastly/models/client_key.rb +239 -0
  150. data/lib/fastly/models/content.rb +8 -4
  151. data/lib/fastly/models/domain.rb +1 -0
  152. data/lib/fastly/models/domain_inspector.rb +238 -0
  153. data/lib/fastly/models/domain_inspector_entry.rb +228 -0
  154. data/lib/fastly/models/domain_inspector_entry_dimensions.rb +238 -0
  155. data/lib/fastly/models/domain_inspector_measurements.rb +828 -0
  156. data/lib/fastly/models/domain_inspector_realtime_entry.rb +241 -0
  157. data/lib/fastly/models/event_attributes.rb +4 -2
  158. data/lib/fastly/models/{events_response_all_of.rb → event_data.rb} +3 -3
  159. data/lib/fastly/models/events_response.rb +1 -1
  160. data/lib/fastly/models/historical_domains.rb +249 -0
  161. data/lib/fastly/models/historical_domains_data.rb +228 -0
  162. data/lib/fastly/models/historical_domains_meta.rb +297 -0
  163. data/lib/fastly/models/historical_domains_meta_filters.rb +235 -0
  164. data/lib/fastly/models/historical_domains_response.rb +257 -0
  165. data/lib/fastly/models/historical_domains_response_all_of.rb +219 -0
  166. data/lib/fastly/models/historical_field_results_attributes.rb +1 -1
  167. data/lib/fastly/models/{historical_field_results_attributes_all_of.rb → historical_field_results_attributes_additional.rb} +3 -3
  168. data/lib/fastly/models/historical_origins_response.rb +257 -0
  169. data/lib/fastly/models/historical_origins_response_all_of.rb +219 -0
  170. data/lib/fastly/models/inline_response2005.rb +227 -0
  171. data/lib/fastly/models/inline_response2006.rb +227 -0
  172. data/lib/fastly/models/inline_response2007.rb +218 -0
  173. data/lib/fastly/models/inline_response400.rb +250 -0
  174. data/lib/fastly/models/legacy_waf_configuration_set.rb +227 -0
  175. data/lib/fastly/models/legacy_waf_firewall.rb +297 -0
  176. data/lib/fastly/models/legacy_waf_owasp.rb +527 -0
  177. data/lib/fastly/models/legacy_waf_rule.rb +257 -0
  178. data/lib/fastly/models/legacy_waf_rule_status.rb +237 -0
  179. data/lib/fastly/models/legacy_waf_ruleset.rb +227 -0
  180. data/lib/fastly/models/legacy_waf_tag.rb +217 -0
  181. data/lib/fastly/models/legacy_waf_update_status.rb +267 -0
  182. data/lib/fastly/models/origin_inspector.rb +238 -0
  183. data/lib/fastly/models/origin_inspector_dimensions.rb +238 -0
  184. data/lib/fastly/models/origin_inspector_entry.rb +228 -0
  185. data/lib/fastly/models/origin_inspector_historical.rb +249 -0
  186. data/lib/fastly/models/origin_inspector_historical_data.rb +225 -0
  187. data/lib/fastly/models/origin_inspector_historical_meta.rb +297 -0
  188. data/lib/fastly/models/origin_inspector_historical_meta_filters.rb +235 -0
  189. data/lib/fastly/models/origin_inspector_measurements.rb +1728 -0
  190. data/lib/fastly/models/origin_inspector_realtime_entry.rb +241 -0
  191. data/lib/fastly/models/origin_inspector_realtime_entry_recorded.rb +208 -0
  192. data/lib/fastly/models/origin_inspector_subsequent_request_timestamp.rb +208 -0
  193. data/lib/fastly/models/origin_inspector_values.rb +1728 -0
  194. data/lib/fastly/models/pagination_cursor_meta.rb +227 -0
  195. data/lib/fastly/models/read_only_service_id.rb +207 -0
  196. data/lib/fastly/models/read_only_version.rb +207 -0
  197. data/lib/fastly/models/realtime_entry.rb +2 -7
  198. data/lib/fastly/models/realtime_entry_aggregated.rb +2397 -0
  199. data/lib/fastly/models/realtime_entry_recorded.rb +208 -0
  200. data/lib/fastly/models/realtime_measurements.rb +4 -2
  201. data/lib/fastly/models/recorded_timestamp.rb +208 -0
  202. data/lib/fastly/models/schemas_snippet_response.rb +3 -3
  203. data/lib/fastly/models/secret.rb +238 -0
  204. data/lib/fastly/models/secret_response.rb +249 -0
  205. data/lib/fastly/models/secret_store.rb +217 -0
  206. data/lib/fastly/models/secret_store_response.rb +238 -0
  207. data/lib/fastly/models/signing_key.rb +218 -0
  208. data/lib/fastly/models/snippet.rb +3 -3
  209. data/lib/fastly/models/snippet_response.rb +3 -3
  210. data/lib/fastly/models/subsequent_request_timestamp.rb +208 -0
  211. data/lib/fastly/models/sudo_generic_token_error.rb +216 -0
  212. data/lib/fastly/models/sudo_request.rb +244 -0
  213. data/lib/fastly/models/sudo_response.rb +217 -0
  214. data/lib/fastly/models/tokens_additional_props.rb +227 -0
  215. data/lib/fastly/models/validator_result.rb +7 -84
  216. data/lib/fastly/models/validator_result_data.rb +234 -0
  217. data/lib/fastly/models/validator_result_data_attributes.rb +293 -0
  218. data/lib/fastly/models/{validator_result_messages.rb → validator_result_data_attributes_messages.rb} +4 -4
  219. data/lib/fastly/models/values.rb +828 -0
  220. data/lib/fastly/models/vcl_syntax_highlighting_response.rb +217 -0
  221. data/lib/fastly/version.rb +1 -1
  222. data/lib/fastly.rb +79 -3
  223. data/sig.json +1 -1
  224. metadata +160 -8
@@ -17,6 +17,139 @@ 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.
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)
27
+ data
28
+ end
29
+
30
+ # Add permissions to a role
31
+ # Add permissions to a role.
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 = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: IamRolesApi.add_role_permissions ...'
38
+ end
39
+ # unbox the parameters from the hash
40
+ role_id = opts[:'role_id']
41
+ # verify the required parameter 'role_id' is set
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"
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
+
20
153
  # Delete a role
21
154
  # Delete a role.
22
155
  # @option opts [String] :role_id Alphanumeric string identifying the role. (required)
@@ -273,5 +406,143 @@ module Fastly
273
406
  end
274
407
  return data, status_code, headers
275
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}"
544
+ end
545
+ return data, status_code, headers
546
+ end
276
547
  end
277
548
  end
@@ -17,6 +17,139 @@ module Fastly
17
17
  def initialize(api_client = ApiClient.default)
18
18
  @api_client = api_client
19
19
  end
20
+ # Add services in a service group
21
+ # Add services in a service group.
22
+ # @option opts [String] :service_group_id Alphanumeric string identifying the service group. (required)
23
+ # @option opts [Hash<String, Object>] :request_body
24
+ # @return [Object]
25
+ def add_service_group_services(opts = {})
26
+ data, _status_code, _headers = add_service_group_services_with_http_info(opts)
27
+ data
28
+ end
29
+
30
+ # Add services in a service group
31
+ # Add services in a service group.
32
+ # @option opts [String] :service_group_id Alphanumeric string identifying the service group. (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_service_group_services_with_http_info(opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: IamServiceGroupsApi.add_service_group_services ...'
38
+ end
39
+ # unbox the parameters from the hash
40
+ service_group_id = opts[:'service_group_id']
41
+ # verify the required parameter 'service_group_id' is set
42
+ if @api_client.config.client_side_validation && service_group_id.nil?
43
+ fail ArgumentError, "Missing the required parameter 'service_group_id' when calling IamServiceGroupsApi.add_service_group_services"
44
+ end
45
+ # resource path
46
+ local_var_path = '/service-groups/{service_group_id}/services'.sub('{' + 'service_group_id' + '}', CGI.escape(service_group_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 => :"IamServiceGroupsApi.add_service_group_services",
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: IamServiceGroupsApi#add_service_group_services\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ end
87
+ return data, status_code, headers
88
+ end
89
+
90
+ # Create a service group
91
+ # Create a service group.
92
+ # @option opts [Hash<String, Object>] :request_body
93
+ # @return [Object]
94
+ def create_a_service_group(opts = {})
95
+ data, _status_code, _headers = create_a_service_group_with_http_info(opts)
96
+ data
97
+ end
98
+
99
+ # Create a service group
100
+ # Create a service group.
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_service_group_with_http_info(opts = {})
104
+ if @api_client.config.debugging
105
+ @api_client.config.logger.debug 'Calling API: IamServiceGroupsApi.create_a_service_group ...'
106
+ end
107
+ # unbox the parameters from the hash
108
+ # resource path
109
+ local_var_path = '/service-groups'
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 => :"IamServiceGroupsApi.create_a_service_group",
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: IamServiceGroupsApi#create_a_service_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
149
+ end
150
+ return data, status_code, headers
151
+ end
152
+
20
153
  # Delete a service group
21
154
  # Delete a service group.
22
155
  # @option opts [String] :service_group_id Alphanumeric string identifying the service group. (required)
@@ -287,5 +420,143 @@ module Fastly
287
420
  end
288
421
  return data, status_code, headers
289
422
  end
423
+
424
+ # Remove services from a service group
425
+ # Remove services from a service group.
426
+ # @option opts [String] :service_group_id Alphanumeric string identifying the service group. (required)
427
+ # @option opts [Hash<String, Object>] :request_body
428
+ # @return [nil]
429
+ def remove_service_group_services(opts = {})
430
+ remove_service_group_services_with_http_info(opts)
431
+ nil
432
+ end
433
+
434
+ # Remove services from a service group
435
+ # Remove services from a service group.
436
+ # @option opts [String] :service_group_id Alphanumeric string identifying the service group. (required)
437
+ # @option opts [Hash<String, Object>] :request_body
438
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
439
+ def remove_service_group_services_with_http_info(opts = {})
440
+ if @api_client.config.debugging
441
+ @api_client.config.logger.debug 'Calling API: IamServiceGroupsApi.remove_service_group_services ...'
442
+ end
443
+ # unbox the parameters from the hash
444
+ service_group_id = opts[:'service_group_id']
445
+ # verify the required parameter 'service_group_id' is set
446
+ if @api_client.config.client_side_validation && service_group_id.nil?
447
+ fail ArgumentError, "Missing the required parameter 'service_group_id' when calling IamServiceGroupsApi.remove_service_group_services"
448
+ end
449
+ # resource path
450
+ local_var_path = '/service-groups/{service_group_id}/services'.sub('{' + 'service_group_id' + '}', CGI.escape(service_group_id.to_s))
451
+
452
+ # query parameters
453
+ query_params = opts[:query_params] || {}
454
+
455
+ # header parameters
456
+ header_params = opts[:header_params] || {}
457
+ # HTTP header 'Content-Type'
458
+ content_type = @api_client.select_header_content_type(['application/json'])
459
+ if !content_type.nil?
460
+ header_params['Content-Type'] = content_type
461
+ end
462
+
463
+ # form parameters
464
+ form_params = opts[:form_params] || {}
465
+
466
+ # http body (model)
467
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'request_body'])
468
+
469
+ # return_type
470
+ return_type = opts[:debug_return_type]
471
+
472
+ # auth_names
473
+ auth_names = opts[:debug_auth_names] || ['token']
474
+
475
+ new_options = opts.merge(
476
+ :operation => :"IamServiceGroupsApi.remove_service_group_services",
477
+ :header_params => header_params,
478
+ :query_params => query_params,
479
+ :form_params => form_params,
480
+ :body => post_body,
481
+ :auth_names => auth_names,
482
+ :return_type => return_type
483
+ )
484
+
485
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
486
+ if @api_client.config.debugging
487
+ @api_client.config.logger.debug "API called: IamServiceGroupsApi#remove_service_group_services\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
488
+ end
489
+ return data, status_code, headers
490
+ end
491
+
492
+ # Update a service group
493
+ # Update a service group.
494
+ # @option opts [String] :service_group_id Alphanumeric string identifying the service group. (required)
495
+ # @option opts [Hash<String, Object>] :request_body
496
+ # @return [Object]
497
+ def update_a_service_group(opts = {})
498
+ data, _status_code, _headers = update_a_service_group_with_http_info(opts)
499
+ data
500
+ end
501
+
502
+ # Update a service group
503
+ # Update a service group.
504
+ # @option opts [String] :service_group_id Alphanumeric string identifying the service group. (required)
505
+ # @option opts [Hash<String, Object>] :request_body
506
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
507
+ def update_a_service_group_with_http_info(opts = {})
508
+ if @api_client.config.debugging
509
+ @api_client.config.logger.debug 'Calling API: IamServiceGroupsApi.update_a_service_group ...'
510
+ end
511
+ # unbox the parameters from the hash
512
+ service_group_id = opts[:'service_group_id']
513
+ # verify the required parameter 'service_group_id' is set
514
+ if @api_client.config.client_side_validation && service_group_id.nil?
515
+ fail ArgumentError, "Missing the required parameter 'service_group_id' when calling IamServiceGroupsApi.update_a_service_group"
516
+ end
517
+ # resource path
518
+ local_var_path = '/service-groups/{service_group_id}'.sub('{' + 'service_group_id' + '}', CGI.escape(service_group_id.to_s))
519
+
520
+ # query parameters
521
+ query_params = opts[:query_params] || {}
522
+
523
+ # header parameters
524
+ header_params = opts[:header_params] || {}
525
+ # HTTP header 'Accept' (if needed)
526
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
527
+ # HTTP header 'Content-Type'
528
+ content_type = @api_client.select_header_content_type(['application/json'])
529
+ if !content_type.nil?
530
+ header_params['Content-Type'] = content_type
531
+ end
532
+
533
+ # form parameters
534
+ form_params = opts[:form_params] || {}
535
+
536
+ # http body (model)
537
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'request_body'])
538
+
539
+ # return_type
540
+ return_type = opts[:debug_return_type] || 'Object'
541
+
542
+ # auth_names
543
+ auth_names = opts[:debug_auth_names] || ['token']
544
+
545
+ new_options = opts.merge(
546
+ :operation => :"IamServiceGroupsApi.update_a_service_group",
547
+ :header_params => header_params,
548
+ :query_params => query_params,
549
+ :form_params => form_params,
550
+ :body => post_body,
551
+ :auth_names => auth_names,
552
+ :return_type => return_type
553
+ )
554
+
555
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
556
+ if @api_client.config.debugging
557
+ @api_client.config.logger.debug "API called: IamServiceGroupsApi#update_a_service_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
558
+ end
559
+ return data, status_code, headers
560
+ end
290
561
  end
291
562
  end