azure_mgmt_event_hub 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/generated/azure_mgmt_event_hub.rb +23 -15
- data/lib/generated/azure_mgmt_event_hub/consumer_groups.rb +123 -111
- data/lib/generated/azure_mgmt_event_hub/event_hub_management_client.rb +6 -2
- data/lib/generated/azure_mgmt_event_hub/event_hubs.rb +240 -218
- data/lib/generated/azure_mgmt_event_hub/models/{resource_list_keys.rb → access_keys.rb} +9 -8
- data/lib/generated/azure_mgmt_event_hub/models/access_rights.rb +1 -1
- data/lib/generated/azure_mgmt_event_hub/models/{shared_access_authorization_rule_create_or_update_parameters.rb → authorization_rule.rb} +21 -19
- data/lib/generated/azure_mgmt_event_hub/models/{shared_access_authorization_rule_list_result.rb → authorization_rule_list_result.rb} +13 -14
- data/lib/generated/azure_mgmt_event_hub/models/capture_description.rb +103 -0
- data/lib/generated/azure_mgmt_event_hub/models/check_name_availability_parameter.rb +45 -0
- data/lib/generated/azure_mgmt_event_hub/models/check_name_availability_result.rb +72 -0
- data/lib/generated/azure_mgmt_event_hub/models/{consumer_group_create_or_update_parameters.rb → consumer_group.rb} +21 -34
- data/lib/generated/azure_mgmt_event_hub/models/consumer_group_list_result.rb +8 -7
- data/lib/generated/azure_mgmt_event_hub/models/destination.rb +79 -0
- data/lib/generated/azure_mgmt_event_hub/models/{namespace_resource.rb → ehnamespace.rb} +54 -11
- data/lib/generated/azure_mgmt_event_hub/models/{namespace_list_result.rb → ehnamespace_list_result.rb} +12 -12
- data/lib/generated/azure_mgmt_event_hub/models/encoding_capture_description.rb +16 -0
- data/lib/generated/azure_mgmt_event_hub/models/entity_status.rb +1 -1
- data/lib/generated/azure_mgmt_event_hub/models/error_response.rb +56 -0
- data/lib/generated/azure_mgmt_event_hub/models/event_hub_list_result.rb +8 -8
- data/lib/generated/azure_mgmt_event_hub/models/{event_hub_resource.rb → eventhub.rb} +43 -43
- data/lib/generated/azure_mgmt_event_hub/models/{policykey.rb → key_type.rb} +3 -3
- data/lib/generated/azure_mgmt_event_hub/models/operation.rb +57 -0
- data/lib/generated/azure_mgmt_event_hub/models/operation_display.rb +69 -0
- data/lib/generated/azure_mgmt_event_hub/models/operation_list_result.rb +99 -0
- data/lib/generated/azure_mgmt_event_hub/models/regenerate_access_key_parameters.rb +59 -0
- data/lib/generated/azure_mgmt_event_hub/models/sku.rb +12 -6
- data/lib/generated/azure_mgmt_event_hub/models/sku_name.rb +1 -1
- data/lib/generated/azure_mgmt_event_hub/models/sku_tier.rb +1 -2
- data/lib/generated/azure_mgmt_event_hub/models/{shared_access_authorization_rule_resource.rb → tracked_resource.rb} +13 -24
- data/lib/generated/azure_mgmt_event_hub/models/unavailable_reason.rb +20 -0
- data/lib/generated/azure_mgmt_event_hub/module_definition.rb +1 -1
- data/lib/generated/azure_mgmt_event_hub/namespaces.rb +480 -251
- data/lib/generated/azure_mgmt_event_hub/operations.rb +213 -0
- data/lib/generated/azure_mgmt_event_hub/version.rb +2 -2
- metadata +25 -17
- data/lib/generated/azure_mgmt_event_hub/models/consumer_group_resource.rb +0 -122
- data/lib/generated/azure_mgmt_event_hub/models/event_hub_create_or_update_parameters.rb +0 -139
- data/lib/generated/azure_mgmt_event_hub/models/namespace_create_or_update_parameters.rb +0 -113
- data/lib/generated/azure_mgmt_event_hub/models/regenerate_keys_parameters.rb +0 -46
@@ -0,0 +1,59 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ARM::EventHub
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Parameters supplied to the Regenerate Authorization Rule operation,
|
10
|
+
# specifies which key neeeds to be reset.
|
11
|
+
#
|
12
|
+
class RegenerateAccessKeyParameters
|
13
|
+
|
14
|
+
include MsRestAzure
|
15
|
+
|
16
|
+
include MsRest::JSONable
|
17
|
+
# @return [KeyType] The access key to regenerate. Possible values
|
18
|
+
# include: 'PrimaryKey', 'SecondaryKey'
|
19
|
+
attr_accessor :key_type
|
20
|
+
|
21
|
+
# @return [String] Optional, if the key value provided, is set for
|
22
|
+
# KeyType or autogenerated Key value set for keyType
|
23
|
+
attr_accessor :key
|
24
|
+
|
25
|
+
|
26
|
+
#
|
27
|
+
# Mapper for RegenerateAccessKeyParameters class as Ruby Hash.
|
28
|
+
# This will be used for serialization/deserialization.
|
29
|
+
#
|
30
|
+
def self.mapper()
|
31
|
+
{
|
32
|
+
required: false,
|
33
|
+
serialized_name: 'RegenerateAccessKeyParameters',
|
34
|
+
type: {
|
35
|
+
name: 'Composite',
|
36
|
+
class_name: 'RegenerateAccessKeyParameters',
|
37
|
+
model_properties: {
|
38
|
+
key_type: {
|
39
|
+
required: true,
|
40
|
+
serialized_name: 'keyType',
|
41
|
+
type: {
|
42
|
+
name: 'Enum',
|
43
|
+
module: 'KeyType'
|
44
|
+
}
|
45
|
+
},
|
46
|
+
key: {
|
47
|
+
required: false,
|
48
|
+
serialized_name: 'key',
|
49
|
+
type: {
|
50
|
+
name: 'String'
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
54
|
+
}
|
55
|
+
}
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -1,26 +1,28 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 1.
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
4
4
|
# regenerated.
|
5
5
|
|
6
6
|
module Azure::ARM::EventHub
|
7
7
|
module Models
|
8
8
|
#
|
9
|
-
# SKU
|
9
|
+
# SKU parameters supplied to the create namespace operation
|
10
10
|
#
|
11
11
|
class Sku
|
12
12
|
|
13
13
|
include MsRestAzure
|
14
14
|
|
15
|
+
include MsRest::JSONable
|
15
16
|
# @return [SkuName] Name of this SKU. Possible values include: 'Basic',
|
16
17
|
# 'Standard'
|
17
18
|
attr_accessor :name
|
18
19
|
|
19
20
|
# @return [SkuTier] The billing tier of this particular SKU. Possible
|
20
|
-
# values include: 'Basic', 'Standard'
|
21
|
+
# values include: 'Basic', 'Standard'
|
21
22
|
attr_accessor :tier
|
22
23
|
|
23
|
-
# @return [Integer] The Event Hubs throughput units
|
24
|
+
# @return [Integer] The Event Hubs throughput units, vaule should be 0 to
|
25
|
+
# 20 throughput units.
|
24
26
|
attr_accessor :capacity
|
25
27
|
|
26
28
|
|
@@ -37,14 +39,14 @@ module Azure::ARM::EventHub
|
|
37
39
|
class_name: 'Sku',
|
38
40
|
model_properties: {
|
39
41
|
name: {
|
40
|
-
required:
|
42
|
+
required: true,
|
41
43
|
serialized_name: 'name',
|
42
44
|
type: {
|
43
45
|
name: 'String'
|
44
46
|
}
|
45
47
|
},
|
46
48
|
tier: {
|
47
|
-
required:
|
49
|
+
required: false,
|
48
50
|
serialized_name: 'tier',
|
49
51
|
type: {
|
50
52
|
name: 'String'
|
@@ -53,6 +55,10 @@ module Azure::ARM::EventHub
|
|
53
55
|
capacity: {
|
54
56
|
required: false,
|
55
57
|
serialized_name: 'capacity',
|
58
|
+
constraints: {
|
59
|
+
InclusiveMaximum: 20,
|
60
|
+
InclusiveMinimum: 0
|
61
|
+
},
|
56
62
|
type: {
|
57
63
|
name: 'Number'
|
58
64
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 1.
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
4
4
|
# regenerated.
|
5
5
|
|
@@ -11,7 +11,6 @@ module Azure::ARM::EventHub
|
|
11
11
|
module SkuTier
|
12
12
|
Basic = "Basic"
|
13
13
|
Standard = "Standard"
|
14
|
-
Premium = "Premium"
|
15
14
|
end
|
16
15
|
end
|
17
16
|
end
|
@@ -1,32 +1,36 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 1.
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
4
4
|
# regenerated.
|
5
5
|
|
6
6
|
module Azure::ARM::EventHub
|
7
7
|
module Models
|
8
8
|
#
|
9
|
-
#
|
9
|
+
# Definition of Resource
|
10
10
|
#
|
11
|
-
class
|
11
|
+
class TrackedResource < MsRestAzure::Resource
|
12
12
|
|
13
13
|
include MsRestAzure
|
14
14
|
|
15
|
-
|
16
|
-
|
15
|
+
include MsRest::JSONable
|
16
|
+
# @return [String] Resource location
|
17
|
+
attr_accessor :location
|
18
|
+
|
19
|
+
# @return [Hash{String => String}] Resource tags
|
20
|
+
attr_accessor :tags
|
17
21
|
|
18
22
|
|
19
23
|
#
|
20
|
-
# Mapper for
|
24
|
+
# Mapper for TrackedResource class as Ruby Hash.
|
21
25
|
# This will be used for serialization/deserialization.
|
22
26
|
#
|
23
27
|
def self.mapper()
|
24
28
|
{
|
25
29
|
required: false,
|
26
|
-
serialized_name: '
|
30
|
+
serialized_name: 'TrackedResource',
|
27
31
|
type: {
|
28
32
|
name: 'Composite',
|
29
|
-
class_name: '
|
33
|
+
class_name: 'TrackedResource',
|
30
34
|
model_properties: {
|
31
35
|
id: {
|
32
36
|
required: false,
|
@@ -53,7 +57,7 @@ module Azure::ARM::EventHub
|
|
53
57
|
}
|
54
58
|
},
|
55
59
|
location: {
|
56
|
-
required:
|
60
|
+
required: false,
|
57
61
|
serialized_name: 'location',
|
58
62
|
type: {
|
59
63
|
name: 'String'
|
@@ -72,21 +76,6 @@ module Azure::ARM::EventHub
|
|
72
76
|
}
|
73
77
|
}
|
74
78
|
}
|
75
|
-
},
|
76
|
-
rights: {
|
77
|
-
required: true,
|
78
|
-
serialized_name: 'properties.rights',
|
79
|
-
type: {
|
80
|
-
name: 'Sequence',
|
81
|
-
element: {
|
82
|
-
required: false,
|
83
|
-
serialized_name: 'AccessRightsElementType',
|
84
|
-
type: {
|
85
|
-
name: 'Enum',
|
86
|
-
module: 'AccessRights'
|
87
|
-
}
|
88
|
-
}
|
89
|
-
}
|
90
79
|
}
|
91
80
|
}
|
92
81
|
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ARM::EventHub
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Defines values for UnavailableReason
|
10
|
+
#
|
11
|
+
module UnavailableReason
|
12
|
+
None = "None"
|
13
|
+
InvalidName = "InvalidName"
|
14
|
+
SubscriptionIsDisabled = "SubscriptionIsDisabled"
|
15
|
+
NameInUse = "NameInUse"
|
16
|
+
NameInLockdown = "NameInLockdown"
|
17
|
+
TooManyNamespaceInCurrentSubscription = "TooManyNamespaceInCurrentSubscription"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 1.
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
4
4
|
# regenerated.
|
5
5
|
|
@@ -8,7 +8,6 @@ module Azure::ARM::EventHub
|
|
8
8
|
# Azure Event Hubs client
|
9
9
|
#
|
10
10
|
class Namespaces
|
11
|
-
include Azure::ARM::EventHub::Models
|
12
11
|
include MsRestAzure
|
13
12
|
|
14
13
|
#
|
@@ -23,21 +22,120 @@ module Azure::ARM::EventHub
|
|
23
22
|
attr_reader :client
|
24
23
|
|
25
24
|
#
|
26
|
-
#
|
25
|
+
# Check the give Namespace name availability.
|
26
|
+
#
|
27
|
+
# @param parameters [CheckNameAvailabilityParameter] Parameters to check
|
28
|
+
# availability of the given Namespace name
|
29
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
30
|
+
# will be added to the HTTP request.
|
31
|
+
#
|
32
|
+
# @return [CheckNameAvailabilityResult] operation results.
|
33
|
+
#
|
34
|
+
def check_name_availability(parameters, custom_headers = nil)
|
35
|
+
response = check_name_availability_async(parameters, custom_headers).value!
|
36
|
+
response.body unless response.nil?
|
37
|
+
end
|
38
|
+
|
39
|
+
#
|
40
|
+
# Check the give Namespace name availability.
|
41
|
+
#
|
42
|
+
# @param parameters [CheckNameAvailabilityParameter] Parameters to check
|
43
|
+
# availability of the given Namespace name
|
44
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
45
|
+
# will be added to the HTTP request.
|
46
|
+
#
|
47
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
48
|
+
#
|
49
|
+
def check_name_availability_with_http_info(parameters, custom_headers = nil)
|
50
|
+
check_name_availability_async(parameters, custom_headers).value!
|
51
|
+
end
|
52
|
+
|
53
|
+
#
|
54
|
+
# Check the give Namespace name availability.
|
55
|
+
#
|
56
|
+
# @param parameters [CheckNameAvailabilityParameter] Parameters to check
|
57
|
+
# availability of the given Namespace name
|
58
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
59
|
+
# to the HTTP request.
|
60
|
+
#
|
61
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
62
|
+
#
|
63
|
+
def check_name_availability_async(parameters, custom_headers = nil)
|
64
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
65
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
66
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
67
|
+
|
68
|
+
|
69
|
+
request_headers = {}
|
70
|
+
|
71
|
+
# Set Headers
|
72
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
73
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
74
|
+
|
75
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
76
|
+
|
77
|
+
# Serialize Request
|
78
|
+
request_mapper = Azure::ARM::EventHub::Models::CheckNameAvailabilityParameter.mapper()
|
79
|
+
request_content = @client.serialize(request_mapper, parameters)
|
80
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
81
|
+
|
82
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.EventHub/CheckNameAvailability'
|
83
|
+
|
84
|
+
request_url = @base_url || @client.base_url
|
85
|
+
|
86
|
+
options = {
|
87
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
88
|
+
path_params: {'subscriptionId' => @client.subscription_id},
|
89
|
+
query_params: {'api-version' => @client.api_version},
|
90
|
+
body: request_content,
|
91
|
+
headers: request_headers.merge(custom_headers || {}),
|
92
|
+
base_url: request_url
|
93
|
+
}
|
94
|
+
promise = @client.make_request_async(:post, path_template, options)
|
95
|
+
|
96
|
+
promise = promise.then do |result|
|
97
|
+
http_response = result.response
|
98
|
+
status_code = http_response.status
|
99
|
+
response_content = http_response.body
|
100
|
+
unless status_code == 200
|
101
|
+
error_model = JSON.load(response_content)
|
102
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
103
|
+
end
|
104
|
+
|
105
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
106
|
+
# Deserialize Response
|
107
|
+
if status_code == 200
|
108
|
+
begin
|
109
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
110
|
+
result_mapper = Azure::ARM::EventHub::Models::CheckNameAvailabilityResult.mapper()
|
111
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
112
|
+
rescue Exception => e
|
113
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
result
|
118
|
+
end
|
119
|
+
|
120
|
+
promise.execute
|
121
|
+
end
|
122
|
+
|
123
|
+
#
|
124
|
+
# Lists all the available Namespaces within a subscription, irrespective of the
|
27
125
|
# resource groups.
|
28
126
|
#
|
29
127
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
30
128
|
# will be added to the HTTP request.
|
31
129
|
#
|
32
|
-
# @return [Array<
|
130
|
+
# @return [Array<EHNamespace>] operation results.
|
33
131
|
#
|
34
|
-
def
|
35
|
-
first_page =
|
132
|
+
def list(custom_headers = nil)
|
133
|
+
first_page = list_as_lazy(custom_headers)
|
36
134
|
first_page.get_all_items
|
37
135
|
end
|
38
136
|
|
39
137
|
#
|
40
|
-
# Lists all the available
|
138
|
+
# Lists all the available Namespaces within a subscription, irrespective of the
|
41
139
|
# resource groups.
|
42
140
|
#
|
43
141
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
@@ -45,12 +143,12 @@ module Azure::ARM::EventHub
|
|
45
143
|
#
|
46
144
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
47
145
|
#
|
48
|
-
def
|
49
|
-
|
146
|
+
def list_with_http_info(custom_headers = nil)
|
147
|
+
list_async(custom_headers).value!
|
50
148
|
end
|
51
149
|
|
52
150
|
#
|
53
|
-
# Lists all the available
|
151
|
+
# Lists all the available Namespaces within a subscription, irrespective of the
|
54
152
|
# resource groups.
|
55
153
|
#
|
56
154
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
@@ -58,7 +156,7 @@ module Azure::ARM::EventHub
|
|
58
156
|
#
|
59
157
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
60
158
|
#
|
61
|
-
def
|
159
|
+
def list_async(custom_headers = nil)
|
62
160
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
63
161
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
64
162
|
|
@@ -68,7 +166,7 @@ module Azure::ARM::EventHub
|
|
68
166
|
# Set Headers
|
69
167
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
70
168
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
71
|
-
path_template = '
|
169
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.EventHub/namespaces'
|
72
170
|
|
73
171
|
request_url = @base_url || @client.base_url
|
74
172
|
|
@@ -87,7 +185,7 @@ module Azure::ARM::EventHub
|
|
87
185
|
response_content = http_response.body
|
88
186
|
unless status_code == 200
|
89
187
|
error_model = JSON.load(response_content)
|
90
|
-
fail
|
188
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
91
189
|
end
|
92
190
|
|
93
191
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -95,8 +193,8 @@ module Azure::ARM::EventHub
|
|
95
193
|
if status_code == 200
|
96
194
|
begin
|
97
195
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
98
|
-
result_mapper =
|
99
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
196
|
+
result_mapper = Azure::ARM::EventHub::Models::EHNamespaceListResult.mapper()
|
197
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
100
198
|
rescue Exception => e
|
101
199
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
102
200
|
end
|
@@ -109,13 +207,14 @@ module Azure::ARM::EventHub
|
|
109
207
|
end
|
110
208
|
|
111
209
|
#
|
112
|
-
# Lists the available
|
210
|
+
# Lists the available Namespaces within a resource group.
|
113
211
|
#
|
114
|
-
# @param resource_group_name [String]
|
212
|
+
# @param resource_group_name [String] Name of the resource group within the
|
213
|
+
# azure subscription.
|
115
214
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
116
215
|
# will be added to the HTTP request.
|
117
216
|
#
|
118
|
-
# @return [Array<
|
217
|
+
# @return [Array<EHNamespace>] operation results.
|
119
218
|
#
|
120
219
|
def list_by_resource_group(resource_group_name, custom_headers = nil)
|
121
220
|
first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers)
|
@@ -123,9 +222,10 @@ module Azure::ARM::EventHub
|
|
123
222
|
end
|
124
223
|
|
125
224
|
#
|
126
|
-
# Lists the available
|
225
|
+
# Lists the available Namespaces within a resource group.
|
127
226
|
#
|
128
|
-
# @param resource_group_name [String]
|
227
|
+
# @param resource_group_name [String] Name of the resource group within the
|
228
|
+
# azure subscription.
|
129
229
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
130
230
|
# will be added to the HTTP request.
|
131
231
|
#
|
@@ -136,9 +236,10 @@ module Azure::ARM::EventHub
|
|
136
236
|
end
|
137
237
|
|
138
238
|
#
|
139
|
-
# Lists the available
|
239
|
+
# Lists the available Namespaces within a resource group.
|
140
240
|
#
|
141
|
-
# @param resource_group_name [String]
|
241
|
+
# @param resource_group_name [String] Name of the resource group within the
|
242
|
+
# azure subscription.
|
142
243
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
143
244
|
# to the HTTP request.
|
144
245
|
#
|
@@ -155,7 +256,7 @@ module Azure::ARM::EventHub
|
|
155
256
|
# Set Headers
|
156
257
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
157
258
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
158
|
-
path_template = '
|
259
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces'
|
159
260
|
|
160
261
|
request_url = @base_url || @client.base_url
|
161
262
|
|
@@ -174,7 +275,7 @@ module Azure::ARM::EventHub
|
|
174
275
|
response_content = http_response.body
|
175
276
|
unless status_code == 200
|
176
277
|
error_model = JSON.load(response_content)
|
177
|
-
fail
|
278
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
178
279
|
end
|
179
280
|
|
180
281
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -182,8 +283,8 @@ module Azure::ARM::EventHub
|
|
182
283
|
if status_code == 200
|
183
284
|
begin
|
184
285
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
185
|
-
result_mapper =
|
186
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
286
|
+
result_mapper = Azure::ARM::EventHub::Models::EHNamespaceListResult.mapper()
|
287
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
187
288
|
rescue Exception => e
|
188
289
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
189
290
|
end
|
@@ -199,14 +300,14 @@ module Azure::ARM::EventHub
|
|
199
300
|
# Creates or updates a namespace. Once created, this namespace's resource
|
200
301
|
# manifest is immutable. This operation is idempotent.
|
201
302
|
#
|
202
|
-
# @param resource_group_name [String]
|
203
|
-
#
|
204
|
-
# @param
|
205
|
-
# a namespace resource.
|
303
|
+
# @param resource_group_name [String] Name of the resource group within the
|
304
|
+
# azure subscription.
|
305
|
+
# @param namespace_name [String] The Namespace name
|
306
|
+
# @param parameters [EHNamespace] Parameters for creating a namespace resource.
|
206
307
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
207
308
|
# will be added to the HTTP request.
|
208
309
|
#
|
209
|
-
# @return [
|
310
|
+
# @return [EHNamespace] operation results.
|
210
311
|
#
|
211
312
|
def create_or_update(resource_group_name, namespace_name, parameters, custom_headers = nil)
|
212
313
|
response = create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers).value!
|
@@ -214,10 +315,10 @@ module Azure::ARM::EventHub
|
|
214
315
|
end
|
215
316
|
|
216
317
|
#
|
217
|
-
# @param resource_group_name [String]
|
218
|
-
#
|
219
|
-
# @param
|
220
|
-
# a namespace resource.
|
318
|
+
# @param resource_group_name [String] Name of the resource group within the
|
319
|
+
# azure subscription.
|
320
|
+
# @param namespace_name [String] The Namespace name
|
321
|
+
# @param parameters [EHNamespace] Parameters for creating a namespace resource.
|
221
322
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
222
323
|
# will be added to the HTTP request.
|
223
324
|
#
|
@@ -231,8 +332,8 @@ module Azure::ARM::EventHub
|
|
231
332
|
promise = promise.then do |response|
|
232
333
|
# Defining deserialization method.
|
233
334
|
deserialize_method = lambda do |parsed_response|
|
234
|
-
result_mapper =
|
235
|
-
parsed_response = @client.deserialize(result_mapper, parsed_response
|
335
|
+
result_mapper = Azure::ARM::EventHub::Models::EHNamespace.mapper()
|
336
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
236
337
|
end
|
237
338
|
|
238
339
|
# Waiting for response.
|
@@ -246,9 +347,9 @@ module Azure::ARM::EventHub
|
|
246
347
|
# Deletes an existing namespace. This operation also removes all associated
|
247
348
|
# resources under the namespace.
|
248
349
|
#
|
249
|
-
# @param resource_group_name [String]
|
250
|
-
#
|
251
|
-
# @param namespace_name [String] The name
|
350
|
+
# @param resource_group_name [String] Name of the resource group within the
|
351
|
+
# azure subscription.
|
352
|
+
# @param namespace_name [String] The Namespace name
|
252
353
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
253
354
|
# will be added to the HTTP request.
|
254
355
|
#
|
@@ -258,9 +359,9 @@ module Azure::ARM::EventHub
|
|
258
359
|
end
|
259
360
|
|
260
361
|
#
|
261
|
-
# @param resource_group_name [String]
|
262
|
-
#
|
263
|
-
# @param namespace_name [String] The name
|
362
|
+
# @param resource_group_name [String] Name of the resource group within the
|
363
|
+
# azure subscription.
|
364
|
+
# @param namespace_name [String] The Namespace name
|
264
365
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
265
366
|
# will be added to the HTTP request.
|
266
367
|
#
|
@@ -286,13 +387,13 @@ module Azure::ARM::EventHub
|
|
286
387
|
#
|
287
388
|
# Gets the description of the specified namespace.
|
288
389
|
#
|
289
|
-
# @param resource_group_name [String]
|
290
|
-
#
|
291
|
-
# @param namespace_name [String] The name
|
390
|
+
# @param resource_group_name [String] Name of the resource group within the
|
391
|
+
# azure subscription.
|
392
|
+
# @param namespace_name [String] The Namespace name
|
292
393
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
293
394
|
# will be added to the HTTP request.
|
294
395
|
#
|
295
|
-
# @return [
|
396
|
+
# @return [EHNamespace] operation results.
|
296
397
|
#
|
297
398
|
def get(resource_group_name, namespace_name, custom_headers = nil)
|
298
399
|
response = get_async(resource_group_name, namespace_name, custom_headers).value!
|
@@ -302,9 +403,9 @@ module Azure::ARM::EventHub
|
|
302
403
|
#
|
303
404
|
# Gets the description of the specified namespace.
|
304
405
|
#
|
305
|
-
# @param resource_group_name [String]
|
306
|
-
#
|
307
|
-
# @param namespace_name [String] The name
|
406
|
+
# @param resource_group_name [String] Name of the resource group within the
|
407
|
+
# azure subscription.
|
408
|
+
# @param namespace_name [String] The Namespace name
|
308
409
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
309
410
|
# will be added to the HTTP request.
|
310
411
|
#
|
@@ -317,9 +418,9 @@ module Azure::ARM::EventHub
|
|
317
418
|
#
|
318
419
|
# Gets the description of the specified namespace.
|
319
420
|
#
|
320
|
-
# @param resource_group_name [String]
|
321
|
-
#
|
322
|
-
# @param namespace_name [String] The name
|
421
|
+
# @param resource_group_name [String] Name of the resource group within the
|
422
|
+
# azure subscription.
|
423
|
+
# @param namespace_name [String] The Namespace name
|
323
424
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
324
425
|
# to the HTTP request.
|
325
426
|
#
|
@@ -337,7 +438,7 @@ module Azure::ARM::EventHub
|
|
337
438
|
# Set Headers
|
338
439
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
339
440
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
340
|
-
path_template = '
|
441
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}'
|
341
442
|
|
342
443
|
request_url = @base_url || @client.base_url
|
343
444
|
|
@@ -354,9 +455,9 @@ module Azure::ARM::EventHub
|
|
354
455
|
http_response = result.response
|
355
456
|
status_code = http_response.status
|
356
457
|
response_content = http_response.body
|
357
|
-
unless status_code == 200
|
458
|
+
unless status_code == 200 || status_code == 201
|
358
459
|
error_model = JSON.load(response_content)
|
359
|
-
fail
|
460
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
360
461
|
end
|
361
462
|
|
362
463
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -364,8 +465,18 @@ module Azure::ARM::EventHub
|
|
364
465
|
if status_code == 200
|
365
466
|
begin
|
366
467
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
367
|
-
result_mapper =
|
368
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
468
|
+
result_mapper = Azure::ARM::EventHub::Models::EHNamespace.mapper()
|
469
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
470
|
+
rescue Exception => e
|
471
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
472
|
+
end
|
473
|
+
end
|
474
|
+
# Deserialize Response
|
475
|
+
if status_code == 201
|
476
|
+
begin
|
477
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
478
|
+
result_mapper = Azure::ARM::EventHub::Models::EHNamespace.mapper()
|
479
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
369
480
|
rescue Exception => e
|
370
481
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
371
482
|
end
|
@@ -378,15 +489,135 @@ module Azure::ARM::EventHub
|
|
378
489
|
end
|
379
490
|
|
380
491
|
#
|
381
|
-
#
|
492
|
+
# Creates or updates a namespace. Once created, this namespace's resource
|
493
|
+
# manifest is immutable. This operation is idempotent.
|
382
494
|
#
|
383
|
-
# @param resource_group_name [String]
|
384
|
-
#
|
385
|
-
# @param namespace_name [String] The
|
495
|
+
# @param resource_group_name [String] Name of the resource group within the
|
496
|
+
# azure subscription.
|
497
|
+
# @param namespace_name [String] The Namespace name
|
498
|
+
# @param parameters [EHNamespace] Parameters for updating a namespace resource.
|
386
499
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
387
500
|
# will be added to the HTTP request.
|
388
501
|
#
|
389
|
-
# @return [
|
502
|
+
# @return [EHNamespace] operation results.
|
503
|
+
#
|
504
|
+
def update(resource_group_name, namespace_name, parameters, custom_headers = nil)
|
505
|
+
response = update_async(resource_group_name, namespace_name, parameters, custom_headers).value!
|
506
|
+
response.body unless response.nil?
|
507
|
+
end
|
508
|
+
|
509
|
+
#
|
510
|
+
# Creates or updates a namespace. Once created, this namespace's resource
|
511
|
+
# manifest is immutable. This operation is idempotent.
|
512
|
+
#
|
513
|
+
# @param resource_group_name [String] Name of the resource group within the
|
514
|
+
# azure subscription.
|
515
|
+
# @param namespace_name [String] The Namespace name
|
516
|
+
# @param parameters [EHNamespace] Parameters for updating a namespace resource.
|
517
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
518
|
+
# will be added to the HTTP request.
|
519
|
+
#
|
520
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
521
|
+
#
|
522
|
+
def update_with_http_info(resource_group_name, namespace_name, parameters, custom_headers = nil)
|
523
|
+
update_async(resource_group_name, namespace_name, parameters, custom_headers).value!
|
524
|
+
end
|
525
|
+
|
526
|
+
#
|
527
|
+
# Creates or updates a namespace. Once created, this namespace's resource
|
528
|
+
# manifest is immutable. This operation is idempotent.
|
529
|
+
#
|
530
|
+
# @param resource_group_name [String] Name of the resource group within the
|
531
|
+
# azure subscription.
|
532
|
+
# @param namespace_name [String] The Namespace name
|
533
|
+
# @param parameters [EHNamespace] Parameters for updating a namespace resource.
|
534
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
535
|
+
# to the HTTP request.
|
536
|
+
#
|
537
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
538
|
+
#
|
539
|
+
def update_async(resource_group_name, namespace_name, parameters, custom_headers = nil)
|
540
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
541
|
+
fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
|
542
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
543
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
544
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
545
|
+
|
546
|
+
|
547
|
+
request_headers = {}
|
548
|
+
|
549
|
+
# Set Headers
|
550
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
551
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
552
|
+
|
553
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
554
|
+
|
555
|
+
# Serialize Request
|
556
|
+
request_mapper = Azure::ARM::EventHub::Models::EHNamespace.mapper()
|
557
|
+
request_content = @client.serialize(request_mapper, parameters)
|
558
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
559
|
+
|
560
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}'
|
561
|
+
|
562
|
+
request_url = @base_url || @client.base_url
|
563
|
+
|
564
|
+
options = {
|
565
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
566
|
+
path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id},
|
567
|
+
query_params: {'api-version' => @client.api_version},
|
568
|
+
body: request_content,
|
569
|
+
headers: request_headers.merge(custom_headers || {}),
|
570
|
+
base_url: request_url
|
571
|
+
}
|
572
|
+
promise = @client.make_request_async(:patch, path_template, options)
|
573
|
+
|
574
|
+
promise = promise.then do |result|
|
575
|
+
http_response = result.response
|
576
|
+
status_code = http_response.status
|
577
|
+
response_content = http_response.body
|
578
|
+
unless status_code == 201 || status_code == 200 || status_code == 202
|
579
|
+
error_model = JSON.load(response_content)
|
580
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
581
|
+
end
|
582
|
+
|
583
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
584
|
+
# Deserialize Response
|
585
|
+
if status_code == 201
|
586
|
+
begin
|
587
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
588
|
+
result_mapper = Azure::ARM::EventHub::Models::EHNamespace.mapper()
|
589
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
590
|
+
rescue Exception => e
|
591
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
592
|
+
end
|
593
|
+
end
|
594
|
+
# Deserialize Response
|
595
|
+
if status_code == 200
|
596
|
+
begin
|
597
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
598
|
+
result_mapper = Azure::ARM::EventHub::Models::EHNamespace.mapper()
|
599
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
600
|
+
rescue Exception => e
|
601
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
602
|
+
end
|
603
|
+
end
|
604
|
+
|
605
|
+
result
|
606
|
+
end
|
607
|
+
|
608
|
+
promise.execute
|
609
|
+
end
|
610
|
+
|
611
|
+
#
|
612
|
+
# Gets a list of authorization rules for a Namespace.
|
613
|
+
#
|
614
|
+
# @param resource_group_name [String] Name of the resource group within the
|
615
|
+
# azure subscription.
|
616
|
+
# @param namespace_name [String] The Namespace name
|
617
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
618
|
+
# will be added to the HTTP request.
|
619
|
+
#
|
620
|
+
# @return [Array<AuthorizationRule>] operation results.
|
390
621
|
#
|
391
622
|
def list_authorization_rules(resource_group_name, namespace_name, custom_headers = nil)
|
392
623
|
first_page = list_authorization_rules_as_lazy(resource_group_name, namespace_name, custom_headers)
|
@@ -394,11 +625,11 @@ module Azure::ARM::EventHub
|
|
394
625
|
end
|
395
626
|
|
396
627
|
#
|
397
|
-
# Gets a list of authorization rules for a
|
628
|
+
# Gets a list of authorization rules for a Namespace.
|
398
629
|
#
|
399
|
-
# @param resource_group_name [String]
|
400
|
-
#
|
401
|
-
# @param namespace_name [String] The
|
630
|
+
# @param resource_group_name [String] Name of the resource group within the
|
631
|
+
# azure subscription.
|
632
|
+
# @param namespace_name [String] The Namespace name
|
402
633
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
403
634
|
# will be added to the HTTP request.
|
404
635
|
#
|
@@ -409,11 +640,11 @@ module Azure::ARM::EventHub
|
|
409
640
|
end
|
410
641
|
|
411
642
|
#
|
412
|
-
# Gets a list of authorization rules for a
|
643
|
+
# Gets a list of authorization rules for a Namespace.
|
413
644
|
#
|
414
|
-
# @param resource_group_name [String]
|
415
|
-
#
|
416
|
-
# @param namespace_name [String] The
|
645
|
+
# @param resource_group_name [String] Name of the resource group within the
|
646
|
+
# azure subscription.
|
647
|
+
# @param namespace_name [String] The Namespace name
|
417
648
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
418
649
|
# to the HTTP request.
|
419
650
|
#
|
@@ -431,7 +662,7 @@ module Azure::ARM::EventHub
|
|
431
662
|
# Set Headers
|
432
663
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
433
664
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
434
|
-
path_template = '
|
665
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/AuthorizationRules'
|
435
666
|
|
436
667
|
request_url = @base_url || @client.base_url
|
437
668
|
|
@@ -450,7 +681,7 @@ module Azure::ARM::EventHub
|
|
450
681
|
response_content = http_response.body
|
451
682
|
unless status_code == 200
|
452
683
|
error_model = JSON.load(response_content)
|
453
|
-
fail
|
684
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
454
685
|
end
|
455
686
|
|
456
687
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -458,8 +689,8 @@ module Azure::ARM::EventHub
|
|
458
689
|
if status_code == 200
|
459
690
|
begin
|
460
691
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
461
|
-
result_mapper =
|
462
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
692
|
+
result_mapper = Azure::ARM::EventHub::Models::AuthorizationRuleListResult.mapper()
|
693
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
463
694
|
rescue Exception => e
|
464
695
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
465
696
|
end
|
@@ -472,18 +703,17 @@ module Azure::ARM::EventHub
|
|
472
703
|
end
|
473
704
|
|
474
705
|
#
|
475
|
-
# Creates or updates an
|
706
|
+
# Creates or updates an AuthorizationRule for a Namespace.
|
476
707
|
#
|
477
|
-
# @param resource_group_name [String]
|
478
|
-
#
|
479
|
-
# @param namespace_name [String] The
|
480
|
-
# @param authorization_rule_name [String]
|
481
|
-
# @param parameters [
|
482
|
-
# shared access authorization rule.
|
708
|
+
# @param resource_group_name [String] Name of the resource group within the
|
709
|
+
# azure subscription.
|
710
|
+
# @param namespace_name [String] The Namespace name
|
711
|
+
# @param authorization_rule_name [String] The authorization rule name.
|
712
|
+
# @param parameters [AuthorizationRule] The shared access AuthorizationRule.
|
483
713
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
484
714
|
# will be added to the HTTP request.
|
485
715
|
#
|
486
|
-
# @return [
|
716
|
+
# @return [AuthorizationRule] operation results.
|
487
717
|
#
|
488
718
|
def create_or_update_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers = nil)
|
489
719
|
response = create_or_update_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers).value!
|
@@ -491,14 +721,13 @@ module Azure::ARM::EventHub
|
|
491
721
|
end
|
492
722
|
|
493
723
|
#
|
494
|
-
# Creates or updates an
|
724
|
+
# Creates or updates an AuthorizationRule for a Namespace.
|
495
725
|
#
|
496
|
-
# @param resource_group_name [String]
|
497
|
-
#
|
498
|
-
# @param namespace_name [String] The
|
499
|
-
# @param authorization_rule_name [String]
|
500
|
-
# @param parameters [
|
501
|
-
# shared access authorization rule.
|
726
|
+
# @param resource_group_name [String] Name of the resource group within the
|
727
|
+
# azure subscription.
|
728
|
+
# @param namespace_name [String] The Namespace name
|
729
|
+
# @param authorization_rule_name [String] The authorization rule name.
|
730
|
+
# @param parameters [AuthorizationRule] The shared access AuthorizationRule.
|
502
731
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
503
732
|
# will be added to the HTTP request.
|
504
733
|
#
|
@@ -509,14 +738,13 @@ module Azure::ARM::EventHub
|
|
509
738
|
end
|
510
739
|
|
511
740
|
#
|
512
|
-
# Creates or updates an
|
741
|
+
# Creates or updates an AuthorizationRule for a Namespace.
|
513
742
|
#
|
514
|
-
# @param resource_group_name [String]
|
515
|
-
#
|
516
|
-
# @param namespace_name [String] The
|
517
|
-
# @param authorization_rule_name [String]
|
518
|
-
# @param parameters [
|
519
|
-
# shared access authorization rule.
|
743
|
+
# @param resource_group_name [String] Name of the resource group within the
|
744
|
+
# azure subscription.
|
745
|
+
# @param namespace_name [String] The Namespace name
|
746
|
+
# @param authorization_rule_name [String] The authorization rule name.
|
747
|
+
# @param parameters [AuthorizationRule] The shared access AuthorizationRule.
|
520
748
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
521
749
|
# to the HTTP request.
|
522
750
|
#
|
@@ -540,11 +768,11 @@ module Azure::ARM::EventHub
|
|
540
768
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
541
769
|
|
542
770
|
# Serialize Request
|
543
|
-
request_mapper =
|
544
|
-
request_content = @client.serialize(request_mapper, parameters
|
771
|
+
request_mapper = Azure::ARM::EventHub::Models::AuthorizationRule.mapper()
|
772
|
+
request_content = @client.serialize(request_mapper, parameters)
|
545
773
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
546
774
|
|
547
|
-
path_template = '
|
775
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}'
|
548
776
|
|
549
777
|
request_url = @base_url || @client.base_url
|
550
778
|
|
@@ -564,7 +792,7 @@ module Azure::ARM::EventHub
|
|
564
792
|
response_content = http_response.body
|
565
793
|
unless status_code == 200
|
566
794
|
error_model = JSON.load(response_content)
|
567
|
-
fail
|
795
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
568
796
|
end
|
569
797
|
|
570
798
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -572,8 +800,8 @@ module Azure::ARM::EventHub
|
|
572
800
|
if status_code == 200
|
573
801
|
begin
|
574
802
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
575
|
-
result_mapper =
|
576
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
803
|
+
result_mapper = Azure::ARM::EventHub::Models::AuthorizationRule.mapper()
|
804
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
577
805
|
rescue Exception => e
|
578
806
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
579
807
|
end
|
@@ -586,12 +814,12 @@ module Azure::ARM::EventHub
|
|
586
814
|
end
|
587
815
|
|
588
816
|
#
|
589
|
-
# Deletes an
|
817
|
+
# Deletes an AuthorizationRule for a Namespace.
|
590
818
|
#
|
591
|
-
# @param resource_group_name [String]
|
592
|
-
#
|
593
|
-
# @param namespace_name [String] The
|
594
|
-
# @param authorization_rule_name [String]
|
819
|
+
# @param resource_group_name [String] Name of the resource group within the
|
820
|
+
# azure subscription.
|
821
|
+
# @param namespace_name [String] The Namespace name
|
822
|
+
# @param authorization_rule_name [String] The authorization rule name.
|
595
823
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
596
824
|
# will be added to the HTTP request.
|
597
825
|
#
|
@@ -602,12 +830,12 @@ module Azure::ARM::EventHub
|
|
602
830
|
end
|
603
831
|
|
604
832
|
#
|
605
|
-
# Deletes an
|
833
|
+
# Deletes an AuthorizationRule for a Namespace.
|
606
834
|
#
|
607
|
-
# @param resource_group_name [String]
|
608
|
-
#
|
609
|
-
# @param namespace_name [String] The
|
610
|
-
# @param authorization_rule_name [String]
|
835
|
+
# @param resource_group_name [String] Name of the resource group within the
|
836
|
+
# azure subscription.
|
837
|
+
# @param namespace_name [String] The Namespace name
|
838
|
+
# @param authorization_rule_name [String] The authorization rule name.
|
611
839
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
612
840
|
# will be added to the HTTP request.
|
613
841
|
#
|
@@ -618,12 +846,12 @@ module Azure::ARM::EventHub
|
|
618
846
|
end
|
619
847
|
|
620
848
|
#
|
621
|
-
# Deletes an
|
849
|
+
# Deletes an AuthorizationRule for a Namespace.
|
622
850
|
#
|
623
|
-
# @param resource_group_name [String]
|
624
|
-
#
|
625
|
-
# @param namespace_name [String] The
|
626
|
-
# @param authorization_rule_name [String]
|
851
|
+
# @param resource_group_name [String] Name of the resource group within the
|
852
|
+
# azure subscription.
|
853
|
+
# @param namespace_name [String] The Namespace name
|
854
|
+
# @param authorization_rule_name [String] The authorization rule name.
|
627
855
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
628
856
|
# to the HTTP request.
|
629
857
|
#
|
@@ -642,7 +870,7 @@ module Azure::ARM::EventHub
|
|
642
870
|
# Set Headers
|
643
871
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
644
872
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
645
|
-
path_template = '
|
873
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}'
|
646
874
|
|
647
875
|
request_url = @base_url || @client.base_url
|
648
876
|
|
@@ -661,7 +889,7 @@ module Azure::ARM::EventHub
|
|
661
889
|
response_content = http_response.body
|
662
890
|
unless status_code == 204 || status_code == 200
|
663
891
|
error_model = JSON.load(response_content)
|
664
|
-
fail
|
892
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
665
893
|
end
|
666
894
|
|
667
895
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -673,16 +901,16 @@ module Azure::ARM::EventHub
|
|
673
901
|
end
|
674
902
|
|
675
903
|
#
|
676
|
-
# Gets an
|
904
|
+
# Gets an AuthorizationRule for a Namespace by rule name.
|
677
905
|
#
|
678
|
-
# @param resource_group_name [String]
|
679
|
-
#
|
680
|
-
# @param namespace_name [String] The
|
681
|
-
# @param authorization_rule_name [String]
|
906
|
+
# @param resource_group_name [String] Name of the resource group within the
|
907
|
+
# azure subscription.
|
908
|
+
# @param namespace_name [String] The Namespace name
|
909
|
+
# @param authorization_rule_name [String] The authorization rule name.
|
682
910
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
683
911
|
# will be added to the HTTP request.
|
684
912
|
#
|
685
|
-
# @return [
|
913
|
+
# @return [AuthorizationRule] operation results.
|
686
914
|
#
|
687
915
|
def get_authorization_rule(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil)
|
688
916
|
response = get_authorization_rule_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers).value!
|
@@ -690,12 +918,12 @@ module Azure::ARM::EventHub
|
|
690
918
|
end
|
691
919
|
|
692
920
|
#
|
693
|
-
# Gets an
|
921
|
+
# Gets an AuthorizationRule for a Namespace by rule name.
|
694
922
|
#
|
695
|
-
# @param resource_group_name [String]
|
696
|
-
#
|
697
|
-
# @param namespace_name [String] The
|
698
|
-
# @param authorization_rule_name [String]
|
923
|
+
# @param resource_group_name [String] Name of the resource group within the
|
924
|
+
# azure subscription.
|
925
|
+
# @param namespace_name [String] The Namespace name
|
926
|
+
# @param authorization_rule_name [String] The authorization rule name.
|
699
927
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
700
928
|
# will be added to the HTTP request.
|
701
929
|
#
|
@@ -706,12 +934,12 @@ module Azure::ARM::EventHub
|
|
706
934
|
end
|
707
935
|
|
708
936
|
#
|
709
|
-
# Gets an
|
937
|
+
# Gets an AuthorizationRule for a Namespace by rule name.
|
710
938
|
#
|
711
|
-
# @param resource_group_name [String]
|
712
|
-
#
|
713
|
-
# @param namespace_name [String] The
|
714
|
-
# @param authorization_rule_name [String]
|
939
|
+
# @param resource_group_name [String] Name of the resource group within the
|
940
|
+
# azure subscription.
|
941
|
+
# @param namespace_name [String] The Namespace name
|
942
|
+
# @param authorization_rule_name [String] The authorization rule name.
|
715
943
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
716
944
|
# to the HTTP request.
|
717
945
|
#
|
@@ -730,7 +958,7 @@ module Azure::ARM::EventHub
|
|
730
958
|
# Set Headers
|
731
959
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
732
960
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
733
|
-
path_template = '
|
961
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}'
|
734
962
|
|
735
963
|
request_url = @base_url || @client.base_url
|
736
964
|
|
@@ -749,7 +977,7 @@ module Azure::ARM::EventHub
|
|
749
977
|
response_content = http_response.body
|
750
978
|
unless status_code == 200
|
751
979
|
error_model = JSON.load(response_content)
|
752
|
-
fail
|
980
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
753
981
|
end
|
754
982
|
|
755
983
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -757,8 +985,8 @@ module Azure::ARM::EventHub
|
|
757
985
|
if status_code == 200
|
758
986
|
begin
|
759
987
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
760
|
-
result_mapper =
|
761
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
988
|
+
result_mapper = Azure::ARM::EventHub::Models::AuthorizationRule.mapper()
|
989
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
762
990
|
rescue Exception => e
|
763
991
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
764
992
|
end
|
@@ -771,16 +999,16 @@ module Azure::ARM::EventHub
|
|
771
999
|
end
|
772
1000
|
|
773
1001
|
#
|
774
|
-
# Gets the primary and secondary connection strings for the
|
1002
|
+
# Gets the primary and secondary connection strings for the Namespace.
|
775
1003
|
#
|
776
|
-
# @param resource_group_name [String]
|
777
|
-
#
|
778
|
-
# @param namespace_name [String] The
|
1004
|
+
# @param resource_group_name [String] Name of the resource group within the
|
1005
|
+
# azure subscription.
|
1006
|
+
# @param namespace_name [String] The Namespace name
|
779
1007
|
# @param authorization_rule_name [String] The authorization rule name.
|
780
1008
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
781
1009
|
# will be added to the HTTP request.
|
782
1010
|
#
|
783
|
-
# @return [
|
1011
|
+
# @return [AccessKeys] operation results.
|
784
1012
|
#
|
785
1013
|
def list_keys(resource_group_name, namespace_name, authorization_rule_name, custom_headers = nil)
|
786
1014
|
response = list_keys_async(resource_group_name, namespace_name, authorization_rule_name, custom_headers).value!
|
@@ -788,11 +1016,11 @@ module Azure::ARM::EventHub
|
|
788
1016
|
end
|
789
1017
|
|
790
1018
|
#
|
791
|
-
# Gets the primary and secondary connection strings for the
|
1019
|
+
# Gets the primary and secondary connection strings for the Namespace.
|
792
1020
|
#
|
793
|
-
# @param resource_group_name [String]
|
794
|
-
#
|
795
|
-
# @param namespace_name [String] The
|
1021
|
+
# @param resource_group_name [String] Name of the resource group within the
|
1022
|
+
# azure subscription.
|
1023
|
+
# @param namespace_name [String] The Namespace name
|
796
1024
|
# @param authorization_rule_name [String] The authorization rule name.
|
797
1025
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
798
1026
|
# will be added to the HTTP request.
|
@@ -804,11 +1032,11 @@ module Azure::ARM::EventHub
|
|
804
1032
|
end
|
805
1033
|
|
806
1034
|
#
|
807
|
-
# Gets the primary and secondary connection strings for the
|
1035
|
+
# Gets the primary and secondary connection strings for the Namespace.
|
808
1036
|
#
|
809
|
-
# @param resource_group_name [String]
|
810
|
-
#
|
811
|
-
# @param namespace_name [String] The
|
1037
|
+
# @param resource_group_name [String] Name of the resource group within the
|
1038
|
+
# azure subscription.
|
1039
|
+
# @param namespace_name [String] The Namespace name
|
812
1040
|
# @param authorization_rule_name [String] The authorization rule name.
|
813
1041
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
814
1042
|
# to the HTTP request.
|
@@ -828,7 +1056,7 @@ module Azure::ARM::EventHub
|
|
828
1056
|
# Set Headers
|
829
1057
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
830
1058
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
831
|
-
path_template = '
|
1059
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/listKeys'
|
832
1060
|
|
833
1061
|
request_url = @base_url || @client.base_url
|
834
1062
|
|
@@ -847,7 +1075,7 @@ module Azure::ARM::EventHub
|
|
847
1075
|
response_content = http_response.body
|
848
1076
|
unless status_code == 200
|
849
1077
|
error_model = JSON.load(response_content)
|
850
|
-
fail
|
1078
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
851
1079
|
end
|
852
1080
|
|
853
1081
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -855,8 +1083,8 @@ module Azure::ARM::EventHub
|
|
855
1083
|
if status_code == 200
|
856
1084
|
begin
|
857
1085
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
858
|
-
result_mapper =
|
859
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
1086
|
+
result_mapper = Azure::ARM::EventHub::Models::AccessKeys.mapper()
|
1087
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
860
1088
|
rescue Exception => e
|
861
1089
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
862
1090
|
end
|
@@ -870,18 +1098,18 @@ module Azure::ARM::EventHub
|
|
870
1098
|
|
871
1099
|
#
|
872
1100
|
# Regenerates the primary or secondary connection strings for the specified
|
873
|
-
#
|
1101
|
+
# Namespace.
|
874
1102
|
#
|
875
|
-
# @param resource_group_name [String]
|
876
|
-
#
|
877
|
-
# @param namespace_name [String] The
|
1103
|
+
# @param resource_group_name [String] Name of the resource group within the
|
1104
|
+
# azure subscription.
|
1105
|
+
# @param namespace_name [String] The Namespace name
|
878
1106
|
# @param authorization_rule_name [String] The authorization rule name.
|
879
|
-
# @param parameters [
|
1107
|
+
# @param parameters [RegenerateAccessKeyParameters] Parameters required to
|
880
1108
|
# regenerate the connection string.
|
881
1109
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
882
1110
|
# will be added to the HTTP request.
|
883
1111
|
#
|
884
|
-
# @return [
|
1112
|
+
# @return [AccessKeys] operation results.
|
885
1113
|
#
|
886
1114
|
def regenerate_keys(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers = nil)
|
887
1115
|
response = regenerate_keys_async(resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers).value!
|
@@ -890,13 +1118,13 @@ module Azure::ARM::EventHub
|
|
890
1118
|
|
891
1119
|
#
|
892
1120
|
# Regenerates the primary or secondary connection strings for the specified
|
893
|
-
#
|
1121
|
+
# Namespace.
|
894
1122
|
#
|
895
|
-
# @param resource_group_name [String]
|
896
|
-
#
|
897
|
-
# @param namespace_name [String] The
|
1123
|
+
# @param resource_group_name [String] Name of the resource group within the
|
1124
|
+
# azure subscription.
|
1125
|
+
# @param namespace_name [String] The Namespace name
|
898
1126
|
# @param authorization_rule_name [String] The authorization rule name.
|
899
|
-
# @param parameters [
|
1127
|
+
# @param parameters [RegenerateAccessKeyParameters] Parameters required to
|
900
1128
|
# regenerate the connection string.
|
901
1129
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
902
1130
|
# will be added to the HTTP request.
|
@@ -909,13 +1137,13 @@ module Azure::ARM::EventHub
|
|
909
1137
|
|
910
1138
|
#
|
911
1139
|
# Regenerates the primary or secondary connection strings for the specified
|
912
|
-
#
|
1140
|
+
# Namespace.
|
913
1141
|
#
|
914
|
-
# @param resource_group_name [String]
|
915
|
-
#
|
916
|
-
# @param namespace_name [String] The
|
1142
|
+
# @param resource_group_name [String] Name of the resource group within the
|
1143
|
+
# azure subscription.
|
1144
|
+
# @param namespace_name [String] The Namespace name
|
917
1145
|
# @param authorization_rule_name [String] The authorization rule name.
|
918
|
-
# @param parameters [
|
1146
|
+
# @param parameters [RegenerateAccessKeyParameters] Parameters required to
|
919
1147
|
# regenerate the connection string.
|
920
1148
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
921
1149
|
# to the HTTP request.
|
@@ -940,11 +1168,11 @@ module Azure::ARM::EventHub
|
|
940
1168
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
941
1169
|
|
942
1170
|
# Serialize Request
|
943
|
-
request_mapper =
|
944
|
-
request_content = @client.serialize(request_mapper, parameters
|
1171
|
+
request_mapper = Azure::ARM::EventHub::Models::RegenerateAccessKeyParameters.mapper()
|
1172
|
+
request_content = @client.serialize(request_mapper, parameters)
|
945
1173
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
946
1174
|
|
947
|
-
path_template = '
|
1175
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys'
|
948
1176
|
|
949
1177
|
request_url = @base_url || @client.base_url
|
950
1178
|
|
@@ -964,7 +1192,7 @@ module Azure::ARM::EventHub
|
|
964
1192
|
response_content = http_response.body
|
965
1193
|
unless status_code == 200
|
966
1194
|
error_model = JSON.load(response_content)
|
967
|
-
fail
|
1195
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
968
1196
|
end
|
969
1197
|
|
970
1198
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -972,8 +1200,8 @@ module Azure::ARM::EventHub
|
|
972
1200
|
if status_code == 200
|
973
1201
|
begin
|
974
1202
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
975
|
-
result_mapper =
|
976
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
1203
|
+
result_mapper = Azure::ARM::EventHub::Models::AccessKeys.mapper()
|
1204
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
977
1205
|
rescue Exception => e
|
978
1206
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
979
1207
|
end
|
@@ -989,14 +1217,14 @@ module Azure::ARM::EventHub
|
|
989
1217
|
# Creates or updates a namespace. Once created, this namespace's resource
|
990
1218
|
# manifest is immutable. This operation is idempotent.
|
991
1219
|
#
|
992
|
-
# @param resource_group_name [String]
|
993
|
-
#
|
994
|
-
# @param
|
995
|
-
# a namespace resource.
|
1220
|
+
# @param resource_group_name [String] Name of the resource group within the
|
1221
|
+
# azure subscription.
|
1222
|
+
# @param namespace_name [String] The Namespace name
|
1223
|
+
# @param parameters [EHNamespace] Parameters for creating a namespace resource.
|
996
1224
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
997
1225
|
# will be added to the HTTP request.
|
998
1226
|
#
|
999
|
-
# @return [
|
1227
|
+
# @return [EHNamespace] operation results.
|
1000
1228
|
#
|
1001
1229
|
def begin_create_or_update(resource_group_name, namespace_name, parameters, custom_headers = nil)
|
1002
1230
|
response = begin_create_or_update_async(resource_group_name, namespace_name, parameters, custom_headers).value!
|
@@ -1007,10 +1235,10 @@ module Azure::ARM::EventHub
|
|
1007
1235
|
# Creates or updates a namespace. Once created, this namespace's resource
|
1008
1236
|
# manifest is immutable. This operation is idempotent.
|
1009
1237
|
#
|
1010
|
-
# @param resource_group_name [String]
|
1011
|
-
#
|
1012
|
-
# @param
|
1013
|
-
# a namespace resource.
|
1238
|
+
# @param resource_group_name [String] Name of the resource group within the
|
1239
|
+
# azure subscription.
|
1240
|
+
# @param namespace_name [String] The Namespace name
|
1241
|
+
# @param parameters [EHNamespace] Parameters for creating a namespace resource.
|
1014
1242
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1015
1243
|
# will be added to the HTTP request.
|
1016
1244
|
#
|
@@ -1024,10 +1252,10 @@ module Azure::ARM::EventHub
|
|
1024
1252
|
# Creates or updates a namespace. Once created, this namespace's resource
|
1025
1253
|
# manifest is immutable. This operation is idempotent.
|
1026
1254
|
#
|
1027
|
-
# @param resource_group_name [String]
|
1028
|
-
#
|
1029
|
-
# @param
|
1030
|
-
# a namespace resource.
|
1255
|
+
# @param resource_group_name [String] Name of the resource group within the
|
1256
|
+
# azure subscription.
|
1257
|
+
# @param namespace_name [String] The Namespace name
|
1258
|
+
# @param parameters [EHNamespace] Parameters for creating a namespace resource.
|
1031
1259
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1032
1260
|
# to the HTTP request.
|
1033
1261
|
#
|
@@ -1050,11 +1278,11 @@ module Azure::ARM::EventHub
|
|
1050
1278
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1051
1279
|
|
1052
1280
|
# Serialize Request
|
1053
|
-
request_mapper =
|
1054
|
-
request_content = @client.serialize(request_mapper, parameters
|
1281
|
+
request_mapper = Azure::ARM::EventHub::Models::EHNamespace.mapper()
|
1282
|
+
request_content = @client.serialize(request_mapper, parameters)
|
1055
1283
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
1056
1284
|
|
1057
|
-
path_template = '
|
1285
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}'
|
1058
1286
|
|
1059
1287
|
request_url = @base_url || @client.base_url
|
1060
1288
|
|
@@ -1074,7 +1302,7 @@ module Azure::ARM::EventHub
|
|
1074
1302
|
response_content = http_response.body
|
1075
1303
|
unless status_code == 201 || status_code == 200 || status_code == 202
|
1076
1304
|
error_model = JSON.load(response_content)
|
1077
|
-
fail
|
1305
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
1078
1306
|
end
|
1079
1307
|
|
1080
1308
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -1082,8 +1310,8 @@ module Azure::ARM::EventHub
|
|
1082
1310
|
if status_code == 201
|
1083
1311
|
begin
|
1084
1312
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1085
|
-
result_mapper =
|
1086
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
1313
|
+
result_mapper = Azure::ARM::EventHub::Models::EHNamespace.mapper()
|
1314
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1087
1315
|
rescue Exception => e
|
1088
1316
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1089
1317
|
end
|
@@ -1092,8 +1320,8 @@ module Azure::ARM::EventHub
|
|
1092
1320
|
if status_code == 200
|
1093
1321
|
begin
|
1094
1322
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1095
|
-
result_mapper =
|
1096
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
1323
|
+
result_mapper = Azure::ARM::EventHub::Models::EHNamespace.mapper()
|
1324
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1097
1325
|
rescue Exception => e
|
1098
1326
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1099
1327
|
end
|
@@ -1109,9 +1337,9 @@ module Azure::ARM::EventHub
|
|
1109
1337
|
# Deletes an existing namespace. This operation also removes all associated
|
1110
1338
|
# resources under the namespace.
|
1111
1339
|
#
|
1112
|
-
# @param resource_group_name [String]
|
1113
|
-
#
|
1114
|
-
# @param namespace_name [String] The name
|
1340
|
+
# @param resource_group_name [String] Name of the resource group within the
|
1341
|
+
# azure subscription.
|
1342
|
+
# @param namespace_name [String] The Namespace name
|
1115
1343
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1116
1344
|
# will be added to the HTTP request.
|
1117
1345
|
#
|
@@ -1125,9 +1353,9 @@ module Azure::ARM::EventHub
|
|
1125
1353
|
# Deletes an existing namespace. This operation also removes all associated
|
1126
1354
|
# resources under the namespace.
|
1127
1355
|
#
|
1128
|
-
# @param resource_group_name [String]
|
1129
|
-
#
|
1130
|
-
# @param namespace_name [String] The name
|
1356
|
+
# @param resource_group_name [String] Name of the resource group within the
|
1357
|
+
# azure subscription.
|
1358
|
+
# @param namespace_name [String] The Namespace name
|
1131
1359
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1132
1360
|
# will be added to the HTTP request.
|
1133
1361
|
#
|
@@ -1141,9 +1369,9 @@ module Azure::ARM::EventHub
|
|
1141
1369
|
# Deletes an existing namespace. This operation also removes all associated
|
1142
1370
|
# resources under the namespace.
|
1143
1371
|
#
|
1144
|
-
# @param resource_group_name [String]
|
1145
|
-
#
|
1146
|
-
# @param namespace_name [String] The name
|
1372
|
+
# @param resource_group_name [String] Name of the resource group within the
|
1373
|
+
# azure subscription.
|
1374
|
+
# @param namespace_name [String] The Namespace name
|
1147
1375
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1148
1376
|
# to the HTTP request.
|
1149
1377
|
#
|
@@ -1161,7 +1389,7 @@ module Azure::ARM::EventHub
|
|
1161
1389
|
# Set Headers
|
1162
1390
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1163
1391
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1164
|
-
path_template = '
|
1392
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}'
|
1165
1393
|
|
1166
1394
|
request_url = @base_url || @client.base_url
|
1167
1395
|
|
@@ -1180,7 +1408,7 @@ module Azure::ARM::EventHub
|
|
1180
1408
|
response_content = http_response.body
|
1181
1409
|
unless status_code == 204 || status_code == 200 || status_code == 202
|
1182
1410
|
error_model = JSON.load(response_content)
|
1183
|
-
fail
|
1411
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
1184
1412
|
end
|
1185
1413
|
|
1186
1414
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -1192,7 +1420,7 @@ module Azure::ARM::EventHub
|
|
1192
1420
|
end
|
1193
1421
|
|
1194
1422
|
#
|
1195
|
-
# Lists all the available
|
1423
|
+
# Lists all the available Namespaces within a subscription, irrespective of the
|
1196
1424
|
# resource groups.
|
1197
1425
|
#
|
1198
1426
|
# @param next_page_link [String] The NextLink from the previous successful call
|
@@ -1200,15 +1428,15 @@ module Azure::ARM::EventHub
|
|
1200
1428
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1201
1429
|
# will be added to the HTTP request.
|
1202
1430
|
#
|
1203
|
-
# @return [
|
1431
|
+
# @return [EHNamespaceListResult] operation results.
|
1204
1432
|
#
|
1205
|
-
def
|
1206
|
-
response =
|
1433
|
+
def list_next(next_page_link, custom_headers = nil)
|
1434
|
+
response = list_next_async(next_page_link, custom_headers).value!
|
1207
1435
|
response.body unless response.nil?
|
1208
1436
|
end
|
1209
1437
|
|
1210
1438
|
#
|
1211
|
-
# Lists all the available
|
1439
|
+
# Lists all the available Namespaces within a subscription, irrespective of the
|
1212
1440
|
# resource groups.
|
1213
1441
|
#
|
1214
1442
|
# @param next_page_link [String] The NextLink from the previous successful call
|
@@ -1218,12 +1446,12 @@ module Azure::ARM::EventHub
|
|
1218
1446
|
#
|
1219
1447
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1220
1448
|
#
|
1221
|
-
def
|
1222
|
-
|
1449
|
+
def list_next_with_http_info(next_page_link, custom_headers = nil)
|
1450
|
+
list_next_async(next_page_link, custom_headers).value!
|
1223
1451
|
end
|
1224
1452
|
|
1225
1453
|
#
|
1226
|
-
# Lists all the available
|
1454
|
+
# Lists all the available Namespaces within a subscription, irrespective of the
|
1227
1455
|
# resource groups.
|
1228
1456
|
#
|
1229
1457
|
# @param next_page_link [String] The NextLink from the previous successful call
|
@@ -1233,7 +1461,7 @@ module Azure::ARM::EventHub
|
|
1233
1461
|
#
|
1234
1462
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1235
1463
|
#
|
1236
|
-
def
|
1464
|
+
def list_next_async(next_page_link, custom_headers = nil)
|
1237
1465
|
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
1238
1466
|
|
1239
1467
|
|
@@ -1260,7 +1488,7 @@ module Azure::ARM::EventHub
|
|
1260
1488
|
response_content = http_response.body
|
1261
1489
|
unless status_code == 200
|
1262
1490
|
error_model = JSON.load(response_content)
|
1263
|
-
fail
|
1491
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
1264
1492
|
end
|
1265
1493
|
|
1266
1494
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -1268,8 +1496,8 @@ module Azure::ARM::EventHub
|
|
1268
1496
|
if status_code == 200
|
1269
1497
|
begin
|
1270
1498
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1271
|
-
result_mapper =
|
1272
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
1499
|
+
result_mapper = Azure::ARM::EventHub::Models::EHNamespaceListResult.mapper()
|
1500
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1273
1501
|
rescue Exception => e
|
1274
1502
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1275
1503
|
end
|
@@ -1282,14 +1510,14 @@ module Azure::ARM::EventHub
|
|
1282
1510
|
end
|
1283
1511
|
|
1284
1512
|
#
|
1285
|
-
# Lists the available
|
1513
|
+
# Lists the available Namespaces within a resource group.
|
1286
1514
|
#
|
1287
1515
|
# @param next_page_link [String] The NextLink from the previous successful call
|
1288
1516
|
# to List operation.
|
1289
1517
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1290
1518
|
# will be added to the HTTP request.
|
1291
1519
|
#
|
1292
|
-
# @return [
|
1520
|
+
# @return [EHNamespaceListResult] operation results.
|
1293
1521
|
#
|
1294
1522
|
def list_by_resource_group_next(next_page_link, custom_headers = nil)
|
1295
1523
|
response = list_by_resource_group_next_async(next_page_link, custom_headers).value!
|
@@ -1297,7 +1525,7 @@ module Azure::ARM::EventHub
|
|
1297
1525
|
end
|
1298
1526
|
|
1299
1527
|
#
|
1300
|
-
# Lists the available
|
1528
|
+
# Lists the available Namespaces within a resource group.
|
1301
1529
|
#
|
1302
1530
|
# @param next_page_link [String] The NextLink from the previous successful call
|
1303
1531
|
# to List operation.
|
@@ -1311,7 +1539,7 @@ module Azure::ARM::EventHub
|
|
1311
1539
|
end
|
1312
1540
|
|
1313
1541
|
#
|
1314
|
-
# Lists the available
|
1542
|
+
# Lists the available Namespaces within a resource group.
|
1315
1543
|
#
|
1316
1544
|
# @param next_page_link [String] The NextLink from the previous successful call
|
1317
1545
|
# to List operation.
|
@@ -1347,7 +1575,7 @@ module Azure::ARM::EventHub
|
|
1347
1575
|
response_content = http_response.body
|
1348
1576
|
unless status_code == 200
|
1349
1577
|
error_model = JSON.load(response_content)
|
1350
|
-
fail
|
1578
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
1351
1579
|
end
|
1352
1580
|
|
1353
1581
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -1355,8 +1583,8 @@ module Azure::ARM::EventHub
|
|
1355
1583
|
if status_code == 200
|
1356
1584
|
begin
|
1357
1585
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1358
|
-
result_mapper =
|
1359
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
1586
|
+
result_mapper = Azure::ARM::EventHub::Models::EHNamespaceListResult.mapper()
|
1587
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1360
1588
|
rescue Exception => e
|
1361
1589
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1362
1590
|
end
|
@@ -1369,14 +1597,14 @@ module Azure::ARM::EventHub
|
|
1369
1597
|
end
|
1370
1598
|
|
1371
1599
|
#
|
1372
|
-
# Gets a list of authorization rules for a
|
1600
|
+
# Gets a list of authorization rules for a Namespace.
|
1373
1601
|
#
|
1374
1602
|
# @param next_page_link [String] The NextLink from the previous successful call
|
1375
1603
|
# to List operation.
|
1376
1604
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1377
1605
|
# will be added to the HTTP request.
|
1378
1606
|
#
|
1379
|
-
# @return [
|
1607
|
+
# @return [AuthorizationRuleListResult] operation results.
|
1380
1608
|
#
|
1381
1609
|
def list_authorization_rules_next(next_page_link, custom_headers = nil)
|
1382
1610
|
response = list_authorization_rules_next_async(next_page_link, custom_headers).value!
|
@@ -1384,7 +1612,7 @@ module Azure::ARM::EventHub
|
|
1384
1612
|
end
|
1385
1613
|
|
1386
1614
|
#
|
1387
|
-
# Gets a list of authorization rules for a
|
1615
|
+
# Gets a list of authorization rules for a Namespace.
|
1388
1616
|
#
|
1389
1617
|
# @param next_page_link [String] The NextLink from the previous successful call
|
1390
1618
|
# to List operation.
|
@@ -1398,7 +1626,7 @@ module Azure::ARM::EventHub
|
|
1398
1626
|
end
|
1399
1627
|
|
1400
1628
|
#
|
1401
|
-
# Gets a list of authorization rules for a
|
1629
|
+
# Gets a list of authorization rules for a Namespace.
|
1402
1630
|
#
|
1403
1631
|
# @param next_page_link [String] The NextLink from the previous successful call
|
1404
1632
|
# to List operation.
|
@@ -1434,7 +1662,7 @@ module Azure::ARM::EventHub
|
|
1434
1662
|
response_content = http_response.body
|
1435
1663
|
unless status_code == 200
|
1436
1664
|
error_model = JSON.load(response_content)
|
1437
|
-
fail
|
1665
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
1438
1666
|
end
|
1439
1667
|
|
1440
1668
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -1442,8 +1670,8 @@ module Azure::ARM::EventHub
|
|
1442
1670
|
if status_code == 200
|
1443
1671
|
begin
|
1444
1672
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1445
|
-
result_mapper =
|
1446
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
1673
|
+
result_mapper = Azure::ARM::EventHub::Models::AuthorizationRuleListResult.mapper()
|
1674
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1447
1675
|
rescue Exception => e
|
1448
1676
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1449
1677
|
end
|
@@ -1456,34 +1684,35 @@ module Azure::ARM::EventHub
|
|
1456
1684
|
end
|
1457
1685
|
|
1458
1686
|
#
|
1459
|
-
# Lists all the available
|
1687
|
+
# Lists all the available Namespaces within a subscription, irrespective of the
|
1460
1688
|
# resource groups.
|
1461
1689
|
#
|
1462
1690
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1463
1691
|
# will be added to the HTTP request.
|
1464
1692
|
#
|
1465
|
-
# @return [
|
1693
|
+
# @return [EHNamespaceListResult] which provide lazy access to pages of the
|
1466
1694
|
# response.
|
1467
1695
|
#
|
1468
|
-
def
|
1469
|
-
response =
|
1696
|
+
def list_as_lazy(custom_headers = nil)
|
1697
|
+
response = list_async(custom_headers).value!
|
1470
1698
|
unless response.nil?
|
1471
1699
|
page = response.body
|
1472
1700
|
page.next_method = Proc.new do |next_page_link|
|
1473
|
-
|
1701
|
+
list_next_async(next_page_link, custom_headers)
|
1474
1702
|
end
|
1475
1703
|
page
|
1476
1704
|
end
|
1477
1705
|
end
|
1478
1706
|
|
1479
1707
|
#
|
1480
|
-
# Lists the available
|
1708
|
+
# Lists the available Namespaces within a resource group.
|
1481
1709
|
#
|
1482
|
-
# @param resource_group_name [String]
|
1710
|
+
# @param resource_group_name [String] Name of the resource group within the
|
1711
|
+
# azure subscription.
|
1483
1712
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1484
1713
|
# will be added to the HTTP request.
|
1485
1714
|
#
|
1486
|
-
# @return [
|
1715
|
+
# @return [EHNamespaceListResult] which provide lazy access to pages of the
|
1487
1716
|
# response.
|
1488
1717
|
#
|
1489
1718
|
def list_by_resource_group_as_lazy(resource_group_name, custom_headers = nil)
|
@@ -1498,16 +1727,16 @@ module Azure::ARM::EventHub
|
|
1498
1727
|
end
|
1499
1728
|
|
1500
1729
|
#
|
1501
|
-
# Gets a list of authorization rules for a
|
1730
|
+
# Gets a list of authorization rules for a Namespace.
|
1502
1731
|
#
|
1503
|
-
# @param resource_group_name [String]
|
1504
|
-
#
|
1505
|
-
# @param namespace_name [String] The
|
1732
|
+
# @param resource_group_name [String] Name of the resource group within the
|
1733
|
+
# azure subscription.
|
1734
|
+
# @param namespace_name [String] The Namespace name
|
1506
1735
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1507
1736
|
# will be added to the HTTP request.
|
1508
1737
|
#
|
1509
|
-
# @return [
|
1510
|
-
#
|
1738
|
+
# @return [AuthorizationRuleListResult] which provide lazy access to pages of
|
1739
|
+
# the response.
|
1511
1740
|
#
|
1512
1741
|
def list_authorization_rules_as_lazy(resource_group_name, namespace_name, custom_headers = nil)
|
1513
1742
|
response = list_authorization_rules_async(resource_group_name, namespace_name, custom_headers).value!
|