azure_mgmt_redis 0.13.0 → 0.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generated/azure_mgmt_redis.rb +17 -7
- data/lib/generated/azure_mgmt_redis/firewall_rules.rb +525 -0
- data/lib/generated/azure_mgmt_redis/models/export_rdbparameters.rb +0 -1
- data/lib/generated/azure_mgmt_redis/models/import_rdbparameters.rb +0 -1
- data/lib/generated/azure_mgmt_redis/models/operation.rb +55 -0
- data/lib/generated/azure_mgmt_redis/models/operation_display.rb +75 -0
- data/lib/generated/azure_mgmt_redis/models/operation_list_result.rb +98 -0
- data/lib/generated/azure_mgmt_redis/models/proxy_resource.rb +59 -0
- data/lib/generated/azure_mgmt_redis/models/redis_access_keys.rb +0 -1
- data/lib/generated/azure_mgmt_redis/models/redis_create_parameters.rb +8 -9
- data/lib/generated/azure_mgmt_redis/models/redis_firewall_rule.rb +79 -0
- data/lib/generated/azure_mgmt_redis/models/redis_firewall_rule_list_result.rb +96 -0
- data/lib/generated/azure_mgmt_redis/models/redis_force_reboot_response.rb +0 -1
- data/lib/generated/azure_mgmt_redis/models/redis_linked_server.rb +0 -1
- data/lib/generated/azure_mgmt_redis/models/redis_linked_server_create_parameters.rb +0 -1
- data/lib/generated/azure_mgmt_redis/models/redis_linked_server_list.rb +0 -1
- data/lib/generated/azure_mgmt_redis/models/redis_linked_server_with_properties.rb +0 -1
- data/lib/generated/azure_mgmt_redis/models/redis_linked_server_with_properties_list.rb +0 -1
- data/lib/generated/azure_mgmt_redis/models/redis_list_result.rb +1 -0
- data/lib/generated/azure_mgmt_redis/models/redis_patch_schedule.rb +0 -1
- data/lib/generated/azure_mgmt_redis/models/redis_reboot_parameters.rb +0 -1
- data/lib/generated/azure_mgmt_redis/models/redis_regenerate_key_parameters.rb +0 -1
- data/lib/generated/azure_mgmt_redis/models/redis_resource.rb +8 -9
- data/lib/generated/azure_mgmt_redis/models/redis_update_parameters.rb +0 -1
- data/lib/generated/azure_mgmt_redis/models/resource.rb +67 -0
- data/lib/generated/azure_mgmt_redis/models/schedule_entry.rb +0 -1
- data/lib/generated/azure_mgmt_redis/models/sku.rb +0 -1
- data/lib/generated/azure_mgmt_redis/models/tracked_resource.rb +85 -0
- data/lib/generated/azure_mgmt_redis/operations.rb +220 -0
- data/lib/generated/azure_mgmt_redis/redis_management_client.rb +8 -0
- data/lib/generated/azure_mgmt_redis/version.rb +1 -1
- metadata +12 -2
@@ -12,7 +12,6 @@ module Azure::ARM::Redis
|
|
12
12
|
|
13
13
|
include MsRestAzure
|
14
14
|
|
15
|
-
include MsRest::JSONable
|
16
15
|
# @return [RebootType] Which Redis node(s) to reboot. Depending on this
|
17
16
|
# value data loss is possible. Possible values include: 'PrimaryNode',
|
18
17
|
# 'SecondaryNode', 'AllNodes'
|
@@ -8,11 +8,10 @@ module Azure::ARM::Redis
|
|
8
8
|
#
|
9
9
|
# A single Redis item in List or Get Operation.
|
10
10
|
#
|
11
|
-
class RedisResource <
|
11
|
+
class RedisResource < TrackedResource
|
12
12
|
|
13
13
|
include MsRestAzure
|
14
14
|
|
15
|
-
include MsRest::JSONable
|
16
15
|
# @return [Hash{String => String}] All Redis Settings. Few possible keys:
|
17
16
|
# rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value
|
18
17
|
# etc.
|
@@ -101,13 +100,6 @@ module Azure::ARM::Redis
|
|
101
100
|
name: 'String'
|
102
101
|
}
|
103
102
|
},
|
104
|
-
location: {
|
105
|
-
required: true,
|
106
|
-
serialized_name: 'location',
|
107
|
-
type: {
|
108
|
-
name: 'String'
|
109
|
-
}
|
110
|
-
},
|
111
103
|
tags: {
|
112
104
|
required: false,
|
113
105
|
serialized_name: 'tags',
|
@@ -122,6 +114,13 @@ module Azure::ARM::Redis
|
|
122
114
|
}
|
123
115
|
}
|
124
116
|
},
|
117
|
+
location: {
|
118
|
+
required: true,
|
119
|
+
serialized_name: 'location',
|
120
|
+
type: {
|
121
|
+
name: 'String'
|
122
|
+
}
|
123
|
+
},
|
125
124
|
redis_configuration: {
|
126
125
|
required: false,
|
127
126
|
serialized_name: 'properties.redisConfiguration',
|
@@ -12,7 +12,6 @@ module Azure::ARM::Redis
|
|
12
12
|
|
13
13
|
include MsRestAzure
|
14
14
|
|
15
|
-
include MsRest::JSONable
|
16
15
|
# @return [Hash{String => String}] All Redis Settings. Few possible keys:
|
17
16
|
# rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value
|
18
17
|
# etc.
|
@@ -0,0 +1,67 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ARM::Redis
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The Resource definition.
|
10
|
+
#
|
11
|
+
class Resource
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Resource ID.
|
16
|
+
attr_accessor :id
|
17
|
+
|
18
|
+
# @return [String] Resource name.
|
19
|
+
attr_accessor :name
|
20
|
+
|
21
|
+
# @return [String] Resource type.
|
22
|
+
attr_accessor :type
|
23
|
+
|
24
|
+
|
25
|
+
#
|
26
|
+
# Mapper for Resource class as Ruby Hash.
|
27
|
+
# This will be used for serialization/deserialization.
|
28
|
+
#
|
29
|
+
def self.mapper()
|
30
|
+
{
|
31
|
+
required: false,
|
32
|
+
serialized_name: 'Resource',
|
33
|
+
type: {
|
34
|
+
name: 'Composite',
|
35
|
+
class_name: 'Resource',
|
36
|
+
model_properties: {
|
37
|
+
id: {
|
38
|
+
required: false,
|
39
|
+
read_only: true,
|
40
|
+
serialized_name: 'id',
|
41
|
+
type: {
|
42
|
+
name: 'String'
|
43
|
+
}
|
44
|
+
},
|
45
|
+
name: {
|
46
|
+
required: false,
|
47
|
+
read_only: true,
|
48
|
+
serialized_name: 'name',
|
49
|
+
type: {
|
50
|
+
name: 'String'
|
51
|
+
}
|
52
|
+
},
|
53
|
+
type: {
|
54
|
+
required: false,
|
55
|
+
read_only: true,
|
56
|
+
serialized_name: 'type',
|
57
|
+
type: {
|
58
|
+
name: 'String'
|
59
|
+
}
|
60
|
+
}
|
61
|
+
}
|
62
|
+
}
|
63
|
+
}
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
@@ -12,7 +12,6 @@ module Azure::ARM::Redis
|
|
12
12
|
|
13
13
|
include MsRestAzure
|
14
14
|
|
15
|
-
include MsRest::JSONable
|
16
15
|
# @return [DayOfWeek] Day of the week when a cache can be patched.
|
17
16
|
# Possible values include: 'Monday', 'Tuesday', 'Wednesday', 'Thursday',
|
18
17
|
# 'Friday', 'Saturday', 'Sunday', 'Everyday', 'Weekend'
|
@@ -0,0 +1,85 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ARM::Redis
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The resource model definition for a ARM tracked top level resource
|
10
|
+
#
|
11
|
+
class TrackedResource < Resource
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [Hash{String => String}] Resource tags.
|
16
|
+
attr_accessor :tags
|
17
|
+
|
18
|
+
# @return [String] The geo-location where the resource lives
|
19
|
+
attr_accessor :location
|
20
|
+
|
21
|
+
|
22
|
+
#
|
23
|
+
# Mapper for TrackedResource class as Ruby Hash.
|
24
|
+
# This will be used for serialization/deserialization.
|
25
|
+
#
|
26
|
+
def self.mapper()
|
27
|
+
{
|
28
|
+
required: false,
|
29
|
+
serialized_name: 'TrackedResource',
|
30
|
+
type: {
|
31
|
+
name: 'Composite',
|
32
|
+
class_name: 'TrackedResource',
|
33
|
+
model_properties: {
|
34
|
+
id: {
|
35
|
+
required: false,
|
36
|
+
read_only: true,
|
37
|
+
serialized_name: 'id',
|
38
|
+
type: {
|
39
|
+
name: 'String'
|
40
|
+
}
|
41
|
+
},
|
42
|
+
name: {
|
43
|
+
required: false,
|
44
|
+
read_only: true,
|
45
|
+
serialized_name: 'name',
|
46
|
+
type: {
|
47
|
+
name: 'String'
|
48
|
+
}
|
49
|
+
},
|
50
|
+
type: {
|
51
|
+
required: false,
|
52
|
+
read_only: true,
|
53
|
+
serialized_name: 'type',
|
54
|
+
type: {
|
55
|
+
name: 'String'
|
56
|
+
}
|
57
|
+
},
|
58
|
+
tags: {
|
59
|
+
required: false,
|
60
|
+
serialized_name: 'tags',
|
61
|
+
type: {
|
62
|
+
name: 'Dictionary',
|
63
|
+
value: {
|
64
|
+
required: false,
|
65
|
+
serialized_name: 'StringElementType',
|
66
|
+
type: {
|
67
|
+
name: 'String'
|
68
|
+
}
|
69
|
+
}
|
70
|
+
}
|
71
|
+
},
|
72
|
+
location: {
|
73
|
+
required: true,
|
74
|
+
serialized_name: 'location',
|
75
|
+
type: {
|
76
|
+
name: 'String'
|
77
|
+
}
|
78
|
+
}
|
79
|
+
}
|
80
|
+
}
|
81
|
+
}
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
@@ -0,0 +1,220 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ARM::Redis
|
7
|
+
#
|
8
|
+
# REST API for Azure Redis Cache Service.
|
9
|
+
#
|
10
|
+
class Operations
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the Operations class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [RedisManagementClient] reference to the RedisManagementClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Lists all of the available REST API operations of the Microsoft.Cache
|
26
|
+
# provider.
|
27
|
+
#
|
28
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
29
|
+
# will be added to the HTTP request.
|
30
|
+
#
|
31
|
+
# @return [Array<Operation>] operation results.
|
32
|
+
#
|
33
|
+
def list(custom_headers = nil)
|
34
|
+
first_page = list_as_lazy(custom_headers)
|
35
|
+
first_page.get_all_items
|
36
|
+
end
|
37
|
+
|
38
|
+
#
|
39
|
+
# Lists all of the available REST API operations of the Microsoft.Cache
|
40
|
+
# provider.
|
41
|
+
#
|
42
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
43
|
+
# will be added to the HTTP request.
|
44
|
+
#
|
45
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
46
|
+
#
|
47
|
+
def list_with_http_info(custom_headers = nil)
|
48
|
+
list_async(custom_headers).value!
|
49
|
+
end
|
50
|
+
|
51
|
+
#
|
52
|
+
# Lists all of the available REST API operations of the Microsoft.Cache
|
53
|
+
# provider.
|
54
|
+
#
|
55
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
56
|
+
# to the HTTP request.
|
57
|
+
#
|
58
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
59
|
+
#
|
60
|
+
def list_async(custom_headers = nil)
|
61
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
62
|
+
|
63
|
+
|
64
|
+
request_headers = {}
|
65
|
+
|
66
|
+
# Set Headers
|
67
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
68
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
69
|
+
path_template = 'providers/Microsoft.Cache/operations'
|
70
|
+
|
71
|
+
request_url = @base_url || @client.base_url
|
72
|
+
|
73
|
+
options = {
|
74
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
75
|
+
query_params: {'api-version' => @client.api_version},
|
76
|
+
headers: request_headers.merge(custom_headers || {}),
|
77
|
+
base_url: request_url
|
78
|
+
}
|
79
|
+
promise = @client.make_request_async(:get, path_template, options)
|
80
|
+
|
81
|
+
promise = promise.then do |result|
|
82
|
+
http_response = result.response
|
83
|
+
status_code = http_response.status
|
84
|
+
response_content = http_response.body
|
85
|
+
unless status_code == 200
|
86
|
+
error_model = JSON.load(response_content)
|
87
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
88
|
+
end
|
89
|
+
|
90
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
91
|
+
# Deserialize Response
|
92
|
+
if status_code == 200
|
93
|
+
begin
|
94
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
95
|
+
result_mapper = Azure::ARM::Redis::Models::OperationListResult.mapper()
|
96
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
97
|
+
rescue Exception => e
|
98
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
result
|
103
|
+
end
|
104
|
+
|
105
|
+
promise.execute
|
106
|
+
end
|
107
|
+
|
108
|
+
#
|
109
|
+
# Lists all of the available REST API operations of the Microsoft.Cache
|
110
|
+
# provider.
|
111
|
+
#
|
112
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
113
|
+
# to List operation.
|
114
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
115
|
+
# will be added to the HTTP request.
|
116
|
+
#
|
117
|
+
# @return [OperationListResult] operation results.
|
118
|
+
#
|
119
|
+
def list_next(next_page_link, custom_headers = nil)
|
120
|
+
response = list_next_async(next_page_link, custom_headers).value!
|
121
|
+
response.body unless response.nil?
|
122
|
+
end
|
123
|
+
|
124
|
+
#
|
125
|
+
# Lists all of the available REST API operations of the Microsoft.Cache
|
126
|
+
# provider.
|
127
|
+
#
|
128
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
129
|
+
# to List operation.
|
130
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
131
|
+
# will be added to the HTTP request.
|
132
|
+
#
|
133
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
134
|
+
#
|
135
|
+
def list_next_with_http_info(next_page_link, custom_headers = nil)
|
136
|
+
list_next_async(next_page_link, custom_headers).value!
|
137
|
+
end
|
138
|
+
|
139
|
+
#
|
140
|
+
# Lists all of the available REST API operations of the Microsoft.Cache
|
141
|
+
# provider.
|
142
|
+
#
|
143
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
144
|
+
# to List operation.
|
145
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
146
|
+
# to the HTTP request.
|
147
|
+
#
|
148
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
149
|
+
#
|
150
|
+
def list_next_async(next_page_link, custom_headers = nil)
|
151
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
152
|
+
|
153
|
+
|
154
|
+
request_headers = {}
|
155
|
+
|
156
|
+
# Set Headers
|
157
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
158
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
159
|
+
path_template = '{nextLink}'
|
160
|
+
|
161
|
+
request_url = @base_url || @client.base_url
|
162
|
+
|
163
|
+
options = {
|
164
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
165
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
166
|
+
headers: request_headers.merge(custom_headers || {}),
|
167
|
+
base_url: request_url
|
168
|
+
}
|
169
|
+
promise = @client.make_request_async(:get, path_template, options)
|
170
|
+
|
171
|
+
promise = promise.then do |result|
|
172
|
+
http_response = result.response
|
173
|
+
status_code = http_response.status
|
174
|
+
response_content = http_response.body
|
175
|
+
unless status_code == 200
|
176
|
+
error_model = JSON.load(response_content)
|
177
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
178
|
+
end
|
179
|
+
|
180
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
181
|
+
# Deserialize Response
|
182
|
+
if status_code == 200
|
183
|
+
begin
|
184
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
185
|
+
result_mapper = Azure::ARM::Redis::Models::OperationListResult.mapper()
|
186
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
187
|
+
rescue Exception => e
|
188
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
189
|
+
end
|
190
|
+
end
|
191
|
+
|
192
|
+
result
|
193
|
+
end
|
194
|
+
|
195
|
+
promise.execute
|
196
|
+
end
|
197
|
+
|
198
|
+
#
|
199
|
+
# Lists all of the available REST API operations of the Microsoft.Cache
|
200
|
+
# provider.
|
201
|
+
#
|
202
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
203
|
+
# will be added to the HTTP request.
|
204
|
+
#
|
205
|
+
# @return [OperationListResult] which provide lazy access to pages of the
|
206
|
+
# response.
|
207
|
+
#
|
208
|
+
def list_as_lazy(custom_headers = nil)
|
209
|
+
response = list_async(custom_headers).value!
|
210
|
+
unless response.nil?
|
211
|
+
page = response.body
|
212
|
+
page.next_method = Proc.new do |next_page_link|
|
213
|
+
list_next_async(next_page_link, custom_headers)
|
214
|
+
end
|
215
|
+
page
|
216
|
+
end
|
217
|
+
end
|
218
|
+
|
219
|
+
end
|
220
|
+
end
|