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
@@ -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
|