fastly 5.3.0 → 6.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +62 -0
- data/Gemfile.lock +1 -1
- data/README.md +86 -63
- data/docs/AclEntry.md +1 -1
- data/docs/AclEntryApi.md +176 -0
- data/docs/AclEntryResponse.md +1 -1
- data/docs/ApexRedirectApi.md +56 -0
- data/docs/Batch.md +12 -0
- data/docs/BatchErrors.md +13 -0
- data/docs/BulkUpdateAclEntry.md +1 -1
- data/docs/ClientKey.md +12 -0
- data/docs/ContactApi.md +50 -0
- data/docs/Content.md +2 -2
- data/docs/ContentApi.md +52 -0
- data/docs/DirectorApi.md +42 -0
- data/docs/DomainInspector.md +12 -0
- data/docs/DomainInspectorEntry.md +11 -0
- data/docs/DomainInspectorEntryDimensions.md +12 -0
- data/docs/DomainInspectorHistoricalApi.md +72 -0
- data/docs/DomainInspectorMeasurements.md +71 -0
- data/docs/DomainInspectorRealtimeApi.md +132 -0
- data/docs/DomainInspectorRealtimeEntry.md +12 -0
- data/docs/EventAttributes.md +1 -1
- data/docs/{EventsResponseAllOf.md → EventData.md} +1 -1
- data/docs/HistoricalDomains.md +13 -0
- data/docs/HistoricalDomainsData.md +11 -0
- data/docs/HistoricalDomainsMeta.md +18 -0
- data/docs/HistoricalDomainsMetaFilters.md +12 -0
- data/docs/HistoricalDomainsResponse.md +13 -0
- data/docs/HistoricalDomainsResponseAllOf.md +10 -0
- data/docs/{HistoricalFieldResultsAttributesAllOf.md → HistoricalFieldResultsAttributesAdditional.md} +1 -1
- data/docs/HistoricalOriginsResponse.md +13 -0
- data/docs/HistoricalOriginsResponseAllOf.md +10 -0
- data/docs/IamRolesApi.md +157 -0
- data/docs/IamServiceGroupsApi.md +157 -0
- data/docs/IamUserGroupsApi.md +315 -0
- data/docs/InlineResponse2005.md +11 -0
- data/docs/InlineResponse2006.md +11 -0
- data/docs/InlineResponse2007.md +10 -0
- data/docs/InlineResponse400.md +10 -0
- data/docs/LegacyWafConfigurationSet.md +11 -0
- data/docs/LegacyWafConfigurationSetsApi.md +125 -0
- data/docs/LegacyWafFirewall.md +18 -0
- data/docs/LegacyWafFirewallApi.md +352 -0
- data/docs/LegacyWafOwasp.md +38 -0
- data/docs/LegacyWafOwaspApi.md +138 -0
- data/docs/LegacyWafRule.md +14 -0
- data/docs/LegacyWafRuleApi.md +184 -0
- data/docs/LegacyWafRuleStatus.md +12 -0
- data/docs/LegacyWafRuleStatusApi.md +202 -0
- data/docs/LegacyWafRuleset.md +11 -0
- data/docs/LegacyWafRulesetApi.md +136 -0
- data/docs/LegacyWafTag.md +10 -0
- data/docs/LegacyWafTagApi.md +58 -0
- data/docs/LegacyWafUpdateStatus.md +15 -0
- data/docs/LegacyWafUpdateStatusApi.md +102 -0
- data/docs/LoggingKafkaApi.md +42 -0
- data/docs/LoggingKinesisApi.md +42 -0
- data/docs/OriginInspector.md +12 -0
- data/docs/OriginInspectorDimensions.md +12 -0
- data/docs/OriginInspectorEntry.md +11 -0
- data/docs/OriginInspectorHistorical.md +13 -0
- data/docs/OriginInspectorHistoricalApi.md +72 -0
- data/docs/OriginInspectorHistoricalData.md +11 -0
- data/docs/OriginInspectorHistoricalMeta.md +18 -0
- data/docs/OriginInspectorHistoricalMetaFilters.md +12 -0
- data/docs/OriginInspectorMeasurements.md +161 -0
- data/docs/OriginInspectorRealtimeApi.md +132 -0
- data/docs/OriginInspectorRealtimeEntry.md +12 -0
- data/docs/OriginInspectorRealtimeEntryRecorded.md +9 -0
- data/docs/OriginInspectorSubsequentRequestTimestamp.md +9 -0
- data/docs/OriginInspectorValues.md +161 -0
- data/docs/PaginationCursorMeta.md +11 -0
- data/docs/ReadOnlyServiceId.md +9 -0
- data/docs/ReadOnlyVersion.md +9 -0
- data/docs/RealtimeEntry.md +2 -2
- data/docs/RealtimeEntryAggregated.md +227 -0
- data/docs/RealtimeEntryRecorded.md +9 -0
- data/docs/RealtimeMeasurements.md +1 -1
- data/docs/RecordedTimestamp.md +9 -0
- data/docs/RequestSettingsApi.md +40 -0
- data/docs/ResponseObjectApi.md +82 -0
- data/docs/SchemasSnippetResponse.md +1 -1
- data/docs/Secret.md +12 -0
- data/docs/SecretResponse.md +13 -0
- data/docs/SecretStore.md +10 -0
- data/docs/SecretStoreApi.md +233 -0
- data/docs/SecretStoreItemApi.md +255 -0
- data/docs/SecretStoreResponse.md +12 -0
- data/docs/ServiceAuthorizationsApi.md +76 -0
- data/docs/SigningKey.md +10 -0
- data/docs/Snippet.md +1 -1
- data/docs/SnippetApi.md +46 -4
- data/docs/SnippetResponse.md +1 -1
- data/docs/SubsequentRequestTimestamp.md +9 -0
- data/docs/SudoApi.md +52 -0
- data/docs/SudoGenericTokenError.md +10 -0
- data/docs/SudoRequest.md +12 -0
- data/docs/SudoResponse.md +10 -0
- data/docs/TokensAdditionalProps.md +9 -0
- data/docs/TokensApi.md +70 -0
- data/docs/ValidatorResult.md +1 -5
- data/docs/ValidatorResultData.md +12 -0
- data/docs/ValidatorResultDataAttributes.md +14 -0
- data/docs/{ValidatorResultMessages.md → ValidatorResultDataAttributesMessages.md} +2 -2
- data/docs/Values.md +71 -0
- data/docs/VclApi.md +8 -6
- data/docs/VclSyntaxHighlightingResponse.md +10 -0
- data/docs/WafActiveRulesApi.md +41 -0
- data/lib/fastly/api/acl_entry_api.rb +332 -0
- data/lib/fastly/api/apex_redirect_api.rb +111 -0
- data/lib/fastly/api/contact_api.rb +90 -0
- data/lib/fastly/api/content_api.rb +79 -0
- data/lib/fastly/api/director_api.rb +82 -0
- data/lib/fastly/api/domain_inspector_historical_api.rb +125 -0
- data/lib/fastly/api/domain_inspector_realtime_api.rb +223 -0
- data/lib/fastly/api/iam_roles_api.rb +271 -0
- data/lib/fastly/api/iam_service_groups_api.rb +271 -0
- data/lib/fastly/api/iam_user_groups_api.rb +547 -0
- data/lib/fastly/api/legacy_waf_configuration_sets_api.rb +209 -0
- data/lib/fastly/api/legacy_waf_firewall_api.rb +627 -0
- data/lib/fastly/api/legacy_waf_owasp_api.rb +244 -0
- data/lib/fastly/api/legacy_waf_rule_api.rb +307 -0
- data/lib/fastly/api/legacy_waf_rule_status_api.rb +366 -0
- data/lib/fastly/api/legacy_waf_ruleset_api.rb +237 -0
- data/lib/fastly/api/legacy_waf_tag_api.rb +96 -0
- data/lib/fastly/api/legacy_waf_update_status_api.rb +184 -0
- data/lib/fastly/api/logging_kafka_api.rb +82 -0
- data/lib/fastly/api/logging_kinesis_api.rb +82 -0
- data/lib/fastly/api/origin_inspector_historical_api.rb +125 -0
- data/lib/fastly/api/origin_inspector_realtime_api.rb +223 -0
- data/lib/fastly/api/request_settings_api.rb +75 -0
- data/lib/fastly/api/response_object_api.rb +157 -0
- data/lib/fastly/api/secret_store_api.rb +381 -0
- data/lib/fastly/api/secret_store_item_api.rb +437 -0
- data/lib/fastly/api/service_authorizations_api.rb +126 -0
- data/lib/fastly/api/snippet_api.rb +88 -6
- data/lib/fastly/api/sudo_api.rb +83 -0
- data/lib/fastly/api/tokens_api.rb +122 -0
- data/lib/fastly/api/vcl_api.rb +10 -10
- data/lib/fastly/api/waf_active_rules_api.rb +75 -0
- data/lib/fastly/configuration.rb +504 -0
- data/lib/fastly/models/acl_entry.rb +1 -1
- data/lib/fastly/models/acl_entry_response.rb +1 -1
- data/lib/fastly/models/batch.rb +239 -0
- data/lib/fastly/models/batch_errors.rb +247 -0
- data/lib/fastly/models/bulk_update_acl_entry.rb +1 -1
- data/lib/fastly/models/client_key.rb +239 -0
- data/lib/fastly/models/content.rb +8 -4
- data/lib/fastly/models/domain.rb +1 -0
- data/lib/fastly/models/domain_inspector.rb +238 -0
- data/lib/fastly/models/domain_inspector_entry.rb +228 -0
- data/lib/fastly/models/domain_inspector_entry_dimensions.rb +238 -0
- data/lib/fastly/models/domain_inspector_measurements.rb +828 -0
- data/lib/fastly/models/domain_inspector_realtime_entry.rb +241 -0
- data/lib/fastly/models/event_attributes.rb +4 -2
- data/lib/fastly/models/{events_response_all_of.rb → event_data.rb} +3 -3
- data/lib/fastly/models/events_response.rb +1 -1
- data/lib/fastly/models/historical_domains.rb +249 -0
- data/lib/fastly/models/historical_domains_data.rb +228 -0
- data/lib/fastly/models/historical_domains_meta.rb +297 -0
- data/lib/fastly/models/historical_domains_meta_filters.rb +235 -0
- data/lib/fastly/models/historical_domains_response.rb +257 -0
- data/lib/fastly/models/historical_domains_response_all_of.rb +219 -0
- data/lib/fastly/models/historical_field_results_attributes.rb +1 -1
- data/lib/fastly/models/{historical_field_results_attributes_all_of.rb → historical_field_results_attributes_additional.rb} +3 -3
- data/lib/fastly/models/historical_origins_response.rb +257 -0
- data/lib/fastly/models/historical_origins_response_all_of.rb +219 -0
- data/lib/fastly/models/inline_response2005.rb +227 -0
- data/lib/fastly/models/inline_response2006.rb +227 -0
- data/lib/fastly/models/inline_response2007.rb +218 -0
- data/lib/fastly/models/inline_response400.rb +250 -0
- data/lib/fastly/models/legacy_waf_configuration_set.rb +227 -0
- data/lib/fastly/models/legacy_waf_firewall.rb +297 -0
- data/lib/fastly/models/legacy_waf_owasp.rb +527 -0
- data/lib/fastly/models/legacy_waf_rule.rb +257 -0
- data/lib/fastly/models/legacy_waf_rule_status.rb +237 -0
- data/lib/fastly/models/legacy_waf_ruleset.rb +227 -0
- data/lib/fastly/models/legacy_waf_tag.rb +217 -0
- data/lib/fastly/models/legacy_waf_update_status.rb +267 -0
- data/lib/fastly/models/origin_inspector.rb +238 -0
- data/lib/fastly/models/origin_inspector_dimensions.rb +238 -0
- data/lib/fastly/models/origin_inspector_entry.rb +228 -0
- data/lib/fastly/models/origin_inspector_historical.rb +249 -0
- data/lib/fastly/models/origin_inspector_historical_data.rb +225 -0
- data/lib/fastly/models/origin_inspector_historical_meta.rb +297 -0
- data/lib/fastly/models/origin_inspector_historical_meta_filters.rb +235 -0
- data/lib/fastly/models/origin_inspector_measurements.rb +1728 -0
- data/lib/fastly/models/origin_inspector_realtime_entry.rb +241 -0
- data/lib/fastly/models/origin_inspector_realtime_entry_recorded.rb +208 -0
- data/lib/fastly/models/origin_inspector_subsequent_request_timestamp.rb +208 -0
- data/lib/fastly/models/origin_inspector_values.rb +1728 -0
- data/lib/fastly/models/pagination_cursor_meta.rb +227 -0
- data/lib/fastly/models/read_only_service_id.rb +207 -0
- data/lib/fastly/models/read_only_version.rb +207 -0
- data/lib/fastly/models/realtime_entry.rb +2 -7
- data/lib/fastly/models/realtime_entry_aggregated.rb +2397 -0
- data/lib/fastly/models/realtime_entry_recorded.rb +208 -0
- data/lib/fastly/models/realtime_measurements.rb +4 -2
- data/lib/fastly/models/recorded_timestamp.rb +208 -0
- data/lib/fastly/models/schemas_snippet_response.rb +3 -3
- data/lib/fastly/models/secret.rb +238 -0
- data/lib/fastly/models/secret_response.rb +249 -0
- data/lib/fastly/models/secret_store.rb +217 -0
- data/lib/fastly/models/secret_store_response.rb +238 -0
- data/lib/fastly/models/signing_key.rb +218 -0
- data/lib/fastly/models/snippet.rb +3 -3
- data/lib/fastly/models/snippet_response.rb +3 -3
- data/lib/fastly/models/subsequent_request_timestamp.rb +208 -0
- data/lib/fastly/models/sudo_generic_token_error.rb +216 -0
- data/lib/fastly/models/sudo_request.rb +244 -0
- data/lib/fastly/models/sudo_response.rb +217 -0
- data/lib/fastly/models/tokens_additional_props.rb +227 -0
- data/lib/fastly/models/validator_result.rb +7 -84
- data/lib/fastly/models/validator_result_data.rb +234 -0
- data/lib/fastly/models/validator_result_data_attributes.rb +293 -0
- data/lib/fastly/models/{validator_result_messages.rb → validator_result_data_attributes_messages.rb} +4 -4
- data/lib/fastly/models/values.rb +828 -0
- data/lib/fastly/models/vcl_syntax_highlighting_response.rb +217 -0
- data/lib/fastly/version.rb +1 -1
- data/lib/fastly.rb +79 -3
- data/sig.json +1 -1
- 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'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!\"
|
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'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!\"
|
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
|