Class: Azure::MediaServices::Mgmt::V2020_05_01::StreamingEndpoints

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb

Overview

StreamingEndpoints

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ StreamingEndpoints

Creates and initializes a new instance of the StreamingEndpoints class.



17
18
19
# File 'lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 17

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientAzureMediaServices (readonly)



22
23
24
# File 'lib/2020-05-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 streaming endpoint.

Azure subscription. maximum length is 24. for creation. automatically started on creation. will be added to the HTTP request.



559
560
561
562
# File 'lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 559

def begin_create(resource_group_name, , streaming_endpoint_name, parameters, auto_start:nil, custom_headers:nil)
  response = begin_create_async(resource_group_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 streaming endpoint.

Azure subscription. maximum length is 24. for creation. automatically started on creation. to the HTTP request.



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
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
# File 'lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 606

def begin_create_async(resource_group_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 .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::V2020_05_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

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => ,'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, options)

  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 == 201
      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::V2020_05_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.message, e.backtrace, result)
      end
    end
    # Deserialize Response
    if status_code == 201
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::MediaServices::Mgmt::V2020_05_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.message, 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 streaming endpoint.

Azure subscription. maximum length is 24. for creation. automatically started on creation. will be added to the HTTP request.



583
584
585
# File 'lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 583

def begin_create_with_http_info(resource_group_name, , streaming_endpoint_name, parameters, auto_start:nil, custom_headers:nil)
  begin_create_async(resource_group_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 streaming endpoint.

Azure subscription. maximum length is 24. will be added to the HTTP request.



834
835
836
837
# File 'lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 834

def begin_delete(resource_group_name, , streaming_endpoint_name, custom_headers:nil)
  response = begin_delete_async(resource_group_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 streaming endpoint.

Azure subscription. maximum length is 24. to the HTTP request.



873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
# File 'lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 873

def begin_delete_async(resource_group_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 .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

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => ,'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, options)

  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 streaming endpoint.

Azure subscription. maximum length is 24. will be added to the HTTP request.



854
855
856
# File 'lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 854

def begin_delete_with_http_info(resource_group_name, , streaming_endpoint_name, custom_headers:nil)
  begin_delete_async(resource_group_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 streaming endpoint.

Azure subscription. maximum length is 24. parameters will be added to the HTTP request.



1142
1143
1144
1145
# File 'lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 1142

def begin_scale(resource_group_name, , streaming_endpoint_name, parameters, custom_headers:nil)
  response = begin_scale_async(resource_group_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 streaming endpoint.

Azure subscription. maximum length is 24. parameters to the HTTP request.



1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
# File 'lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 1185

def begin_scale_async(resource_group_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 .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::V2020_05_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

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => ,'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, options)

  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 streaming endpoint.

Azure subscription. maximum length is 24. parameters will be added to the HTTP request.



1164
1165
1166
# File 'lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 1164

def begin_scale_with_http_info(resource_group_name, , streaming_endpoint_name, parameters, custom_headers:nil)
  begin_scale_async(resource_group_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 streaming endpoint.

Azure subscription. maximum length is 24. will be added to the HTTP request.



936
937
938
939
# File 'lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 936

def begin_start(resource_group_name, , streaming_endpoint_name, custom_headers:nil)
  response = begin_start_async(resource_group_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 streaming endpoint.

Azure subscription. maximum length is 24. to the HTTP request.



975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
# File 'lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 975

def begin_start_async(resource_group_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 .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

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => ,'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, options)

  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 streaming endpoint.

Azure subscription. maximum length is 24. will be added to the HTTP request.



956
957
958
# File 'lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 956

def begin_start_with_http_info(resource_group_name, , streaming_endpoint_name, custom_headers:nil)
  begin_start_async(resource_group_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 streaming endpoint.

Azure subscription. maximum length is 24. will be added to the HTTP request.



1038
1039
1040
1041
# File 'lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 1038

def begin_stop(resource_group_name, , streaming_endpoint_name, custom_headers:nil)
  response = begin_stop_async(resource_group_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 streaming endpoint.

Azure subscription. maximum length is 24. to the HTTP request.



1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
# File 'lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 1077

def begin_stop_async(resource_group_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 .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

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => ,'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, options)

  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 streaming endpoint.

Azure subscription. maximum length is 24. will be added to the HTTP request.



1058
1059
1060
# File 'lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 1058

def begin_stop_with_http_info(resource_group_name, , streaming_endpoint_name, custom_headers:nil)
  begin_stop_async(resource_group_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 streaming endpoint.

Azure subscription. maximum length is 24. for creation. will be added to the HTTP request.



700
701
702
703
# File 'lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 700

def begin_update(resource_group_name, , streaming_endpoint_name, parameters, custom_headers:nil)
  response = begin_update_async(resource_group_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 streaming endpoint.

Azure subscription. maximum length is 24. for creation. to the HTTP request.



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
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
# File 'lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 743

def begin_update_async(resource_group_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 .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::V2020_05_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

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => ,'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, options)

  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::V2020_05_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.message, 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::V2020_05_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.message, 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 streaming endpoint.

Azure subscription. maximum length is 24. for creation. will be added to the HTTP request.



722
723
724
# File 'lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 722

def begin_update_with_http_info(resource_group_name, , streaming_endpoint_name, parameters, custom_headers:nil)
  begin_update_async(resource_group_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 streaming endpoint.

Azure subscription. maximum length is 24. for creation. automatically started on creation. will be added to the HTTP request.



259
260
261
262
# File 'lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 259

def create(resource_group_name, , streaming_endpoint_name, parameters, auto_start:nil, custom_headers:nil)
  response = create_async(resource_group_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. maximum length is 24. for creation. automatically started on creation. will be added to the HTTP request.

response.



280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
# File 'lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 280

def create_async(resource_group_name, , streaming_endpoint_name, parameters, auto_start:nil, custom_headers:nil)
  # Send request
  promise = begin_create_async(resource_group_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::V2020_05_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 streaming endpoint.

Azure subscription. maximum length is 24. will be added to the HTTP request.



365
366
367
368
# File 'lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 365

def delete(resource_group_name, , streaming_endpoint_name, custom_headers:nil)
  response = delete_async(resource_group_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. maximum length is 24. will be added to the HTTP request.

response.



382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
# File 'lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 382

def delete_async(resource_group_name, , streaming_endpoint_name, custom_headers:nil)
  # Send request
  promise = begin_delete_async(resource_group_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 streaming endpoint.

Azure subscription. maximum length is 24. will be added to the HTTP request.



142
143
144
145
# File 'lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 142

def get(resource_group_name, , streaming_endpoint_name, custom_headers:nil)
  response = get_async(resource_group_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 streaming endpoint.

Azure subscription. maximum length is 24. to the HTTP request.



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
236
237
238
# File 'lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 181

def get_async(resource_group_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 .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

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => ,'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, options)

  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::V2020_05_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.message, 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 streaming endpoint.

Azure subscription. maximum length is 24. will be added to the HTTP request.



162
163
164
# File 'lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 162

def get_with_http_info(resource_group_name, , streaming_endpoint_name, custom_headers:nil)
  get_async(resource_group_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 streaming endpoints in the account.

Azure subscription. will be added to the HTTP request.



37
38
39
40
# File 'lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 37

def list(resource_group_name, , custom_headers:nil)
  first_page = list_as_lazy(resource_group_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 streaming endpoints in the account.

Azure subscription. will be added to the HTTP request.

the response.



1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
# File 'lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 1352

def list_as_lazy(resource_group_name, , custom_headers:nil)
  response = list_async(resource_group_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 streaming endpoints 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/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 72

def list_async(resource_group_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 .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

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => },
      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, options)

  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::V2020_05_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.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_next(next_page_link, custom_headers: nil) ⇒ StreamingEndpointListResult

List StreamingEndpoints

Lists the streaming endpoints in the account.

to List operation. will be added to the HTTP request.



1254
1255
1256
1257
# File 'lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 1254

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 streaming endpoints in the account.

to List operation. to the HTTP request.



1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
# File 'lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 1287

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

  options = {
      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, options)

  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::V2020_05_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.message, 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 streaming endpoints in the account.

to List operation. will be added to the HTTP request.



1271
1272
1273
# File 'lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 1271

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 streaming endpoints in the account.

Azure subscription. will be added to the HTTP request.



55
56
57
# File 'lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 55

def list_with_http_info(resource_group_name, , custom_headers:nil)
  list_async(resource_group_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 streaming endpoint.

Azure subscription. maximum length is 24. parameters will be added to the HTTP request.



505
506
507
508
# File 'lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 505

def scale(resource_group_name, , streaming_endpoint_name, parameters, custom_headers:nil)
  response = scale_async(resource_group_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. maximum length is 24. parameters will be added to the HTTP request.

response.



524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
# File 'lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 524

def scale_async(resource_group_name, , streaming_endpoint_name, parameters, custom_headers:nil)
  # Send request
  promise = begin_scale_async(resource_group_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 streaming endpoint.

Azure subscription. maximum length is 24. will be added to the HTTP request.



411
412
413
414
# File 'lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 411

def start(resource_group_name, , streaming_endpoint_name, custom_headers:nil)
  response = start_async(resource_group_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. maximum length is 24. will be added to the HTTP request.

response.



428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
# File 'lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 428

def start_async(resource_group_name, , streaming_endpoint_name, custom_headers:nil)
  # Send request
  promise = begin_start_async(resource_group_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 streaming endpoint.

Azure subscription. maximum length is 24. will be added to the HTTP request.



457
458
459
460
# File 'lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 457

def stop(resource_group_name, , streaming_endpoint_name, custom_headers:nil)
  response = stop_async(resource_group_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. maximum length is 24. will be added to the HTTP request.

response.



474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
# File 'lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 474

def stop_async(resource_group_name, , streaming_endpoint_name, custom_headers:nil)
  # Send request
  promise = begin_stop_async(resource_group_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 streaming endpoint.

Azure subscription. maximum length is 24. for creation. will be added to the HTTP request.



315
316
317
318
# File 'lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 315

def update(resource_group_name, , streaming_endpoint_name, parameters, custom_headers:nil)
  response = update_async(resource_group_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. maximum length is 24. for creation. will be added to the HTTP request.

response.



334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
# File 'lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb', line 334

def update_async(resource_group_name, , streaming_endpoint_name, parameters, custom_headers:nil)
  # Send request
  promise = begin_update_async(resource_group_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::V2020_05_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