azure_mgmt_service_bus 0.17.2 → 0.17.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +5 -5
  2. data/lib/2015-08-01/generated/azure_mgmt_service_bus/models/check_name_availability.rb +1 -1
  3. data/lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb +15 -15
  4. data/lib/2015-08-01/generated/azure_mgmt_service_bus/queues.rb +18 -18
  5. data/lib/2015-08-01/generated/azure_mgmt_service_bus/service_bus_management_client.rb +1 -1
  6. data/lib/2015-08-01/generated/azure_mgmt_service_bus/topics.rb +21 -21
  7. data/lib/2017-04-01/generated/azure_mgmt_service_bus.rb +28 -20
  8. data/lib/2017-04-01/generated/azure_mgmt_service_bus/disaster_recovery_configs.rb +9 -9
  9. data/lib/2017-04-01/generated/azure_mgmt_service_bus/migration_configs.rb +17 -17
  10. data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/arm_disaster_recovery.rb +2 -2
  11. data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/check_name_availability.rb +1 -1
  12. data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/default_action.rb +16 -0
  13. data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/error_response.rb +1 -1
  14. data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/migration_config_properties.rb +14 -0
  15. data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/name_space_type.rb +19 -0
  16. data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/network_rule_ipaction.rb +15 -0
  17. data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/network_rule_set.rb +114 -0
  18. data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/nwrule_set_ip_rules.rb +59 -0
  19. data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/nwrule_set_virtual_network_rules.rb +59 -0
  20. data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/regenerate_access_key_parameters.rb +1 -1
  21. data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/sbnamespace.rb +1 -1
  22. data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/sbnamespace_migrate.rb +48 -0
  23. data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/sbnamespace_update_parameters.rb +1 -1
  24. data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/sbtopic.rb +1 -1
  25. data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/subnet.rb +46 -0
  26. data/lib/2017-04-01/generated/azure_mgmt_service_bus/namespaces.rb +326 -15
  27. data/lib/2017-04-01/generated/azure_mgmt_service_bus/queues.rb +15 -15
  28. data/lib/2017-04-01/generated/azure_mgmt_service_bus/service_bus_management_client.rb +1 -1
  29. data/lib/2017-04-01/generated/azure_mgmt_service_bus/topics.rb +18 -18
  30. data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus.rb +53 -0
  31. data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/default_action.rb +16 -0
  32. data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/error_response.rb +58 -0
  33. data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/ip_filter_rule.rb +96 -0
  34. data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/ip_filter_rule_list_result.rb +100 -0
  35. data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/ipaction.rb +16 -0
  36. data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/network_rule_ipaction.rb +15 -0
  37. data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/network_rule_set.rb +114 -0
  38. data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/nwrule_set_ip_rules.rb +58 -0
  39. data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/nwrule_set_virtual_network_rules.rb +59 -0
  40. data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/operation.rb +59 -0
  41. data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/operation_display.rb +72 -0
  42. data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/operation_list_result.rb +103 -0
  43. data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/resource.rb +80 -0
  44. data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/resource_namespace_patch.rb +92 -0
  45. data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/sbnamespace.rb +171 -0
  46. data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/sbnamespace_list_result.rb +99 -0
  47. data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/sbnamespace_update_parameters.rb +171 -0
  48. data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/sbsku.rb +73 -0
  49. data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/sku_name.rb +17 -0
  50. data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/sku_tier.rb +17 -0
  51. data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/subnet.rb +46 -0
  52. data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/tracked_resource.rb +92 -0
  53. data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/virtual_network_rule.rb +73 -0
  54. data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/virtual_network_rule_list_result.rb +100 -0
  55. data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/module_definition.rb +9 -0
  56. data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/namespaces.rb +2211 -0
  57. data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/operations.rb +216 -0
  58. data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/service_bus_management_client.rb +137 -0
  59. data/lib/azure_mgmt_service_bus.rb +1 -0
  60. data/lib/profiles/latest/modules/servicebus_profile_module.rb +102 -70
  61. data/lib/version.rb +1 -1
  62. metadata +40 -3
@@ -0,0 +1,59 @@
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::ServiceBus::Mgmt::V2017_04_01
7
+ module Models
8
+ #
9
+ # Description of NetWorkRuleSet - IpRules resource.
10
+ #
11
+ class NWRuleSetIpRules
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] IP Mask
16
+ attr_accessor :ip_mask
17
+
18
+ # @return [NetworkRuleIPAction] The IP Filter Action. Possible values
19
+ # include: 'Allow'. Default value: 'Allow' .
20
+ attr_accessor :action
21
+
22
+
23
+ #
24
+ # Mapper for NWRuleSetIpRules class as Ruby Hash.
25
+ # This will be used for serialization/deserialization.
26
+ #
27
+ def self.mapper()
28
+ {
29
+ client_side_validation: true,
30
+ required: false,
31
+ serialized_name: 'NWRuleSetIpRules',
32
+ type: {
33
+ name: 'Composite',
34
+ class_name: 'NWRuleSetIpRules',
35
+ model_properties: {
36
+ ip_mask: {
37
+ client_side_validation: true,
38
+ required: false,
39
+ serialized_name: 'ipMask',
40
+ type: {
41
+ name: 'String'
42
+ }
43
+ },
44
+ action: {
45
+ client_side_validation: true,
46
+ required: false,
47
+ serialized_name: 'action',
48
+ default_value: 'Allow',
49
+ type: {
50
+ name: 'String'
51
+ }
52
+ }
53
+ }
54
+ }
55
+ }
56
+ end
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,59 @@
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::ServiceBus::Mgmt::V2017_04_01
7
+ module Models
8
+ #
9
+ # Description of VirtualNetworkRules - NetworkRules resource.
10
+ #
11
+ class NWRuleSetVirtualNetworkRules
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Subnet] Subnet properties
16
+ attr_accessor :subnet
17
+
18
+ # @return [Boolean] Value that indicates whether to ignore missing VNet
19
+ # Service Endpoint
20
+ attr_accessor :ignore_missing_vnet_service_endpoint
21
+
22
+
23
+ #
24
+ # Mapper for NWRuleSetVirtualNetworkRules class as Ruby Hash.
25
+ # This will be used for serialization/deserialization.
26
+ #
27
+ def self.mapper()
28
+ {
29
+ client_side_validation: true,
30
+ required: false,
31
+ serialized_name: 'NWRuleSetVirtualNetworkRules',
32
+ type: {
33
+ name: 'Composite',
34
+ class_name: 'NWRuleSetVirtualNetworkRules',
35
+ model_properties: {
36
+ subnet: {
37
+ client_side_validation: true,
38
+ required: false,
39
+ serialized_name: 'subnet',
40
+ type: {
41
+ name: 'Composite',
42
+ class_name: 'Subnet'
43
+ }
44
+ },
45
+ ignore_missing_vnet_service_endpoint: {
46
+ client_side_validation: true,
47
+ required: false,
48
+ serialized_name: 'ignoreMissingVnetServiceEndpoint',
49
+ type: {
50
+ name: 'Boolean'
51
+ }
52
+ }
53
+ }
54
+ }
55
+ }
56
+ end
57
+ end
58
+ end
59
+ end
@@ -7,7 +7,7 @@ module Azure::ServiceBus::Mgmt::V2017_04_01
7
7
  module Models
8
8
  #
9
9
  # Parameters supplied to the Regenerate Authorization Rule operation,
10
- # specifies which key neeeds to be reset.
10
+ # specifies which key needs to be reset.
11
11
  #
12
12
  class RegenerateAccessKeyParameters
13
13
 
@@ -12,7 +12,7 @@ module Azure::ServiceBus::Mgmt::V2017_04_01
12
12
 
13
13
  include MsRestAzure
14
14
 
15
- # @return [SBSku] Porperties of Sku
15
+ # @return [SBSku] Properties of Sku
16
16
  attr_accessor :sku
17
17
 
18
18
  # @return [String] Provisioning state of the namespace.
@@ -0,0 +1,48 @@
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::ServiceBus::Mgmt::V2017_04_01
7
+ module Models
8
+ #
9
+ # Namespace Migrate Object
10
+ #
11
+ class SBNamespaceMigrate
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [NameSpaceType] Type of namespaces. Possible values include:
16
+ # 'Messaging', 'NotificationHub', 'Mixed', 'EventHub', 'Relay'
17
+ attr_accessor :target_namespace_type
18
+
19
+
20
+ #
21
+ # Mapper for SBNamespaceMigrate class as Ruby Hash.
22
+ # This will be used for serialization/deserialization.
23
+ #
24
+ def self.mapper()
25
+ {
26
+ client_side_validation: true,
27
+ required: false,
28
+ serialized_name: 'SBNamespaceMigrate',
29
+ type: {
30
+ name: 'Composite',
31
+ class_name: 'SBNamespaceMigrate',
32
+ model_properties: {
33
+ target_namespace_type: {
34
+ client_side_validation: true,
35
+ required: true,
36
+ serialized_name: 'targetNamespaceType',
37
+ type: {
38
+ name: 'Enum',
39
+ module: 'NameSpaceType'
40
+ }
41
+ }
42
+ }
43
+ }
44
+ }
45
+ end
46
+ end
47
+ end
48
+ end
@@ -12,7 +12,7 @@ module Azure::ServiceBus::Mgmt::V2017_04_01
12
12
 
13
13
  include MsRestAzure
14
14
 
15
- # @return [SBSku] Porperties of Sku
15
+ # @return [SBSku] Properties of Sku
16
16
  attr_accessor :sku
17
17
 
18
18
  # @return [String] Provisioning state of the namespace.
@@ -28,7 +28,7 @@ module Azure::ServiceBus::Mgmt::V2017_04_01
28
28
  # @return [Integer] Number of subscriptions.
29
29
  attr_accessor :subscription_count
30
30
 
31
- # @return [MessageCountDetails] Message count deatils
31
+ # @return [MessageCountDetails] Message count details
32
32
  attr_accessor :count_details
33
33
 
34
34
  # @return [Duration] ISO 8601 Default message timespan to live value.
@@ -0,0 +1,46 @@
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::ServiceBus::Mgmt::V2017_04_01
7
+ module Models
8
+ #
9
+ # Properties supplied for Subnet
10
+ #
11
+ class Subnet
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Resource ID of Virtual Network Subnet
16
+ attr_accessor :id
17
+
18
+
19
+ #
20
+ # Mapper for Subnet class as Ruby Hash.
21
+ # This will be used for serialization/deserialization.
22
+ #
23
+ def self.mapper()
24
+ {
25
+ client_side_validation: true,
26
+ required: false,
27
+ serialized_name: 'Subnet',
28
+ type: {
29
+ name: 'Composite',
30
+ class_name: 'Subnet',
31
+ model_properties: {
32
+ id: {
33
+ client_side_validation: true,
34
+ required: true,
35
+ serialized_name: 'id',
36
+ type: {
37
+ name: 'String'
38
+ }
39
+ }
40
+ }
41
+ }
42
+ }
43
+ end
44
+ end
45
+ end
46
+ end
@@ -719,7 +719,7 @@ module Azure::ServiceBus::Mgmt::V2017_04_01
719
719
  # @param resource_group_name [String] Name of the Resource group within the
720
720
  # Azure subscription.
721
721
  # @param namespace_name [String] The namespace name
722
- # @param authorization_rule_name [String] The authorizationrule name.
722
+ # @param authorization_rule_name [String] The authorization rule name.
723
723
  # @param parameters [SBAuthorizationRule] The shared access authorization rule.
724
724
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
725
725
  # will be added to the HTTP request.
@@ -737,7 +737,7 @@ module Azure::ServiceBus::Mgmt::V2017_04_01
737
737
  # @param resource_group_name [String] Name of the Resource group within the
738
738
  # Azure subscription.
739
739
  # @param namespace_name [String] The namespace name
740
- # @param authorization_rule_name [String] The authorizationrule name.
740
+ # @param authorization_rule_name [String] The authorization rule name.
741
741
  # @param parameters [SBAuthorizationRule] The shared access authorization rule.
742
742
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
743
743
  # will be added to the HTTP request.
@@ -754,7 +754,7 @@ module Azure::ServiceBus::Mgmt::V2017_04_01
754
754
  # @param resource_group_name [String] Name of the Resource group within the
755
755
  # Azure subscription.
756
756
  # @param namespace_name [String] The namespace name
757
- # @param authorization_rule_name [String] The authorizationrule name.
757
+ # @param authorization_rule_name [String] The authorization rule name.
758
758
  # @param parameters [SBAuthorizationRule] The shared access authorization rule.
759
759
  # @param [Hash{String => String}] A hash of custom headers that will be added
760
760
  # to the HTTP request.
@@ -835,7 +835,7 @@ module Azure::ServiceBus::Mgmt::V2017_04_01
835
835
  # @param resource_group_name [String] Name of the Resource group within the
836
836
  # Azure subscription.
837
837
  # @param namespace_name [String] The namespace name
838
- # @param authorization_rule_name [String] The authorizationrule name.
838
+ # @param authorization_rule_name [String] The authorization rule name.
839
839
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
840
840
  # will be added to the HTTP request.
841
841
  #
@@ -851,7 +851,7 @@ module Azure::ServiceBus::Mgmt::V2017_04_01
851
851
  # @param resource_group_name [String] Name of the Resource group within the
852
852
  # Azure subscription.
853
853
  # @param namespace_name [String] The namespace name
854
- # @param authorization_rule_name [String] The authorizationrule name.
854
+ # @param authorization_rule_name [String] The authorization rule name.
855
855
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
856
856
  # will be added to the HTTP request.
857
857
  #
@@ -867,7 +867,7 @@ module Azure::ServiceBus::Mgmt::V2017_04_01
867
867
  # @param resource_group_name [String] Name of the Resource group within the
868
868
  # Azure subscription.
869
869
  # @param namespace_name [String] The namespace name
870
- # @param authorization_rule_name [String] The authorizationrule name.
870
+ # @param authorization_rule_name [String] The authorization rule name.
871
871
  # @param [Hash{String => String}] A hash of custom headers that will be added
872
872
  # to the HTTP request.
873
873
  #
@@ -929,7 +929,7 @@ module Azure::ServiceBus::Mgmt::V2017_04_01
929
929
  # @param resource_group_name [String] Name of the Resource group within the
930
930
  # Azure subscription.
931
931
  # @param namespace_name [String] The namespace name
932
- # @param authorization_rule_name [String] The authorizationrule name.
932
+ # @param authorization_rule_name [String] The authorization rule name.
933
933
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
934
934
  # will be added to the HTTP request.
935
935
  #
@@ -946,7 +946,7 @@ module Azure::ServiceBus::Mgmt::V2017_04_01
946
946
  # @param resource_group_name [String] Name of the Resource group within the
947
947
  # Azure subscription.
948
948
  # @param namespace_name [String] The namespace name
949
- # @param authorization_rule_name [String] The authorizationrule name.
949
+ # @param authorization_rule_name [String] The authorization rule name.
950
950
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
951
951
  # will be added to the HTTP request.
952
952
  #
@@ -962,7 +962,7 @@ module Azure::ServiceBus::Mgmt::V2017_04_01
962
962
  # @param resource_group_name [String] Name of the Resource group within the
963
963
  # Azure subscription.
964
964
  # @param namespace_name [String] The namespace name
965
- # @param authorization_rule_name [String] The authorizationrule name.
965
+ # @param authorization_rule_name [String] The authorization rule name.
966
966
  # @param [Hash{String => String}] A hash of custom headers that will be added
967
967
  # to the HTTP request.
968
968
  #
@@ -1034,7 +1034,7 @@ module Azure::ServiceBus::Mgmt::V2017_04_01
1034
1034
  # @param resource_group_name [String] Name of the Resource group within the
1035
1035
  # Azure subscription.
1036
1036
  # @param namespace_name [String] The namespace name
1037
- # @param authorization_rule_name [String] The authorizationrule name.
1037
+ # @param authorization_rule_name [String] The authorization rule name.
1038
1038
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1039
1039
  # will be added to the HTTP request.
1040
1040
  #
@@ -1051,7 +1051,7 @@ module Azure::ServiceBus::Mgmt::V2017_04_01
1051
1051
  # @param resource_group_name [String] Name of the Resource group within the
1052
1052
  # Azure subscription.
1053
1053
  # @param namespace_name [String] The namespace name
1054
- # @param authorization_rule_name [String] The authorizationrule name.
1054
+ # @param authorization_rule_name [String] The authorization rule name.
1055
1055
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1056
1056
  # will be added to the HTTP request.
1057
1057
  #
@@ -1067,7 +1067,7 @@ module Azure::ServiceBus::Mgmt::V2017_04_01
1067
1067
  # @param resource_group_name [String] Name of the Resource group within the
1068
1068
  # Azure subscription.
1069
1069
  # @param namespace_name [String] The namespace name
1070
- # @param authorization_rule_name [String] The authorizationrule name.
1070
+ # @param authorization_rule_name [String] The authorization rule name.
1071
1071
  # @param [Hash{String => String}] A hash of custom headers that will be added
1072
1072
  # to the HTTP request.
1073
1073
  #
@@ -1139,7 +1139,7 @@ module Azure::ServiceBus::Mgmt::V2017_04_01
1139
1139
  # @param resource_group_name [String] Name of the Resource group within the
1140
1140
  # Azure subscription.
1141
1141
  # @param namespace_name [String] The namespace name
1142
- # @param authorization_rule_name [String] The authorizationrule name.
1142
+ # @param authorization_rule_name [String] The authorization rule name.
1143
1143
  # @param parameters [RegenerateAccessKeyParameters] Parameters supplied to
1144
1144
  # regenerate the authorization rule.
1145
1145
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
@@ -1158,7 +1158,7 @@ module Azure::ServiceBus::Mgmt::V2017_04_01
1158
1158
  # @param resource_group_name [String] Name of the Resource group within the
1159
1159
  # Azure subscription.
1160
1160
  # @param namespace_name [String] The namespace name
1161
- # @param authorization_rule_name [String] The authorizationrule name.
1161
+ # @param authorization_rule_name [String] The authorization rule name.
1162
1162
  # @param parameters [RegenerateAccessKeyParameters] Parameters supplied to
1163
1163
  # regenerate the authorization rule.
1164
1164
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
@@ -1176,7 +1176,7 @@ module Azure::ServiceBus::Mgmt::V2017_04_01
1176
1176
  # @param resource_group_name [String] Name of the Resource group within the
1177
1177
  # Azure subscription.
1178
1178
  # @param namespace_name [String] The namespace name
1179
- # @param authorization_rule_name [String] The authorizationrule name.
1179
+ # @param authorization_rule_name [String] The authorization rule name.
1180
1180
  # @param parameters [RegenerateAccessKeyParameters] Parameters supplied to
1181
1181
  # regenerate the authorization rule.
1182
1182
  # @param [Hash{String => String}] A hash of custom headers that will be added
@@ -1252,6 +1252,317 @@ module Azure::ServiceBus::Mgmt::V2017_04_01
1252
1252
  promise.execute
1253
1253
  end
1254
1254
 
1255
+ #
1256
+ # This operation Migrate the given namespace to provided name type
1257
+ #
1258
+ # @param resource_group_name [String] Name of the Resource group within the
1259
+ # Azure subscription.
1260
+ # @param namespace_name [String] The namespace name
1261
+ # @param parameters [SBNamespaceMigrate] Parameters supplied to migrate
1262
+ # namespace type.
1263
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1264
+ # will be added to the HTTP request.
1265
+ #
1266
+ #
1267
+ def migrate(resource_group_name, namespace_name, parameters, custom_headers:nil)
1268
+ response = migrate_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value!
1269
+ nil
1270
+ end
1271
+
1272
+ #
1273
+ # This operation Migrate the given namespace to provided name type
1274
+ #
1275
+ # @param resource_group_name [String] Name of the Resource group within the
1276
+ # Azure subscription.
1277
+ # @param namespace_name [String] The namespace name
1278
+ # @param parameters [SBNamespaceMigrate] Parameters supplied to migrate
1279
+ # namespace type.
1280
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1281
+ # will be added to the HTTP request.
1282
+ #
1283
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1284
+ #
1285
+ def migrate_with_http_info(resource_group_name, namespace_name, parameters, custom_headers:nil)
1286
+ migrate_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value!
1287
+ end
1288
+
1289
+ #
1290
+ # This operation Migrate the given namespace to provided name type
1291
+ #
1292
+ # @param resource_group_name [String] Name of the Resource group within the
1293
+ # Azure subscription.
1294
+ # @param namespace_name [String] The namespace name
1295
+ # @param parameters [SBNamespaceMigrate] Parameters supplied to migrate
1296
+ # namespace type.
1297
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1298
+ # to the HTTP request.
1299
+ #
1300
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1301
+ #
1302
+ def migrate_async(resource_group_name, namespace_name, parameters, custom_headers:nil)
1303
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1304
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1305
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1306
+ fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
1307
+ fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
1308
+ fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
1309
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1310
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1311
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1312
+
1313
+
1314
+ request_headers = {}
1315
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1316
+
1317
+ # Set Headers
1318
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1319
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1320
+
1321
+ # Serialize Request
1322
+ request_mapper = Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBNamespaceMigrate.mapper()
1323
+ request_content = @client.serialize(request_mapper, parameters)
1324
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1325
+
1326
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrate'
1327
+
1328
+ request_url = @base_url || @client.base_url
1329
+
1330
+ options = {
1331
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1332
+ path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id},
1333
+ query_params: {'api-version' => @client.api_version},
1334
+ body: request_content,
1335
+ headers: request_headers.merge(custom_headers || {}),
1336
+ base_url: request_url
1337
+ }
1338
+ promise = @client.make_request_async(:post, path_template, options)
1339
+
1340
+ promise = promise.then do |result|
1341
+ http_response = result.response
1342
+ status_code = http_response.status
1343
+ response_content = http_response.body
1344
+ unless status_code == 200
1345
+ error_model = JSON.load(response_content)
1346
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1347
+ end
1348
+
1349
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1350
+
1351
+ result
1352
+ end
1353
+
1354
+ promise.execute
1355
+ end
1356
+
1357
+ #
1358
+ # Create or update NetworkRuleSet for a Namespace.
1359
+ #
1360
+ # @param resource_group_name [String] Name of the Resource group within the
1361
+ # Azure subscription.
1362
+ # @param namespace_name [String] The namespace name
1363
+ # @param parameters [NetworkRuleSet] The Namespace IpFilterRule.
1364
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1365
+ # will be added to the HTTP request.
1366
+ #
1367
+ # @return [NetworkRuleSet] operation results.
1368
+ #
1369
+ def create_or_update_network_rule_set(resource_group_name, namespace_name, parameters, custom_headers:nil)
1370
+ response = create_or_update_network_rule_set_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value!
1371
+ response.body unless response.nil?
1372
+ end
1373
+
1374
+ #
1375
+ # Create or update NetworkRuleSet for a Namespace.
1376
+ #
1377
+ # @param resource_group_name [String] Name of the Resource group within the
1378
+ # Azure subscription.
1379
+ # @param namespace_name [String] The namespace name
1380
+ # @param parameters [NetworkRuleSet] The Namespace IpFilterRule.
1381
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1382
+ # will be added to the HTTP request.
1383
+ #
1384
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1385
+ #
1386
+ def create_or_update_network_rule_set_with_http_info(resource_group_name, namespace_name, parameters, custom_headers:nil)
1387
+ create_or_update_network_rule_set_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value!
1388
+ end
1389
+
1390
+ #
1391
+ # Create or update NetworkRuleSet for a Namespace.
1392
+ #
1393
+ # @param resource_group_name [String] Name of the Resource group within the
1394
+ # Azure subscription.
1395
+ # @param namespace_name [String] The namespace name
1396
+ # @param parameters [NetworkRuleSet] The Namespace IpFilterRule.
1397
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1398
+ # to the HTTP request.
1399
+ #
1400
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1401
+ #
1402
+ def create_or_update_network_rule_set_async(resource_group_name, namespace_name, parameters, custom_headers:nil)
1403
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1404
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1405
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1406
+ fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
1407
+ fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
1408
+ fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
1409
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1410
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1411
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1412
+
1413
+
1414
+ request_headers = {}
1415
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1416
+
1417
+ # Set Headers
1418
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1419
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1420
+
1421
+ # Serialize Request
1422
+ request_mapper = Azure::ServiceBus::Mgmt::V2017_04_01::Models::NetworkRuleSet.mapper()
1423
+ request_content = @client.serialize(request_mapper, parameters)
1424
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1425
+
1426
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/networkRuleSets/default'
1427
+
1428
+ request_url = @base_url || @client.base_url
1429
+
1430
+ options = {
1431
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1432
+ path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id},
1433
+ query_params: {'api-version' => @client.api_version},
1434
+ body: request_content,
1435
+ headers: request_headers.merge(custom_headers || {}),
1436
+ base_url: request_url
1437
+ }
1438
+ promise = @client.make_request_async(:put, path_template, options)
1439
+
1440
+ promise = promise.then do |result|
1441
+ http_response = result.response
1442
+ status_code = http_response.status
1443
+ response_content = http_response.body
1444
+ unless status_code == 200
1445
+ error_model = JSON.load(response_content)
1446
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1447
+ end
1448
+
1449
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1450
+ # Deserialize Response
1451
+ if status_code == 200
1452
+ begin
1453
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1454
+ result_mapper = Azure::ServiceBus::Mgmt::V2017_04_01::Models::NetworkRuleSet.mapper()
1455
+ result.body = @client.deserialize(result_mapper, parsed_response)
1456
+ rescue Exception => e
1457
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1458
+ end
1459
+ end
1460
+
1461
+ result
1462
+ end
1463
+
1464
+ promise.execute
1465
+ end
1466
+
1467
+ #
1468
+ # Gets NetworkRuleSet for a Namespace.
1469
+ #
1470
+ # @param resource_group_name [String] Name of the Resource group within the
1471
+ # Azure subscription.
1472
+ # @param namespace_name [String] The namespace name
1473
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1474
+ # will be added to the HTTP request.
1475
+ #
1476
+ # @return [NetworkRuleSet] operation results.
1477
+ #
1478
+ def get_network_rule_set(resource_group_name, namespace_name, custom_headers:nil)
1479
+ response = get_network_rule_set_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
1480
+ response.body unless response.nil?
1481
+ end
1482
+
1483
+ #
1484
+ # Gets NetworkRuleSet for a Namespace.
1485
+ #
1486
+ # @param resource_group_name [String] Name of the Resource group within the
1487
+ # Azure subscription.
1488
+ # @param namespace_name [String] The namespace name
1489
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1490
+ # will be added to the HTTP request.
1491
+ #
1492
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1493
+ #
1494
+ def get_network_rule_set_with_http_info(resource_group_name, namespace_name, custom_headers:nil)
1495
+ get_network_rule_set_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
1496
+ end
1497
+
1498
+ #
1499
+ # Gets NetworkRuleSet for a Namespace.
1500
+ #
1501
+ # @param resource_group_name [String] Name of the Resource group within the
1502
+ # Azure subscription.
1503
+ # @param namespace_name [String] The namespace name
1504
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1505
+ # to the HTTP request.
1506
+ #
1507
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1508
+ #
1509
+ def get_network_rule_set_async(resource_group_name, namespace_name, custom_headers:nil)
1510
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1511
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1512
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1513
+ fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
1514
+ fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
1515
+ fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
1516
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1517
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1518
+
1519
+
1520
+ request_headers = {}
1521
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1522
+
1523
+ # Set Headers
1524
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1525
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1526
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/networkRuleSets/default'
1527
+
1528
+ request_url = @base_url || @client.base_url
1529
+
1530
+ options = {
1531
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1532
+ path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id},
1533
+ query_params: {'api-version' => @client.api_version},
1534
+ headers: request_headers.merge(custom_headers || {}),
1535
+ base_url: request_url
1536
+ }
1537
+ promise = @client.make_request_async(:get, path_template, options)
1538
+
1539
+ promise = promise.then do |result|
1540
+ http_response = result.response
1541
+ status_code = http_response.status
1542
+ response_content = http_response.body
1543
+ unless status_code == 200
1544
+ error_model = JSON.load(response_content)
1545
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1546
+ end
1547
+
1548
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1549
+ # Deserialize Response
1550
+ if status_code == 200
1551
+ begin
1552
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1553
+ result_mapper = Azure::ServiceBus::Mgmt::V2017_04_01::Models::NetworkRuleSet.mapper()
1554
+ result.body = @client.deserialize(result_mapper, parsed_response)
1555
+ rescue Exception => e
1556
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1557
+ end
1558
+ end
1559
+
1560
+ result
1561
+ end
1562
+
1563
+ promise.execute
1564
+ end
1565
+
1255
1566
  #
1256
1567
  # Creates or updates a service namespace. Once created, this namespace's
1257
1568
  # resource manifest is immutable. This operation is idempotent.