Class: Azure::MediaServices::Mgmt::V2018_07_01::StreamingEndpoints
- Inherits:
-
Object
- Object
- Azure::MediaServices::Mgmt::V2018_07_01::StreamingEndpoints
- Includes:
- MsRestAzure
- Defined in:
- lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb
Overview
StreamingEndpoints
Instance Attribute Summary collapse
-
#client ⇒ AzureMediaServices
readonly
Reference to the AzureMediaServices.
Instance Method Summary collapse
-
#begin_create(resource_group_name, account_name, streaming_endpoint_name, parameters, auto_start: nil, custom_headers: nil) ⇒ StreamingEndpoint
Create StreamingEndpoint.
-
#begin_create_async(resource_group_name, account_name, streaming_endpoint_name, parameters, auto_start: nil, custom_headers: nil) ⇒ Concurrent::Promise
Create StreamingEndpoint.
-
#begin_create_with_http_info(resource_group_name, account_name, streaming_endpoint_name, parameters, auto_start: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Create StreamingEndpoint.
-
#begin_delete(resource_group_name, account_name, streaming_endpoint_name, custom_headers: nil) ⇒ Object
Delete StreamingEndpoint.
-
#begin_delete_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers: nil) ⇒ Concurrent::Promise
Delete StreamingEndpoint.
-
#begin_delete_with_http_info(resource_group_name, account_name, streaming_endpoint_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Delete StreamingEndpoint.
-
#begin_scale(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers: nil) ⇒ Object
Scale StreamingEndpoint.
-
#begin_scale_async(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Scale StreamingEndpoint.
-
#begin_scale_with_http_info(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Scale StreamingEndpoint.
-
#begin_start(resource_group_name, account_name, streaming_endpoint_name, custom_headers: nil) ⇒ Object
Start StreamingEndpoint.
-
#begin_start_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers: nil) ⇒ Concurrent::Promise
Start StreamingEndpoint.
-
#begin_start_with_http_info(resource_group_name, account_name, streaming_endpoint_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Start StreamingEndpoint.
-
#begin_stop(resource_group_name, account_name, streaming_endpoint_name, custom_headers: nil) ⇒ Object
Stop StreamingEndpoint.
-
#begin_stop_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers: nil) ⇒ Concurrent::Promise
Stop StreamingEndpoint.
-
#begin_stop_with_http_info(resource_group_name, account_name, streaming_endpoint_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Stop StreamingEndpoint.
-
#begin_update(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers: nil) ⇒ StreamingEndpoint
Update StreamingEndpoint.
-
#begin_update_async(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Update StreamingEndpoint.
-
#begin_update_with_http_info(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Update StreamingEndpoint.
-
#create(resource_group_name, account_name, streaming_endpoint_name, parameters, auto_start: nil, custom_headers: nil) ⇒ StreamingEndpoint
Create StreamingEndpoint.
-
#create_async(resource_group_name, account_name, streaming_endpoint_name, parameters, auto_start: nil, custom_headers: nil) ⇒ Concurrent::Promise
Azure subscription.
-
#delete(resource_group_name, account_name, streaming_endpoint_name, custom_headers: nil) ⇒ Object
Delete StreamingEndpoint.
-
#delete_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers: nil) ⇒ Concurrent::Promise
Azure subscription.
-
#get(resource_group_name, account_name, streaming_endpoint_name, custom_headers: nil) ⇒ StreamingEndpoint
Get StreamingEndpoint.
-
#get_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers: nil) ⇒ Concurrent::Promise
Get StreamingEndpoint.
-
#get_with_http_info(resource_group_name, account_name, streaming_endpoint_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get StreamingEndpoint.
-
#initialize(client) ⇒ StreamingEndpoints
constructor
Creates and initializes a new instance of the StreamingEndpoints class.
-
#list(resource_group_name, account_name, custom_headers: nil) ⇒ Array<StreamingEndpoint>
List StreamingEndpoints.
-
#list_as_lazy(resource_group_name, account_name, custom_headers: nil) ⇒ StreamingEndpointListResult
List StreamingEndpoints.
-
#list_async(resource_group_name, account_name, custom_headers: nil) ⇒ Concurrent::Promise
List StreamingEndpoints.
-
#list_next(next_page_link, custom_headers: nil) ⇒ StreamingEndpointListResult
List StreamingEndpoints.
-
#list_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
List StreamingEndpoints.
-
#list_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
List StreamingEndpoints.
-
#list_with_http_info(resource_group_name, account_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
List StreamingEndpoints.
-
#scale(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers: nil) ⇒ Object
Scale StreamingEndpoint.
-
#scale_async(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Azure subscription.
-
#start(resource_group_name, account_name, streaming_endpoint_name, custom_headers: nil) ⇒ Object
Start StreamingEndpoint.
-
#start_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers: nil) ⇒ Concurrent::Promise
Azure subscription.
-
#stop(resource_group_name, account_name, streaming_endpoint_name, custom_headers: nil) ⇒ Object
Stop StreamingEndpoint.
-
#stop_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers: nil) ⇒ Concurrent::Promise
Azure subscription.
-
#update(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers: nil) ⇒ StreamingEndpoint
Update StreamingEndpoint.
-
#update_async(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Azure subscription.
Constructor Details
#initialize(client) ⇒ StreamingEndpoints
Creates and initializes a new instance of the StreamingEndpoints class.
17 18 19 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 17 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ AzureMediaServices (readonly)
Returns reference to the AzureMediaServices.
22 23 24 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 22 def client @client end |
Instance Method Details
#begin_create(resource_group_name, account_name, streaming_endpoint_name, parameters, auto_start: nil, custom_headers: nil) ⇒ StreamingEndpoint
Create StreamingEndpoint
Creates a StreamingEndpoint.
Azure subscription. creation. automatically started on creation. will be added to the HTTP request.
543 544 545 546 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 543 def begin_create(resource_group_name, account_name, streaming_endpoint_name, parameters, auto_start:nil, custom_headers:nil) response = begin_create_async(resource_group_name, account_name, streaming_endpoint_name, parameters, auto_start:auto_start, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_create_async(resource_group_name, account_name, streaming_endpoint_name, parameters, auto_start: nil, custom_headers: nil) ⇒ Concurrent::Promise
Create StreamingEndpoint
Creates a StreamingEndpoint.
Azure subscription. creation. automatically started on creation. to the HTTP request.
588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 588 def begin_create_async(resource_group_name, account_name, streaming_endpoint_name, parameters, auto_start:nil, custom_headers:nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'account_name is nil' if account_name.nil? fail ArgumentError, 'streaming_endpoint_name is nil' if streaming_endpoint_name.nil? fail ArgumentError, "'streaming_endpoint_name' should satisfy the constraint - 'MaxLength': '24'" if !streaming_endpoint_name.nil? && streaming_endpoint_name.length > 24 fail ArgumentError, "'streaming_endpoint_name' should satisfy the constraint - 'MinLength': '1'" if !streaming_endpoint_name.nil? && streaming_endpoint_name.length < 1 fail ArgumentError, "'streaming_endpoint_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$'" if !streaming_endpoint_name.nil? && streaming_endpoint_name.match(Regexp.new('^^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$$')).nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::MediaServices::Mgmt::V2018_07_01::Models::StreamingEndpoint.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints/{streamingEndpointName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'streamingEndpointName' => streaming_endpoint_name}, query_params: {'api-version' => @client.api_version,'autoStart' => auto_start}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::MediaServices::Mgmt::V2018_07_01::Models::StreamingEndpoint.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::MediaServices::Mgmt::V2018_07_01::Models::StreamingEndpoint.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#begin_create_with_http_info(resource_group_name, account_name, streaming_endpoint_name, parameters, auto_start: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Create StreamingEndpoint
Creates a StreamingEndpoint.
Azure subscription. creation. automatically started on creation. will be added to the HTTP request.
566 567 568 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 566 def begin_create_with_http_info(resource_group_name, account_name, streaming_endpoint_name, parameters, auto_start:nil, custom_headers:nil) begin_create_async(resource_group_name, account_name, streaming_endpoint_name, parameters, auto_start:auto_start, custom_headers:custom_headers).value! end |
#begin_delete(resource_group_name, account_name, streaming_endpoint_name, custom_headers: nil) ⇒ Object
Delete StreamingEndpoint
Deletes a StreamingEndpoint.
Azure subscription. will be added to the HTTP request.
812 813 814 815 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 812 def begin_delete(resource_group_name, account_name, streaming_endpoint_name, custom_headers:nil) response = begin_delete_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:custom_headers).value! nil end |
#begin_delete_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers: nil) ⇒ Concurrent::Promise
Delete StreamingEndpoint
Deletes a StreamingEndpoint.
Azure subscription. to the HTTP request.
849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 849 def begin_delete_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'account_name is nil' if account_name.nil? fail ArgumentError, 'streaming_endpoint_name is nil' if streaming_endpoint_name.nil? fail ArgumentError, "'streaming_endpoint_name' should satisfy the constraint - 'MaxLength': '24'" if !streaming_endpoint_name.nil? && streaming_endpoint_name.length > 24 fail ArgumentError, "'streaming_endpoint_name' should satisfy the constraint - 'MinLength': '1'" if !streaming_endpoint_name.nil? && streaming_endpoint_name.length < 1 fail ArgumentError, "'streaming_endpoint_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$'" if !streaming_endpoint_name.nil? && streaming_endpoint_name.match(Regexp.new('^^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$$')).nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints/{streamingEndpointName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'streamingEndpointName' => streaming_endpoint_name}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 || status_code == 204 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end |
#begin_delete_with_http_info(resource_group_name, account_name, streaming_endpoint_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Delete StreamingEndpoint
Deletes a StreamingEndpoint.
Azure subscription. will be added to the HTTP request.
831 832 833 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 831 def begin_delete_with_http_info(resource_group_name, account_name, streaming_endpoint_name, custom_headers:nil) begin_delete_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:custom_headers).value! end |
#begin_scale(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers: nil) ⇒ Object
Scale StreamingEndpoint
Scales an existing StreamingEndpoint.
Azure subscription. parameters will be added to the HTTP request.
1111 1112 1113 1114 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 1111 def begin_scale(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers:nil) response = begin_scale_async(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers:custom_headers).value! nil end |
#begin_scale_async(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Scale StreamingEndpoint
Scales an existing StreamingEndpoint.
Azure subscription. parameters to the HTTP request.
1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 1152 def begin_scale_async(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers:nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'account_name is nil' if account_name.nil? fail ArgumentError, 'streaming_endpoint_name is nil' if streaming_endpoint_name.nil? fail ArgumentError, "'streaming_endpoint_name' should satisfy the constraint - 'MaxLength': '24'" if !streaming_endpoint_name.nil? && streaming_endpoint_name.length > 24 fail ArgumentError, "'streaming_endpoint_name' should satisfy the constraint - 'MinLength': '1'" if !streaming_endpoint_name.nil? && streaming_endpoint_name.length < 1 fail ArgumentError, "'streaming_endpoint_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$'" if !streaming_endpoint_name.nil? && streaming_endpoint_name.match(Regexp.new('^^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$$')).nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::MediaServices::Mgmt::V2018_07_01::Models::StreamingEntityScaleUnit.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints/{streamingEndpointName}/scale' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'streamingEndpointName' => streaming_endpoint_name}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end |
#begin_scale_with_http_info(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Scale StreamingEndpoint
Scales an existing StreamingEndpoint.
Azure subscription. parameters will be added to the HTTP request.
1132 1133 1134 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 1132 def begin_scale_with_http_info(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers:nil) begin_scale_async(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers:custom_headers).value! end |
#begin_start(resource_group_name, account_name, streaming_endpoint_name, custom_headers: nil) ⇒ Object
Start StreamingEndpoint
Starts an existing StreamingEndpoint.
Azure subscription. will be added to the HTTP request.
911 912 913 914 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 911 def begin_start(resource_group_name, account_name, streaming_endpoint_name, custom_headers:nil) response = begin_start_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:custom_headers).value! nil end |
#begin_start_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers: nil) ⇒ Concurrent::Promise
Start StreamingEndpoint
Starts an existing StreamingEndpoint.
Azure subscription. to the HTTP request.
948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 948 def begin_start_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'account_name is nil' if account_name.nil? fail ArgumentError, 'streaming_endpoint_name is nil' if streaming_endpoint_name.nil? fail ArgumentError, "'streaming_endpoint_name' should satisfy the constraint - 'MaxLength': '24'" if !streaming_endpoint_name.nil? && streaming_endpoint_name.length > 24 fail ArgumentError, "'streaming_endpoint_name' should satisfy the constraint - 'MinLength': '1'" if !streaming_endpoint_name.nil? && streaming_endpoint_name.length < 1 fail ArgumentError, "'streaming_endpoint_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$'" if !streaming_endpoint_name.nil? && streaming_endpoint_name.match(Regexp.new('^^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$$')).nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints/{streamingEndpointName}/start' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'streamingEndpointName' => streaming_endpoint_name}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end |
#begin_start_with_http_info(resource_group_name, account_name, streaming_endpoint_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Start StreamingEndpoint
Starts an existing StreamingEndpoint.
Azure subscription. will be added to the HTTP request.
930 931 932 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 930 def begin_start_with_http_info(resource_group_name, account_name, streaming_endpoint_name, custom_headers:nil) begin_start_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:custom_headers).value! end |
#begin_stop(resource_group_name, account_name, streaming_endpoint_name, custom_headers: nil) ⇒ Object
Stop StreamingEndpoint
Stops an existing StreamingEndpoint.
Azure subscription. will be added to the HTTP request.
1010 1011 1012 1013 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 1010 def begin_stop(resource_group_name, account_name, streaming_endpoint_name, custom_headers:nil) response = begin_stop_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:custom_headers).value! nil end |
#begin_stop_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers: nil) ⇒ Concurrent::Promise
Stop StreamingEndpoint
Stops an existing StreamingEndpoint.
Azure subscription. to the HTTP request.
1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 1047 def begin_stop_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'account_name is nil' if account_name.nil? fail ArgumentError, 'streaming_endpoint_name is nil' if streaming_endpoint_name.nil? fail ArgumentError, "'streaming_endpoint_name' should satisfy the constraint - 'MaxLength': '24'" if !streaming_endpoint_name.nil? && streaming_endpoint_name.length > 24 fail ArgumentError, "'streaming_endpoint_name' should satisfy the constraint - 'MinLength': '1'" if !streaming_endpoint_name.nil? && streaming_endpoint_name.length < 1 fail ArgumentError, "'streaming_endpoint_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$'" if !streaming_endpoint_name.nil? && streaming_endpoint_name.match(Regexp.new('^^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$$')).nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints/{streamingEndpointName}/stop' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'streamingEndpointName' => streaming_endpoint_name}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end |
#begin_stop_with_http_info(resource_group_name, account_name, streaming_endpoint_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Stop StreamingEndpoint
Stops an existing StreamingEndpoint.
Azure subscription. will be added to the HTTP request.
1029 1030 1031 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 1029 def begin_stop_with_http_info(resource_group_name, account_name, streaming_endpoint_name, custom_headers:nil) begin_stop_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:custom_headers).value! end |
#begin_update(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers: nil) ⇒ StreamingEndpoint
Update StreamingEndpoint
Updates a existing StreamingEndpoint.
Azure subscription. creation. will be added to the HTTP request.
681 682 683 684 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 681 def begin_update(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers:nil) response = begin_update_async(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_update_async(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Update StreamingEndpoint
Updates a existing StreamingEndpoint.
Azure subscription. creation. to the HTTP request.
722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 722 def begin_update_async(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers:nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'account_name is nil' if account_name.nil? fail ArgumentError, 'streaming_endpoint_name is nil' if streaming_endpoint_name.nil? fail ArgumentError, "'streaming_endpoint_name' should satisfy the constraint - 'MaxLength': '24'" if !streaming_endpoint_name.nil? && streaming_endpoint_name.length > 24 fail ArgumentError, "'streaming_endpoint_name' should satisfy the constraint - 'MinLength': '1'" if !streaming_endpoint_name.nil? && streaming_endpoint_name.length < 1 fail ArgumentError, "'streaming_endpoint_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$'" if !streaming_endpoint_name.nil? && streaming_endpoint_name.match(Regexp.new('^^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$$')).nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::MediaServices::Mgmt::V2018_07_01::Models::StreamingEndpoint.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints/{streamingEndpointName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'streamingEndpointName' => streaming_endpoint_name}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:patch, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::MediaServices::Mgmt::V2018_07_01::Models::StreamingEndpoint.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::MediaServices::Mgmt::V2018_07_01::Models::StreamingEndpoint.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#begin_update_with_http_info(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Update StreamingEndpoint
Updates a existing StreamingEndpoint.
Azure subscription. creation. will be added to the HTTP request.
702 703 704 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 702 def begin_update_with_http_info(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers:nil) begin_update_async(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers:custom_headers).value! end |
#create(resource_group_name, account_name, streaming_endpoint_name, parameters, auto_start: nil, custom_headers: nil) ⇒ StreamingEndpoint
Create StreamingEndpoint
Creates a StreamingEndpoint.
Azure subscription. creation. automatically started on creation. will be added to the HTTP request.
255 256 257 258 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 255 def create(resource_group_name, account_name, streaming_endpoint_name, parameters, auto_start:nil, custom_headers:nil) response = create_async(resource_group_name, account_name, streaming_endpoint_name, parameters, auto_start:auto_start, custom_headers:custom_headers).value! response.body unless response.nil? end |
#create_async(resource_group_name, account_name, streaming_endpoint_name, parameters, auto_start: nil, custom_headers: nil) ⇒ Concurrent::Promise
Azure subscription. creation. automatically started on creation. will be added to the HTTP request.
response.
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 275 def create_async(resource_group_name, account_name, streaming_endpoint_name, parameters, auto_start:nil, custom_headers:nil) # Send request promise = begin_create_async(resource_group_name, account_name, streaming_endpoint_name, parameters, auto_start:auto_start, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::MediaServices::Mgmt::V2018_07_01::Models::StreamingEndpoint.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#delete(resource_group_name, account_name, streaming_endpoint_name, custom_headers: nil) ⇒ Object
Delete StreamingEndpoint
Deletes a StreamingEndpoint.
Azure subscription. will be added to the HTTP request.
357 358 359 360 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 357 def delete(resource_group_name, account_name, streaming_endpoint_name, custom_headers:nil) response = delete_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:custom_headers).value! nil end |
#delete_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers: nil) ⇒ Concurrent::Promise
Azure subscription. will be added to the HTTP request.
response.
373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 373 def delete_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:nil) # Send request promise = begin_delete_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#get(resource_group_name, account_name, streaming_endpoint_name, custom_headers: nil) ⇒ StreamingEndpoint
Get StreamingEndpoint
Gets a StreamingEndpoint.
Azure subscription. will be added to the HTTP request.
141 142 143 144 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 141 def get(resource_group_name, account_name, streaming_endpoint_name, custom_headers:nil) response = get_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers: nil) ⇒ Concurrent::Promise
Get StreamingEndpoint
Gets a StreamingEndpoint.
Azure subscription. to the HTTP request.
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 178 def get_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'account_name is nil' if account_name.nil? fail ArgumentError, 'streaming_endpoint_name is nil' if streaming_endpoint_name.nil? fail ArgumentError, "'streaming_endpoint_name' should satisfy the constraint - 'MaxLength': '24'" if !streaming_endpoint_name.nil? && streaming_endpoint_name.length > 24 fail ArgumentError, "'streaming_endpoint_name' should satisfy the constraint - 'MinLength': '1'" if !streaming_endpoint_name.nil? && streaming_endpoint_name.length < 1 fail ArgumentError, "'streaming_endpoint_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$'" if !streaming_endpoint_name.nil? && streaming_endpoint_name.match(Regexp.new('^^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$$')).nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints/{streamingEndpointName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'streamingEndpointName' => streaming_endpoint_name}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 404 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::MediaServices::Mgmt::V2018_07_01::Models::StreamingEndpoint.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_with_http_info(resource_group_name, account_name, streaming_endpoint_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get StreamingEndpoint
Gets a StreamingEndpoint.
Azure subscription. will be added to the HTTP request.
160 161 162 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 160 def get_with_http_info(resource_group_name, account_name, streaming_endpoint_name, custom_headers:nil) get_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:custom_headers).value! end |
#list(resource_group_name, account_name, custom_headers: nil) ⇒ Array<StreamingEndpoint>
List StreamingEndpoints
Lists the StreamingEndpoints in the account.
Azure subscription. will be added to the HTTP request.
37 38 39 40 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 37 def list(resource_group_name, account_name, custom_headers:nil) first_page = list_as_lazy(resource_group_name, account_name, custom_headers:custom_headers) first_page.get_all_items end |
#list_as_lazy(resource_group_name, account_name, custom_headers: nil) ⇒ StreamingEndpointListResult
List StreamingEndpoints
Lists the StreamingEndpoints in the account.
Azure subscription. will be added to the HTTP request.
the response.
1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 1319 def list_as_lazy(resource_group_name, account_name, custom_headers:nil) response = list_async(resource_group_name, account_name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#list_async(resource_group_name, account_name, custom_headers: nil) ⇒ Concurrent::Promise
List StreamingEndpoints
Lists the StreamingEndpoints in the account.
Azure subscription. to the HTTP request.
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 72 def list_async(resource_group_name, account_name, custom_headers:nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'account_name is nil' if account_name.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::MediaServices::Mgmt::V2018_07_01::Models::StreamingEndpointListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_next(next_page_link, custom_headers: nil) ⇒ StreamingEndpointListResult
List StreamingEndpoints
Lists the StreamingEndpoints in the account.
to List operation. will be added to the HTTP request.
1221 1222 1223 1224 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 1221 def list_next(next_page_link, custom_headers:nil) response = list_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
List StreamingEndpoints
Lists the StreamingEndpoints in the account.
to List operation. to the HTTP request.
1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 1254 def list_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::MediaServices::Mgmt::V2018_07_01::Models::StreamingEndpointListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
List StreamingEndpoints
Lists the StreamingEndpoints in the account.
to List operation. will be added to the HTTP request.
1238 1239 1240 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 1238 def list_next_with_http_info(next_page_link, custom_headers:nil) list_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_with_http_info(resource_group_name, account_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
List StreamingEndpoints
Lists the StreamingEndpoints in the account.
Azure subscription. will be added to the HTTP request.
55 56 57 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 55 def list_with_http_info(resource_group_name, account_name, custom_headers:nil) list_async(resource_group_name, account_name, custom_headers:custom_headers).value! end |
#scale(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers: nil) ⇒ Object
Scale StreamingEndpoint
Scales an existing StreamingEndpoint.
Azure subscription. parameters will be added to the HTTP request.
491 492 493 494 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 491 def scale(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers:nil) response = scale_async(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers:custom_headers).value! nil end |
#scale_async(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Azure subscription. parameters will be added to the HTTP request.
response.
509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 509 def scale_async(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers:nil) # Send request promise = begin_scale_async(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#start(resource_group_name, account_name, streaming_endpoint_name, custom_headers: nil) ⇒ Object
Start StreamingEndpoint
Starts an existing StreamingEndpoint.
Azure subscription. will be added to the HTTP request.
401 402 403 404 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 401 def start(resource_group_name, account_name, streaming_endpoint_name, custom_headers:nil) response = start_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:custom_headers).value! nil end |
#start_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers: nil) ⇒ Concurrent::Promise
Azure subscription. will be added to the HTTP request.
response.
417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 417 def start_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:nil) # Send request promise = begin_start_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#stop(resource_group_name, account_name, streaming_endpoint_name, custom_headers: nil) ⇒ Object
Stop StreamingEndpoint
Stops an existing StreamingEndpoint.
Azure subscription. will be added to the HTTP request.
445 446 447 448 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 445 def stop(resource_group_name, account_name, streaming_endpoint_name, custom_headers:nil) response = stop_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:custom_headers).value! nil end |
#stop_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers: nil) ⇒ Concurrent::Promise
Azure subscription. will be added to the HTTP request.
response.
461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 461 def stop_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:nil) # Send request promise = begin_stop_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#update(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers: nil) ⇒ StreamingEndpoint
Update StreamingEndpoint
Updates a existing StreamingEndpoint.
Azure subscription. creation. will be added to the HTTP request.
309 310 311 312 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 309 def update(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers:nil) response = update_async(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#update_async(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Azure subscription. creation. will be added to the HTTP request.
response.
327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 |
# File 'lib/2018-07-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 327 def update_async(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers:nil) # Send request promise = begin_update_async(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::MediaServices::Mgmt::V2018_07_01::Models::StreamingEndpoint.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |