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
@@ -0,0 +1,437 @@
1
+ =begin
2
+ #Fastly API
3
+
4
+ #Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/)
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: oss@fastly.com
8
+
9
+ =end
10
+
11
+ require 'cgi'
12
+
13
+ module Fastly
14
+ class SecretStoreItemApi
15
+ attr_accessor :api_client
16
+
17
+ def initialize(api_client = ApiClient.default)
18
+ @api_client = api_client
19
+ end
20
+ # Create a new secret in a store.
21
+ # Create a new secret in a store. Returns an error if a secret already exists with the same name. See `PUT` and `PATCH` methods for ways to recreate an existing secret. The `secret` field must be Base64-encoded because a secret can contain binary data. In the example below, the unencoded secret is \"Hello, world!\"
22
+ # @option opts [String] :store_id (required)
23
+ # @option opts [Secret] :secret
24
+ # @return [SecretResponse]
25
+ def create_secret(opts = {})
26
+ data, _status_code, _headers = create_secret_with_http_info(opts)
27
+ data
28
+ end
29
+
30
+ # Create a new secret in a store.
31
+ # Create a new secret in a store. Returns an error if a secret already exists with the same name. See `PUT` and `PATCH` methods for ways to recreate an existing secret. The `secret` field must be Base64-encoded because a secret can contain binary data. In the example below, the unencoded secret is \"Hello, world!\"
32
+ # @option opts [String] :store_id (required)
33
+ # @option opts [Secret] :secret
34
+ # @return [Array<(SecretResponse, Integer, Hash)>] SecretResponse data, response status code and response headers
35
+ def create_secret_with_http_info(opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: SecretStoreItemApi.create_secret ...'
38
+ end
39
+ # unbox the parameters from the hash
40
+ store_id = opts[:'store_id']
41
+ # verify the required parameter 'store_id' is set
42
+ if @api_client.config.client_side_validation && store_id.nil?
43
+ fail ArgumentError, "Missing the required parameter 'store_id' when calling SecretStoreItemApi.create_secret"
44
+ end
45
+ # resource path
46
+ local_var_path = '/resources/stores/secret/{store_id}/secrets'.sub('{' + 'store_id' + '}', CGI.escape(store_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[:'secret'])
66
+
67
+ # return_type
68
+ return_type = opts[:debug_return_type] || 'SecretResponse'
69
+
70
+ # auth_names
71
+ auth_names = opts[:debug_auth_names] || ['token']
72
+
73
+ new_options = opts.merge(
74
+ :operation => :"SecretStoreItemApi.create_secret",
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: SecretStoreItemApi#create_secret\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ end
87
+ return data, status_code, headers
88
+ end
89
+
90
+ # Delete a secret from a store.
91
+ # Delete a secret from a store by name.
92
+ # @option opts [String] :store_id (required)
93
+ # @option opts [String] :secret_name (required)
94
+ # @return [nil]
95
+ def delete_secret(opts = {})
96
+ delete_secret_with_http_info(opts)
97
+ nil
98
+ end
99
+
100
+ # Delete a secret from a store.
101
+ # Delete a secret from a store by name.
102
+ # @option opts [String] :store_id (required)
103
+ # @option opts [String] :secret_name (required)
104
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
105
+ def delete_secret_with_http_info(opts = {})
106
+ if @api_client.config.debugging
107
+ @api_client.config.logger.debug 'Calling API: SecretStoreItemApi.delete_secret ...'
108
+ end
109
+ # unbox the parameters from the hash
110
+ store_id = opts[:'store_id']
111
+ secret_name = opts[:'secret_name']
112
+ # verify the required parameter 'store_id' is set
113
+ if @api_client.config.client_side_validation && store_id.nil?
114
+ fail ArgumentError, "Missing the required parameter 'store_id' when calling SecretStoreItemApi.delete_secret"
115
+ end
116
+ # verify the required parameter 'secret_name' is set
117
+ if @api_client.config.client_side_validation && secret_name.nil?
118
+ fail ArgumentError, "Missing the required parameter 'secret_name' when calling SecretStoreItemApi.delete_secret"
119
+ end
120
+ # resource path
121
+ local_var_path = '/resources/stores/secret/{store_id}/secrets/{secret_name}'.sub('{' + 'store_id' + '}', CGI.escape(store_id.to_s)).sub('{' + 'secret_name' + '}', CGI.escape(secret_name.to_s))
122
+
123
+ # query parameters
124
+ query_params = opts[:query_params] || {}
125
+
126
+ # header parameters
127
+ header_params = opts[:header_params] || {}
128
+
129
+ # form parameters
130
+ form_params = opts[:form_params] || {}
131
+
132
+ # http body (model)
133
+ post_body = opts[:debug_body]
134
+
135
+ # return_type
136
+ return_type = opts[:debug_return_type]
137
+
138
+ # auth_names
139
+ auth_names = opts[:debug_auth_names] || ['token']
140
+
141
+ new_options = opts.merge(
142
+ :operation => :"SecretStoreItemApi.delete_secret",
143
+ :header_params => header_params,
144
+ :query_params => query_params,
145
+ :form_params => form_params,
146
+ :body => post_body,
147
+ :auth_names => auth_names,
148
+ :return_type => return_type
149
+ )
150
+
151
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
152
+ if @api_client.config.debugging
153
+ @api_client.config.logger.debug "API called: SecretStoreItemApi#delete_secret\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
154
+ end
155
+ return data, status_code, headers
156
+ end
157
+
158
+ # Get secret metadata.
159
+ # Get metadata about a secret by name.
160
+ # @option opts [String] :store_id (required)
161
+ # @option opts [String] :secret_name (required)
162
+ # @return [SecretResponse]
163
+ def get_secret(opts = {})
164
+ data, _status_code, _headers = get_secret_with_http_info(opts)
165
+ data
166
+ end
167
+
168
+ # Get secret metadata.
169
+ # Get metadata about a secret by name.
170
+ # @option opts [String] :store_id (required)
171
+ # @option opts [String] :secret_name (required)
172
+ # @return [Array<(SecretResponse, Integer, Hash)>] SecretResponse data, response status code and response headers
173
+ def get_secret_with_http_info(opts = {})
174
+ if @api_client.config.debugging
175
+ @api_client.config.logger.debug 'Calling API: SecretStoreItemApi.get_secret ...'
176
+ end
177
+ # unbox the parameters from the hash
178
+ store_id = opts[:'store_id']
179
+ secret_name = opts[:'secret_name']
180
+ # verify the required parameter 'store_id' is set
181
+ if @api_client.config.client_side_validation && store_id.nil?
182
+ fail ArgumentError, "Missing the required parameter 'store_id' when calling SecretStoreItemApi.get_secret"
183
+ end
184
+ # verify the required parameter 'secret_name' is set
185
+ if @api_client.config.client_side_validation && secret_name.nil?
186
+ fail ArgumentError, "Missing the required parameter 'secret_name' when calling SecretStoreItemApi.get_secret"
187
+ end
188
+ # resource path
189
+ local_var_path = '/resources/stores/secret/{store_id}/secrets/{secret_name}'.sub('{' + 'store_id' + '}', CGI.escape(store_id.to_s)).sub('{' + 'secret_name' + '}', CGI.escape(secret_name.to_s))
190
+
191
+ # query parameters
192
+ query_params = opts[:query_params] || {}
193
+
194
+ # header parameters
195
+ header_params = opts[:header_params] || {}
196
+ # HTTP header 'Accept' (if needed)
197
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
198
+
199
+ # form parameters
200
+ form_params = opts[:form_params] || {}
201
+
202
+ # http body (model)
203
+ post_body = opts[:debug_body]
204
+
205
+ # return_type
206
+ return_type = opts[:debug_return_type] || 'SecretResponse'
207
+
208
+ # auth_names
209
+ auth_names = opts[:debug_auth_names] || ['token']
210
+
211
+ new_options = opts.merge(
212
+ :operation => :"SecretStoreItemApi.get_secret",
213
+ :header_params => header_params,
214
+ :query_params => query_params,
215
+ :form_params => form_params,
216
+ :body => post_body,
217
+ :auth_names => auth_names,
218
+ :return_type => return_type
219
+ )
220
+
221
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
222
+ if @api_client.config.debugging
223
+ @api_client.config.logger.debug "API called: SecretStoreItemApi#get_secret\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
224
+ end
225
+ return data, status_code, headers
226
+ end
227
+
228
+ # List secrets within a store.
229
+ # List all secrets within a store.
230
+ # @option opts [String] :store_id (required)
231
+ # @option opts [String] :cursor Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty.
232
+ # @option opts [String] :limit Number of results per page. The maximum is 200. (default to '100')
233
+ # @return [InlineResponse2006]
234
+ def get_secrets(opts = {})
235
+ data, _status_code, _headers = get_secrets_with_http_info(opts)
236
+ data
237
+ end
238
+
239
+ # List secrets within a store.
240
+ # List all secrets within a store.
241
+ # @option opts [String] :store_id (required)
242
+ # @option opts [String] :cursor Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty.
243
+ # @option opts [String] :limit Number of results per page. The maximum is 200. (default to '100')
244
+ # @return [Array<(InlineResponse2006, Integer, Hash)>] InlineResponse2006 data, response status code and response headers
245
+ def get_secrets_with_http_info(opts = {})
246
+ if @api_client.config.debugging
247
+ @api_client.config.logger.debug 'Calling API: SecretStoreItemApi.get_secrets ...'
248
+ end
249
+ # unbox the parameters from the hash
250
+ store_id = opts[:'store_id']
251
+ # verify the required parameter 'store_id' is set
252
+ if @api_client.config.client_side_validation && store_id.nil?
253
+ fail ArgumentError, "Missing the required parameter 'store_id' when calling SecretStoreItemApi.get_secrets"
254
+ end
255
+ # resource path
256
+ local_var_path = '/resources/stores/secret/{store_id}/secrets'.sub('{' + 'store_id' + '}', CGI.escape(store_id.to_s))
257
+
258
+ # query parameters
259
+ query_params = opts[:query_params] || {}
260
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
261
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
262
+
263
+ # header parameters
264
+ header_params = opts[:header_params] || {}
265
+ # HTTP header 'Accept' (if needed)
266
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
267
+
268
+ # form parameters
269
+ form_params = opts[:form_params] || {}
270
+
271
+ # http body (model)
272
+ post_body = opts[:debug_body]
273
+
274
+ # return_type
275
+ return_type = opts[:debug_return_type] || 'InlineResponse2006'
276
+
277
+ # auth_names
278
+ auth_names = opts[:debug_auth_names] || ['token']
279
+
280
+ new_options = opts.merge(
281
+ :operation => :"SecretStoreItemApi.get_secrets",
282
+ :header_params => header_params,
283
+ :query_params => query_params,
284
+ :form_params => form_params,
285
+ :body => post_body,
286
+ :auth_names => auth_names,
287
+ :return_type => return_type
288
+ )
289
+
290
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
291
+ if @api_client.config.debugging
292
+ @api_client.config.logger.debug "API called: SecretStoreItemApi#get_secrets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
293
+ end
294
+ return data, status_code, headers
295
+ end
296
+
297
+ # Recreate a secret in a store.
298
+ # Recreate a secret based on the secret's name. Returns an error if there is no existing secret with the same name. The `secret` field must be Base64-encoded because a secret can contain binary data. In the example below, the unencoded secret is \"Hello, world!\"
299
+ # @option opts [String] :store_id (required)
300
+ # @option opts [Secret] :secret
301
+ # @return [SecretResponse]
302
+ def must_recreate_secret(opts = {})
303
+ data, _status_code, _headers = must_recreate_secret_with_http_info(opts)
304
+ data
305
+ end
306
+
307
+ # Recreate a secret in a store.
308
+ # Recreate a secret based on the secret&#39;s name. Returns an error if there is no existing secret with the same name. The &#x60;secret&#x60; field must be Base64-encoded because a secret can contain binary data. In the example below, the unencoded secret is \&quot;Hello, world!\&quot;
309
+ # @option opts [String] :store_id (required)
310
+ # @option opts [Secret] :secret
311
+ # @return [Array<(SecretResponse, Integer, Hash)>] SecretResponse data, response status code and response headers
312
+ def must_recreate_secret_with_http_info(opts = {})
313
+ if @api_client.config.debugging
314
+ @api_client.config.logger.debug 'Calling API: SecretStoreItemApi.must_recreate_secret ...'
315
+ end
316
+ # unbox the parameters from the hash
317
+ store_id = opts[:'store_id']
318
+ # verify the required parameter 'store_id' is set
319
+ if @api_client.config.client_side_validation && store_id.nil?
320
+ fail ArgumentError, "Missing the required parameter 'store_id' when calling SecretStoreItemApi.must_recreate_secret"
321
+ end
322
+ # resource path
323
+ local_var_path = '/resources/stores/secret/{store_id}/secrets'.sub('{' + 'store_id' + '}', CGI.escape(store_id.to_s))
324
+
325
+ # query parameters
326
+ query_params = opts[:query_params] || {}
327
+
328
+ # header parameters
329
+ header_params = opts[:header_params] || {}
330
+ # HTTP header 'Accept' (if needed)
331
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
332
+ # HTTP header 'Content-Type'
333
+ content_type = @api_client.select_header_content_type(['application/json'])
334
+ if !content_type.nil?
335
+ header_params['Content-Type'] = content_type
336
+ end
337
+
338
+ # form parameters
339
+ form_params = opts[:form_params] || {}
340
+
341
+ # http body (model)
342
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'secret'])
343
+
344
+ # return_type
345
+ return_type = opts[:debug_return_type] || 'SecretResponse'
346
+
347
+ # auth_names
348
+ auth_names = opts[:debug_auth_names] || ['token']
349
+
350
+ new_options = opts.merge(
351
+ :operation => :"SecretStoreItemApi.must_recreate_secret",
352
+ :header_params => header_params,
353
+ :query_params => query_params,
354
+ :form_params => form_params,
355
+ :body => post_body,
356
+ :auth_names => auth_names,
357
+ :return_type => return_type
358
+ )
359
+
360
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
361
+ if @api_client.config.debugging
362
+ @api_client.config.logger.debug "API called: SecretStoreItemApi#must_recreate_secret\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
363
+ end
364
+ return data, status_code, headers
365
+ end
366
+
367
+ # Create or recreate a secret in a store.
368
+ # Create or recreate a secret based on the secret's name. The response object's `recreated` field will be true if the secret was recreated. The `secret` field must be Base64-encoded because a secret can contain binary data. In the example below, the unencoded secret is \"Hello, world!\"
369
+ # @option opts [String] :store_id (required)
370
+ # @option opts [Secret] :secret
371
+ # @return [SecretResponse]
372
+ def recreate_secret(opts = {})
373
+ data, _status_code, _headers = recreate_secret_with_http_info(opts)
374
+ data
375
+ end
376
+
377
+ # Create or recreate a secret in a store.
378
+ # Create or recreate a secret based on the secret&#39;s name. The response object&#39;s &#x60;recreated&#x60; field will be true if the secret was recreated. The &#x60;secret&#x60; field must be Base64-encoded because a secret can contain binary data. In the example below, the unencoded secret is \&quot;Hello, world!\&quot;
379
+ # @option opts [String] :store_id (required)
380
+ # @option opts [Secret] :secret
381
+ # @return [Array<(SecretResponse, Integer, Hash)>] SecretResponse data, response status code and response headers
382
+ def recreate_secret_with_http_info(opts = {})
383
+ if @api_client.config.debugging
384
+ @api_client.config.logger.debug 'Calling API: SecretStoreItemApi.recreate_secret ...'
385
+ end
386
+ # unbox the parameters from the hash
387
+ store_id = opts[:'store_id']
388
+ # verify the required parameter 'store_id' is set
389
+ if @api_client.config.client_side_validation && store_id.nil?
390
+ fail ArgumentError, "Missing the required parameter 'store_id' when calling SecretStoreItemApi.recreate_secret"
391
+ end
392
+ # resource path
393
+ local_var_path = '/resources/stores/secret/{store_id}/secrets'.sub('{' + 'store_id' + '}', CGI.escape(store_id.to_s))
394
+
395
+ # query parameters
396
+ query_params = opts[:query_params] || {}
397
+
398
+ # header parameters
399
+ header_params = opts[:header_params] || {}
400
+ # HTTP header 'Accept' (if needed)
401
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
402
+ # HTTP header 'Content-Type'
403
+ content_type = @api_client.select_header_content_type(['application/json'])
404
+ if !content_type.nil?
405
+ header_params['Content-Type'] = content_type
406
+ end
407
+
408
+ # form parameters
409
+ form_params = opts[:form_params] || {}
410
+
411
+ # http body (model)
412
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'secret'])
413
+
414
+ # return_type
415
+ return_type = opts[:debug_return_type] || 'SecretResponse'
416
+
417
+ # auth_names
418
+ auth_names = opts[:debug_auth_names] || ['token']
419
+
420
+ new_options = opts.merge(
421
+ :operation => :"SecretStoreItemApi.recreate_secret",
422
+ :header_params => header_params,
423
+ :query_params => query_params,
424
+ :form_params => form_params,
425
+ :body => post_body,
426
+ :auth_names => auth_names,
427
+ :return_type => return_type
428
+ )
429
+
430
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
431
+ if @api_client.config.debugging
432
+ @api_client.config.logger.debug "API called: SecretStoreItemApi#recreate_secret\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
433
+ end
434
+ return data, status_code, headers
435
+ end
436
+ end
437
+ end
@@ -141,6 +141,69 @@ module Fastly
141
141
  return data, status_code, headers
142
142
  end
143
143
 
144
+ # Delete service authorizations
145
+ # Delete service authorizations.
146
+ # @option opts [Hash<String, Object>] :request_body
147
+ # @return [InlineResponse2007]
148
+ def delete_service_authorization2(opts = {})
149
+ data, _status_code, _headers = delete_service_authorization2_with_http_info(opts)
150
+ data
151
+ end
152
+
153
+ # Delete service authorizations
154
+ # Delete service authorizations.
155
+ # @option opts [Hash<String, Object>] :request_body
156
+ # @return [Array<(InlineResponse2007, Integer, Hash)>] InlineResponse2007 data, response status code and response headers
157
+ def delete_service_authorization2_with_http_info(opts = {})
158
+ if @api_client.config.debugging
159
+ @api_client.config.logger.debug 'Calling API: ServiceAuthorizationsApi.delete_service_authorization2 ...'
160
+ end
161
+ # unbox the parameters from the hash
162
+ # resource path
163
+ local_var_path = '/service-authorizations'
164
+
165
+ # query parameters
166
+ query_params = opts[:query_params] || {}
167
+
168
+ # header parameters
169
+ header_params = opts[:header_params] || {}
170
+ # HTTP header 'Accept' (if needed)
171
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json; ext=bulk'])
172
+ # HTTP header 'Content-Type'
173
+ content_type = @api_client.select_header_content_type(['application/vnd.api+json; ext=bulk'])
174
+ if !content_type.nil?
175
+ header_params['Content-Type'] = content_type
176
+ end
177
+
178
+ # form parameters
179
+ form_params = opts[:form_params] || {}
180
+
181
+ # http body (model)
182
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'request_body'])
183
+
184
+ # return_type
185
+ return_type = opts[:debug_return_type] || 'InlineResponse2007'
186
+
187
+ # auth_names
188
+ auth_names = opts[:debug_auth_names] || ['token']
189
+
190
+ new_options = opts.merge(
191
+ :operation => :"ServiceAuthorizationsApi.delete_service_authorization2",
192
+ :header_params => header_params,
193
+ :query_params => query_params,
194
+ :form_params => form_params,
195
+ :body => post_body,
196
+ :auth_names => auth_names,
197
+ :return_type => return_type
198
+ )
199
+
200
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
201
+ if @api_client.config.debugging
202
+ @api_client.config.logger.debug "API called: ServiceAuthorizationsApi#delete_service_authorization2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
203
+ end
204
+ return data, status_code, headers
205
+ end
206
+
144
207
  # List service authorizations
145
208
  # List service authorizations.
146
209
  # @option opts [Integer] :page_number Current page.
@@ -343,5 +406,68 @@ module Fastly
343
406
  end
344
407
  return data, status_code, headers
345
408
  end
409
+
410
+ # Update service authorizations
411
+ # Update service authorizations.
412
+ # @option opts [Hash<String, Object>] :request_body
413
+ # @return [ServiceAuthorizationsResponse]
414
+ def update_service_authorization2(opts = {})
415
+ data, _status_code, _headers = update_service_authorization2_with_http_info(opts)
416
+ data
417
+ end
418
+
419
+ # Update service authorizations
420
+ # Update service authorizations.
421
+ # @option opts [Hash<String, Object>] :request_body
422
+ # @return [Array<(ServiceAuthorizationsResponse, Integer, Hash)>] ServiceAuthorizationsResponse data, response status code and response headers
423
+ def update_service_authorization2_with_http_info(opts = {})
424
+ if @api_client.config.debugging
425
+ @api_client.config.logger.debug 'Calling API: ServiceAuthorizationsApi.update_service_authorization2 ...'
426
+ end
427
+ # unbox the parameters from the hash
428
+ # resource path
429
+ local_var_path = '/service-authorizations'
430
+
431
+ # query parameters
432
+ query_params = opts[:query_params] || {}
433
+
434
+ # header parameters
435
+ header_params = opts[:header_params] || {}
436
+ # HTTP header 'Accept' (if needed)
437
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json; ext=bulk'])
438
+ # HTTP header 'Content-Type'
439
+ content_type = @api_client.select_header_content_type(['application/vnd.api+json; ext=bulk'])
440
+ if !content_type.nil?
441
+ header_params['Content-Type'] = content_type
442
+ end
443
+
444
+ # form parameters
445
+ form_params = opts[:form_params] || {}
446
+
447
+ # http body (model)
448
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'request_body'])
449
+
450
+ # return_type
451
+ return_type = opts[:debug_return_type] || 'ServiceAuthorizationsResponse'
452
+
453
+ # auth_names
454
+ auth_names = opts[:debug_auth_names] || ['token']
455
+
456
+ new_options = opts.merge(
457
+ :operation => :"ServiceAuthorizationsApi.update_service_authorization2",
458
+ :header_params => header_params,
459
+ :query_params => query_params,
460
+ :form_params => form_params,
461
+ :body => post_body,
462
+ :auth_names => auth_names,
463
+ :return_type => return_type
464
+ )
465
+
466
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
467
+ if @api_client.config.debugging
468
+ @api_client.config.logger.debug "API called: ServiceAuthorizationsApi#update_service_authorization2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
469
+ end
470
+ return data, status_code, headers
471
+ end
346
472
  end
347
473
  end