Class: Azure::MediaServices::Mgmt::V2018_03_30_preview::StreamingEndpoints
- Inherits:
-
Object
- Object
- Azure::MediaServices::Mgmt::V2018_03_30_preview::StreamingEndpoints
- Includes:
- MsRestAzure
- Defined in:
- lib/2018-03-30-preview/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-03-30-preview/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-03-30-preview/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. will be added to the HTTP request.
540 541 542 543 |
# File 'lib/2018-03-30-preview/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 540 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. to the HTTP request.
583 584 585 586 587 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 |
# File 'lib/2018-03-30-preview/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 583 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_03_30_preview::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_03_30_preview::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_03_30_preview::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. will be added to the HTTP request.
562 563 564 |
# File 'lib/2018-03-30-preview/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 562 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.
807 808 809 810 |
# File 'lib/2018-03-30-preview/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 807 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.
844 845 846 847 848 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 |
# File 'lib/2018-03-30-preview/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 844 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.
826 827 828 |
# File 'lib/2018-03-30-preview/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 826 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.
1106 1107 1108 1109 |
# File 'lib/2018-03-30-preview/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 1106 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.
1147 1148 1149 1150 1151 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 |
# File 'lib/2018-03-30-preview/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 1147 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_03_30_preview::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.
1127 1128 1129 |
# File 'lib/2018-03-30-preview/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 1127 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.
906 907 908 909 |
# File 'lib/2018-03-30-preview/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 906 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.
943 944 945 946 947 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 |
# File 'lib/2018-03-30-preview/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 943 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.
925 926 927 |
# File 'lib/2018-03-30-preview/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 925 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.
1005 1006 1007 1008 |
# File 'lib/2018-03-30-preview/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 1005 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.
1042 1043 1044 1045 1046 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 |
# File 'lib/2018-03-30-preview/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 1042 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.
1024 1025 1026 |
# File 'lib/2018-03-30-preview/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 1024 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.
676 677 678 679 |
# File 'lib/2018-03-30-preview/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 676 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.
717 718 719 720 721 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 |
# File 'lib/2018-03-30-preview/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 717 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_03_30_preview::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_03_30_preview::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_03_30_preview::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.
697 698 699 |
# File 'lib/2018-03-30-preview/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 697 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. will be added to the HTTP request.
254 255 256 257 |
# File 'lib/2018-03-30-preview/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 254 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. will be added to the HTTP request.
response.
273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 |
# File 'lib/2018-03-30-preview/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 273 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_03_30_preview::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.
355 356 357 358 |
# File 'lib/2018-03-30-preview/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 355 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.
371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 |
# File 'lib/2018-03-30-preview/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 371 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-03-30-preview/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-03-30-preview/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_03_30_preview::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-03-30-preview/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-03-30-preview/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.
1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 |
# File 'lib/2018-03-30-preview/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 1314 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-03-30-preview/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_03_30_preview::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.
1216 1217 1218 1219 |
# File 'lib/2018-03-30-preview/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 1216 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.
1249 1250 1251 1252 1253 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 |
# File 'lib/2018-03-30-preview/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 1249 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_03_30_preview::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.
1233 1234 1235 |
# File 'lib/2018-03-30-preview/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 1233 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-03-30-preview/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.
489 490 491 492 |
# File 'lib/2018-03-30-preview/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 489 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.
507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 |
# File 'lib/2018-03-30-preview/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 507 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.
399 400 401 402 |
# File 'lib/2018-03-30-preview/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 399 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.
415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 |
# File 'lib/2018-03-30-preview/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 415 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.
443 444 445 446 |
# File 'lib/2018-03-30-preview/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 443 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.
459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 |
# File 'lib/2018-03-30-preview/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 459 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.
307 308 309 310 |
# File 'lib/2018-03-30-preview/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 307 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.
325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 |
# File 'lib/2018-03-30-preview/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 325 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_03_30_preview::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 |