azure_mgmt_iot_hub 0.16.0 → 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (157) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2016-02-03/generated/azure_mgmt_iot_hub/iot_hub_client.rb +7 -6
  3. data/lib/2017-01-19/generated/azure_mgmt_iot_hub/iot_hub_client.rb +7 -6
  4. data/lib/2017-07-01/generated/azure_mgmt_iot_hub/iot_hub_client.rb +7 -6
  5. data/lib/2018-01-22/generated/azure_mgmt_iot_hub.rb +89 -0
  6. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/certificates.rb +711 -0
  7. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/iot_hub_client.rb +139 -0
  8. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/iot_hub_resource.rb +3242 -0
  9. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/access_rights.rb +29 -0
  10. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/capabilities.rb +16 -0
  11. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/certificate_body_description.rb +47 -0
  12. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/certificate_description.rb +95 -0
  13. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/certificate_list_description.rb +56 -0
  14. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/certificate_properties.rb +107 -0
  15. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/certificate_properties_with_nonce.rb +121 -0
  16. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/certificate_verification_description.rb +47 -0
  17. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/certificate_with_nonce_description.rb +95 -0
  18. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/cloud_to_device_properties.rb +77 -0
  19. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/error_details.rb +83 -0
  20. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/event_hub_consumer_group_info.rb +102 -0
  21. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/event_hub_consumer_groups_list_result.rb +101 -0
  22. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/event_hub_properties.rb +107 -0
  23. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/export_devices_request.rb +59 -0
  24. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/fallback_route_properties.rb +114 -0
  25. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/feedback_properties.rb +77 -0
  26. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/import_devices_request.rb +58 -0
  27. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_capacity.rb +89 -0
  28. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_description.rb +126 -0
  29. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_description_list_result.rb +100 -0
  30. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_name_availability_info.rb +73 -0
  31. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_name_unavailability_reason.rb +16 -0
  32. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_properties.rb +252 -0
  33. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_quota_metric_info.rb +71 -0
  34. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_quota_metric_info_list_result.rb +101 -0
  35. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_scale_type.rb +17 -0
  36. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_sku.rb +18 -0
  37. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_sku_description.rb +71 -0
  38. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_sku_description_list_result.rb +101 -0
  39. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_sku_info.rb +73 -0
  40. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_sku_tier.rb +16 -0
  41. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/ip_filter_action_type.rb +16 -0
  42. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/ip_filter_rule.rb +71 -0
  43. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/job_response.rb +137 -0
  44. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/job_response_list_result.rb +99 -0
  45. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/job_status.rb +20 -0
  46. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/job_type.rb +24 -0
  47. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/messaging_endpoint_properties.rb +77 -0
  48. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/operation.rb +60 -0
  49. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/operation_display.rb +71 -0
  50. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/operation_inputs.rb +46 -0
  51. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/operation_list_result.rb +103 -0
  52. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/operation_monitoring_level.rb +18 -0
  53. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/operations_monitoring_properties.rb +58 -0
  54. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/registry_statistics.rb +73 -0
  55. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/resource.rb +104 -0
  56. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/route_properties.rb +116 -0
  57. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/routing_endpoints.rb +126 -0
  58. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/routing_event_hub_properties.rb +87 -0
  59. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/routing_properties.rb +88 -0
  60. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/routing_service_bus_queue_endpoint_properties.rb +90 -0
  61. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/routing_service_bus_topic_endpoint_properties.rb +90 -0
  62. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/routing_source.rb +18 -0
  63. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/routing_storage_container_properties.rb +156 -0
  64. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule.rb +89 -0
  65. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule_list_result.rb +103 -0
  66. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/storage_endpoint_properties.rb +73 -0
  67. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/tags_resource.rb +55 -0
  68. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/module_definition.rb +9 -0
  69. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/operations.rb +215 -0
  70. data/lib/2018-04-01/generated/azure_mgmt_iot_hub.rb +108 -0
  71. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/certificates.rb +711 -0
  72. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/iot_hub_client.rb +143 -0
  73. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/iot_hub_resource.rb +3676 -0
  74. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/access_rights.rb +29 -0
  75. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/capabilities.rb +16 -0
  76. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/certificate_body_description.rb +47 -0
  77. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/certificate_description.rb +95 -0
  78. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/certificate_list_description.rb +56 -0
  79. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/certificate_properties.rb +118 -0
  80. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/certificate_properties_with_nonce.rb +133 -0
  81. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/certificate_verification_description.rb +47 -0
  82. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/certificate_with_nonce_description.rb +95 -0
  83. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/cloud_to_device_properties.rb +77 -0
  84. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/endpoint_health_data.rb +58 -0
  85. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/endpoint_health_data_list_result.rb +100 -0
  86. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/endpoint_health_status.rb +18 -0
  87. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/error_details.rb +83 -0
  88. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/event_hub_consumer_group_info.rb +102 -0
  89. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/event_hub_consumer_groups_list_result.rb +101 -0
  90. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/event_hub_properties.rb +107 -0
  91. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/export_devices_request.rb +59 -0
  92. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/fallback_route_properties.rb +114 -0
  93. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/feedback_properties.rb +77 -0
  94. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/import_devices_request.rb +58 -0
  95. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_capacity.rb +89 -0
  96. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_description.rb +126 -0
  97. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_description_list_result.rb +100 -0
  98. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_name_availability_info.rb +73 -0
  99. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_name_unavailability_reason.rb +16 -0
  100. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_properties.rb +252 -0
  101. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_quota_metric_info.rb +71 -0
  102. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_quota_metric_info_list_result.rb +101 -0
  103. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_scale_type.rb +17 -0
  104. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_sku.rb +21 -0
  105. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_sku_description.rb +71 -0
  106. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_sku_description_list_result.rb +101 -0
  107. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_sku_info.rb +73 -0
  108. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_sku_tier.rb +17 -0
  109. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/ip_filter_action_type.rb +16 -0
  110. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/ip_filter_rule.rb +71 -0
  111. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/job_response.rb +137 -0
  112. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/job_response_list_result.rb +99 -0
  113. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/job_status.rb +20 -0
  114. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/job_type.rb +24 -0
  115. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/matched_route.rb +47 -0
  116. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/messaging_endpoint_properties.rb +77 -0
  117. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/name.rb +57 -0
  118. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/operation.rb +60 -0
  119. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/operation_display.rb +71 -0
  120. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/operation_inputs.rb +46 -0
  121. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/operation_list_result.rb +103 -0
  122. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/operation_monitoring_level.rb +18 -0
  123. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/operations_monitoring_properties.rb +58 -0
  124. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/registry_statistics.rb +73 -0
  125. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/resource.rb +104 -0
  126. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/route_compilation_error.rb +70 -0
  127. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/route_error_position.rb +57 -0
  128. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/route_error_range.rb +59 -0
  129. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/route_error_severity.rb +16 -0
  130. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/route_properties.rb +116 -0
  131. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/routing_endpoints.rb +126 -0
  132. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/routing_event_hub_properties.rb +87 -0
  133. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/routing_message.rb +84 -0
  134. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/routing_properties.rb +88 -0
  135. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/routing_service_bus_queue_endpoint_properties.rb +90 -0
  136. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/routing_service_bus_topic_endpoint_properties.rb +90 -0
  137. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/routing_source.rb +19 -0
  138. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/routing_storage_container_properties.rb +156 -0
  139. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule.rb +89 -0
  140. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule_list_result.rb +103 -0
  141. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/storage_endpoint_properties.rb +73 -0
  142. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/tags_resource.rb +55 -0
  143. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/test_all_routes_input.rb +60 -0
  144. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/test_all_routes_result.rb +55 -0
  145. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/test_result_status.rb +17 -0
  146. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/test_route_input.rb +59 -0
  147. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/test_route_result.rb +59 -0
  148. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/test_route_result_details.rb +56 -0
  149. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/user_subscription_quota.rb +102 -0
  150. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/user_subscription_quota_list_result.rb +67 -0
  151. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/module_definition.rb +9 -0
  152. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/operations.rb +215 -0
  153. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/resource_provider_common.rb +115 -0
  154. data/lib/azure_mgmt_iot_hub.rb +3 -1
  155. data/lib/profiles/latest/modules/iothub_profile_module.rb +240 -162
  156. data/lib/version.rb +1 -1
  157. metadata +154 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f6679541ae6b5fbd38497009fc429e841b62742b
4
- data.tar.gz: d6dc2cee6107f17e71edb9786f9dacbddb6f24d5
3
+ metadata.gz: f48d003565ca9d9682275ceb9b6ae14ad43987ff
4
+ data.tar.gz: 013afe7c7ed2f3a38d9168c7a67d5c7b0f6b0b8f
5
5
  SHA512:
6
- metadata.gz: 1cf021d5e8ee1bbd8fabc1212dea821b59565a72116d3bdebcdcece2b954910b16c1780d41757135b75b1d22e54be11182fac76f7615664d3d363072d714c6b1
7
- data.tar.gz: f32c3a2871b9c7f0a9aa43a8dd80d9aef2261e7a492550bf8ee24ee3a60324e0288a847ba89b14c2adc5155e84a8fbf8727d2055548858b2b6ae8fdd0b85f061
6
+ metadata.gz: 83db64d6388a926acb205935f35131c6e711e9233f0beed5057d1301226447a276f5dc8f00d17e0ba0e3656eb1601bc688bd4f0a3c48d976a15826bfaa86d86e
7
+ data.tar.gz: 2ac336f1b0ffbca409a41c08c4e6e1d30619bb7458bea7305d308df32e5860ce5299ed14f9a7988effb4d8e73551af007b948d8c2c6e04197604ccc90b5f82c9
@@ -23,15 +23,16 @@ module Azure::IotHub::Mgmt::V2016_02_03
23
23
  # @return [String] The version of the API.
24
24
  attr_reader :api_version
25
25
 
26
- # @return [String] Gets or sets the preferred language for the response.
26
+ # @return [String] The preferred language for the response.
27
27
  attr_accessor :accept_language
28
28
 
29
- # @return [Integer] Gets or sets the retry timeout in seconds for Long
30
- # Running Operations. Default value is 30.
29
+ # @return [Integer] The retry timeout in seconds for Long Running
30
+ # Operations. Default value is 30.
31
31
  attr_accessor :long_running_operation_retry_timeout
32
32
 
33
- # @return [Boolean] When set to true a unique x-ms-client-request-id value
34
- # is generated and included in each request. Default is true.
33
+ # @return [Boolean] Whether a unique x-ms-client-request-id should be
34
+ # generated. When set to true a unique x-ms-client-request-id value is
35
+ # generated and included in each request. Default is true.
35
36
  attr_accessor :generate_client_request_id
36
37
 
37
38
  # @return [IotHubResource] iot_hub_resource
@@ -123,7 +124,7 @@ module Azure::IotHub::Mgmt::V2016_02_03
123
124
  #
124
125
  def add_telemetry
125
126
  sdk_information = 'azure_mgmt_iot_hub'
126
- sdk_information = "#{sdk_information}/0.16.0"
127
+ sdk_information = "#{sdk_information}/0.17.0"
127
128
  add_user_agent_information(sdk_information)
128
129
  end
129
130
  end
@@ -23,15 +23,16 @@ module Azure::IotHub::Mgmt::V2017_01_19
23
23
  # @return [String] The version of the API.
24
24
  attr_reader :api_version
25
25
 
26
- # @return [String] Gets or sets the preferred language for the response.
26
+ # @return [String] The preferred language for the response.
27
27
  attr_accessor :accept_language
28
28
 
29
- # @return [Integer] Gets or sets the retry timeout in seconds for Long
30
- # Running Operations. Default value is 30.
29
+ # @return [Integer] The retry timeout in seconds for Long Running
30
+ # Operations. Default value is 30.
31
31
  attr_accessor :long_running_operation_retry_timeout
32
32
 
33
- # @return [Boolean] When set to true a unique x-ms-client-request-id value
34
- # is generated and included in each request. Default is true.
33
+ # @return [Boolean] Whether a unique x-ms-client-request-id should be
34
+ # generated. When set to true a unique x-ms-client-request-id value is
35
+ # generated and included in each request. Default is true.
35
36
  attr_accessor :generate_client_request_id
36
37
 
37
38
  # @return [IotHubResource] iot_hub_resource
@@ -123,7 +124,7 @@ module Azure::IotHub::Mgmt::V2017_01_19
123
124
  #
124
125
  def add_telemetry
125
126
  sdk_information = 'azure_mgmt_iot_hub'
126
- sdk_information = "#{sdk_information}/0.16.0"
127
+ sdk_information = "#{sdk_information}/0.17.0"
127
128
  add_user_agent_information(sdk_information)
128
129
  end
129
130
  end
@@ -23,15 +23,16 @@ module Azure::IotHub::Mgmt::V2017_07_01
23
23
  # @return [String] The version of the API.
24
24
  attr_reader :api_version
25
25
 
26
- # @return [String] Gets or sets the preferred language for the response.
26
+ # @return [String] The preferred language for the response.
27
27
  attr_accessor :accept_language
28
28
 
29
- # @return [Integer] Gets or sets the retry timeout in seconds for Long
30
- # Running Operations. Default value is 30.
29
+ # @return [Integer] The retry timeout in seconds for Long Running
30
+ # Operations. Default value is 30.
31
31
  attr_accessor :long_running_operation_retry_timeout
32
32
 
33
- # @return [Boolean] When set to true a unique x-ms-client-request-id value
34
- # is generated and included in each request. Default is true.
33
+ # @return [Boolean] Whether a unique x-ms-client-request-id should be
34
+ # generated. When set to true a unique x-ms-client-request-id value is
35
+ # generated and included in each request. Default is true.
35
36
  attr_accessor :generate_client_request_id
36
37
 
37
38
  # @return [Operations] operations
@@ -131,7 +132,7 @@ module Azure::IotHub::Mgmt::V2017_07_01
131
132
  #
132
133
  def add_telemetry
133
134
  sdk_information = 'azure_mgmt_iot_hub'
134
- sdk_information = "#{sdk_information}/0.16.0"
135
+ sdk_information = "#{sdk_information}/0.17.0"
135
136
  add_user_agent_information(sdk_information)
136
137
  end
137
138
  end
@@ -0,0 +1,89 @@
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
+ require 'uri'
7
+ require 'cgi'
8
+ require 'date'
9
+ require 'json'
10
+ require 'base64'
11
+ require 'erb'
12
+ require 'securerandom'
13
+ require 'time'
14
+ require 'timeliness'
15
+ require 'faraday'
16
+ require 'faraday-cookie_jar'
17
+ require 'concurrent'
18
+ require 'ms_rest'
19
+ require '2018-01-22/generated/azure_mgmt_iot_hub/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::IotHub::Mgmt::V2018_01_22
23
+ autoload :Operations, '2018-01-22/generated/azure_mgmt_iot_hub/operations.rb'
24
+ autoload :IotHubResource, '2018-01-22/generated/azure_mgmt_iot_hub/iot_hub_resource.rb'
25
+ autoload :Certificates, '2018-01-22/generated/azure_mgmt_iot_hub/certificates.rb'
26
+ autoload :IotHubClient, '2018-01-22/generated/azure_mgmt_iot_hub/iot_hub_client.rb'
27
+
28
+ module Models
29
+ autoload :IotHubSkuInfo, '2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_sku_info.rb'
30
+ autoload :CertificateVerificationDescription, '2018-01-22/generated/azure_mgmt_iot_hub/models/certificate_verification_description.rb'
31
+ autoload :CertificateBodyDescription, '2018-01-22/generated/azure_mgmt_iot_hub/models/certificate_body_description.rb'
32
+ autoload :CertificateDescription, '2018-01-22/generated/azure_mgmt_iot_hub/models/certificate_description.rb'
33
+ autoload :Resource, '2018-01-22/generated/azure_mgmt_iot_hub/models/resource.rb'
34
+ autoload :CertificatePropertiesWithNonce, '2018-01-22/generated/azure_mgmt_iot_hub/models/certificate_properties_with_nonce.rb'
35
+ autoload :SharedAccessSignatureAuthorizationRuleListResult, '2018-01-22/generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule_list_result.rb'
36
+ autoload :SharedAccessSignatureAuthorizationRule, '2018-01-22/generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule.rb'
37
+ autoload :OperationDisplay, '2018-01-22/generated/azure_mgmt_iot_hub/models/operation_display.rb'
38
+ autoload :EventHubProperties, '2018-01-22/generated/azure_mgmt_iot_hub/models/event_hub_properties.rb'
39
+ autoload :Operation, '2018-01-22/generated/azure_mgmt_iot_hub/models/operation.rb'
40
+ autoload :RoutingServiceBusTopicEndpointProperties, '2018-01-22/generated/azure_mgmt_iot_hub/models/routing_service_bus_topic_endpoint_properties.rb'
41
+ autoload :OperationListResult, '2018-01-22/generated/azure_mgmt_iot_hub/models/operation_list_result.rb'
42
+ autoload :RoutingStorageContainerProperties, '2018-01-22/generated/azure_mgmt_iot_hub/models/routing_storage_container_properties.rb'
43
+ autoload :ErrorDetails, '2018-01-22/generated/azure_mgmt_iot_hub/models/error_details.rb'
44
+ autoload :RouteProperties, '2018-01-22/generated/azure_mgmt_iot_hub/models/route_properties.rb'
45
+ autoload :IotHubQuotaMetricInfo, '2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_quota_metric_info.rb'
46
+ autoload :RoutingProperties, '2018-01-22/generated/azure_mgmt_iot_hub/models/routing_properties.rb'
47
+ autoload :IotHubQuotaMetricInfoListResult, '2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_quota_metric_info_list_result.rb'
48
+ autoload :MessagingEndpointProperties, '2018-01-22/generated/azure_mgmt_iot_hub/models/messaging_endpoint_properties.rb'
49
+ autoload :RegistryStatistics, '2018-01-22/generated/azure_mgmt_iot_hub/models/registry_statistics.rb'
50
+ autoload :CloudToDeviceProperties, '2018-01-22/generated/azure_mgmt_iot_hub/models/cloud_to_device_properties.rb'
51
+ autoload :JobResponse, '2018-01-22/generated/azure_mgmt_iot_hub/models/job_response.rb'
52
+ autoload :IotHubProperties, '2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_properties.rb'
53
+ autoload :JobResponseListResult, '2018-01-22/generated/azure_mgmt_iot_hub/models/job_response_list_result.rb'
54
+ autoload :CertificateListDescription, '2018-01-22/generated/azure_mgmt_iot_hub/models/certificate_list_description.rb'
55
+ autoload :IotHubCapacity, '2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_capacity.rb'
56
+ autoload :IpFilterRule, '2018-01-22/generated/azure_mgmt_iot_hub/models/ip_filter_rule.rb'
57
+ autoload :IotHubSkuDescription, '2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_sku_description.rb'
58
+ autoload :RoutingEventHubProperties, '2018-01-22/generated/azure_mgmt_iot_hub/models/routing_event_hub_properties.rb'
59
+ autoload :TagsResource, '2018-01-22/generated/azure_mgmt_iot_hub/models/tags_resource.rb'
60
+ autoload :FallbackRouteProperties, '2018-01-22/generated/azure_mgmt_iot_hub/models/fallback_route_properties.rb'
61
+ autoload :EventHubConsumerGroupInfo, '2018-01-22/generated/azure_mgmt_iot_hub/models/event_hub_consumer_group_info.rb'
62
+ autoload :FeedbackProperties, '2018-01-22/generated/azure_mgmt_iot_hub/models/feedback_properties.rb'
63
+ autoload :EventHubConsumerGroupsListResult, '2018-01-22/generated/azure_mgmt_iot_hub/models/event_hub_consumer_groups_list_result.rb'
64
+ autoload :CertificateProperties, '2018-01-22/generated/azure_mgmt_iot_hub/models/certificate_properties.rb'
65
+ autoload :IotHubSkuDescriptionListResult, '2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_sku_description_list_result.rb'
66
+ autoload :RoutingServiceBusQueueEndpointProperties, '2018-01-22/generated/azure_mgmt_iot_hub/models/routing_service_bus_queue_endpoint_properties.rb'
67
+ autoload :IotHubDescriptionListResult, '2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_description_list_result.rb'
68
+ autoload :StorageEndpointProperties, '2018-01-22/generated/azure_mgmt_iot_hub/models/storage_endpoint_properties.rb'
69
+ autoload :OperationInputs, '2018-01-22/generated/azure_mgmt_iot_hub/models/operation_inputs.rb'
70
+ autoload :CertificateWithNonceDescription, '2018-01-22/generated/azure_mgmt_iot_hub/models/certificate_with_nonce_description.rb'
71
+ autoload :IotHubNameAvailabilityInfo, '2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_name_availability_info.rb'
72
+ autoload :OperationsMonitoringProperties, '2018-01-22/generated/azure_mgmt_iot_hub/models/operations_monitoring_properties.rb'
73
+ autoload :ExportDevicesRequest, '2018-01-22/generated/azure_mgmt_iot_hub/models/export_devices_request.rb'
74
+ autoload :RoutingEndpoints, '2018-01-22/generated/azure_mgmt_iot_hub/models/routing_endpoints.rb'
75
+ autoload :ImportDevicesRequest, '2018-01-22/generated/azure_mgmt_iot_hub/models/import_devices_request.rb'
76
+ autoload :IotHubDescription, '2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_description.rb'
77
+ autoload :AccessRights, '2018-01-22/generated/azure_mgmt_iot_hub/models/access_rights.rb'
78
+ autoload :IpFilterActionType, '2018-01-22/generated/azure_mgmt_iot_hub/models/ip_filter_action_type.rb'
79
+ autoload :RoutingSource, '2018-01-22/generated/azure_mgmt_iot_hub/models/routing_source.rb'
80
+ autoload :OperationMonitoringLevel, '2018-01-22/generated/azure_mgmt_iot_hub/models/operation_monitoring_level.rb'
81
+ autoload :Capabilities, '2018-01-22/generated/azure_mgmt_iot_hub/models/capabilities.rb'
82
+ autoload :IotHubSku, '2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_sku.rb'
83
+ autoload :IotHubSkuTier, '2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_sku_tier.rb'
84
+ autoload :JobType, '2018-01-22/generated/azure_mgmt_iot_hub/models/job_type.rb'
85
+ autoload :JobStatus, '2018-01-22/generated/azure_mgmt_iot_hub/models/job_status.rb'
86
+ autoload :IotHubScaleType, '2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_scale_type.rb'
87
+ autoload :IotHubNameUnavailabilityReason, '2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_name_unavailability_reason.rb'
88
+ end
89
+ end
@@ -0,0 +1,711 @@
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::IotHub::Mgmt::V2018_01_22
7
+ #
8
+ # Use this API to manage the IoT hubs in your Azure subscription.
9
+ #
10
+ class Certificates
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Certificates class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [IotHubClient] reference to the IotHubClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Get the certificate list.
26
+ #
27
+ # Returns the list of certificates.
28
+ #
29
+ # @param resource_group_name [String] The name of the resource group that
30
+ # contains the IoT hub.
31
+ # @param resource_name [String] The name of the IoT hub.
32
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
33
+ # will be added to the HTTP request.
34
+ #
35
+ # @return [CertificateListDescription] operation results.
36
+ #
37
+ def list_by_iot_hub(resource_group_name, resource_name, custom_headers:nil)
38
+ response = list_by_iot_hub_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
39
+ response.body unless response.nil?
40
+ end
41
+
42
+ #
43
+ # Get the certificate list.
44
+ #
45
+ # Returns the list of certificates.
46
+ #
47
+ # @param resource_group_name [String] The name of the resource group that
48
+ # contains the IoT hub.
49
+ # @param resource_name [String] The name of the IoT hub.
50
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
51
+ # will be added to the HTTP request.
52
+ #
53
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
54
+ #
55
+ def list_by_iot_hub_with_http_info(resource_group_name, resource_name, custom_headers:nil)
56
+ list_by_iot_hub_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
57
+ end
58
+
59
+ #
60
+ # Get the certificate list.
61
+ #
62
+ # Returns the list of certificates.
63
+ #
64
+ # @param resource_group_name [String] The name of the resource group that
65
+ # contains the IoT hub.
66
+ # @param resource_name [String] The name of the IoT hub.
67
+ # @param [Hash{String => String}] A hash of custom headers that will be added
68
+ # to the HTTP request.
69
+ #
70
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
71
+ #
72
+ def list_by_iot_hub_async(resource_group_name, resource_name, custom_headers:nil)
73
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
74
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
75
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
76
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
77
+
78
+
79
+ request_headers = {}
80
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
81
+
82
+ # Set Headers
83
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
84
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
85
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates'
86
+
87
+ request_url = @base_url || @client.base_url
88
+
89
+ options = {
90
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
91
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name},
92
+ query_params: {'api-version' => @client.api_version},
93
+ headers: request_headers.merge(custom_headers || {}),
94
+ base_url: request_url
95
+ }
96
+ promise = @client.make_request_async(:get, path_template, options)
97
+
98
+ promise = promise.then do |result|
99
+ http_response = result.response
100
+ status_code = http_response.status
101
+ response_content = http_response.body
102
+ unless status_code == 200
103
+ error_model = JSON.load(response_content)
104
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
105
+ end
106
+
107
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
108
+ # Deserialize Response
109
+ if status_code == 200
110
+ begin
111
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
112
+ result_mapper = Azure::IotHub::Mgmt::V2018_01_22::Models::CertificateListDescription.mapper()
113
+ result.body = @client.deserialize(result_mapper, parsed_response)
114
+ rescue Exception => e
115
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
116
+ end
117
+ end
118
+
119
+ result
120
+ end
121
+
122
+ promise.execute
123
+ end
124
+
125
+ #
126
+ # Get the certificate.
127
+ #
128
+ # Returns the certificate.
129
+ #
130
+ # @param resource_group_name [String] The name of the resource group that
131
+ # contains the IoT hub.
132
+ # @param resource_name [String] The name of the IoT hub.
133
+ # @param certificate_name [String] The name of the certificate
134
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
135
+ # will be added to the HTTP request.
136
+ #
137
+ # @return [CertificateDescription] operation results.
138
+ #
139
+ def get(resource_group_name, resource_name, certificate_name, custom_headers:nil)
140
+ response = get_async(resource_group_name, resource_name, certificate_name, custom_headers:custom_headers).value!
141
+ response.body unless response.nil?
142
+ end
143
+
144
+ #
145
+ # Get the certificate.
146
+ #
147
+ # Returns the certificate.
148
+ #
149
+ # @param resource_group_name [String] The name of the resource group that
150
+ # contains the IoT hub.
151
+ # @param resource_name [String] The name of the IoT hub.
152
+ # @param certificate_name [String] The name of the certificate
153
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
154
+ # will be added to the HTTP request.
155
+ #
156
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
157
+ #
158
+ def get_with_http_info(resource_group_name, resource_name, certificate_name, custom_headers:nil)
159
+ get_async(resource_group_name, resource_name, certificate_name, custom_headers:custom_headers).value!
160
+ end
161
+
162
+ #
163
+ # Get the certificate.
164
+ #
165
+ # Returns the certificate.
166
+ #
167
+ # @param resource_group_name [String] The name of the resource group that
168
+ # contains the IoT hub.
169
+ # @param resource_name [String] The name of the IoT hub.
170
+ # @param certificate_name [String] The name of the certificate
171
+ # @param [Hash{String => String}] A hash of custom headers that will be added
172
+ # to the HTTP request.
173
+ #
174
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
175
+ #
176
+ def get_async(resource_group_name, resource_name, certificate_name, custom_headers:nil)
177
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
178
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
179
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
180
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
181
+ fail ArgumentError, 'certificate_name is nil' if certificate_name.nil?
182
+ fail ArgumentError, "'certificate_name' should satisfy the constraint - 'Pattern': '^[A-Za-z0-9-._]{1,64}$'" if !certificate_name.nil? && certificate_name.match(Regexp.new('^^[A-Za-z0-9-._]{1,64}$$')).nil?
183
+
184
+
185
+ request_headers = {}
186
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
187
+
188
+ # Set Headers
189
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
190
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
191
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates/{certificateName}'
192
+
193
+ request_url = @base_url || @client.base_url
194
+
195
+ options = {
196
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
197
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name,'certificateName' => certificate_name},
198
+ query_params: {'api-version' => @client.api_version},
199
+ headers: request_headers.merge(custom_headers || {}),
200
+ base_url: request_url
201
+ }
202
+ promise = @client.make_request_async(:get, path_template, options)
203
+
204
+ promise = promise.then do |result|
205
+ http_response = result.response
206
+ status_code = http_response.status
207
+ response_content = http_response.body
208
+ unless status_code == 200
209
+ error_model = JSON.load(response_content)
210
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
211
+ end
212
+
213
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
214
+ # Deserialize Response
215
+ if status_code == 200
216
+ begin
217
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
218
+ result_mapper = Azure::IotHub::Mgmt::V2018_01_22::Models::CertificateDescription.mapper()
219
+ result.body = @client.deserialize(result_mapper, parsed_response)
220
+ rescue Exception => e
221
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
222
+ end
223
+ end
224
+
225
+ result
226
+ end
227
+
228
+ promise.execute
229
+ end
230
+
231
+ #
232
+ # Upload the certificate to the IoT hub.
233
+ #
234
+ # Adds new or replaces existing certificate.
235
+ #
236
+ # @param resource_group_name [String] The name of the resource group that
237
+ # contains the IoT hub.
238
+ # @param resource_name [String] The name of the IoT hub.
239
+ # @param certificate_name [String] The name of the certificate
240
+ # @param certificate_description [CertificateBodyDescription] The certificate
241
+ # body.
242
+ # @param if_match [String] ETag of the Certificate. Do not specify for creating
243
+ # a brand new certificate. Required to update an existing certificate.
244
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
245
+ # will be added to the HTTP request.
246
+ #
247
+ # @return [CertificateDescription] operation results.
248
+ #
249
+ def create_or_update(resource_group_name, resource_name, certificate_name, certificate_description, if_match:nil, custom_headers:nil)
250
+ response = create_or_update_async(resource_group_name, resource_name, certificate_name, certificate_description, if_match:if_match, custom_headers:custom_headers).value!
251
+ response.body unless response.nil?
252
+ end
253
+
254
+ #
255
+ # Upload the certificate to the IoT hub.
256
+ #
257
+ # Adds new or replaces existing certificate.
258
+ #
259
+ # @param resource_group_name [String] The name of the resource group that
260
+ # contains the IoT hub.
261
+ # @param resource_name [String] The name of the IoT hub.
262
+ # @param certificate_name [String] The name of the certificate
263
+ # @param certificate_description [CertificateBodyDescription] The certificate
264
+ # body.
265
+ # @param if_match [String] ETag of the Certificate. Do not specify for creating
266
+ # a brand new certificate. Required to update an existing certificate.
267
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
268
+ # will be added to the HTTP request.
269
+ #
270
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
271
+ #
272
+ def create_or_update_with_http_info(resource_group_name, resource_name, certificate_name, certificate_description, if_match:nil, custom_headers:nil)
273
+ create_or_update_async(resource_group_name, resource_name, certificate_name, certificate_description, if_match:if_match, custom_headers:custom_headers).value!
274
+ end
275
+
276
+ #
277
+ # Upload the certificate to the IoT hub.
278
+ #
279
+ # Adds new or replaces existing certificate.
280
+ #
281
+ # @param resource_group_name [String] The name of the resource group that
282
+ # contains the IoT hub.
283
+ # @param resource_name [String] The name of the IoT hub.
284
+ # @param certificate_name [String] The name of the certificate
285
+ # @param certificate_description [CertificateBodyDescription] The certificate
286
+ # body.
287
+ # @param if_match [String] ETag of the Certificate. Do not specify for creating
288
+ # a brand new certificate. Required to update an existing certificate.
289
+ # @param [Hash{String => String}] A hash of custom headers that will be added
290
+ # to the HTTP request.
291
+ #
292
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
293
+ #
294
+ def create_or_update_async(resource_group_name, resource_name, certificate_name, certificate_description, if_match:nil, custom_headers:nil)
295
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
296
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
297
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
298
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
299
+ fail ArgumentError, 'certificate_name is nil' if certificate_name.nil?
300
+ fail ArgumentError, "'certificate_name' should satisfy the constraint - 'Pattern': '^[A-Za-z0-9-._]{1,64}$'" if !certificate_name.nil? && certificate_name.match(Regexp.new('^^[A-Za-z0-9-._]{1,64}$$')).nil?
301
+ fail ArgumentError, 'certificate_description is nil' if certificate_description.nil?
302
+
303
+
304
+ request_headers = {}
305
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
306
+
307
+ # Set Headers
308
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
309
+ request_headers['If-Match'] = if_match unless if_match.nil?
310
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
311
+
312
+ # Serialize Request
313
+ request_mapper = Azure::IotHub::Mgmt::V2018_01_22::Models::CertificateBodyDescription.mapper()
314
+ request_content = @client.serialize(request_mapper, certificate_description)
315
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
316
+
317
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates/{certificateName}'
318
+
319
+ request_url = @base_url || @client.base_url
320
+
321
+ options = {
322
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
323
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name,'certificateName' => certificate_name},
324
+ query_params: {'api-version' => @client.api_version},
325
+ body: request_content,
326
+ headers: request_headers.merge(custom_headers || {}),
327
+ base_url: request_url
328
+ }
329
+ promise = @client.make_request_async(:put, path_template, options)
330
+
331
+ promise = promise.then do |result|
332
+ http_response = result.response
333
+ status_code = http_response.status
334
+ response_content = http_response.body
335
+ unless status_code == 201 || status_code == 200
336
+ error_model = JSON.load(response_content)
337
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
338
+ end
339
+
340
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
341
+ # Deserialize Response
342
+ if status_code == 201
343
+ begin
344
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
345
+ result_mapper = Azure::IotHub::Mgmt::V2018_01_22::Models::CertificateDescription.mapper()
346
+ result.body = @client.deserialize(result_mapper, parsed_response)
347
+ rescue Exception => e
348
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
349
+ end
350
+ end
351
+ # Deserialize Response
352
+ if status_code == 200
353
+ begin
354
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
355
+ result_mapper = Azure::IotHub::Mgmt::V2018_01_22::Models::CertificateDescription.mapper()
356
+ result.body = @client.deserialize(result_mapper, parsed_response)
357
+ rescue Exception => e
358
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
359
+ end
360
+ end
361
+
362
+ result
363
+ end
364
+
365
+ promise.execute
366
+ end
367
+
368
+ #
369
+ # Delete an X509 certificate.
370
+ #
371
+ # Deletes an existing X509 certificate or does nothing if it does not exist.
372
+ #
373
+ # @param resource_group_name [String] The name of the resource group that
374
+ # contains the IoT hub.
375
+ # @param resource_name [String] The name of the IoT hub.
376
+ # @param certificate_name [String] The name of the certificate
377
+ # @param if_match [String] ETag of the Certificate.
378
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
379
+ # will be added to the HTTP request.
380
+ #
381
+ #
382
+ def delete(resource_group_name, resource_name, certificate_name, if_match, custom_headers:nil)
383
+ response = delete_async(resource_group_name, resource_name, certificate_name, if_match, custom_headers:custom_headers).value!
384
+ nil
385
+ end
386
+
387
+ #
388
+ # Delete an X509 certificate.
389
+ #
390
+ # Deletes an existing X509 certificate or does nothing if it does not exist.
391
+ #
392
+ # @param resource_group_name [String] The name of the resource group that
393
+ # contains the IoT hub.
394
+ # @param resource_name [String] The name of the IoT hub.
395
+ # @param certificate_name [String] The name of the certificate
396
+ # @param if_match [String] ETag of the Certificate.
397
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
398
+ # will be added to the HTTP request.
399
+ #
400
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
401
+ #
402
+ def delete_with_http_info(resource_group_name, resource_name, certificate_name, if_match, custom_headers:nil)
403
+ delete_async(resource_group_name, resource_name, certificate_name, if_match, custom_headers:custom_headers).value!
404
+ end
405
+
406
+ #
407
+ # Delete an X509 certificate.
408
+ #
409
+ # Deletes an existing X509 certificate or does nothing if it does not exist.
410
+ #
411
+ # @param resource_group_name [String] The name of the resource group that
412
+ # contains the IoT hub.
413
+ # @param resource_name [String] The name of the IoT hub.
414
+ # @param certificate_name [String] The name of the certificate
415
+ # @param if_match [String] ETag of the Certificate.
416
+ # @param [Hash{String => String}] A hash of custom headers that will be added
417
+ # to the HTTP request.
418
+ #
419
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
420
+ #
421
+ def delete_async(resource_group_name, resource_name, certificate_name, if_match, custom_headers:nil)
422
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
423
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
424
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
425
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
426
+ fail ArgumentError, 'certificate_name is nil' if certificate_name.nil?
427
+ fail ArgumentError, "'certificate_name' should satisfy the constraint - 'Pattern': '^[A-Za-z0-9-._]{1,64}$'" if !certificate_name.nil? && certificate_name.match(Regexp.new('^^[A-Za-z0-9-._]{1,64}$$')).nil?
428
+ fail ArgumentError, 'if_match is nil' if if_match.nil?
429
+
430
+
431
+ request_headers = {}
432
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
433
+
434
+ # Set Headers
435
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
436
+ request_headers['If-Match'] = if_match unless if_match.nil?
437
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
438
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates/{certificateName}'
439
+
440
+ request_url = @base_url || @client.base_url
441
+
442
+ options = {
443
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
444
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name,'certificateName' => certificate_name},
445
+ query_params: {'api-version' => @client.api_version},
446
+ headers: request_headers.merge(custom_headers || {}),
447
+ base_url: request_url
448
+ }
449
+ promise = @client.make_request_async(:delete, path_template, options)
450
+
451
+ promise = promise.then do |result|
452
+ http_response = result.response
453
+ status_code = http_response.status
454
+ response_content = http_response.body
455
+ unless status_code == 200 || status_code == 204
456
+ error_model = JSON.load(response_content)
457
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
458
+ end
459
+
460
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
461
+
462
+ result
463
+ end
464
+
465
+ promise.execute
466
+ end
467
+
468
+ #
469
+ # Generate verification code for proof of possession flow.
470
+ #
471
+ # Generates verification code for proof of possession flow. The verification
472
+ # code will be used to generate a leaf certificate.
473
+ #
474
+ # @param resource_group_name [String] The name of the resource group that
475
+ # contains the IoT hub.
476
+ # @param resource_name [String] The name of the IoT hub.
477
+ # @param certificate_name [String] The name of the certificate
478
+ # @param if_match [String] ETag of the Certificate.
479
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
480
+ # will be added to the HTTP request.
481
+ #
482
+ # @return [CertificateWithNonceDescription] operation results.
483
+ #
484
+ def generate_verification_code(resource_group_name, resource_name, certificate_name, if_match, custom_headers:nil)
485
+ response = generate_verification_code_async(resource_group_name, resource_name, certificate_name, if_match, custom_headers:custom_headers).value!
486
+ response.body unless response.nil?
487
+ end
488
+
489
+ #
490
+ # Generate verification code for proof of possession flow.
491
+ #
492
+ # Generates verification code for proof of possession flow. The verification
493
+ # code will be used to generate a leaf certificate.
494
+ #
495
+ # @param resource_group_name [String] The name of the resource group that
496
+ # contains the IoT hub.
497
+ # @param resource_name [String] The name of the IoT hub.
498
+ # @param certificate_name [String] The name of the certificate
499
+ # @param if_match [String] ETag of the Certificate.
500
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
501
+ # will be added to the HTTP request.
502
+ #
503
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
504
+ #
505
+ def generate_verification_code_with_http_info(resource_group_name, resource_name, certificate_name, if_match, custom_headers:nil)
506
+ generate_verification_code_async(resource_group_name, resource_name, certificate_name, if_match, custom_headers:custom_headers).value!
507
+ end
508
+
509
+ #
510
+ # Generate verification code for proof of possession flow.
511
+ #
512
+ # Generates verification code for proof of possession flow. The verification
513
+ # code will be used to generate a leaf certificate.
514
+ #
515
+ # @param resource_group_name [String] The name of the resource group that
516
+ # contains the IoT hub.
517
+ # @param resource_name [String] The name of the IoT hub.
518
+ # @param certificate_name [String] The name of the certificate
519
+ # @param if_match [String] ETag of the Certificate.
520
+ # @param [Hash{String => String}] A hash of custom headers that will be added
521
+ # to the HTTP request.
522
+ #
523
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
524
+ #
525
+ def generate_verification_code_async(resource_group_name, resource_name, certificate_name, if_match, custom_headers:nil)
526
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
527
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
528
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
529
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
530
+ fail ArgumentError, 'certificate_name is nil' if certificate_name.nil?
531
+ fail ArgumentError, "'certificate_name' should satisfy the constraint - 'Pattern': '^[A-Za-z0-9-._]{1,64}$'" if !certificate_name.nil? && certificate_name.match(Regexp.new('^^[A-Za-z0-9-._]{1,64}$$')).nil?
532
+ fail ArgumentError, 'if_match is nil' if if_match.nil?
533
+
534
+
535
+ request_headers = {}
536
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
537
+
538
+ # Set Headers
539
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
540
+ request_headers['If-Match'] = if_match unless if_match.nil?
541
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
542
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates/{certificateName}/generateVerificationCode'
543
+
544
+ request_url = @base_url || @client.base_url
545
+
546
+ options = {
547
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
548
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name,'certificateName' => certificate_name},
549
+ query_params: {'api-version' => @client.api_version},
550
+ headers: request_headers.merge(custom_headers || {}),
551
+ base_url: request_url
552
+ }
553
+ promise = @client.make_request_async(:post, path_template, options)
554
+
555
+ promise = promise.then do |result|
556
+ http_response = result.response
557
+ status_code = http_response.status
558
+ response_content = http_response.body
559
+ unless status_code == 200
560
+ error_model = JSON.load(response_content)
561
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
562
+ end
563
+
564
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
565
+ # Deserialize Response
566
+ if status_code == 200
567
+ begin
568
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
569
+ result_mapper = Azure::IotHub::Mgmt::V2018_01_22::Models::CertificateWithNonceDescription.mapper()
570
+ result.body = @client.deserialize(result_mapper, parsed_response)
571
+ rescue Exception => e
572
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
573
+ end
574
+ end
575
+
576
+ result
577
+ end
578
+
579
+ promise.execute
580
+ end
581
+
582
+ #
583
+ # Verify certificate's private key possession.
584
+ #
585
+ # Verifies the certificate's private key possession by providing the leaf cert
586
+ # issued by the verifying pre uploaded certificate.
587
+ #
588
+ # @param resource_group_name [String] The name of the resource group that
589
+ # contains the IoT hub.
590
+ # @param resource_name [String] The name of the IoT hub.
591
+ # @param certificate_name [String] The name of the certificate
592
+ # @param certificate_verification_body [CertificateVerificationDescription] The
593
+ # name of the certificate
594
+ # @param if_match [String] ETag of the Certificate.
595
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
596
+ # will be added to the HTTP request.
597
+ #
598
+ # @return [CertificateDescription] operation results.
599
+ #
600
+ def verify(resource_group_name, resource_name, certificate_name, certificate_verification_body, if_match, custom_headers:nil)
601
+ response = verify_async(resource_group_name, resource_name, certificate_name, certificate_verification_body, if_match, custom_headers:custom_headers).value!
602
+ response.body unless response.nil?
603
+ end
604
+
605
+ #
606
+ # Verify certificate's private key possession.
607
+ #
608
+ # Verifies the certificate's private key possession by providing the leaf cert
609
+ # issued by the verifying pre uploaded certificate.
610
+ #
611
+ # @param resource_group_name [String] The name of the resource group that
612
+ # contains the IoT hub.
613
+ # @param resource_name [String] The name of the IoT hub.
614
+ # @param certificate_name [String] The name of the certificate
615
+ # @param certificate_verification_body [CertificateVerificationDescription] The
616
+ # name of the certificate
617
+ # @param if_match [String] ETag of the Certificate.
618
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
619
+ # will be added to the HTTP request.
620
+ #
621
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
622
+ #
623
+ def verify_with_http_info(resource_group_name, resource_name, certificate_name, certificate_verification_body, if_match, custom_headers:nil)
624
+ verify_async(resource_group_name, resource_name, certificate_name, certificate_verification_body, if_match, custom_headers:custom_headers).value!
625
+ end
626
+
627
+ #
628
+ # Verify certificate's private key possession.
629
+ #
630
+ # Verifies the certificate's private key possession by providing the leaf cert
631
+ # issued by the verifying pre uploaded certificate.
632
+ #
633
+ # @param resource_group_name [String] The name of the resource group that
634
+ # contains the IoT hub.
635
+ # @param resource_name [String] The name of the IoT hub.
636
+ # @param certificate_name [String] The name of the certificate
637
+ # @param certificate_verification_body [CertificateVerificationDescription] The
638
+ # name of the certificate
639
+ # @param if_match [String] ETag of the Certificate.
640
+ # @param [Hash{String => String}] A hash of custom headers that will be added
641
+ # to the HTTP request.
642
+ #
643
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
644
+ #
645
+ def verify_async(resource_group_name, resource_name, certificate_name, certificate_verification_body, if_match, custom_headers:nil)
646
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
647
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
648
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
649
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
650
+ fail ArgumentError, 'certificate_name is nil' if certificate_name.nil?
651
+ fail ArgumentError, "'certificate_name' should satisfy the constraint - 'Pattern': '^[A-Za-z0-9-._]{1,64}$'" if !certificate_name.nil? && certificate_name.match(Regexp.new('^^[A-Za-z0-9-._]{1,64}$$')).nil?
652
+ fail ArgumentError, 'certificate_verification_body is nil' if certificate_verification_body.nil?
653
+ fail ArgumentError, 'if_match is nil' if if_match.nil?
654
+
655
+
656
+ request_headers = {}
657
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
658
+
659
+ # Set Headers
660
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
661
+ request_headers['If-Match'] = if_match unless if_match.nil?
662
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
663
+
664
+ # Serialize Request
665
+ request_mapper = Azure::IotHub::Mgmt::V2018_01_22::Models::CertificateVerificationDescription.mapper()
666
+ request_content = @client.serialize(request_mapper, certificate_verification_body)
667
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
668
+
669
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates/{certificateName}/verify'
670
+
671
+ request_url = @base_url || @client.base_url
672
+
673
+ options = {
674
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
675
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name,'certificateName' => certificate_name},
676
+ query_params: {'api-version' => @client.api_version},
677
+ body: request_content,
678
+ headers: request_headers.merge(custom_headers || {}),
679
+ base_url: request_url
680
+ }
681
+ promise = @client.make_request_async(:post, path_template, options)
682
+
683
+ promise = promise.then do |result|
684
+ http_response = result.response
685
+ status_code = http_response.status
686
+ response_content = http_response.body
687
+ unless status_code == 200
688
+ error_model = JSON.load(response_content)
689
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
690
+ end
691
+
692
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
693
+ # Deserialize Response
694
+ if status_code == 200
695
+ begin
696
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
697
+ result_mapper = Azure::IotHub::Mgmt::V2018_01_22::Models::CertificateDescription.mapper()
698
+ result.body = @client.deserialize(result_mapper, parsed_response)
699
+ rescue Exception => e
700
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
701
+ end
702
+ end
703
+
704
+ result
705
+ end
706
+
707
+ promise.execute
708
+ end
709
+
710
+ end
711
+ end