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