azure_mgmt_signalr 0.17.4 → 0.17.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/2018-03-01-preview/generated/azure_mgmt_signalr/signal_r.rb +11 -1
- data/lib/2018-03-01-preview/generated/azure_mgmt_signalr/signal_rmanagement_client.rb +1 -1
- data/lib/2018-10-01/generated/azure_mgmt_signalr.rb +13 -9
- data/lib/2018-10-01/generated/azure_mgmt_signalr/models/error_response.rb +48 -0
- data/lib/2018-10-01/generated/azure_mgmt_signalr/models/error_response_body.rb +93 -0
- data/lib/2018-10-01/generated/azure_mgmt_signalr/models/feature_flags.rb +16 -0
- data/lib/2018-10-01/generated/azure_mgmt_signalr/models/log_specification.rb +57 -0
- data/lib/2018-10-01/generated/azure_mgmt_signalr/models/service_specification.rb +21 -0
- data/lib/2018-10-01/generated/azure_mgmt_signalr/models/signal_rfeature.rb +12 -6
- data/lib/2018-10-01/generated/azure_mgmt_signalr/operations.rb +2 -2
- data/lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb +23 -13
- data/lib/2018-10-01/generated/azure_mgmt_signalr/signal_rmanagement_client.rb +1 -1
- data/lib/2018-10-01/generated/azure_mgmt_signalr/usages.rb +2 -2
- data/lib/2020-05-01/generated/azure_mgmt_signalr.rb +76 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/aclaction.rb +16 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/dimension.rb +80 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/error_response.rb +48 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/error_response_body.rb +93 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/feature_flags.rb +17 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/key_type.rb +16 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/log_specification.rb +57 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/metric_specification.rb +139 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/name_availability.rb +70 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/name_availability_parameters.rb +59 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/network_acl.rb +75 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/operation.rb +96 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/operation_display.rb +79 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/operation_list.rb +102 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/operation_properties.rb +47 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/private_endpoint.rb +46 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/private_endpoint_acl.rb +78 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/private_endpoint_connection.rb +101 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/private_link_resource.rb +111 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/private_link_resource_list.rb +102 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/private_link_service_connection_state.rb +72 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/private_link_service_connection_status.rb +18 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/provisioning_state.rb +23 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/proxy_resource.rb +63 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/regenerate_key_parameters.rb +48 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/resource.rb +81 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/resource_sku.rb +101 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/serverless_upstream_settings.rb +58 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/service_kind.rb +16 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/service_specification.rb +77 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/signal_rcors_settings.rb +57 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/signal_rcreate_or_update_properties.rb +117 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/signal_rfeature.rb +93 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/signal_rkeys.rb +81 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/signal_rnetwork_acls.rb +80 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/signal_rrequest_type.rb +17 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/signal_rresource.rb +294 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/signal_rresource_list.rb +101 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/signal_rsku_tier.rb +18 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/signal_rusage.rb +95 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/signal_rusage_list.rb +101 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/signal_rusage_name.rb +57 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/tracked_resource.rb +94 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/models/upstream_template.rb +109 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/module_definition.rb +9 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/operations.rb +225 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/signal_r.rb +1493 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/signal_rmanagement_client.rb +150 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/signal_rprivate_endpoint_connections.rb +404 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/signal_rprivate_link_resources.rb +246 -0
- data/lib/2020-05-01/generated/azure_mgmt_signalr/usages.rb +226 -0
- data/lib/azure_mgmt_signalr.rb +1 -0
- data/lib/profiles/latest/modules/signalr_profile_module.rb +143 -71
- data/lib/version.rb +1 -1
- metadata +60 -4
@@ -0,0 +1,150 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::Signalr::Mgmt::V2020_05_01
|
7
|
+
#
|
8
|
+
# A service client - single point of access to the REST API.
|
9
|
+
#
|
10
|
+
class SignalRManagementClient < MsRestAzure::AzureServiceClient
|
11
|
+
include MsRestAzure
|
12
|
+
include MsRestAzure::Serialization
|
13
|
+
|
14
|
+
# @return [String] the base URI of the service.
|
15
|
+
attr_accessor :base_url
|
16
|
+
|
17
|
+
# @return Credentials needed for the client to connect to Azure.
|
18
|
+
attr_reader :credentials
|
19
|
+
|
20
|
+
# @return [String] Client Api Version.
|
21
|
+
attr_reader :api_version
|
22
|
+
|
23
|
+
# @return [String] Gets subscription Id which uniquely identify the
|
24
|
+
# Microsoft Azure subscription. The subscription ID forms part of the URI
|
25
|
+
# for every service call.
|
26
|
+
attr_accessor :subscription_id
|
27
|
+
|
28
|
+
# @return [String] The preferred language for the response.
|
29
|
+
attr_accessor :accept_language
|
30
|
+
|
31
|
+
# @return [Integer] The retry timeout in seconds for Long Running
|
32
|
+
# Operations. Default value is 30.
|
33
|
+
attr_accessor :long_running_operation_retry_timeout
|
34
|
+
|
35
|
+
# @return [Boolean] Whether a unique x-ms-client-request-id should be
|
36
|
+
# generated. When set to true a unique x-ms-client-request-id value is
|
37
|
+
# generated and included in each request. Default is true.
|
38
|
+
attr_accessor :generate_client_request_id
|
39
|
+
|
40
|
+
# @return [Operations] operations
|
41
|
+
attr_reader :operations
|
42
|
+
|
43
|
+
# @return [SignalR] signal_r
|
44
|
+
attr_reader :signal_r
|
45
|
+
|
46
|
+
# @return [SignalRPrivateEndpointConnections]
|
47
|
+
# signal_rprivate_endpoint_connections
|
48
|
+
attr_reader :signal_rprivate_endpoint_connections
|
49
|
+
|
50
|
+
# @return [SignalRPrivateLinkResources] signal_rprivate_link_resources
|
51
|
+
attr_reader :signal_rprivate_link_resources
|
52
|
+
|
53
|
+
# @return [Usages] usages
|
54
|
+
attr_reader :usages
|
55
|
+
|
56
|
+
#
|
57
|
+
# Creates initializes a new instance of the SignalRManagementClient class.
|
58
|
+
# @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
|
59
|
+
# @param base_url [String] the base URI of the service.
|
60
|
+
# @param options [Array] filters to be applied to the HTTP requests.
|
61
|
+
#
|
62
|
+
def initialize(credentials = nil, base_url = nil, options = nil)
|
63
|
+
super(credentials, options)
|
64
|
+
@base_url = base_url || 'https://management.azure.com'
|
65
|
+
|
66
|
+
fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
|
67
|
+
@credentials = credentials
|
68
|
+
|
69
|
+
@operations = Operations.new(self)
|
70
|
+
@signal_r = SignalR.new(self)
|
71
|
+
@signal_rprivate_endpoint_connections = SignalRPrivateEndpointConnections.new(self)
|
72
|
+
@signal_rprivate_link_resources = SignalRPrivateLinkResources.new(self)
|
73
|
+
@usages = Usages.new(self)
|
74
|
+
@api_version = '2020-05-01'
|
75
|
+
@accept_language = 'en-US'
|
76
|
+
@long_running_operation_retry_timeout = 30
|
77
|
+
@generate_client_request_id = true
|
78
|
+
add_telemetry
|
79
|
+
end
|
80
|
+
|
81
|
+
#
|
82
|
+
# Makes a request and returns the body of the response.
|
83
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
84
|
+
# @param path [String] the path, relative to {base_url}.
|
85
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
86
|
+
# @return [Hash{String=>String}] containing the body of the response.
|
87
|
+
# Example:
|
88
|
+
#
|
89
|
+
# request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
|
90
|
+
# path = "/path"
|
91
|
+
# options = {
|
92
|
+
# body: request_content,
|
93
|
+
# query_params: {'api-version' => '2016-02-01'}
|
94
|
+
# }
|
95
|
+
# result = @client.make_request(:put, path, options)
|
96
|
+
#
|
97
|
+
def make_request(method, path, options = {})
|
98
|
+
result = make_request_with_http_info(method, path, options)
|
99
|
+
result.body unless result.nil?
|
100
|
+
end
|
101
|
+
|
102
|
+
#
|
103
|
+
# Makes a request and returns the operation response.
|
104
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
105
|
+
# @param path [String] the path, relative to {base_url}.
|
106
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
107
|
+
# @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
|
108
|
+
#
|
109
|
+
def make_request_with_http_info(method, path, options = {})
|
110
|
+
result = make_request_async(method, path, options).value!
|
111
|
+
result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
|
112
|
+
result
|
113
|
+
end
|
114
|
+
|
115
|
+
#
|
116
|
+
# Makes a request asynchronously.
|
117
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
118
|
+
# @param path [String] the path, relative to {base_url}.
|
119
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
120
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
121
|
+
#
|
122
|
+
def make_request_async(method, path, options = {})
|
123
|
+
fail ArgumentError, 'method is nil' if method.nil?
|
124
|
+
fail ArgumentError, 'path is nil' if path.nil?
|
125
|
+
|
126
|
+
request_url = options[:base_url] || @base_url
|
127
|
+
if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
|
128
|
+
@request_headers['Content-Type'] = options[:headers]['Content-Type']
|
129
|
+
end
|
130
|
+
|
131
|
+
request_headers = @request_headers
|
132
|
+
request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
|
133
|
+
options.merge!({headers: request_headers.merge(options[:headers] || {})})
|
134
|
+
options.merge!({credentials: @credentials}) unless @credentials.nil?
|
135
|
+
|
136
|
+
super(request_url, method, path, options)
|
137
|
+
end
|
138
|
+
|
139
|
+
|
140
|
+
private
|
141
|
+
#
|
142
|
+
# Adds telemetry information.
|
143
|
+
#
|
144
|
+
def add_telemetry
|
145
|
+
sdk_information = 'azure_mgmt_signalr'
|
146
|
+
sdk_information = "#{sdk_information}/0.17.5"
|
147
|
+
add_user_agent_information(sdk_information)
|
148
|
+
end
|
149
|
+
end
|
150
|
+
end
|
@@ -0,0 +1,404 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::Signalr::Mgmt::V2020_05_01
|
7
|
+
#
|
8
|
+
# REST API for Azure SignalR Service
|
9
|
+
#
|
10
|
+
class SignalRPrivateEndpointConnections
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the SignalRPrivateEndpointConnections class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [SignalRManagementClient] reference to the SignalRManagementClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Get the specified private endpoint connection associated with a SignalR
|
26
|
+
# resource.
|
27
|
+
#
|
28
|
+
# @param private_endpoint_connection_name [String] The name of the private
|
29
|
+
# endpoint connection associated with the SignalR resource.
|
30
|
+
# @param resource_group_name [String] The name of the resource group that
|
31
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
32
|
+
# Manager API or the portal.
|
33
|
+
# @param resource_name [String] The name of the SignalR resource.
|
34
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
35
|
+
# will be added to the HTTP request.
|
36
|
+
#
|
37
|
+
# @return [PrivateEndpointConnection] operation results.
|
38
|
+
#
|
39
|
+
def get(private_endpoint_connection_name, resource_group_name, resource_name, custom_headers:nil)
|
40
|
+
response = get_async(private_endpoint_connection_name, resource_group_name, resource_name, custom_headers:custom_headers).value!
|
41
|
+
response.body unless response.nil?
|
42
|
+
end
|
43
|
+
|
44
|
+
#
|
45
|
+
# Get the specified private endpoint connection associated with a SignalR
|
46
|
+
# resource.
|
47
|
+
#
|
48
|
+
# @param private_endpoint_connection_name [String] The name of the private
|
49
|
+
# endpoint connection associated with the SignalR resource.
|
50
|
+
# @param resource_group_name [String] The name of the resource group that
|
51
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
52
|
+
# Manager API or the portal.
|
53
|
+
# @param resource_name [String] The name of the SignalR resource.
|
54
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
55
|
+
# will be added to the HTTP request.
|
56
|
+
#
|
57
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
58
|
+
#
|
59
|
+
def get_with_http_info(private_endpoint_connection_name, resource_group_name, resource_name, custom_headers:nil)
|
60
|
+
get_async(private_endpoint_connection_name, resource_group_name, resource_name, custom_headers:custom_headers).value!
|
61
|
+
end
|
62
|
+
|
63
|
+
#
|
64
|
+
# Get the specified private endpoint connection associated with a SignalR
|
65
|
+
# resource.
|
66
|
+
#
|
67
|
+
# @param private_endpoint_connection_name [String] The name of the private
|
68
|
+
# endpoint connection associated with the SignalR resource.
|
69
|
+
# @param resource_group_name [String] The name of the resource group that
|
70
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
71
|
+
# Manager API or the portal.
|
72
|
+
# @param resource_name [String] The name of the SignalR resource.
|
73
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
74
|
+
# to the HTTP request.
|
75
|
+
#
|
76
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
77
|
+
#
|
78
|
+
def get_async(private_endpoint_connection_name, resource_group_name, resource_name, custom_headers:nil)
|
79
|
+
fail ArgumentError, 'private_endpoint_connection_name is nil' if private_endpoint_connection_name.nil?
|
80
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
81
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
82
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
83
|
+
fail ArgumentError, 'resource_name is nil' if resource_name.nil?
|
84
|
+
|
85
|
+
|
86
|
+
request_headers = {}
|
87
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
88
|
+
|
89
|
+
# Set Headers
|
90
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
91
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
92
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'
|
93
|
+
|
94
|
+
request_url = @base_url || @client.base_url
|
95
|
+
|
96
|
+
options = {
|
97
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
98
|
+
path_params: {'privateEndpointConnectionName' => private_endpoint_connection_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name},
|
99
|
+
query_params: {'api-version' => @client.api_version},
|
100
|
+
headers: request_headers.merge(custom_headers || {}),
|
101
|
+
base_url: request_url
|
102
|
+
}
|
103
|
+
promise = @client.make_request_async(:get, path_template, options)
|
104
|
+
|
105
|
+
promise = promise.then do |result|
|
106
|
+
http_response = result.response
|
107
|
+
status_code = http_response.status
|
108
|
+
response_content = http_response.body
|
109
|
+
unless status_code == 200
|
110
|
+
error_model = JSON.load(response_content)
|
111
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
112
|
+
end
|
113
|
+
|
114
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
115
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
116
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
117
|
+
# Deserialize Response
|
118
|
+
if status_code == 200
|
119
|
+
begin
|
120
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
121
|
+
result_mapper = Azure::Signalr::Mgmt::V2020_05_01::Models::PrivateEndpointConnection.mapper()
|
122
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
123
|
+
rescue Exception => e
|
124
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
result
|
129
|
+
end
|
130
|
+
|
131
|
+
promise.execute
|
132
|
+
end
|
133
|
+
|
134
|
+
#
|
135
|
+
# Update the state of specified private endpoint connection associated with a
|
136
|
+
# SignalR resource.
|
137
|
+
#
|
138
|
+
# @param private_endpoint_connection_name [String] The name of the private
|
139
|
+
# endpoint connection associated with the SignalR resource.
|
140
|
+
# @param resource_group_name [String] The name of the resource group that
|
141
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
142
|
+
# Manager API or the portal.
|
143
|
+
# @param resource_name [String] The name of the SignalR resource.
|
144
|
+
# @param parameters [PrivateEndpointConnection] The resource of private
|
145
|
+
# endpoint and its properties.
|
146
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
147
|
+
# will be added to the HTTP request.
|
148
|
+
#
|
149
|
+
# @return [PrivateEndpointConnection] operation results.
|
150
|
+
#
|
151
|
+
def update(private_endpoint_connection_name, resource_group_name, resource_name, parameters:nil, custom_headers:nil)
|
152
|
+
response = update_async(private_endpoint_connection_name, resource_group_name, resource_name, parameters:parameters, custom_headers:custom_headers).value!
|
153
|
+
response.body unless response.nil?
|
154
|
+
end
|
155
|
+
|
156
|
+
#
|
157
|
+
# Update the state of specified private endpoint connection associated with a
|
158
|
+
# SignalR resource.
|
159
|
+
#
|
160
|
+
# @param private_endpoint_connection_name [String] The name of the private
|
161
|
+
# endpoint connection associated with the SignalR resource.
|
162
|
+
# @param resource_group_name [String] The name of the resource group that
|
163
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
164
|
+
# Manager API or the portal.
|
165
|
+
# @param resource_name [String] The name of the SignalR resource.
|
166
|
+
# @param parameters [PrivateEndpointConnection] The resource of private
|
167
|
+
# endpoint and its properties.
|
168
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
169
|
+
# will be added to the HTTP request.
|
170
|
+
#
|
171
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
172
|
+
#
|
173
|
+
def update_with_http_info(private_endpoint_connection_name, resource_group_name, resource_name, parameters:nil, custom_headers:nil)
|
174
|
+
update_async(private_endpoint_connection_name, resource_group_name, resource_name, parameters:parameters, custom_headers:custom_headers).value!
|
175
|
+
end
|
176
|
+
|
177
|
+
#
|
178
|
+
# Update the state of specified private endpoint connection associated with a
|
179
|
+
# SignalR resource.
|
180
|
+
#
|
181
|
+
# @param private_endpoint_connection_name [String] The name of the private
|
182
|
+
# endpoint connection associated with the SignalR resource.
|
183
|
+
# @param resource_group_name [String] The name of the resource group that
|
184
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
185
|
+
# Manager API or the portal.
|
186
|
+
# @param resource_name [String] The name of the SignalR resource.
|
187
|
+
# @param parameters [PrivateEndpointConnection] The resource of private
|
188
|
+
# endpoint and its properties.
|
189
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
190
|
+
# to the HTTP request.
|
191
|
+
#
|
192
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
193
|
+
#
|
194
|
+
def update_async(private_endpoint_connection_name, resource_group_name, resource_name, parameters:nil, custom_headers:nil)
|
195
|
+
fail ArgumentError, 'private_endpoint_connection_name is nil' if private_endpoint_connection_name.nil?
|
196
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
197
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
198
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
199
|
+
fail ArgumentError, 'resource_name is nil' if resource_name.nil?
|
200
|
+
|
201
|
+
|
202
|
+
request_headers = {}
|
203
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
204
|
+
|
205
|
+
# Set Headers
|
206
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
207
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
208
|
+
|
209
|
+
# Serialize Request
|
210
|
+
request_mapper = Azure::Signalr::Mgmt::V2020_05_01::Models::PrivateEndpointConnection.mapper()
|
211
|
+
request_content = @client.serialize(request_mapper, parameters)
|
212
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
213
|
+
|
214
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'
|
215
|
+
|
216
|
+
request_url = @base_url || @client.base_url
|
217
|
+
|
218
|
+
options = {
|
219
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
220
|
+
path_params: {'privateEndpointConnectionName' => private_endpoint_connection_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name},
|
221
|
+
query_params: {'api-version' => @client.api_version},
|
222
|
+
body: request_content,
|
223
|
+
headers: request_headers.merge(custom_headers || {}),
|
224
|
+
base_url: request_url
|
225
|
+
}
|
226
|
+
promise = @client.make_request_async(:put, path_template, options)
|
227
|
+
|
228
|
+
promise = promise.then do |result|
|
229
|
+
http_response = result.response
|
230
|
+
status_code = http_response.status
|
231
|
+
response_content = http_response.body
|
232
|
+
unless status_code == 200
|
233
|
+
error_model = JSON.load(response_content)
|
234
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
235
|
+
end
|
236
|
+
|
237
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
238
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
239
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
240
|
+
# Deserialize Response
|
241
|
+
if status_code == 200
|
242
|
+
begin
|
243
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
244
|
+
result_mapper = Azure::Signalr::Mgmt::V2020_05_01::Models::PrivateEndpointConnection.mapper()
|
245
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
246
|
+
rescue Exception => e
|
247
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
248
|
+
end
|
249
|
+
end
|
250
|
+
|
251
|
+
result
|
252
|
+
end
|
253
|
+
|
254
|
+
promise.execute
|
255
|
+
end
|
256
|
+
|
257
|
+
#
|
258
|
+
# Delete the specified private endpoint connection associated with a SignalR
|
259
|
+
# resource.
|
260
|
+
#
|
261
|
+
# @param private_endpoint_connection_name [String] The name of the private
|
262
|
+
# endpoint connection associated with the SignalR resource.
|
263
|
+
# @param resource_group_name [String] The name of the resource group that
|
264
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
265
|
+
# Manager API or the portal.
|
266
|
+
# @param resource_name [String] The name of the SignalR resource.
|
267
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
268
|
+
# will be added to the HTTP request.
|
269
|
+
#
|
270
|
+
def delete(private_endpoint_connection_name, resource_group_name, resource_name, custom_headers:nil)
|
271
|
+
response = delete_async(private_endpoint_connection_name, resource_group_name, resource_name, custom_headers:custom_headers).value!
|
272
|
+
nil
|
273
|
+
end
|
274
|
+
|
275
|
+
#
|
276
|
+
# @param private_endpoint_connection_name [String] The name of the private
|
277
|
+
# endpoint connection associated with the SignalR resource.
|
278
|
+
# @param resource_group_name [String] The name of the resource group that
|
279
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
280
|
+
# Manager API or the portal.
|
281
|
+
# @param resource_name [String] The name of the SignalR resource.
|
282
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
283
|
+
# will be added to the HTTP request.
|
284
|
+
#
|
285
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
286
|
+
# response.
|
287
|
+
#
|
288
|
+
def delete_async(private_endpoint_connection_name, resource_group_name, resource_name, custom_headers:nil)
|
289
|
+
# Send request
|
290
|
+
promise = begin_delete_async(private_endpoint_connection_name, resource_group_name, resource_name, custom_headers:custom_headers)
|
291
|
+
|
292
|
+
promise = promise.then do |response|
|
293
|
+
# Defining deserialization method.
|
294
|
+
deserialize_method = lambda do |parsed_response|
|
295
|
+
end
|
296
|
+
|
297
|
+
# Waiting for response.
|
298
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
299
|
+
end
|
300
|
+
|
301
|
+
promise
|
302
|
+
end
|
303
|
+
|
304
|
+
#
|
305
|
+
# Delete the specified private endpoint connection associated with a SignalR
|
306
|
+
# resource.
|
307
|
+
#
|
308
|
+
# @param private_endpoint_connection_name [String] The name of the private
|
309
|
+
# endpoint connection associated with the SignalR resource.
|
310
|
+
# @param resource_group_name [String] The name of the resource group that
|
311
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
312
|
+
# Manager API or the portal.
|
313
|
+
# @param resource_name [String] The name of the SignalR resource.
|
314
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
315
|
+
# will be added to the HTTP request.
|
316
|
+
#
|
317
|
+
#
|
318
|
+
def begin_delete(private_endpoint_connection_name, resource_group_name, resource_name, custom_headers:nil)
|
319
|
+
response = begin_delete_async(private_endpoint_connection_name, resource_group_name, resource_name, custom_headers:custom_headers).value!
|
320
|
+
nil
|
321
|
+
end
|
322
|
+
|
323
|
+
#
|
324
|
+
# Delete the specified private endpoint connection associated with a SignalR
|
325
|
+
# resource.
|
326
|
+
#
|
327
|
+
# @param private_endpoint_connection_name [String] The name of the private
|
328
|
+
# endpoint connection associated with the SignalR resource.
|
329
|
+
# @param resource_group_name [String] The name of the resource group that
|
330
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
331
|
+
# Manager API or the portal.
|
332
|
+
# @param resource_name [String] The name of the SignalR resource.
|
333
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
334
|
+
# will be added to the HTTP request.
|
335
|
+
#
|
336
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
337
|
+
#
|
338
|
+
def begin_delete_with_http_info(private_endpoint_connection_name, resource_group_name, resource_name, custom_headers:nil)
|
339
|
+
begin_delete_async(private_endpoint_connection_name, resource_group_name, resource_name, custom_headers:custom_headers).value!
|
340
|
+
end
|
341
|
+
|
342
|
+
#
|
343
|
+
# Delete the specified private endpoint connection associated with a SignalR
|
344
|
+
# resource.
|
345
|
+
#
|
346
|
+
# @param private_endpoint_connection_name [String] The name of the private
|
347
|
+
# endpoint connection associated with the SignalR resource.
|
348
|
+
# @param resource_group_name [String] The name of the resource group that
|
349
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
350
|
+
# Manager API or the portal.
|
351
|
+
# @param resource_name [String] The name of the SignalR resource.
|
352
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
353
|
+
# to the HTTP request.
|
354
|
+
#
|
355
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
356
|
+
#
|
357
|
+
def begin_delete_async(private_endpoint_connection_name, resource_group_name, resource_name, custom_headers:nil)
|
358
|
+
fail ArgumentError, 'private_endpoint_connection_name is nil' if private_endpoint_connection_name.nil?
|
359
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
360
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
361
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
362
|
+
fail ArgumentError, 'resource_name is nil' if resource_name.nil?
|
363
|
+
|
364
|
+
|
365
|
+
request_headers = {}
|
366
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
367
|
+
|
368
|
+
# Set Headers
|
369
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
370
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
371
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'
|
372
|
+
|
373
|
+
request_url = @base_url || @client.base_url
|
374
|
+
|
375
|
+
options = {
|
376
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
377
|
+
path_params: {'privateEndpointConnectionName' => private_endpoint_connection_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name},
|
378
|
+
query_params: {'api-version' => @client.api_version},
|
379
|
+
headers: request_headers.merge(custom_headers || {}),
|
380
|
+
base_url: request_url
|
381
|
+
}
|
382
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
383
|
+
|
384
|
+
promise = promise.then do |result|
|
385
|
+
http_response = result.response
|
386
|
+
status_code = http_response.status
|
387
|
+
response_content = http_response.body
|
388
|
+
unless status_code == 202 || status_code == 204
|
389
|
+
error_model = JSON.load(response_content)
|
390
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
391
|
+
end
|
392
|
+
|
393
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
394
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
395
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
396
|
+
|
397
|
+
result
|
398
|
+
end
|
399
|
+
|
400
|
+
promise.execute
|
401
|
+
end
|
402
|
+
|
403
|
+
end
|
404
|
+
end
|